01 2021 档案
摘要:https://gitee.com/eric167/shio-small
阅读全文
摘要:<!--components/Tabs/Tabs.wxml--> <view class="tabs"> <view class="tabs_title"> <view wx:for="{{tabs}}" wx:key="id" class="title_item {{item.isActive ?
阅读全文
摘要:<!--pages/feedback/index.wxml--> <Tabs tabs="{{tabs}}" bindtabsItemChange="handleTabsItemChange"> <view class="fb_main"> <view class="fb_title">问题的种类<
阅读全文
摘要:<view class="search_row"> <input value="{{inputValue}}" placeholder="请输入你要搜索的商品" bindinput="handleInput"> </input> <button class="search_btn" bindtap=
阅读全文
摘要:import regeneratorRuntime from "../../lib/runtime/runtime.js"; /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under
阅读全文
摘要:// pages/cart/index.js import {getSetting,chooseAddress,openSetting} from '../../utils/asyncWx.js' import regeneratorRuntime from "../../lib/runtime/r
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
摘要:// let title = document.querySelector('#title') as HTMLHeadElement // console.log(title.innerText) // // title.innerText = '666' // // console.log(tit
阅读全文
摘要:<view class="btm_tool"> <view class="tool_item"> <view class="iconfont icon-kefu"></view> <view> 联系客服 </view> <button open-type="contact"></button> </
阅读全文
摘要:// 点击轮播图 放大预览 handlePrevewImage(e){ // 1 先构造要预览的图片数组 const urls = this.GoodsInfo.pics.map(v=>v.pics_mid) // 2 接收传递过来的图片url const current = e.currentTa
阅读全文
摘要:// 同时发送的异步代码的次数 let ajaxTimes = 0; export const request=(params)=>{ ajaxTimes++; // 显示加载中效果 wx.showLoading({ title: "加载中", mask: true }); // 定义公共的url
阅读全文
摘要:"enablePullDownRefresh": true, "backgroundTextStyle":"dark" /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { console.log('下拉刷新') //1 重置数
阅读全文
摘要:// pages/goods_list/index.js import {request} from "../../request/index.js" import regeneratorRuntime from "../../lib/runtime/runtime.js"; Page({ /**
阅读全文
摘要:{ display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp:2; // 显示2行 }
阅读全文
摘要:names[names.length] = '哈哈哈' names[names.length] = '烤山芋' console.log(names) let nums:number[] = [100,200,300] // for(let i:number = 0; i <= nums.length
阅读全文
摘要:console.log('1 准备开始执行') for(let i: number = 1;i<=3;i++){ console.log('...一锅装不下') } console.log('2 for循环执行结束') 添加配置 { // 使用 IntelliSense 了解相关属性。 // 悬停以
阅读全文
摘要:runtime.js /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the
阅读全文
摘要:/** * 页面的初始数据 */ data: { // 左侧菜单的数据 leftMenuList:[], // 右侧的商品数据 rightContent:[], // 被点击的 左侧的菜单 currentIndex:0 }, // 接口的返回数据 Cates:[], /** * 生命周期函数--监听
阅读全文
摘要:下载 小程序开发助手 和 easy less "less.compile": { "outExt": ".wxss" }, ok
阅读全文
摘要:"window":{ "backgroundTextStyle":"light", "navigationBarBackgroundColor": "#eb4450", "navigationBarTitleText": "优购", "navigationBarTextStyle":"white"
阅读全文
摘要:"tabBar": { "color": "#999", "selectedColor": "#ff2d4a", "backgroundColor": "#fafafa", "list": [ { "pagePath": "pages/index/index", "text": "首页",
阅读全文
摘要:Page({ /** * 页面的初始数据 */ data: { }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { console.log("onLoad"); // onLoad发送异步请求来初始化页面数据 }, /** * 生命周期函数
阅读全文
摘要://app.js App({ // 1 应用第一次启动的就会触发的事件 onLaunch() { // 在应用第一次启动的时候 获取用户的个人信息 // console.log("onLaunch"); // aabbcc // js的方式来跳转 不能触发 onPageNotFound // wx.
阅读全文
摘要:tabs: [ { id: 0, name: "首页", isActive: true }, { id: 1, name: "原创", isActive: false } , { id: 2, name: "分类", isActive: false } , { id: 3, name: "关于",
阅读全文
摘要:声明组件 { "usingComponents": { "Tabs": "../../components/Tabs/Tabs " } } 使用组件 <Tabs></Tabs> <!--components/Tabs/Tabs.wxml--> <view class="tabs"> <view cl
阅读全文
摘要:<view> <checkbox-group bindchange="handleItemChange"> <checkbox value="{{item.value}}" wx:for="{{list}}" wx:key="id"> {{item.name}} </checkbox> </chec
阅读全文
摘要:<!-- radio 单选框 1 radio标签 必须要和 父元素 radio-group来使用 2 value 选中的单选框的值 3 需要给 radio-group 绑定 change事件 4 需要在页面中显示 选中的值 --> <radio-group bindchange="handleCha
阅读全文
摘要:<!-- 小程序中的字体图标 1 type 图标的类型 success|success_no_circle|info|warn|waiting|cancel|download|search|clear 2 size 大小 3 color 图标的颜色 --> <icon type="cancel" s
阅读全文
摘要:<!-- button 标签 1 外观的属性 1 size 控制按钮的大小 1 default 默认大小 2 mini 小尺寸 2 type 用来控制按钮的颜色 1 default 灰色 2 primary 绿色 3 warn 红色 3 plain 按钮是否镂空,背景色透明 4 loading 文字
阅读全文
摘要:<!-- rich-text 富文本标签 1 nodes属性来实现 1 接收标签字符串 2 接收对象数组 --> <rich-text nodes="{{html}}"></rich-text> // pages/demo12/demo12.js Page({ data: { // 1 标签字符串
阅读全文
摘要:<!-- 导航组件 navigator 0 块级元素 默认会换行 可以直接加宽度和高度 1 url 要跳转的页面路径 绝对路径 相对路径 2 target 要跳转到当前的小程序 还是其他的小程序的页面 self 默认值 自己 小程序的页面 miniProgram 其他的小程序的页面 3 open-t
阅读全文
摘要:<!-- 1 长按文字复制 selectable 2 对文本内容 进行 解码 --> <text selectable decode> text 123 < </text> <!-- image 图片标签 1 src 指定要加载的图片的路径 图片存在默认的宽度和高度 320 *
阅读全文
摘要:/* 1 小程序中 不需要主动来引入样式文件 2 需要把页面中某些元素的单位 由 px 改成 rpx 1 设计稿 750x 750 px = 750 rpx 1 px = 1 rpx 2 把屏幕宽度 改成 375px 375 px = 750 rpx 1 px = 2rpx 1rpx = 0.5px
阅读全文
摘要:<!-- 1 需要给input标签绑定 input事件 绑定关键字 bindinput 2 如何获取 输入框的值 通过事件源对象来获取 e.detail.value 3 把输入框的值 赋值到 data当中 不能直接 1 this.data.num=e.detail.value 2 this.num=
阅读全文
摘要:条件渲染 1 wx:if="{{true/false}}" 1 if , else , if else wx:if wx:elif wx:else 2 hidden 1 在标签上直接加入属性 hidden 2 hidden="{{true}}" 3 什么场景下用哪个 1 当标签不是频繁的切换显示 优
阅读全文
摘要:block 1 占位符的标签 2 写代码的时候 可以看到这标签存在 3 页面渲染 小程序会把它移除掉 <view> <block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="id" class="my_list"
阅读全文
摘要:列表循环 1 wx:for="{{数组或者对象}}" wx:for-item="循环项的名称" wx:for-index="循环项的索引" 2 wx:key="唯一的值" 用来提高列表渲染的性能 1 wx:key 绑定一个普通的字符串的时候 那么这个字符串名称 肯定是 循环数组 中的 对象的 唯一属
阅读全文
摘要:// 判断传入的数字是否是质数 // 特点 只能被1和自己整除, 不能被 2 到 num -1 之间的数整除 function isPrime(num){ // 1 获取 num的 平方根 var temp = parseInt(Math.sqrt(num)) // 2 循环判断 for(var i
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>哈希表实现</ti
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>双向链表</tit
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>单项链表</tit
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>优先级队列</ti
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>封装队列</tit
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>栈的封装</tit
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
摘要:<router-link to="/home" replace>首页</router-link> <router-link to="/about" replace>关于</router-link> <!-- <router-link :to="/user/+userId" replace>用户</r
阅读全文
摘要:import Vue from 'vue' import Router from 'vue-router' // import Home from '@/components/Home' // import About from '@/components/About' // import User
阅读全文
摘要:import Vue from 'vue' import Router from 'vue-router' // import Home from '@/components/Home' // import About from '@/components/About' // import User
阅读全文
摘要:全局安装 vue脚手架cnpm install -g @vue/cli vue create 创建 vue3的项目 cnpm install -g @vue/cli-init vue init webpack 创建 vue2的项目 vue init webpack vuecli2test
阅读全文

浙公网安备 33010602011771号