├── .gitignore
├── LICENSE
├── README.md
├── cloudfunctions
├── querymenusubscript
│ ├── index.js
│ └── package.json
└── querytodolist
│ ├── index.js
│ ├── package-lock.json
│ └── package.json
├── img
├── day.jpeg
├── detail.jpeg
├── important.jpeg
├── list.jpeg
└── menu.jpeg
├── miniprogram
├── app.js
├── app.json
├── app.wxss
├── components
│ ├── side-menu
│ │ ├── SideMenu.js
│ │ ├── SideMenu.json
│ │ ├── SideMenu.wxml
│ │ └── SideMenu.wxss
│ ├── todo-input
│ │ ├── TodoInput.js
│ │ ├── TodoInput.json
│ │ ├── TodoInput.wxml
│ │ └── TodoInput.wxss
│ ├── todo-item
│ │ ├── TodoItem.js
│ │ ├── TodoItem.json
│ │ ├── TodoItem.wxml
│ │ └── TodoItem.wxss
│ └── todolist
│ │ ├── todolist.js
│ │ ├── todolist.json
│ │ ├── todolist.wxml
│ │ └── todolist.wxss
├── images
│ ├── no-data.png
│ └── share.jpeg
├── miniprogram_npm
│ ├── @vant
│ │ └── weapp
│ │ │ ├── action-sheet
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── area
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── button
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── card
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── cell-group
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── cell
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── checkbox-group
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── checkbox
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxs
│ │ │ └── index.wxss
│ │ │ ├── circle
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── col
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── collapse-item
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── collapse
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── common
│ │ │ ├── color.js
│ │ │ ├── component.js
│ │ │ ├── index.wxss
│ │ │ ├── style
│ │ │ │ ├── clearfix.wxss
│ │ │ │ ├── ellipsis.wxss
│ │ │ │ ├── hairline.wxss
│ │ │ │ ├── mixins
│ │ │ │ │ ├── clearfix.wxss
│ │ │ │ │ ├── ellipsis.wxss
│ │ │ │ │ └── hairline.wxss
│ │ │ │ ├── theme.wxss
│ │ │ │ └── var.wxss
│ │ │ └── utils.js
│ │ │ ├── count-down
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxss
│ │ │ └── utils.js
│ │ │ ├── datetime-picker
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── definitions
│ │ │ ├── index.js
│ │ │ └── weapp.js
│ │ │ ├── dialog
│ │ │ ├── dialog.js
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── divider
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── dropdown-item
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── dropdown-menu
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxs
│ │ │ └── index.wxss
│ │ │ ├── field
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── goods-action-button
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── goods-action-icon
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── goods-action
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── grid-item
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── grid
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── icon
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── image
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── index-anchor
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── index-bar
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── info
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── loading
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── mixins
│ │ │ ├── basic.js
│ │ │ ├── button.js
│ │ │ ├── link.js
│ │ │ ├── open-type.js
│ │ │ ├── touch.js
│ │ │ └── transition.js
│ │ │ ├── nav-bar
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── notice-bar
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── notify
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxss
│ │ │ └── notify.js
│ │ │ ├── overlay
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── panel
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── picker-column
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxs
│ │ │ └── index.wxss
│ │ │ ├── picker
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxss
│ │ │ └── shared.js
│ │ │ ├── popup
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── progress
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxs
│ │ │ └── index.wxss
│ │ │ ├── radio-group
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── radio
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── rate
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── row
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── search
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── sidebar-item
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── sidebar
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── skeleton
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── slider
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── stepper
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── steps
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── sticky
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxs
│ │ │ └── index.wxss
│ │ │ ├── submit-bar
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── swipe-cell
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── switch
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── tab
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── tabbar-item
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── tabbar
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── tabs
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxs
│ │ │ └── index.wxss
│ │ │ ├── tag
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── toast
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxss
│ │ │ └── toast.js
│ │ │ ├── transition
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ └── index.wxss
│ │ │ ├── tree-select
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxs
│ │ │ └── index.wxss
│ │ │ ├── uploader
│ │ │ ├── index.js
│ │ │ ├── index.json
│ │ │ ├── index.wxml
│ │ │ ├── index.wxss
│ │ │ └── utils.js
│ │ │ └── wxs
│ │ │ ├── add-unit.wxs
│ │ │ ├── array.wxs
│ │ │ ├── bem.wxs
│ │ │ ├── memoize.wxs
│ │ │ ├── object.wxs
│ │ │ └── utils.wxs
│ └── moment
│ │ └── index.js
├── package-lock.json
├── package.json
├── pages
│ ├── important
│ │ ├── important.js
│ │ ├── important.json
│ │ ├── important.wxml
│ │ └── important.wxss
│ ├── index
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ ├── index.wxss
│ │ └── user-unlogin.png
│ ├── todo-detail
│ │ ├── todo-detail.js
│ │ ├── todo-detail.json
│ │ ├── todo-detail.wxml
│ │ └── todo-detail.wxss
│ └── todo-list
│ │ ├── todo-list.js
│ │ ├── todo-list.json
│ │ ├── todo-list.wxml
│ │ └── todo-list.wxss
├── sitemap.json
├── style
│ ├── guide.wxss
│ └── public.wxss
└── utils
│ ├── markTodoItem.js
│ ├── queryTodo.js
│ ├── todoDbHelper.js
│ ├── tools.js
│ └── utils.js
├── package.json
└── project.config.json
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | /tests/e2e/reports/
6 | selenium-debug.log
7 |
8 | # local env files
9 | .env.local
10 | .env.*.local
11 |
12 | # Log files
13 | npm-debug.log*
14 | yarn-debug.log*
15 | yarn-error.log*
16 |
17 | # Editor directories and files
18 | .idea
19 | .vscode
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw*
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 helti
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 记我清单
2 |
3 | ## 简介
4 | 此项目基于小程序云开发,你不需要自己搭建服务器环境。产品原型参考自Microsoft To-Do(微软待办)
5 |
6 | ## 引导
7 | - 你需要在project.config.json中的appid替换成你的appid便可用微信开发者工具预览
8 | - 在云开发设置中创建环境并在appjs中设置你的环境id
9 | - 你需要在云开发中的数据库中创建名为todos的集合
10 | - 你需要在miniprogram文件夹下安装npm包,因为本项目使用了有赞的小程序组件 [vant-weapp](https://youzan.github.io/vant-weapp/#/intro)
11 |
12 | ## 功能介绍
13 | ### 我的一天
14 | 首页展示是我的一天的清单,你可以在我的一天中添加代办事项,也可以从重要清单和代办列表里选择清单添加到我的一天
15 |
16 |
17 |
18 |
19 | ### 重要
20 | 重要页面展示的是重要的代办清单包含着我的一天
21 |
22 |
23 |
24 | ### 代办列表
25 | 代办列表是我的一天和重要清单的集合,你可以在该列表里查看所有类别的清单
26 |
27 |
28 |
29 | ### 代办详情
30 | 详情也可以设置重要、完成、是否添加到我的一天、是否设置过期时间、添加备注、删除。
31 |
32 |
33 |
34 |
35 | ## 参考文档
36 |
37 | - [云开发文档](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)
38 |
39 |
--------------------------------------------------------------------------------
/cloudfunctions/querymenusubscript/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 |
4 | cloud.init({
5 | // API 调用都保持和云函数当前所在环境一致
6 | env: cloud.DYNAMIC_CURRENT_ENV
7 | })
8 |
9 | const db = cloud.database()
10 |
11 | // 云函数入口函数
12 | exports.main = async(event, context) => {
13 | const wxContext = cloud.getWXContext()
14 | // 先取出集合记录总数
15 | const countResult = await db.collection('todos').where({
16 | _openid: wxContext.OPENID
17 | }).count()
18 | const isImportantResult = await db.collection('todos').where({
19 | isImportant: true,
20 | _openid: wxContext.OPENID
21 | }).count()
22 | const isImportantCount = isImportantResult.total
23 | const count = countResult.total
24 |
25 | return {
26 | count,
27 | isImportantCount
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/cloudfunctions/querymenusubscript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "querymenusubscript",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "wx-server-sdk": "latest"
13 | }
14 | }
--------------------------------------------------------------------------------
/cloudfunctions/querytodolist/index.js:
--------------------------------------------------------------------------------
1 | // 云函数入口文件
2 | const cloud = require('wx-server-sdk')
3 | const moment = require('moment')
4 |
5 | cloud.init({
6 | // API 调用都保持和云函数当前所在环境一致
7 | env: cloud.DYNAMIC_CURRENT_ENV
8 | })
9 |
10 | const db = cloud.database()
11 | const _ = db.command
12 | const MAX_LIMIT = 100
13 |
14 | // 云函数入口函数
15 | exports.main = async(event, context) => {
16 | const wxContext = cloud.getWXContext()
17 | // 先取出集合记录总数
18 | const countResult = await db.collection('todos').count()
19 | const isImportantResult = await db.collection('todos').where({
20 | isImportant: true
21 | }).count()
22 | const isImportantCount = isImportantResult.total
23 | const count = countResult.total
24 | const queryCount = event.count ? event.count : 10
25 | // 查询参数
26 | const dbParams = event.dbParams ? event.dbParams : {}
27 | // openid
28 | dbParams._openid = wxContext.OPENID
29 | // 我的一天条件/当天
30 | if (dbParams.isMyday) {
31 | let curDate = moment().format('YYYY-MM-DD');
32 | let nextDate = moment().add(1, 'days').format('YYYY-MM-DD')
33 | dbParams.addMydayDate = _.gte(new Date(curDate)).and(_.lte(new Date(nextDate)))
34 | }
35 | // 计算需分几次取
36 | const batchTimes = Math.ceil(queryCount / 100)
37 | //
38 | // 承载所有读操作的 promise 的数组
39 | const tasks = []
40 | for (let i = 0; i < batchTimes; i++) {
41 | const promise = db.collection('todos').where(dbParams).skip(i * MAX_LIMIT).limit(MAX_LIMIT).get()
42 | tasks.push(promise)
43 | }
44 | // 等待所有
45 | let data = (await Promise.all(tasks)).reduce((acc, cur) => {
46 | return {
47 | data: acc.data.concat(cur.data),
48 | errMsg: acc.errMsg,
49 | }
50 | })
51 | return {
52 | data: data.data,
53 | count,
54 | isImportantCount,
55 | event
56 | }
57 |
58 | }
--------------------------------------------------------------------------------
/cloudfunctions/querytodolist/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "todolist",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "moment": "^2.24.0",
13 | "wx-server-sdk": "latest"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/img/day.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/img/day.jpeg
--------------------------------------------------------------------------------
/img/detail.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/img/detail.jpeg
--------------------------------------------------------------------------------
/img/important.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/img/important.jpeg
--------------------------------------------------------------------------------
/img/list.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/img/list.jpeg
--------------------------------------------------------------------------------
/img/menu.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/img/menu.jpeg
--------------------------------------------------------------------------------
/miniprogram/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | import('./utils/tools')
3 | App({
4 | onLaunch: function () {
5 |
6 | if (!wx.cloud) {
7 | console.error('请使用 2.2.3 或以上的基础库以使用云能力')
8 | } else {
9 | wx.cloud.init({
10 | // env 参数说明:
11 | // env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源
12 | // 此处请填入环境 ID, 环境 ID 可打开云控制台查看
13 | // 如不填则使用默认环境(第一个创建的环境)
14 | env: 'production-e9bw1',
15 | traceUser: true,
16 | })
17 | }
18 |
19 | this.globalData = {}
20 | }
21 | })
22 |
--------------------------------------------------------------------------------
/miniprogram/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/important/important",
5 | "pages/todo-list/todo-list",
6 | "pages/todo-detail/todo-detail"
7 | ],
8 | "usingComponents": {
9 | "todo-list": "/components/todolist/todolist",
10 | "todo-input": "/components/todo-input/TodoInput",
11 | "van-button": "@vant/weapp/button",
12 | "van-icon": "@vant/weapp/icon",
13 | "van-popup": "@vant/weapp/popup",
14 | "van-checkbox": "@vant/weapp/checkbox",
15 | "van-cell": "@vant/weapp/cell",
16 | "van-cell-group": "@vant/weapp/cell-group",
17 | "van-datetime-picker": "@vant/weapp/datetime-picker",
18 | "van-skeleton": "@vant/weapp/skeleton",
19 | "van-notify": "@vant/weapp/notify/index"
20 | },
21 | "window": {
22 | "backgroundColor": "#A9C3F8",
23 | "backgroundTextStyle": "light",
24 | "navigationBarBackgroundColor": "#A9C3F8",
25 | "navigationBarTitleText": "TodoDone",
26 | "navigationBarTextStyle": "black"
27 | },
28 | "sitemapLocation": "sitemap.json"
29 | }
--------------------------------------------------------------------------------
/miniprogram/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | @import './style/public.wxss';
--------------------------------------------------------------------------------
/miniprogram/components/side-menu/SideMenu.js:
--------------------------------------------------------------------------------
1 | // components/side-menu/SideMenu.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | userInfo: {
8 | type: Object,
9 | value: null
10 | },
11 | subscript: { // 角标
12 | type: Object,
13 | value: null
14 | }
15 | },
16 |
17 | /**
18 | * 组件的初始数据
19 | */
20 | data: {
21 |
22 | },
23 |
24 | /**
25 | * 组件的方法列表
26 | */
27 | methods: {
28 | getUserInfo(e) {
29 | console.log('e', e)
30 | if (e.detail.userInfo) {
31 | this.triggerEvent('getuserinfo', e.detail)
32 | } else {
33 | this.triggerEvent('getuserinfo', null)
34 | }
35 |
36 | },
37 | goImportant() {
38 | wx.navigateTo({
39 | url: '/pages/important/important',
40 | })
41 | this.triggerEvent('click-menu-list-item', {})
42 | },
43 | goTodoList() {
44 | wx.navigateTo({
45 | url: '/pages/todo-list/todo-list',
46 | })
47 | this.triggerEvent('click-menu-list-item', {})
48 | }
49 | }
50 | })
--------------------------------------------------------------------------------
/miniprogram/components/side-menu/SideMenu.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/components/side-menu/SideMenu.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/miniprogram/components/side-menu/SideMenu.wxss:
--------------------------------------------------------------------------------
1 | /* components/side-menu/SideMenu.wxss */
2 | .side-menu-wrapper {
3 | width: 450rpx;
4 | height: 100%;
5 | }
6 |
7 | .user-info {
8 | display: flex;
9 | align-items: center;
10 | padding: 60rpx 20rpx 20rpx;
11 | }
12 |
13 | .user-info .user-avatar {
14 | border-radius: 50%;
15 | width: 120rpx;
16 | height: 120rpx;
17 | overflow: hidden;
18 | margin-right: 20rpx;
19 | }
20 |
21 | .user-name {
22 | margin-left: 10px;
23 | }
24 |
25 | /* 登录按钮 */
26 |
27 | .auth-btn {
28 | border-color: none;
29 | color: #333;
30 | background: #fff;
31 | margin: 0;
32 | padding: 0;
33 | font-size: 14px;
34 | margin-left: 10px;
35 | }
36 |
37 | .auth-btn::after {
38 | border: none !important;
39 | }
40 |
41 | .user-info .user-name {
42 | padding-left: 10rpx;
43 | }
44 |
45 | .menu-list {}
--------------------------------------------------------------------------------
/miniprogram/components/todo-input/TodoInput.js:
--------------------------------------------------------------------------------
1 | // components/todo-input/TodoInput.js
2 | import {
3 | addTodoItem
4 | } from '../../utils/todoDbHelper.js'
5 | import Notify from '../../miniprogram_npm/@vant/weapp/notify/notify';
6 |
7 | Component({
8 | /**
9 | * 组件的属性列表
10 | */
11 | properties: {
12 | pageType: {
13 | type: Number,
14 | value: 0
15 | } // 0我的一天 ,1重要 ,2代办列表
16 | },
17 |
18 | /**
19 | * 组件的初始数据
20 | */
21 | data: {
22 | todoValue: ''
23 | },
24 |
25 | /**
26 | * 组件的方法列表
27 | */
28 | methods: {
29 | todoInputHandle(e) {
30 | this.data.todoValue = e.detail.value
31 | },
32 | todoInputConfirmHandle(e) {
33 | let that = this
34 | let todoValue = this.data.todoValue
35 | let pageType = this.data.pageType
36 | console.log('pageType', pageType)
37 | if (!todoValue) {
38 | Notify({
39 | type: 'warning',
40 | message: '请输入代办事项!'
41 | })
42 | return
43 | }
44 | let addParams = {
45 | description: todoValue,
46 | }
47 | if (pageType === 0) {
48 | addParams.isMyday = true
49 | addParams.addMydayDate = new Date()
50 | }
51 | if (pageType === 1) {
52 | addParams.isImportant = true
53 | }
54 | console.log('addParams', addParams)
55 |
56 | addTodoItem(addParams).then(res => {
57 | // res 是一个对象,其中有 _id 字段标记刚创建的记录的 id
58 | console.log('插入成功', res)
59 | that.triggerEvent('success', res)
60 | that.setData({
61 | todoValue: ''
62 | })
63 | })
64 |
65 | }
66 | }
67 | })
--------------------------------------------------------------------------------
/miniprogram/components/todo-input/TodoInput.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/components/todo-input/TodoInput.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/miniprogram/components/todo-input/TodoInput.wxss:
--------------------------------------------------------------------------------
1 | /* components/todo-input/TodoInput.wxss */
2 |
3 | .todo-input-wrapper {
4 | display: flex;
5 | align-items: center;
6 | height: 90rpx;
7 | width: 100%;
8 | justify-content: space-between;
9 | background-color: rgba(100, 96, 96,.6);
10 | color: #fff;
11 | border-radius: 10rpx;
12 | font-size: 16px;
13 | }
14 |
15 | .add-icon, .enter-icon {
16 | width: 80rpx;
17 | display: flex;
18 | height: 90rpx;
19 | align-items: center;
20 | justify-content: center;
21 | }
22 |
23 | .input-component-wrapper {
24 | width: 540rpx;
25 | padding-left: 20rpx;
26 | }
27 |
28 | .input-component {
29 | width: 100%;
30 | color: #fff;
31 | height: 90rpx;
32 | }
33 |
--------------------------------------------------------------------------------
/miniprogram/components/todo-item/TodoItem.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/components/todo-item/TodoItem.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{todo.description}}
12 |
13 |
14 |
15 |
16 |
18 | 我的一天
19 |
20 |
21 | {{todo.due_date_format}}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/miniprogram/components/todo-item/TodoItem.wxss:
--------------------------------------------------------------------------------
1 | /* components/todo-item/TodoItem.wxss */
2 |
3 | .van-ellipsis {
4 | overflow: hidden;
5 | white-space: nowrap;
6 | text-overflow: ellipsis;
7 | }
8 |
9 | .van-multi-ellipsis--l2 {
10 | -webkit-line-clamp: 2;
11 | }
12 |
13 | .van-multi-ellipsis--l2,
14 | .van-multi-ellipsis--l3 {
15 | display: -webkit-box;
16 | overflow: hidden;
17 | text-overflow: ellipsis;
18 | -webkit-box-orient: vertical;
19 | }
20 |
21 | .van-multi-ellipsis--l3 {
22 | -webkit-line-clamp: 3;
23 | }
24 |
25 | .todo-item-content {
26 | background-color: #fff;
27 | border-radius: 15rpx;
28 | display: flex;
29 | align-items: center;
30 | justify-content: space-between;
31 | padding: 0 20rpx;
32 | height: 100rpx;
33 | /* border-bottom: 1px solid #dedede; */
34 | margin-bottom: 4px;
35 | }
36 |
37 | .todo-body {
38 | width: 580rpx;
39 | padding-left: 20rpx;
40 | font-size: 14px;
41 | min-height: 30rpx;
42 | }
43 |
44 | .todo-body .todo-des {
45 | font-size: 12px;
46 | display: flex;
47 | }
48 |
49 | .todo-des {
50 | color: #a0a0a0;
51 | }
--------------------------------------------------------------------------------
/miniprogram/components/todolist/todolist.js:
--------------------------------------------------------------------------------
1 | // components/todolist/todolist.js
2 | Component({
3 | /**
4 | * 组件的属性列表
5 | */
6 | properties: {
7 | todoList: {
8 | type: Array,
9 | value: []
10 | },
11 | loading: {
12 | type: Boolean,
13 | value: true
14 | },
15 | emptyText: {
16 | type: String,
17 | value: '数据是空的~'
18 | }
19 | },
20 |
21 | /**
22 | * 组件的初始数据
23 | */
24 | data: {
25 |
26 | },
27 |
28 | /**
29 | * 组件的方法列表
30 | */
31 | methods: {
32 | checkboxChange(event) {
33 | console.log('ev', event)
34 | },
35 | clickTodoItemHandle(event) {
36 | console.log(event)
37 | },
38 | clickTodoItemRight(event) {
39 | console.log(event)
40 | },
41 | removesuccessHandle(e){
42 | this.triggerEvent('removesuccess',e)
43 | }
44 | }
45 | })
--------------------------------------------------------------------------------
/miniprogram/components/todolist/todolist.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "todo-item": "../todo-item/TodoItem"
5 | }
6 | }
--------------------------------------------------------------------------------
/miniprogram/components/todolist/todolist.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
16 | {{emptyText}}
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/miniprogram/components/todolist/todolist.wxss:
--------------------------------------------------------------------------------
1 | /* components/todolist/todolist.wxss */
2 | .todo-lsit-wrapper{
3 | padding:0 20rpx;
4 | margin-top: 20rpx;
5 | }
6 |
7 | .no-data{
8 | color: #fff;
9 | text-align: center;
10 | font-size: 12px;
11 | }
--------------------------------------------------------------------------------
/miniprogram/images/no-data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/miniprogram/images/no-data.png
--------------------------------------------------------------------------------
/miniprogram/images/share.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/miniprogram/images/share.jpeg
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | var button_1 = require("../mixins/button");
5 | var open_type_1 = require("../mixins/open-type");
6 | component_1.VantComponent({
7 | mixins: [button_1.button, open_type_1.openType],
8 | props: {
9 | show: Boolean,
10 | title: String,
11 | cancelText: String,
12 | description: String,
13 | round: {
14 | type: Boolean,
15 | value: true
16 | },
17 | zIndex: {
18 | type: Number,
19 | value: 100
20 | },
21 | actions: {
22 | type: Array,
23 | value: []
24 | },
25 | overlay: {
26 | type: Boolean,
27 | value: true
28 | },
29 | closeOnClickOverlay: {
30 | type: Boolean,
31 | value: true
32 | },
33 | closeOnClickAction: {
34 | type: Boolean,
35 | value: true
36 | },
37 | safeAreaInsetBottom: {
38 | type: Boolean,
39 | value: true
40 | }
41 | },
42 | methods: {
43 | onSelect: function (event) {
44 | var index = event.currentTarget.dataset.index;
45 | var item = this.data.actions[index];
46 | if (item && !item.disabled && !item.loading) {
47 | this.$emit('select', item);
48 | if (this.data.closeOnClickAction) {
49 | this.onClose();
50 | }
51 | }
52 | },
53 | onCancel: function () {
54 | this.$emit('cancel');
55 | },
56 | onClose: function () {
57 | this.$emit('close');
58 | },
59 | onClickOverlay: function () {
60 | this.$emit('click-overlay');
61 | this.onClose();
62 | }
63 | }
64 | });
65 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-popup": "../popup/index",
6 | "van-loading": "../loading/index"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/area/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-picker": "../picker/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/area/index.wxml:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/area/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/button/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-loading": "../loading/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/card/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var link_1 = require("../mixins/link");
4 | var component_1 = require("../common/component");
5 | component_1.VantComponent({
6 | classes: [
7 | 'num-class',
8 | 'desc-class',
9 | 'thumb-class',
10 | 'title-class',
11 | 'price-class',
12 | 'origin-price-class',
13 | ],
14 | mixins: [link_1.link],
15 | props: {
16 | tag: String,
17 | num: String,
18 | desc: String,
19 | thumb: String,
20 | title: String,
21 | price: {
22 | type: String,
23 | observer: 'updatePrice'
24 | },
25 | centered: Boolean,
26 | lazyLoad: Boolean,
27 | thumbLink: String,
28 | originPrice: String,
29 | thumbMode: {
30 | type: String,
31 | value: 'aspectFit'
32 | },
33 | currency: {
34 | type: String,
35 | value: '¥'
36 | }
37 | },
38 | methods: {
39 | updatePrice: function () {
40 | var price = this.data.price;
41 | var priceArr = price.toString().split('.');
42 | this.setData({
43 | integerStr: priceArr[0],
44 | decimalStr: priceArr[1] ? "." + priceArr[1] : '',
45 | });
46 | },
47 | onClickThumb: function () {
48 | this.jumpLink('thumbLink');
49 | }
50 | }
51 | });
52 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/card/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-tag": "../tag/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/card/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
44 |
45 |
48 |
49 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | title: String,
7 | border: {
8 | type: Boolean,
9 | value: true
10 | }
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxml:
--------------------------------------------------------------------------------
1 |
5 | {{ title }}
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-cell-group__title{padding:16px 16px 8px;padding:var(--cell-group-title-padding,16px 16px 8px);font-size:14px;font-size:var(--cell-group-title-font-size,14px);line-height:16px;line-height:var(--cell-group-title-line-height,16px);color:#969799;color:var(--cell-group-title-color,#969799)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/cell/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var link_1 = require("../mixins/link");
4 | var component_1 = require("../common/component");
5 | component_1.VantComponent({
6 | classes: [
7 | 'title-class',
8 | 'label-class',
9 | 'value-class',
10 | 'right-icon-class',
11 | 'hover-class'
12 | ],
13 | mixins: [link_1.link],
14 | props: {
15 | title: null,
16 | value: null,
17 | icon: String,
18 | size: String,
19 | label: String,
20 | center: Boolean,
21 | isLink: Boolean,
22 | required: Boolean,
23 | clickable: Boolean,
24 | titleWidth: String,
25 | customStyle: String,
26 | arrowDirection: String,
27 | useLabelSlot: Boolean,
28 | border: {
29 | type: Boolean,
30 | value: true
31 | }
32 | },
33 | methods: {
34 | onClick: function (event) {
35 | this.$emit('click', event.detail);
36 | this.jumpLink();
37 | }
38 | }
39 | });
40 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
16 |
17 |
18 |
22 | {{ title }}
23 |
24 |
25 |
26 |
27 | {{ label }}
28 |
29 |
30 |
31 |
32 | {{ value }}
33 |
34 |
35 |
36 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | field: true,
6 | relation: {
7 | name: 'checkbox',
8 | type: 'descendant',
9 | current: 'checkbox-group',
10 | linked: function (target) {
11 | this.updateChild(target);
12 | },
13 | },
14 | props: {
15 | max: Number,
16 | value: {
17 | type: Array,
18 | observer: 'updateChildren'
19 | },
20 | disabled: {
21 | type: Boolean,
22 | observer: 'updateChildren'
23 | }
24 | },
25 | methods: {
26 | updateChildren: function () {
27 | var _this = this;
28 | (this.children || []).forEach(function (child) {
29 | return _this.updateChild(child);
30 | });
31 | },
32 | updateChild: function (child) {
33 | var _a = this.data, value = _a.value, disabled = _a.disabled;
34 | child.setData({
35 | value: value.indexOf(child.data.name) !== -1,
36 | parentDisabled: disabled
37 | });
38 | }
39 | }
40 | });
41 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | var utils = require('../wxs/utils.wxs');
3 |
4 | function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) {
5 | var styles = [['font-size', utils.addUnit(iconSize)]];
6 | if (checkedColor && value && !disabled && !parentDisabled) {
7 | styles.push(['border-color', checkedColor]);
8 | styles.push(['background-color', checkedColor]);
9 | }
10 |
11 | return styles
12 | .map(function(item) {
13 | return item.join(':');
14 | })
15 | .join(';');
16 | }
17 |
18 | module.exports = {
19 | iconStyle: iconStyle
20 | };
21 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-checkbox{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:20px;line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{-webkit-flex:none;flex:none}.van-checkbox__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;font-size:20px;font-size:var(--checkbox-size,20px);border:1px solid #c8c9cc;border:1px solid var(--checkbox-border-color,#c8c9cc);transition-duration:.2s;transition-duration:var(--checkbox-transition-duration,.2s)}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--checkbox-checked-icon-color,#1989fa)}.van-checkbox__icon--disabled{background-color:#ebedf0;background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c8c9cc;color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;margin-left:10px;margin-left:var(--checkbox-label-margin,10px);color:#323233;color:var(--checkbox-label-color,#323233)}.van-checkbox__label--left{float:left;margin:0 10px 0 0;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:#c8c9cc;color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/circle/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{ text }}
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-circle{position:relative;display:inline-block;text-align:center}.van-circle__text{position:absolute;top:50%;left:0;width:100%;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#323233;color:var(--circle-text-color,#323233)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/col/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | relation: {
6 | name: 'row',
7 | type: 'ancestor',
8 | current: 'col',
9 | },
10 | props: {
11 | span: Number,
12 | offset: Number
13 | },
14 | data: {
15 | viewStyle: ''
16 | },
17 | methods: {
18 | setGutter: function (gutter) {
19 | var padding = gutter / 2 + "px";
20 | var viewStyle = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : '';
21 | if (viewStyle !== this.data.viewStyle) {
22 | this.setData({ viewStyle: viewStyle });
23 | }
24 | }
25 | }
26 | });
27 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/col/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/col/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/col/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
23 |
27 |
28 |
32 |
33 |
38 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;transition:-webkit-transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s);transition:transform var(--collapse-item-transition-duration,.3s),-webkit-transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c8c9cc!important;color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important;background-color:var(--white,#fff)!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__wrapper--transition{transition:height .3s ease-in-out}.van-collapse-item__content{padding:15px;padding:var(--collapse-item-content-padding,15px);color:#969799;color:var(--collapse-item-content-text-color,#969799);font-size:13px;font-size:var(--collapse-item-content-font-size,13px);line-height:1.5;line-height:var(--collapse-item-content-line-height,1.5);background-color:#fff;background-color:var(--collapse-item-content-background-color,#fff)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | relation: {
6 | name: 'collapse-item',
7 | type: 'descendant',
8 | current: 'collapse',
9 | },
10 | props: {
11 | value: {
12 | type: null,
13 | observer: 'updateExpanded'
14 | },
15 | accordion: {
16 | type: Boolean,
17 | observer: 'updateExpanded'
18 | },
19 | border: {
20 | type: Boolean,
21 | value: true
22 | }
23 | },
24 | methods: {
25 | updateExpanded: function () {
26 | this.children.forEach(function (child) {
27 | child.updateExpanded();
28 | });
29 | },
30 | switch: function (name, expanded) {
31 | var _a = this.data, accordion = _a.accordion, value = _a.value;
32 | if (!accordion) {
33 | name = expanded
34 | ? (value || []).concat(name)
35 | : (value || []).filter(function (activeName) { return activeName !== name; });
36 | }
37 | else {
38 | name = expanded ? name : '';
39 | }
40 | this.$emit('change', name);
41 | this.$emit('input', name);
42 | }
43 | }
44 | });
45 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/color.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.RED = '#ee0a24';
4 | exports.BLUE = '#1989fa';
5 | exports.WHITE = '#fff';
6 | exports.GREEN = '#07c160';
7 | exports.ORANGE = '#ff976a';
8 | exports.GRAY = '#323233';
9 | exports.GRAY_DARK = '#969799';
10 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/index.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/style/clearfix.wxss:
--------------------------------------------------------------------------------
1 | .van-clearfix:after{display:table;clear:both;content:""}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/style/ellipsis.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/style/hairline.wxss:
--------------------------------------------------------------------------------
1 | .van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/clearfix.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/clearfix.wxss
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/ellipsis.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/ellipsis.wxss
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/hairline.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/hairline.wxss
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/style/theme.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/miniprogram/miniprogram_npm/@vant/weapp/common/style/theme.wxss
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/style/var.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/miniprogram/miniprogram_npm/@vant/weapp/common/style/var.wxss
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/common/utils.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | function isDef(value) {
4 | return value !== undefined && value !== null;
5 | }
6 | exports.isDef = isDef;
7 | function isObj(x) {
8 | var type = typeof x;
9 | return x !== null && (type === 'object' || type === 'function');
10 | }
11 | exports.isObj = isObj;
12 | function isNumber(value) {
13 | return /^\d+(\.\d+)?$/.test(value);
14 | }
15 | exports.isNumber = isNumber;
16 | function range(num, min, max) {
17 | return Math.min(Math.max(num, min), max);
18 | }
19 | exports.range = range;
20 | function nextTick(fn) {
21 | setTimeout(function () {
22 | fn();
23 | }, 1000 / 30);
24 | }
25 | exports.nextTick = nextTick;
26 | var systemInfo = null;
27 | function getSystemInfoSync() {
28 | if (systemInfo == null) {
29 | systemInfo = wx.getSystemInfoSync();
30 | }
31 | return systemInfo;
32 | }
33 | exports.getSystemInfoSync = getSystemInfoSync;
34 | function addUnit(value) {
35 | if (!isDef(value)) {
36 | return undefined;
37 | }
38 | value = String(value);
39 | return isNumber(value) ? value + "px" : value;
40 | }
41 | exports.addUnit = addUnit;
42 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ formattedTime }}
4 |
5 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-count-down{color:#323233;color:var(--count-down-text-color,#323233);font-size:14px;font-size:var(--count-down-font-size,14px);line-height:20px;line-height:var(--count-down-line-height,20px)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-picker": "../picker/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxml:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/definitions/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/definitions/weapp.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-popup": "../popup/index",
5 | "van-button": "../button/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-dialog{top:45%!important;overflow:hidden;width:320px;width:var(--dialog-width,320px);font-size:16px;font-size:var(--dialog-font-size,16px);border-radius:16px;border-radius:var(--dialog-border-radius,16px);background-color:#fff;background-color:var(--dialog-background-color,#fff)}@media (max-width:321px){.van-dialog{width:90%;width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{text-align:center;padding-top:24px;padding-top:var(--dialog-header-padding-top,24px);font-weight:500;font-weight:var(--dialog-header-font-weight,500);line-height:24px;line-height:var(--dialog-header-line-height,24px)}.van-dialog__header--isolated{padding:24px 0;padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch;font-size:14px;font-size:var(--dialog-message-font-size,14px);line-height:20px;line-height:var(--dialog-message-line-height,20px);max-height:60vh;max-height:var(--dialog-message-max-height,60vh);padding:24px;padding:var(--dialog-message-padding,24px)}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--has-title{padding-top:12px;padding-top:var(--dialog-has-title-message-padding-top,12px);color:#646566;color:var(--dialog-has-title-message-text-color,#646566)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/divider/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | dashed: {
7 | type: Boolean,
8 | value: false
9 | },
10 | hairline: {
11 | type: Boolean,
12 | value: false
13 | },
14 | contentPosition: {
15 | type: String,
16 | value: ''
17 | },
18 | fontSize: {
19 | type: Number,
20 | value: ''
21 | },
22 | borderColor: {
23 | type: String,
24 | value: ''
25 | },
26 | textColor: {
27 | type: String,
28 | value: ''
29 | },
30 | customStyle: {
31 | type: String,
32 | value: ''
33 | }
34 | }
35 | });
36 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/divider/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-divider{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin:16px 0;margin:var(--divider-margin,16px 0);color:#969799;color:var(--divider-text-color,#969799);font-size:14px;font-size:var(--divider-font-size,14px);line-height:24px;line-height:var(--divider-line-height,24px);border:0 solid #ebedf0;border-color:var(--divider-border-color,#ebedf0)}.van-divider:after,.van-divider:before{display:block;-webkit-flex:1;flex:1;box-sizing:border-box;height:1px;border-color:inherit;border-style:inherit;border-width:1px 0 0}.van-divider:before{content:""}.van-divider--hairline:after,.van-divider--hairline:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:16px;margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:"";margin-left:16px;margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:10%;max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:10%;max-width:var(--divider-content-right-width,10%)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-popup": "../popup/index",
5 | "van-cell": "../cell/index",
6 | "van-icon": "../icon/index"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
18 |
27 |
32 | {{ item.text }}
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-dropdown-item{position:fixed;right:0;left:0;overflow:hidden}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:#1989fa;color:var(--dropdown-menu-option-active-color,#1989fa)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
24 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | function displayTitle(item) {
3 | if (item.title) {
4 | return item.title;
5 | }
6 |
7 | var match = item.options.filter(function(option) {
8 | return option.value === item.value;
9 | });
10 | var displayTitle = match.length ? match[0].text : '';
11 | return displayTitle;
12 | }
13 |
14 | module.exports = {
15 | displayTitle: displayTitle
16 | };
17 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-dropdown-menu{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;height:50px;height:var(--dropdown-menu-height,50px);background-color:#fff;background-color:var(--dropdown-menu-background-color,#fff)}.van-dropdown-menu__item{display:-webkit-flex;display:flex;-webkit-flex:1;flex:1;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:#969799;color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:0 8px;padding:var(--dropdown-menu-title-padding,0 8px);color:#323233;color:var(--dropdown-menu-title-text-color,#323233);font-size:15px;font-size:var(--dropdown-menu-title-font-size,15px);line-height:18px;line-height:var(--dropdown-menu-title-line-height,18px)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:#1989fa;color:var(--dropdown-menu-title-active-text-color,#1989fa)}.van-dropdown-menu__title--down:after{margin-top:-1px;-webkit-transform:rotate(135deg);transform:rotate(135deg)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/field/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index",
5 | "van-icon": "../icon/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | var link_1 = require("../mixins/link");
5 | var button_1 = require("../mixins/button");
6 | var open_type_1 = require("../mixins/open-type");
7 | component_1.VantComponent({
8 | mixins: [link_1.link, button_1.button, open_type_1.openType],
9 | relation: {
10 | type: 'ancestor',
11 | name: 'goods-action',
12 | current: 'goods-action-button',
13 | },
14 | props: {
15 | text: String,
16 | color: String,
17 | loading: Boolean,
18 | disabled: Boolean,
19 | plain: Boolean,
20 | type: {
21 | type: String,
22 | value: 'danger'
23 | }
24 | },
25 | mounted: function () {
26 | this.updateStyle();
27 | },
28 | methods: {
29 | onClick: function (event) {
30 | this.$emit('click', event.detail);
31 | this.jumpLink();
32 | },
33 | updateStyle: function () {
34 | var _a = this.parent.children, children = _a === void 0 ? [] : _a;
35 | var length = children.length;
36 | var index = children.indexOf(this);
37 | this.setData({
38 | isFirst: index === 0,
39 | isLast: index === length - 1
40 | });
41 | }
42 | }
43 | });
44 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-button": "../button/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
28 | {{ text }}
29 |
30 |
31 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-goods-action-button{--button-warning-background-color:linear-gradient(90deg,#ffd01e,#ff8917);--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(90deg,#ffd01e,#ff8917));--button-danger-background-color:linear-gradient(90deg,#ff6034,#ee0a24);--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(90deg,#ff6034,#ee0a24));--button-default-height:40px;--button-default-height:var(--goods-action-button-height,40px);--button-line-height:40px;--button-line-height:var(--goods-action-button-height,40px);--button-plain-background-color:#fff;--button-plain-background-color:var(--goods-action-button-plain-color,#fff);display:block;--button-border-width:0}.van-goods-action-button--first{margin-left:5px;--button-border-radius:20px 0 0 20px;--button-border-radius:var(--goods-action-button-border-radius,20px) 0 0 var(--goods-action-button-border-radius,20px)}.van-goods-action-button--last{margin-right:5px;--button-border-radius:0 20px 20px 0;--button-border-radius:0 var(--goods-action-button-border-radius,20px) var(--goods-action-button-border-radius,20px) 0}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{width:100%;font-weight:500!important;font-weight:var(--font-weight-bold,500)!important}@media (max-width:321px){.van-goods-action-button{font-size:13px}}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | var link_1 = require("../mixins/link");
5 | var button_1 = require("../mixins/button");
6 | var open_type_1 = require("../mixins/open-type");
7 | component_1.VantComponent({
8 | classes: ['icon-class', 'text-class'],
9 | mixins: [link_1.link, button_1.button, open_type_1.openType],
10 | props: {
11 | text: String,
12 | dot: Boolean,
13 | info: String,
14 | icon: String,
15 | disabled: Boolean,
16 | loading: Boolean
17 | },
18 | methods: {
19 | onClick: function (event) {
20 | this.$emit('click', event.detail);
21 | this.jumpLink();
22 | }
23 | }
24 | });
25 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-button": "../button/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxml:
--------------------------------------------------------------------------------
1 |
25 |
26 |
35 |
36 | {{ text }}
37 |
38 |
39 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-goods-action-icon{border:none!important;width:50px!important;width:var(--goods-action-icon-height,50px)!important}.van-goods-action-icon__content{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;height:100%;line-height:1;font-size:10px;font-size:var(--goods-action-icon-font-size,10px);color:#646566;color:var(--goods-action-icon-text-color,#646566)}.van-goods-action-icon__icon{margin-bottom:4px}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | relation: {
6 | type: 'descendant',
7 | name: 'goods-action-button',
8 | current: 'goods-action',
9 | },
10 | props: {
11 | safeAreaInsetBottom: {
12 | type: Boolean,
13 | value: true
14 | }
15 | }
16 | });
17 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;background-color:#fff;background-color:var(--goods-action-background-color,#fff)}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{ text }}
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-grid-item{position:relative;float:left;box-sizing:border-box}.van-grid-item--square{height:0}.van-grid-item__content{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;box-sizing:border-box;height:100%;padding:16px 8px;padding:var(--grid-item-content-padding,16px 8px);background-color:#fff;background-color:var(--grid-item-content-background-color,#fff)}.van-grid-item__content:after{z-index:1;border-width:0 1px 1px 0;border-bottom-width:var(--border-width-base,1px);border-right-width:var(--border-width-base,1px);border-top-width:0}.van-grid-item__content--surround:after{border-width:1px;border-width:var(--border-width-base,1px)}.van-grid-item__content--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-grid-item__content--square{position:absolute;top:0;right:0;left:0}.van-grid-item__content--clickable:active{background-color:#f2f3f5;background-color:var(--grid-item-content-active-color,#f2f3f5)}.van-grid-item__icon{font-size:26px;font-size:var(--grid-item-icon-size,26px)}.van-grid-item__text{word-wrap:break-word;color:#646566;color:var(--grid-item-text-color,#646566);font-size:12px;font-size:var(--grid-item-text-font-size,12px)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/grid/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | var utils_1 = require("../common/utils");
5 | component_1.VantComponent({
6 | relation: {
7 | name: 'grid-item',
8 | type: 'descendant',
9 | current: 'grid',
10 | },
11 | props: {
12 | square: {
13 | type: Boolean,
14 | observer: 'updateChildren'
15 | },
16 | gutter: {
17 | type: [Number, String],
18 | value: 0,
19 | observer: 'updateChildren'
20 | },
21 | clickable: {
22 | type: Boolean,
23 | observer: 'updateChildren'
24 | },
25 | columnNum: {
26 | type: Number,
27 | value: 4,
28 | observer: 'updateChildren'
29 | },
30 | center: {
31 | type: Boolean,
32 | value: true,
33 | observer: 'updateChildren'
34 | },
35 | border: {
36 | type: Boolean,
37 | value: true,
38 | observer: 'updateChildren'
39 | }
40 | },
41 | data: {
42 | viewStyle: '',
43 | },
44 | created: function () {
45 | var gutter = this.data.gutter;
46 | if (gutter) {
47 | this.setData({
48 | viewStyle: "padding-left: " + utils_1.addUnit(gutter)
49 | });
50 | }
51 | },
52 | methods: {
53 | updateChildren: function () {
54 | this.children.forEach(function (child) {
55 | child.updateStyle();
56 | });
57 | }
58 | }
59 | });
60 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/grid/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-grid{position:relative;box-sizing:border-box;overflow:hidden}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/icon/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | dot: Boolean,
7 | info: null,
8 | size: null,
9 | color: String,
10 | customStyle: String,
11 | classPrefix: {
12 | type: String,
13 | value: 'van-icon'
14 | },
15 | name: {
16 | type: String,
17 | observer: function (val) {
18 | this.setData({
19 | isImageName: val.indexOf('/') !== -1
20 | });
21 | }
22 | }
23 | },
24 | methods: {
25 | onClick: function () {
26 | this.$emit('click');
27 | }
28 | }
29 | });
30 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/icon/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
14 |
20 |
21 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/image/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-loading": "../loading/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/image/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
18 |
19 |
23 |
24 |
25 |
26 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/image/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:50%}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#969799;color:var(--image-placeholder-text-color,#969799);font-size:14px;font-size:var(--image-placeholder-font-size,14px);background-color:#f7f8fa;background-color:var(--image-placeholder-background-color,#f7f8fa)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | relation: {
6 | name: 'index-bar',
7 | type: 'ancestor',
8 | current: 'index-anchor',
9 | },
10 | props: {
11 | useSlot: Boolean,
12 | index: null
13 | },
14 | data: {
15 | active: false,
16 | wrapperStyle: '',
17 | anchorStyle: ''
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
9 |
10 |
11 | {{ index }}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-index-anchor{padding:0 16px;padding:var(--index-anchor-padding,0 16px);color:#323233;color:var(--index-anchor-text-color,#323233);font-weight:500;font-weight:var(--index-anchor-font-weight,500);font-size:14px;font-size:var(--index-anchor-font-size,14px);line-height:32px;line-height:var(--index-anchor-line-height,32px);background-color:initial;background-color:var(--index-anchor-background-color,transparent)}.van-index-anchor--active{right:0;left:0;color:#07c160;color:var(--index-anchor-active-text-color,#07c160);background-color:#fff;background-color:var(--index-anchor-active-background-color,#fff)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
22 |
23 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{position:fixed;top:50%;right:0;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-weight:500;padding:0 4px 0 16px;padding:0 var(--padding-base,4px) 0 var(--padding-md,16px);font-size:10px;font-size:var(--index-bar-index-font-size,10px);line-height:14px;line-height:var(--index-bar-index-line-height,14px)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/info/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | dot: Boolean,
7 | info: null,
8 | customStyle: String
9 | }
10 | });
11 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/info/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/info/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ dot ? '' : info }}
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/info/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-info{position:absolute;top:0;right:0;box-sizing:border-box;white-space:nowrap;text-align:center;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%;min-width:16px;min-width:var(--info-size,16px);padding:0 3px;padding:var(--info-padding,0 3px);color:#fff;color:var(--info-color,#fff);font-weight:500;font-weight:var(--info-font-weight,500);font-size:12px;font-size:var(--info-font-size,12px);font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--info-font-family,PingFang SC,Helvetica Neue,Arial,sans-serif);line-height:14px;line-height:calc(var(--info-size, 16px) - var(--info-border-width, 1px)*2);background-color:#ee0a24;background-color:var(--info-background-color,#ee0a24);border:1px solid #fff;border:var(--info-border-width,1px) solid var(--white,#fff);border-radius:16px;border-radius:var(--info-size,16px)}.van-info--dot{min-width:0;border-radius:100%;width:8px;width:var(--info-dot-size,8px);height:8px;height:var(--info-dot-size,8px);background-color:#ee0a24;background-color:var(--info-dot-color,#ee0a24)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/loading/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | color: String,
7 | vertical: Boolean,
8 | type: {
9 | type: String,
10 | value: 'circular'
11 | },
12 | size: String,
13 | textSize: String
14 | },
15 | data: {
16 | array12: Array.from({ length: 12 }),
17 | },
18 | });
19 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/loading/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/mixins/basic.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.basic = Behavior({
4 | methods: {
5 | $emit: function () {
6 | var args = [];
7 | for (var _i = 0; _i < arguments.length; _i++) {
8 | args[_i] = arguments[_i];
9 | }
10 | this.triggerEvent.apply(this, args);
11 | },
12 | set: function (data, callback) {
13 | this.setData(data, callback);
14 | return new Promise(function (resolve) { return wx.nextTick(resolve); });
15 | },
16 | getRect: function (selector, all) {
17 | var _this = this;
18 | return new Promise(function (resolve) {
19 | wx.createSelectorQuery()
20 | .in(_this)[all ? 'selectAll' : 'select'](selector)
21 | .boundingClientRect(function (rect) {
22 | if (all && Array.isArray(rect) && rect.length) {
23 | resolve(rect);
24 | }
25 | if (!all && rect) {
26 | resolve(rect);
27 | }
28 | })
29 | .exec();
30 | });
31 | }
32 | }
33 | });
34 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/mixins/button.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.button = Behavior({
4 | externalClasses: ['hover-class'],
5 | properties: {
6 | id: String,
7 | lang: {
8 | type: String,
9 | value: 'en'
10 | },
11 | businessId: Number,
12 | sessionFrom: String,
13 | sendMessageTitle: String,
14 | sendMessagePath: String,
15 | sendMessageImg: String,
16 | showMessageCard: Boolean,
17 | appParameter: String,
18 | ariaLabel: String
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/mixins/link.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.link = Behavior({
4 | properties: {
5 | url: String,
6 | linkType: {
7 | type: String,
8 | value: 'navigateTo'
9 | }
10 | },
11 | methods: {
12 | jumpLink: function (urlKey) {
13 | if (urlKey === void 0) { urlKey = 'url'; }
14 | var url = this.data[urlKey];
15 | if (url) {
16 | wx[this.data.linkType]({ url: url });
17 | }
18 | }
19 | }
20 | });
21 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/mixins/open-type.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.openType = Behavior({
4 | properties: {
5 | openType: String
6 | },
7 | methods: {
8 | bindGetUserInfo: function (event) {
9 | this.$emit('getuserinfo', event.detail);
10 | },
11 | bindContact: function (event) {
12 | this.$emit('contact', event.detail);
13 | },
14 | bindGetPhoneNumber: function (event) {
15 | this.$emit('getphonenumber', event.detail);
16 | },
17 | bindError: function (event) {
18 | this.$emit('error', event.detail);
19 | },
20 | bindLaunchApp: function (event) {
21 | this.$emit('launchapp', event.detail);
22 | },
23 | bindOpenSetting: function (event) {
24 | this.$emit('opensetting', event.detail);
25 | },
26 | }
27 | });
28 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/mixins/touch.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var MIN_DISTANCE = 10;
4 | function getDirection(x, y) {
5 | if (x > y && x > MIN_DISTANCE) {
6 | return 'horizontal';
7 | }
8 | if (y > x && y > MIN_DISTANCE) {
9 | return 'vertical';
10 | }
11 | return '';
12 | }
13 | exports.touch = Behavior({
14 | methods: {
15 | resetTouchStatus: function () {
16 | this.direction = '';
17 | this.deltaX = 0;
18 | this.deltaY = 0;
19 | this.offsetX = 0;
20 | this.offsetY = 0;
21 | },
22 | touchStart: function (event) {
23 | this.resetTouchStatus();
24 | var touch = event.touches[0];
25 | this.startX = touch.clientX;
26 | this.startY = touch.clientY;
27 | },
28 | touchMove: function (event) {
29 | var touch = event.touches[0];
30 | this.deltaX = touch.clientX - this.startX;
31 | this.deltaY = touch.clientY - this.startY;
32 | this.offsetX = Math.abs(this.deltaX);
33 | this.offsetY = Math.abs(this.deltaY);
34 | this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
35 | }
36 | }
37 | });
38 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | classes: ['title-class'],
6 | props: {
7 | title: String,
8 | fixed: Boolean,
9 | leftText: String,
10 | rightText: String,
11 | leftArrow: Boolean,
12 | border: {
13 | type: Boolean,
14 | value: true
15 | },
16 | zIndex: {
17 | type: Number,
18 | value: 1
19 | },
20 | safeAreaInsetTop: {
21 | type: Boolean,
22 | value: true
23 | },
24 | },
25 | data: {
26 | statusBarHeight: 0
27 | },
28 | created: function () {
29 | var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
30 | this.setData({ statusBarHeight: statusBarHeight });
31 | },
32 | methods: {
33 | onClickLeft: function () {
34 | this.$emit('click-left');
35 | },
36 | onClickRight: function () {
37 | this.$emit('click-right');
38 | }
39 | }
40 | });
41 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
15 | {{ leftText }}
21 |
22 |
23 |
24 |
25 | {{ title }}
26 |
27 |
28 |
29 | {{ rightText }}
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-nav-bar{position:relative;text-align:center;-webkit-user-select:none;user-select:none;height:44px;height:var(--nav-bar-height,44px);line-height:44px;line-height:var(--nav-bar-height,44px);background-color:#fff;background-color:var(--nav-bar-background-color,#fff)}.van-nav-bar__text{display:inline-block;vertical-align:middle;margin:0 -16px;margin:0 -var(--padding-md,16px);padding:0 16px;padding:0 var(--padding-md,16px);color:#1989fa;color:var(--nav-bar-text-color,#1989fa)}.van-nav-bar__text--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}.van-nav-bar__arrow{vertical-align:middle;font-size:16px;font-size:var(--nav-bar-arrow-size,16px);color:#1989fa;color:var(--nav-bar-text-color,#1989fa)}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar__title{max-width:60%;margin:0 auto;color:#323233;color:var(--nav-bar-title-text-color,#323233);font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--nav-bar-title-font-size,16px)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;bottom:0;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;font-size:14px;font-size:var(--font-size-md,14px)}.van-nav-bar__left{left:16px;left:var(--padding-md,16px)}.van-nav-bar__right{right:16px;right:var(--padding-md,16px)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
15 |
16 |
17 |
18 |
19 | {{ text }}
20 |
21 |
22 |
23 |
29 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:40px;height:var(--notice-bar-height,40px);padding:0 16px;padding:var(--notice-bar-padding,0 16px);font-size:14px;font-size:var(--notice-bar-font-size,14px);color:#ed6a0c;color:var(--notice-bar-text-color,#ed6a0c);line-height:24px;line-height:var(--notice-bar-line-height,24px);background-color:#fffbe8;background-color:var(--notice-bar-background-color,#fffbe8)}.van-notice-bar--withicon{position:relative;padding-right:40px}.van-notice-bar--wrapable{height:auto;padding:8px 16px;padding:var(--notice-bar-wrapable-padding,8px 16px)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal}.van-notice-bar__left-icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;margin-right:4px;vertical-align:middle}.van-notice-bar__left-icon,.van-notice-bar__right-icon{font-size:16px;font-size:var(--notice-bar-icon-size,16px);min-width:22px;min-width:var(--notice-bar-icon-min-width,22px)}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px}.van-notice-bar__wrap{position:relative;-webkit-flex:1;flex:1;overflow:hidden;height:24px;height:var(--notice-bar-line-height,24px)}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/notify/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-transition": "../transition/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
16 | {{ message }}
17 |
18 |
19 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-notify{text-align:center;word-wrap:break-word;padding:6px 15px;padding:var(--notify-padding,6px 15px);font-size:14px;font-size:var(--notify-font-size,14px);line-height:20px;line-height:var(--notify-line-height,20px)}.van-notify__container{position:fixed;top:0;box-sizing:border-box;width:100%}.van-notify--primary{background-color:#1989fa;background-color:var(--notify-primary-background-color,#1989fa)}.van-notify--success{background-color:#07c160;background-color:var(--notify-success-background-color,#07c160)}.van-notify--danger{background-color:#ee0a24;background-color:var(--notify-danger-background-color,#ee0a24)}.van-notify--warning{background-color:#ff976a;background-color:var(--notify-warning-background-color,#ff976a)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | show: Boolean,
7 | customStyle: String,
8 | duration: {
9 | type: null,
10 | value: 300
11 | },
12 | zIndex: {
13 | type: Number,
14 | value: 1
15 | }
16 | },
17 | methods: {
18 | onClick: function () {
19 | this.$emit('click');
20 | },
21 | // for prevent touchmove
22 | noop: function () { }
23 | }
24 | });
25 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-transition": "../transition/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);background-color:var(--overlay-background-color,rgba(0,0,0,.7))}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/panel/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | classes: ['header-class', 'footer-class'],
6 | props: {
7 | desc: String,
8 | title: String,
9 | status: String,
10 | useFooterSlot: Boolean
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/panel/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-panel{background:#fff;background:var(--panel-background-color,#fff)}.van-panel__header-value{color:#ee0a24;color:var(--panel-header-value-color,#ee0a24)}.van-panel__footer{padding:8px 16px;padding:var(--panel-footer-padding,8px 16px)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 | {{ getOptionText(option, valueKey) }}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxs:
--------------------------------------------------------------------------------
1 | function isObj(x) {
2 | var type = typeof x;
3 | return x !== null && (type === 'object' || type === 'function');
4 | }
5 |
6 | module.exports = function (option, valueKey) {
7 | return isObj(option) && option[valueKey] != null ? option[valueKey] : option;
8 | }
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-picker-column{overflow:hidden;text-align:center;color:#000;color:var(--picker-option-text-color,#000);font-size:16px;font-size:var(--picker-option-font-size,16px)}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;font-weight:var(--font-weight-bold,500);color:#323233;color:var(--picker-option-selected-text-color,#323233)}.van-picker-column__item--disabled{opacity:.3;opacity:var(--picker-option-disabled-opacity,.3)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/picker/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "picker-column": "../picker-column/index",
5 | "loading": "../loading/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;-webkit-user-select:none;user-select:none;background-color:#fff;background-color:var(--picker-background-color,#fff)}.van-picker__toolbar{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;height:44px;height:var(--picker-toolbar-height,44px);line-height:44px;line-height:var(--picker-toolbar-height,44px)}.van-picker__cancel,.van-picker__confirm{padding:0 16px;padding:var(--picker-action-padding,0 16px);font-size:14px;font-size:var(--picker-action-font-size,14px);color:#1989fa;color:var(--picker-action-text-color,#1989fa)}.van-picker__cancel--hover,.van-picker__confirm--hover{background-color:#f2f3f5;background-color:var(--picker-action-active-color,#f2f3f5)}.van-picker__title{max-width:50%;text-align:center;font-weight:500;font-weight:var(--font-weight-bold,500);font-size:16px;font-size:var(--picker-option-font-size,16px)}.van-picker__columns{position:relative;display:-webkit-flex;display:flex}.van-picker__column{-webkit-flex:1 1;flex:1 1;width:0}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background-color:hsla(0,0%,100%,.9);background-color:var(--picker-loading-mask-color,hsla(0,0%,100%,.9))}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/picker/shared.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.pickerProps = {
4 | title: String,
5 | loading: Boolean,
6 | showToolbar: Boolean,
7 | cancelButtonText: {
8 | type: String,
9 | value: '取消'
10 | },
11 | confirmButtonText: {
12 | type: String,
13 | value: '确认'
14 | },
15 | visibleItemCount: {
16 | type: Number,
17 | value: 5
18 | },
19 | itemHeight: {
20 | type: Number,
21 | value: 44
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/popup/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-overlay": "../overlay/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
25 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/progress/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | var color_1 = require("../common/color");
5 | component_1.VantComponent({
6 | props: {
7 | inactive: Boolean,
8 | percentage: Number,
9 | pivotText: String,
10 | pivotColor: String,
11 | trackColor: String,
12 | showPivot: {
13 | type: Boolean,
14 | value: true
15 | },
16 | color: {
17 | type: String,
18 | value: color_1.BLUE
19 | },
20 | textColor: {
21 | type: String,
22 | value: '#fff'
23 | },
24 | strokeWidth: {
25 | type: null,
26 | value: 4
27 | }
28 | }
29 | });
30 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/progress/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
17 | {{ getters.text(pivotText, percentage) }}
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | text: function(pivotText, percentage) {
3 | return pivotText || percentage + '%';
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-progress{position:relative;height:4px;height:var(--progress-height,4px);border-radius:4px;border-radius:var(--progress-height,4px);background:#ebedf0;background:var(--progress-background-color,#ebedf0)}.van-progress__portion{position:absolute;left:0;height:100%;border-radius:inherit;background:#1989fa;background:var(--progress-color,#1989fa)}.van-progress__pivot{position:absolute;top:50%;right:0;box-sizing:border-box;min-width:2em;text-align:center;word-break:keep-all;border-radius:1em;-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#fff;color:var(--progress-pivot-text-color,#fff);padding:0 5px;padding:var(--progress-pivot-padding,0 5px);font-size:10px;font-size:var(--progress-pivot-font-size,10px);line-height:1.6;line-height:var(--progress-pivot-line-height,1.6);background-color:#1989fa;background-color:var(--progress-pivot-background-color,#1989fa)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | field: true,
6 | relation: {
7 | name: 'radio',
8 | type: 'descendant',
9 | current: 'radio-group',
10 | linked: function (target) {
11 | this.updateChild(target);
12 | },
13 | },
14 | props: {
15 | value: {
16 | type: null,
17 | observer: 'updateChildren'
18 | },
19 | disabled: {
20 | type: Boolean,
21 | observer: 'updateChildren'
22 | }
23 | },
24 | methods: {
25 | updateChildren: function () {
26 | var _this = this;
27 | (this.children || []).forEach(function (child) {
28 | return _this.updateChild(child);
29 | });
30 | },
31 | updateChild: function (child) {
32 | var _a = this.data, value = _a.value, disabled = _a.disabled;
33 | child.setData({
34 | value: value,
35 | disabled: disabled || child.data.disabled
36 | });
37 | }
38 | }
39 | });
40 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/radio/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | field: true,
6 | relation: {
7 | name: 'radio-group',
8 | type: 'ancestor',
9 | current: 'radio',
10 | },
11 | classes: ['icon-class', 'label-class'],
12 | props: {
13 | value: null,
14 | disabled: Boolean,
15 | useIconSlot: Boolean,
16 | checkedColor: String,
17 | labelPosition: {
18 | type: String,
19 | value: 'right'
20 | },
21 | labelDisabled: Boolean,
22 | shape: {
23 | type: String,
24 | value: 'round'
25 | },
26 | iconSize: {
27 | type: null,
28 | value: 20
29 | }
30 | },
31 | methods: {
32 | emitChange: function (value) {
33 | var instance = this.parent || this;
34 | instance.$emit('input', value);
35 | instance.$emit('change', value);
36 | },
37 | onChange: function () {
38 | if (!this.data.disabled) {
39 | this.emitChange(this.data.name);
40 | }
41 | },
42 | onClickLabel: function () {
43 | var _a = this.data, disabled = _a.disabled, labelDisabled = _a.labelDisabled, name = _a.name;
44 | if (!disabled && !labelDisabled) {
45 | this.emitChange(name);
46 | }
47 | }
48 | }
49 | });
50 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/radio/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
21 |
22 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-radio{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{-webkit-flex:none;flex:none}.van-radio__icon{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:1em;height:1em;color:transparent;text-align:center;transition-property:color,border-color,background-color;border:1px solid #c8c9cc;border:1px solid var(--radio-border-color,#c8c9cc);font-size:20px;font-size:var(--radio-size,20px);transition-duration:.2s;transition-duration:var(--radio-transition-duration,.2s)}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{color:#fff;color:var(--white,#fff);background-color:#1989fa;background-color:var(--radio-checked-icon-color,#1989fa);border-color:#1989fa;border-color:var(--radio-checked-icon-color,#1989fa)}.van-radio__icon--disabled{background-color:#ebedf0;background-color:var(--radio-disabled-background-color,#ebedf0);border-color:#c8c9cc;border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:#c8c9cc;color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;margin-left:10px;margin-left:var(--radio-label-margin,10px);color:#323233;color:var(--radio-label-color,#323233);line-height:20px;line-height:var(--radio-size,20px)}.van-radio__label--left{float:left;margin:0 10px 0 0;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:#c8c9cc;color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/rate/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
13 |
22 |
23 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-rate{display:-webkit-inline-flex;display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{position:relative;padding:0 2px;padding:0 var(--rate-horizontal-padding,2px)}.van-rate__icon{display:block;height:1em;font-size:20px;font-size:var(--rate-icon-size,20px)}.van-rate__icon--half{position:absolute;top:0;width:.5em;overflow:hidden;left:2px;left:var(--rate-horizontal-padding,2px)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/row/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | relation: {
6 | name: 'col',
7 | type: 'descendant',
8 | current: 'row',
9 | linked: function (target) {
10 | if (this.data.gutter) {
11 | target.setGutter(this.data.gutter);
12 | }
13 | }
14 | },
15 | props: {
16 | gutter: {
17 | type: Number,
18 | observer: 'setGutter'
19 | }
20 | },
21 | data: {
22 | viewStyle: '',
23 | },
24 | mounted: function () {
25 | if (this.data.gutter) {
26 | this.setGutter();
27 | }
28 | },
29 | methods: {
30 | setGutter: function () {
31 | var _this = this;
32 | var gutter = this.data.gutter;
33 | var margin = "-" + Number(gutter) / 2 + "px";
34 | var viewStyle = gutter
35 | ? "margin-right: " + margin + "; margin-left: " + margin + ";"
36 | : '';
37 | this.setData({ viewStyle: viewStyle });
38 | this.getRelationNodes('../col/index').forEach(function (col) {
39 | col.setGutter(_this.data.gutter);
40 | });
41 | }
42 | }
43 | });
44 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/row/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/row/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/row/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-row:after{display:table;clear:both;content:""}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/search/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-field": "../field/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/search/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 | {{ label }}
9 |
10 |
11 |
36 |
37 |
38 |
39 |
40 |
41 |
47 |
48 | {{ actionText }}
49 |
50 |
51 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/search/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-search{-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;padding:var(--search-padding,10px 12px)}.van-search,.van-search__content{display:-webkit-flex;display:flex}.van-search__content{-webkit-flex:1;flex:1;padding-left:8px;padding-left:var(--padding-xs,8px);border-radius:2px;border-radius:var(--border-radius-sm,2px);background-color:#f7f8fa;background-color:var(--search-background-color,#f7f8fa)}.van-search__content--round{border-radius:17px;border-radius:calc(var(--search-input-height, 34px)/2)}.van-search__label{padding:0 5px;padding:var(--search-label-padding,0 5px);font-size:14px;font-size:var(--search-label-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-label-color,#323233)}.van-search__field{-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#969799;color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{padding:0 8px;padding:var(--search-action-padding,0 8px);font-size:14px;font-size:var(--search-action-font-size,14px);line-height:34px;line-height:var(--search-input-height,34px);color:#323233;color:var(--search-action-text-color,#323233)}.van-search__action--hover{background-color:#f2f3f5;background-color:var(--active-color,#f2f3f5)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | classes: [
6 | 'active-class',
7 | 'disabled-class',
8 | ],
9 | relation: {
10 | type: 'ancestor',
11 | name: 'sidebar',
12 | current: 'sidebar-item',
13 | },
14 | props: {
15 | dot: Boolean,
16 | info: null,
17 | title: String,
18 | disabled: Boolean
19 | },
20 | methods: {
21 | onClick: function () {
22 | var _this = this;
23 | var parent = this.parent;
24 | if (!parent || this.data.disabled) {
25 | return;
26 | }
27 | var index = parent.children.indexOf(this);
28 | parent.setActive(index).then(function () {
29 | _this.$emit('click', index);
30 | parent.$emit('change', index);
31 | });
32 | },
33 | setActive: function (selected) {
34 | return this.setData({ selected: selected });
35 | }
36 | }
37 | });
38 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-sidebar-item{display:block;box-sizing:border-box;overflow:hidden;word-wrap:break-word;border-left:3px solid transparent;-webkit-user-select:none;user-select:none;padding:20px 12px 20px 8px;padding:var(--sidebar-padding,20px 12px 20px 8px);font-size:14px;font-size:var(--sidebar-font-size,14px);line-height:20px;line-height:var(--sidebar-line-height,20px);color:#323233;color:var(--sidebar-text-color,#323233);background-color:#fafafa;background-color:var(--sidebar-background-color,#fafafa)}.van-sidebar-item__text{position:relative;display:inline-block}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:#f2f3f5;background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{color:#323233;color:var(--sidebar-selected-text-color,#323233);font-weight:500;font-weight:var(--sidebar-selected-font-weight,500);border-color:#ee0a24;border-color:var(--sidebar-selected-border-color,#ee0a24)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:#fff;background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:#c8c9cc;color:var(--sidebar-disabled-text-color,#c8c9cc)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | relation: {
6 | name: 'sidebar-item',
7 | type: 'descendant',
8 | current: 'sidebar',
9 | linked: function () {
10 | this.setActive(this.data.activeKey);
11 | },
12 | unlinked: function () {
13 | this.setActive(this.data.activeKey);
14 | }
15 | },
16 | props: {
17 | activeKey: {
18 | type: Number,
19 | value: 0,
20 | observer: 'setActive'
21 | }
22 | },
23 | beforeCreate: function () {
24 | this.currentActive = -1;
25 | },
26 | methods: {
27 | setActive: function (activeKey) {
28 | var _a = this, children = _a.children, currentActive = _a.currentActive;
29 | if (!children.length) {
30 | return Promise.resolve();
31 | }
32 | this.currentActive = activeKey;
33 | var stack = [];
34 | if (currentActive !== activeKey && children[currentActive]) {
35 | stack.push(children[currentActive].setActive(false));
36 | }
37 | if (children[activeKey]) {
38 | stack.push(children[activeKey].setActive(true));
39 | }
40 | return Promise.all(stack);
41 | }
42 | }
43 | });
44 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxml:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-sidebar{width:85px;width:var(--sidebar-width,85px)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | classes: ['avatar-class', 'title-class', 'row-class'],
6 | props: {
7 | row: {
8 | type: Number,
9 | value: 0,
10 | observer: function (value) {
11 | this.setData({ rowArray: Array.from({ length: value }) });
12 | },
13 | },
14 | title: Boolean,
15 | avatar: Boolean,
16 | loading: {
17 | type: Boolean,
18 | value: true
19 | },
20 | animate: {
21 | type: Boolean,
22 | value: true
23 | },
24 | avatarSize: {
25 | type: String,
26 | value: '32px'
27 | },
28 | avatarShape: {
29 | type: String,
30 | value: 'round'
31 | },
32 | titleWidth: {
33 | type: String,
34 | value: '40%'
35 | },
36 | rowWidth: {
37 | type: null,
38 | value: '100%',
39 | observer: function (val) {
40 | this.setData({ isArray: val instanceof Array });
41 | }
42 | }
43 | },
44 | data: {
45 | isArray: false,
46 | rowArray: [],
47 | }
48 | });
49 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
12 |
13 |
18 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-skeleton{display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:0 16px;padding:var(--skeleton-padding,0 16px)}.van-skeleton__avatar{-webkit-flex-shrink:0;flex-shrink:0;margin-right:16px;margin-right:var(--padding-md,16px);background-color:#f2f3f5;background-color:var(--skeleton-avatar-background-color,#f2f3f5)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{-webkit-flex:1;flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:8px;padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{height:16px;height:var(--skeleton-row-height,16px);background-color:#f2f3f5;background-color:var(--skeleton-row-background-color,#f2f3f5)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:12px;margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{-webkit-animation:van-skeleton-blink 1.2s ease-in-out infinite;animation:van-skeleton-blink 1.2s ease-in-out infinite}@-webkit-keyframes van-skeleton-blink{50%{opacity:.6}}@keyframes van-skeleton-blink{50%{opacity:.6}}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/slider/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
12 |
19 |
23 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;border-radius:var(--border-radius-max,999px);background-color:#ebedf0;background-color:var(--slider-inactive-background-color,#ebedf0)}.van-slider:before{position:absolute;right:0;left:0;content:"";top:-8px;top:-var(--padding-xs,8px);bottom:-8px;bottom:-var(--padding-xs,8px)}.van-slider__bar{position:relative;border-radius:inherit;transition:width .2s;transition:width var(--animation-duration-fast,.2s);background-color:#1989fa;background-color:var(--slider-active-background-color,#1989fa)}.van-slider__button{width:24px;height:24px;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.5);background-color:#fff;background-color:var(--slider-button-background-color,#fff)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider--disabled{opacity:.5}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
26 |
37 |
38 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/steps/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | var color_1 = require("../common/color");
5 | component_1.VantComponent({
6 | classes: ['desc-class'],
7 | props: {
8 | icon: String,
9 | steps: Array,
10 | active: Number,
11 | direction: {
12 | type: String,
13 | value: 'horizontal'
14 | },
15 | activeColor: {
16 | type: String,
17 | value: color_1.GREEN
18 | },
19 | inactiveColor: {
20 | type: String,
21 | value: color_1.GRAY_DARK
22 | },
23 | activeIcon: {
24 | type: String,
25 | value: 'checked'
26 | },
27 | inactiveIcon: String
28 | }
29 | });
30 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/steps/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 | {{ item.text }}
13 | {{ item.desc }}
14 |
15 |
16 |
17 |
23 |
28 |
29 |
30 |
31 |
32 |
36 |
37 |
38 |
39 |
40 |
41 | function get(index, active) {
42 | if (index < active) {
43 | return 'finish';
44 | } else if (index === active) {
45 | return 'process';
46 | }
47 |
48 | return 'inactive';
49 | }
50 |
51 | module.exports = get;
52 |
53 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | function wrapStyle(data) {
3 | if (data.fixed) {
4 | return 'top: ' + data.offsetTop + 'px;';
5 | }
6 |
7 | return '';
8 | }
9 |
10 | function containerStyle(data) {
11 | if (data.fixed) {
12 | return 'height: ' + data.height + 'px; z-index: ' + data.zIndex + ';';
13 | }
14 |
15 | return '';
16 | }
17 |
18 | module.exports = {
19 | wrapStyle: wrapStyle,
20 | containerStyle: containerStyle
21 | };
22 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-sticky{position:relative}.van-sticky-wrap--fixed{position:fixed;right:0;left:0}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | classes: [
6 | 'bar-class',
7 | 'price-class',
8 | 'button-class'
9 | ],
10 | props: {
11 | tip: {
12 | type: null,
13 | observer: 'updateTip'
14 | },
15 | tipIcon: String,
16 | type: Number,
17 | price: {
18 | type: null,
19 | observer: 'updatePrice'
20 | },
21 | label: String,
22 | loading: Boolean,
23 | disabled: Boolean,
24 | buttonText: String,
25 | currency: {
26 | type: String,
27 | value: '¥'
28 | },
29 | buttonType: {
30 | type: String,
31 | value: 'danger'
32 | },
33 | decimalLength: {
34 | type: Number,
35 | value: 2,
36 | observer: 'updatePrice'
37 | },
38 | suffixLabel: String,
39 | safeAreaInsetBottom: {
40 | type: Boolean,
41 | value: true
42 | }
43 | },
44 | methods: {
45 | updatePrice: function () {
46 | var _a = this.data, price = _a.price, decimalLength = _a.decimalLength;
47 | var priceStrArr = typeof price === 'number' && (price / 100).toFixed(decimalLength).split('.');
48 | this.setData({
49 | hasPrice: typeof price === 'number',
50 | integerStr: priceStrArr && priceStrArr[0],
51 | decimalStr: decimalLength && priceStrArr ? "." + priceStrArr[1] : ''
52 | });
53 | },
54 | updateTip: function () {
55 | this.setData({ hasTip: typeof this.data.tip === 'string' });
56 | },
57 | onSubmit: function (event) {
58 | this.$emit('submit', event.detail);
59 | }
60 | }
61 | });
62 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-button": "../button/index",
5 | "van-icon": "../icon/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
13 |
14 | {{ tip }}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | {{ label || '合计:' }}
23 |
24 | {{ currency }}
25 | {{ integerStr }}{{decimalStr}}
26 |
27 | {{ suffixLabel }}
28 |
29 |
39 | {{ loading ? '' : buttonText }}
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/switch/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-loading": "../loading/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tab/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | relation: {
6 | name: 'tabs',
7 | type: 'ancestor',
8 | current: 'tab',
9 | },
10 | props: {
11 | dot: {
12 | type: Boolean,
13 | observer: 'update'
14 | },
15 | info: {
16 | type: null,
17 | observer: 'update'
18 | },
19 | title: {
20 | type: String,
21 | observer: 'update'
22 | },
23 | disabled: {
24 | type: Boolean,
25 | observer: 'update'
26 | },
27 | titleStyle: {
28 | type: String,
29 | observer: 'update'
30 | },
31 | name: {
32 | type: [Number, String],
33 | value: '',
34 | }
35 | },
36 | data: {
37 | active: false
38 | },
39 | methods: {
40 | getComputedName: function () {
41 | if (this.data.name !== '') {
42 | return this.data.name;
43 | }
44 | return this.index;
45 | },
46 | updateRender: function (active, parent) {
47 | var parentData = parent.data;
48 | this.inited = this.inited || active;
49 | this.setData({
50 | active: active,
51 | shouldRender: this.inited || !parentData.lazyRender,
52 | shouldShow: active || parentData.animated
53 | });
54 | },
55 | update: function () {
56 | if (this.parent) {
57 | this.parent.updateTabs();
58 | }
59 | }
60 | }
61 | });
62 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';:host{-webkit-flex-shrink:0;flex-shrink:0;width:100%}.van-tab__pane,:host{box-sizing:border-box}.van-tab__pane{overflow-y:auto;-webkit-overflow-scrolling:touch}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | info: null,
7 | name: null,
8 | icon: String,
9 | dot: Boolean
10 | },
11 | relation: {
12 | name: 'tabbar',
13 | type: 'ancestor',
14 | current: 'tabbar-item',
15 | },
16 | data: {
17 | active: false
18 | },
19 | methods: {
20 | onClick: function () {
21 | if (this.parent) {
22 | this.parent.onChange(this);
23 | }
24 | this.$emit('click');
25 | },
26 | updateFromParent: function () {
27 | var parent = this.parent;
28 | if (!parent) {
29 | return;
30 | }
31 | var index = parent.children.indexOf(this);
32 | var parentData = parent.data;
33 | var data = this.data;
34 | var active = (data.name || index) === parentData.active;
35 | var patch = {};
36 | if (active !== data.active) {
37 | patch.active = active;
38 | }
39 | if (parentData.activeColor !== data.activeColor) {
40 | patch.activeColor = parentData.activeColor;
41 | }
42 | if (parentData.inactiveColor !== data.inactiveColor) {
43 | patch.inactiveColor = parentData.inactiveColor;
44 | }
45 | return Object.keys(patch).length > 0
46 | ? this.set(patch)
47 | : Promise.resolve();
48 | }
49 | }
50 | });
51 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-info": "../info/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
14 |
15 |
19 |
20 |
21 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;height:100%;color:#646566;color:var(--tabbar-item-text-color,#646566);font-size:12px;font-size:var(--tabbar-item-font-size,12px);line-height:1;line-height:var(--tabbar-item-line-height,1)}.van-tabbar-item__icon{position:relative;margin-bottom:5px;margin-bottom:var(--tabbar-item-margin-bottom,5px);font-size:18px;font-size:var(--tabbar-item-icon-size,18px)}.van-tabbar-item__icon__inner{display:block;min-width:1em}.van-tabbar-item--active{color:#1989fa;color:var(--tabbar-item-active-color,#1989fa)}.van-tabbar-item__info{margin-top:2px}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | relation: {
6 | name: 'tabbar-item',
7 | type: 'descendant',
8 | current: 'tabbar',
9 | linked: function (target) {
10 | target.parent = this;
11 | target.updateFromParent();
12 | },
13 | unlinked: function () {
14 | this.updateChildren();
15 | }
16 | },
17 | props: {
18 | active: {
19 | type: null,
20 | observer: 'updateChildren'
21 | },
22 | activeColor: {
23 | type: String,
24 | observer: 'updateChildren'
25 | },
26 | inactiveColor: {
27 | type: String,
28 | observer: 'updateChildren'
29 | },
30 | fixed: {
31 | type: Boolean,
32 | value: true
33 | },
34 | border: {
35 | type: Boolean,
36 | value: true
37 | },
38 | zIndex: {
39 | type: Number,
40 | value: 1
41 | },
42 | safeAreaInsetBottom: {
43 | type: Boolean,
44 | value: true
45 | }
46 | },
47 | methods: {
48 | updateChildren: function () {
49 | var children = this.children;
50 | if (!Array.isArray(children) || !children.length) {
51 | return Promise.resolve();
52 | }
53 | return Promise.all(children.map(function (child) { return child.updateFromParent(); }));
54 | },
55 | onChange: function (child) {
56 | var index = this.children.indexOf(child);
57 | var active = child.data.name || index;
58 | if (active !== this.data.active) {
59 | this.$emit('change', active);
60 | }
61 | }
62 | }
63 | });
64 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;width:100%;height:50px;height:var(--tabbar-height,50px);background-color:#fff;background-color:var(--tabbar-background-color,#fff)}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:env(safe-area-inset-bottom)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index",
5 | "van-sticky": "../sticky/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | function tabClass(active, ellipsis) {
3 | var classes = ['tab-class'];
4 |
5 | if (active) {
6 | classes.push('tab-active-class');
7 | }
8 |
9 | if (ellipsis) {
10 | classes.push('van-ellipsis');
11 | }
12 |
13 | return classes.join(' ');
14 | }
15 |
16 | function tabStyle(
17 | active,
18 | ellipsis,
19 | color,
20 | type,
21 | disabled,
22 | activeColor,
23 | inactiveColor,
24 | swipeThreshold,
25 | scrollable
26 | ) {
27 | var styles = [];
28 | var isCard = type === 'card';
29 | // card theme color
30 | if (color && isCard) {
31 | styles.push('border-color:' + color);
32 |
33 | if (!disabled) {
34 | if (active) {
35 | styles.push('background-color:' + color);
36 | } else {
37 | styles.push('color:' + color);
38 | }
39 | }
40 | }
41 |
42 | var titleColor = active ? activeColor : inactiveColor;
43 | if (titleColor) {
44 | styles.push('color:' + titleColor);
45 | }
46 |
47 | if (scrollable && ellipsis) {
48 | styles.push('flex-basis:' + 88 / swipeThreshold + '%');
49 | }
50 |
51 | return styles.join(';');
52 | }
53 |
54 | function trackStyle(data) {
55 | if (!data.animated) {
56 | return '';
57 | }
58 |
59 | return [
60 | 'transform: translate3d(' + -100 * data.currentIndex + '%, 0, 0)',
61 | '-webkit-transition-duration: ' + data.duration + 's',
62 | 'transition-duration: ' + data.duration + 's'
63 | ].join(';');
64 | }
65 |
66 | module.exports.tabClass = tabClass;
67 | module.exports.tabStyle = tabStyle;
68 | module.exports.trackStyle = trackStyle;
69 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tag/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | size: String,
7 | mark: Boolean,
8 | color: String,
9 | plain: Boolean,
10 | round: Boolean,
11 | textColor: String,
12 | type: {
13 | type: String,
14 | value: 'default'
15 | },
16 | closeable: Boolean
17 | },
18 | methods: {
19 | onClose: function () {
20 | this.$emit('close');
21 | }
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tag/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tag{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;line-height:normal;padding:.2em .5em;padding:var(--tag-padding,.2em .5em);color:#fff;color:var(--tag-text-color,#fff);font-size:10px;font-size:var(--tag-font-size,10px);border-radius:.2em;border-radius:var(--tag-border-radius,.2em)}.van-tag:after{border-color:currentColor;border-radius:.2em * 2;border-radius:var(--tag-border-radius,.2em) * 2}.van-tag--default{background-color:#969799;background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:#969799;color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:#ee0a24;background-color:var(--tag-dander-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:#ee0a24;color:var(--tag-dander-color,#ee0a24)}.van-tag--primary{background-color:#1989fa;background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:#1989fa;color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:#07c160;background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:#07c160;color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:#ff976a;background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:#ff976a;color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:#fff;background-color:var(--tag-plain-background-color,#fff)}.van-tag--mark{padding-right:.7em}.van-tag--mark,.van-tag--mark:after{border-radius:0 999px 999px 0;border-radius:0 var(--tag-round-border-radius,999px) var(--tag-round-border-radius,999px) 0}.van-tag--round,.van-tag--round:after{border-radius:999px;border-radius:var(--tag-round-border-radius,999px)}.van-tag--medium{font-size:12px;font-size:var(--tag-medium-font-size,12px)}.van-tag--large{font-size:14px;font-size:var(--tag-large-font-size,14px)}.van-tag__close{margin-left:2px}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/toast/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | component_1.VantComponent({
5 | props: {
6 | show: Boolean,
7 | mask: Boolean,
8 | message: String,
9 | forbidClick: Boolean,
10 | zIndex: {
11 | type: Number,
12 | value: 1000
13 | },
14 | type: {
15 | type: String,
16 | value: 'text'
17 | },
18 | loadingType: {
19 | type: String,
20 | value: 'circular'
21 | },
22 | position: {
23 | type: String,
24 | value: 'middle'
25 | }
26 | },
27 | methods: {
28 | // for prevent touchmove
29 | noop: function () { }
30 | }
31 | });
32 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/toast/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-loading": "../loading/index",
6 | "van-overlay": "../overlay/index",
7 | "van-transition": "../transition/index"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
16 |
17 | {{ message }}
18 |
19 |
20 |
21 |
27 |
28 | {{ message }}
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:initial;color:#fff;color:var(--toast-text-color,#fff);font-size:14px;font-size:var(--toast-font-size,14px);line-height:20px;line-height:var(--toast-line-height,20px);white-space:pre-wrap;word-wrap:break-word;background-color:rgba(50,50,51,.88);background-color:var(--toast-background-color,rgba(50,50,51,.88));border-radius:4px;border-radius:var(--toast-border-radius,4px)}.van-toast__container{position:fixed;top:50%;left:50%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:70%;max-width:var(--toast-max-width,70%)}.van-toast--text{min-width:96px;min-width:var(--toast-text-min-width,96px);padding:8px 12px;padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{width:90px;width:var(--toast-default-width,90px);min-height:90px;min-height:var(--toast-default-min-height,90px);padding:16px;padding:var(--toast-default-padding,16px)}.van-toast--icon .van-toast__icon{font-size:48px;font-size:var(--toast-icon-size,48px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translateY(-30vh);transform:translateY(-30vh)}.van-toast--bottom{-webkit-transform:translateY(30vh);transform:translateY(30vh)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/transition/index.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var component_1 = require("../common/component");
4 | var transition_1 = require("../mixins/transition");
5 | component_1.VantComponent({
6 | classes: [
7 | 'enter-class',
8 | 'enter-active-class',
9 | 'enter-to-class',
10 | 'leave-class',
11 | 'leave-active-class',
12 | 'leave-to-class'
13 | ],
14 | mixins: [transition_1.transition(true)]
15 | });
16 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/transition/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-transition{transition-timing-function:ease}.van-fade-enter-active,.van-fade-leave-active{transition-property:opacity}.van-fade-enter,.van-fade-leave-to{opacity:0}.van-fade-down-enter-active,.van-fade-down-leave-active,.van-fade-left-enter-active,.van-fade-left-leave-active,.van-fade-right-enter-active,.van-fade-right-leave-active,.van-fade-up-enter-active,.van-fade-up-leave-active{transition-property:opacity,-webkit-transform;transition-property:opacity,transform;transition-property:opacity,transform,-webkit-transform}.van-fade-up-enter,.van-fade-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0}.van-fade-down-enter,.van-fade-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);opacity:0}.van-fade-left-enter,.van-fade-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);opacity:0}.van-fade-right-enter,.van-fade-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);opacity:0}.van-slide-down-enter-active,.van-slide-down-leave-active,.van-slide-left-enter-active,.van-slide-left-leave-active,.van-slide-right-enter-active,.van-slide-right-leave-active,.van-slide-up-enter-active,.van-slide-up-leave-active{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.van-slide-up-enter,.van-slide-up-leave-to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.van-slide-down-enter,.van-slide-down-leave-to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.van-slide-left-enter,.van-slide-left-leave-to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-slide-right-enter,.van-slide-right-leave-to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-sidebar": "../sidebar/index",
6 | "van-sidebar-item": "../sidebar-item/index"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
19 |
20 |
21 |
22 |
23 |
30 | {{ item.text }}
31 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | var array = require('../wxs/array.wxs');
3 |
4 | function isActive (activeList, itemId) {
5 | if (array.isArray(activeList)) {
6 | return activeList.indexOf(itemId) > -1;
7 | }
8 |
9 | return activeList === itemId;
10 | }
11 |
12 | module.exports.isActive = isActive;
13 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tree-select{position:relative;display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;font-size:14px;font-size:var(--tree-select-font-size,14px)}.van-tree-select__nav{-webkit-flex:1;flex:1;background-color:#fafafa;background-color:var(--tree-select-nav-background-color,#fafafa);--sidebar-padding:12px 8px 12px 12px}.van-tree-select__nav__inner{width:100%!important;height:100%}.van-tree-select__content{-webkit-flex:2;flex:2;background-color:#fff;background-color:var(--tree-select-content-background-color,#fff)}.van-tree-select__item{position:relative;font-weight:700;padding:0 32px 0 16px;padding:0 32px 0 var(--padding-md,16px);line-height:44px;line-height:var(--tree-select-item-height,44px)}.van-tree-select__item--active{color:#ee0a24;color:var(--tree-select-item-active-color,#ee0a24)}.van-tree-select__item--disabled{color:#c8c9cc;color:var(--tree-select-item-disabled-color,#c8c9cc)}.van-tree-select__selected{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:16px;right:var(--padding-md,16px)}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-uploader{position:relative;display:inline-block}.van-uploader__wrapper{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.van-uploader__slot:empty{display:none}.van-uploader__slot:not(:empty)+.van-uploader__upload{display:none!important}.van-uploader__upload{position:relative;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;width:80px;height:80px;margin:0 8px 8px 0;background-color:#fff;border:1px dashed #ebedf0;border-radius:4px}.van-uploader__upload-icon{display:inline-block;width:24px;height:24px;color:#969799;font-size:24px}.van-uploader__upload-text{margin-top:8px;color:#969799;font-size:12px}.van-uploader__upload--disabled{opacity:.5;opacity:var(--uploader-disabled-opacity,.5)}.van-uploader__preview{position:relative;margin:0 8px 8px 0}.van-uploader__preview-image{display:block;width:80px;height:80px;border-radius:4px}.van-uploader__preview-delete{position:absolute;top:-8px;right:-8px;color:#969799;font-size:18px;background-color:#fff;border-radius:100%}.van-uploader__file{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;width:80px;height:80px;background-color:#f7f8fa;border-radius:4px}.van-uploader__file-icon{display:inline-block;width:20px;height:20px;color:#646566;font-size:20px}.van-uploader__file-name{box-sizing:border-box;width:100%;margin-top:8px;padding:0 5px;color:#646566;font-size:12px;text-align:center}
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/uploader/utils.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var IMAGE_EXT = ['jpeg', 'jpg', 'gif', 'png', 'svg'];
4 | function isImageUrl(url) {
5 | return IMAGE_EXT.some(function (ext) { return url.indexOf("." + ext) !== -1; });
6 | }
7 | exports.isImageUrl = isImageUrl;
8 | function isImageFile(item) {
9 | if (item.type) {
10 | return item.type.indexOf('image') === 0;
11 | }
12 | if (item.path) {
13 | return isImageUrl(item.path);
14 | }
15 | if (item.url) {
16 | return isImageUrl(item.url);
17 | }
18 | return false;
19 | }
20 | exports.isImageFile = isImageFile;
21 | function isVideo(res, accept) {
22 | return accept === 'video';
23 | }
24 | exports.isVideo = isVideo;
25 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/wxs/add-unit.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | var REGEXP = getRegExp('^\d+(\.\d+)?$');
3 |
4 | function addUnit(value) {
5 | if (value == null) {
6 | return undefined;
7 | }
8 |
9 | return REGEXP.test('' + value) ? value + 'px' : value;
10 | }
11 |
12 | module.exports = {
13 | addUnit: addUnit
14 | };
15 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/wxs/array.wxs:
--------------------------------------------------------------------------------
1 | function isArray(array) {
2 | return array && array.constructor === 'Array';
3 | }
4 |
5 | module.exports.isArray = isArray;
6 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/wxs/bem.wxs:
--------------------------------------------------------------------------------
1 | var array = require('./array.wxs');
2 | var object = require('./object.wxs');
3 | var PREFIX = 'van-';
4 |
5 | function join(name, mods) {
6 | name = PREFIX + name;
7 | mods = mods.map(function(mod) {
8 | return name + '--' + mod;
9 | });
10 | mods.unshift(name);
11 | return mods.join(' ');
12 | }
13 |
14 | function traversing(mods, conf) {
15 | if (!conf) {
16 | return;
17 | }
18 |
19 | if (typeof conf === 'string' || typeof conf === 'number') {
20 | mods.push(conf);
21 | } else if (array.isArray(conf)) {
22 | conf.forEach(function(item) {
23 | traversing(mods, item);
24 | });
25 | } else if (typeof conf === 'object') {
26 | object.keys(conf).forEach(function(key) {
27 | conf[key] && mods.push(key);
28 | });
29 | }
30 | }
31 |
32 | function bem(name, conf) {
33 | var mods = [];
34 | traversing(mods, conf);
35 | return join(name, mods);
36 | }
37 |
38 | module.exports.bem = bem;
39 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/wxs/memoize.wxs:
--------------------------------------------------------------------------------
1 | /**
2 | * Simple memoize
3 | * wxs doesn't support fn.apply, so this memoize only support up to 2 args
4 | */
5 |
6 | function isPrimitive(value) {
7 | var type = typeof value;
8 | return (
9 | type === 'boolean' ||
10 | type === 'number' ||
11 | type === 'string' ||
12 | type === 'undefined' ||
13 | value === null
14 | );
15 | }
16 |
17 | // mock simple fn.call in wxs
18 | function call(fn, args) {
19 | if (args.length === 2) {
20 | return fn(args[0], args[1]);
21 | }
22 |
23 | if (args.length === 1) {
24 | return fn(args[0]);
25 | }
26 |
27 | return fn();
28 | }
29 |
30 | function serializer(args) {
31 | if (args.length === 1 && isPrimitive(args[0])) {
32 | return args[0];
33 | }
34 | var obj = {};
35 | for (var i = 0; i < args.length; i++) {
36 | obj['key' + i] = args[i];
37 | }
38 | return JSON.stringify(obj);
39 | }
40 |
41 | function memoize(fn) {
42 | var cache = {};
43 |
44 | return function() {
45 | var key = serializer(arguments);
46 | if (cache[key] === undefined) {
47 | cache[key] = call(fn, arguments);
48 | }
49 |
50 | return cache[key];
51 | };
52 | }
53 |
54 | module.exports.memoize = memoize;
55 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/wxs/object.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | var REGEXP = getRegExp('{|}|"', 'g');
3 |
4 | function keys(obj) {
5 | return JSON.stringify(obj)
6 | .replace(REGEXP, '')
7 | .split(',')
8 | .map(function(item) {
9 | return item.split(':')[0];
10 | });
11 | }
12 |
13 | module.exports.keys = keys;
14 |
--------------------------------------------------------------------------------
/miniprogram/miniprogram_npm/@vant/weapp/wxs/utils.wxs:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | var bem = require('./bem.wxs').bem;
3 | var memoize = require('./memoize.wxs').memoize;
4 | var addUnit = require('./add-unit.wxs').addUnit;
5 |
6 | module.exports = {
7 | bem: memoize(bem),
8 | memoize: memoize,
9 | addUnit: addUnit
10 | };
11 |
--------------------------------------------------------------------------------
/miniprogram/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "miniprogram",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@vant/weapp": {
8 | "version": "1.0.6",
9 | "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.0.6.tgz",
10 | "integrity": "sha512-pBItrE8EA4j3R+/1sXe8S1WvukQMJ3SNsZzwIA8Vwjw9A3HiVmIa7zM9fX32rZATiYn6HYYd08V52mQTemTocw=="
11 | },
12 | "moment": {
13 | "version": "2.24.0",
14 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
15 | "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/miniprogram/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "miniprogram",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "app.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "@vant/weapp": "^1.0.6",
13 | "moment": "^2.24.0"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/miniprogram/pages/important/important.js:
--------------------------------------------------------------------------------
1 | // miniprogram/pages/important/important.js
2 | import {
3 | formatDate
4 | } from '../../utils/utils.js'
5 | import {
6 | queryTodo
7 | } from '../../utils/queryTodo.js'
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | todoList: [],
15 | loading: true, // 第一次加载
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: function(options) {
22 |
23 | },
24 | onShow() {
25 | console.log('show')
26 | this.queryTodoList()
27 | },
28 | queryTodoList() {
29 | queryTodo({
30 | isImportant: true
31 | }).then(res => {
32 | console.log('res', res)
33 | if (res.data) {
34 | this.setData({
35 | todoList: res.data,
36 | loading: false
37 | })
38 | }
39 | })
40 | },
41 | onAddTodoSuccess(res) {
42 | console.log('res', res)
43 | this.queryTodoList()
44 | },
45 |
46 | removesuccessHandle(e){
47 | console.log('todoId',e)
48 | this.queryTodoList()
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面初次渲染完成
53 | */
54 | onReady: function() {
55 |
56 | },
57 |
58 | /**
59 | * 生命周期函数--监听页面隐藏
60 | */
61 | onHide: function() {
62 |
63 | },
64 |
65 | /**
66 | * 生命周期函数--监听页面卸载
67 | */
68 | onUnload: function() {
69 |
70 | },
71 |
72 | /**
73 | * 页面相关事件处理函数--监听用户下拉动作
74 | */
75 | onPullDownRefresh: function() {
76 |
77 | },
78 |
79 | /**
80 | * 页面上拉触底事件的处理函数
81 | */
82 | onReachBottom: function() {
83 |
84 | },
85 | })
--------------------------------------------------------------------------------
/miniprogram/pages/important/important.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "backgroundColor": "#A9C3F8",
4 | "backgroundTextStyle": "light",
5 | "navigationBarBackgroundColor": "#A9C3F8",
6 | "navigationBarTitleText": "重要",
7 | "navigationBarTextStyle": "white"
8 | }
--------------------------------------------------------------------------------
/miniprogram/pages/important/important.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram/pages/important/important.wxss:
--------------------------------------------------------------------------------
1 | /* miniprogram/pages/important/important.wxss */
2 | page{
3 | background: #A9C3F8;
4 | padding-bottom: 140rpx;
5 | }
6 |
7 | .important-wrapper{
8 | padding-top: 80rpx;
9 | }
10 |
11 | /* todo-input */
12 | .todo-input-wrapper{
13 | padding: 20rpx;
14 | }
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "side-menu": "../../components/side-menu/SideMenu"
4 | },
5 | "backgroundColor": "#A9C3F8",
6 | "backgroundTextStyle": "light",
7 | "navigationBarBackgroundColor": "#A9C3F8",
8 | "navigationBarTitleText": "",
9 | "navigationBarTextStyle": "black"
10 | }
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 我的一天
6 |
7 | {{currentDate}}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | background: #a9c3f8;
3 | }
4 |
5 | .page {
6 | padding-bottom: 140rpx;
7 | }
8 |
9 | .page-top {
10 | display: flex;
11 | justify-content: space-between;
12 | padding: 20rpx;
13 | background: #a9c3f8;
14 | color: #fff;
15 | }
16 |
17 | .top-left .day-text {
18 | font-size: 20px;
19 | }
20 |
21 | .top-left .day-date {
22 | font-size: 14px;
23 | }
24 |
25 | .top-right {
26 | font-size: 20px;
27 | }
28 |
--------------------------------------------------------------------------------
/miniprogram/pages/index/user-unlogin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HelTi/todo-done/4ab0ce5b3bfaded5fb7d7dccfd575c7a7e927c29/miniprogram/pages/index/user-unlogin.png
--------------------------------------------------------------------------------
/miniprogram/pages/todo-detail/todo-detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "backgroundColor": "#A9C3F8",
4 | "backgroundTextStyle": "light",
5 | "navigationBarBackgroundColor": "#A9C3F8",
6 | "navigationBarTitleText": "",
7 | "navigationBarTextStyle": "white"
8 | }
--------------------------------------------------------------------------------
/miniprogram/pages/todo-detail/todo-detail.wxss:
--------------------------------------------------------------------------------
1 | .todo-item-content {
2 | background-color: #fff;
3 | border-radius: 15rpx;
4 | display: flex;
5 | align-items: center;
6 | /* justify-content: space-between; */
7 | padding: 0 40rpx;
8 | height: 100rpx;
9 | /* border-bottom: 1px solid #dedede; */
10 | margin-bottom: 2px;
11 | }
12 |
13 | .todo-check {
14 | width: 50rpx;
15 | }
16 |
17 | .todo-body {
18 | width: 600rpx;
19 | padding-left: 10rpx;
20 | font-size: 14px;
21 | }
22 |
23 | .todo-body .todo-des {
24 | font-size: 12px;
25 | }
26 |
27 | .todo-des {
28 | color: #a0a0a0;
29 | }
30 |
31 | .todo-setting {
32 | padding: 0 40rpx 40rpx;
33 | }
34 |
35 | .todo-setting .setting-item {
36 | border-bottom: 1px solid #f0f0f0;
37 | display: flex;
38 | padding: 25rpx 0;
39 | align-items: center;
40 | font-size: 14px;
41 | color: #455a6499;
42 | }
43 |
44 | .active-item {
45 | color: #1989fa !important;
46 | }
47 |
48 | .setting-icon {
49 | width: 50rpx;
50 | font-size: 16px;
51 | height: 100%;
52 | display: flex;
53 | align-items: center;
54 | }
55 |
56 | .setting-body {
57 | padding-left: 10rpx;
58 | }
59 |
60 | /* bottom */
61 |
62 | .tips-bottom-content {
63 | display: flex;
64 | font-size: 14px;
65 | align-items: center;
66 | padding: 30rpx 40rpx;
67 | color: #797575;
68 | }
69 |
70 | .tips-bottom-content .placeholder {
71 | width: 90rpx;
72 | }
73 |
74 | .delete-btn{
75 | color: #ffc107;
76 | }
77 |
78 | .tips-body {
79 | width: 570rpx;
80 | display: flex;
81 | align-items: center;
82 | justify-content: center;
83 | }
84 |
--------------------------------------------------------------------------------
/miniprogram/pages/todo-list/todo-list.js:
--------------------------------------------------------------------------------
1 | // miniprogram/pages/todo-list/todo-list.js
2 | import {
3 | formatDate
4 | } from '../../utils/utils.js'
5 | import {
6 | queryTodo
7 | } from '../../utils/queryTodo.js'
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | todoList: [],
15 | loading: true
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: function(options) {
22 |
23 | },
24 | onShow: function() {
25 | this.queryTodoList()
26 | },
27 | queryTodoList() {
28 | queryTodo().then(res => {
29 | console.log('res', res)
30 | if (res.data) {
31 | this.setData({
32 | todoList: res.data,
33 | loading: false
34 | })
35 | }
36 | })
37 | },
38 | removesuccessHandle(e){
39 | console.log('todoId',e)
40 | this.queryTodoList()
41 | },
42 | onAddTodoSuccess(res) {
43 | console.log('res', res)
44 | this.queryTodoList()
45 | },
46 |
47 | /**
48 | * 生命周期函数--监听页面初次渲染完成
49 | */
50 | onReady: function() {
51 |
52 | },
53 | /**
54 | * 生命周期函数--监听页面隐藏
55 | */
56 | onHide: function() {
57 |
58 | },
59 |
60 | /**
61 | * 生命周期函数--监听页面卸载
62 | */
63 | onUnload: function() {
64 |
65 | },
66 |
67 | /**
68 | * 页面相关事件处理函数--监听用户下拉动作
69 | */
70 | onPullDownRefresh: function() {
71 |
72 | },
73 |
74 | /**
75 | * 页面上拉触底事件的处理函数
76 | */
77 | onReachBottom: function() {
78 |
79 | },
80 |
81 | /**
82 | * 用户点击右上角分享
83 | */
84 | onShareAppMessage: function() {
85 |
86 | }
87 | })
--------------------------------------------------------------------------------
/miniprogram/pages/todo-list/todo-list.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "backgroundColor": "#A9C3F8",
4 | "backgroundTextStyle": "light",
5 | "navigationBarBackgroundColor": "#A9C3F8",
6 | "navigationBarTitleText": "代办列表",
7 | "navigationBarTextStyle": "white"
8 | }
--------------------------------------------------------------------------------
/miniprogram/pages/todo-list/todo-list.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/miniprogram/pages/todo-list/todo-list.wxss:
--------------------------------------------------------------------------------
1 | /* miniprogram/pages/important/important.wxss */
2 | page{
3 | background: #A9C3F8;
4 | padding-bottom: 140rpx;
5 | }
6 |
7 | .important-wrapper{
8 | padding-top: 80rpx;
9 | }
10 |
11 | /* todo-input */
12 | .todo-input-wrapper{
13 | padding: 20rpx;
14 | }
--------------------------------------------------------------------------------
/miniprogram/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/miniprogram/style/public.wxss:
--------------------------------------------------------------------------------
1 | /* 1像素边框 */
2 |
3 | .van-hairline, .van-hairline--bottom, .van-hairline--left, .van-hairline--right,
4 | .van-hairline--surround, .van-hairline--top, .van-hairline--top-bottom {
5 | position: relative;
6 | }
7 |
8 | .van-hairline--bottom::after, .van-hairline--left::after,
9 | .van-hairline--right::after, .van-hairline--surround::after,
10 | .van-hairline--top-bottom::after, .van-hairline--top::after,
11 | .van-hairline::after {
12 | content: ' ';
13 | position: absolute;
14 | pointer-events: none;
15 | box-sizing: border-box;
16 | -webkit-transform-origin: center;
17 | transform-origin: center;
18 | top: -50%;
19 | left: -50%;
20 | right: -50%;
21 | bottom: -50%;
22 | -webkit-transform: scale(0.5);
23 | transform: scale(0.5);
24 | border: 0 solid #efefef;
25 | }
26 |
27 | .van-hairline--top::after {
28 | border-top-width: 1px;
29 | }
30 |
31 | .van-hairline--left::after {
32 | border-left-width: 1px;
33 | }
34 |
35 | .van-hairline--right::after {
36 | border-right-width: 1px;
37 | }
38 |
39 | .van-hairline--bottom::after {
40 | border-bottom-width: 1px;
41 | }
42 |
43 | .van-hairline--top-bottom::after {
44 | border-width: 1px 0;
45 | }
46 |
47 | .van-hairline--surround::after {
48 | border-width: 1px;
49 | }
50 |
51 | .fixed-bottom{
52 | position: fixed;
53 | bottom: 0;
54 | right: 0;
55 | left: 0;
56 | }
57 |
58 | /* todo-input */
59 |
60 | .todo-input-wrapper {
61 | padding: 20rpx;
62 | background: #a9c3f8;
63 | }
64 |
--------------------------------------------------------------------------------
/miniprogram/utils/markTodoItem.js:
--------------------------------------------------------------------------------
1 | const moment = require('moment')
2 | /**
3 | * 标记todoitem 是否在我的一天、是否过期
4 | */
5 |
6 | export const markTodoItem = (item) => {
7 | let result = {}
8 | // 是否展示我的一天标记
9 | if (item.isMyday) {
10 | let curDate = new Date(moment().format('YYYY-MM-DD'));
11 | let nextDate = new Date(moment().add(1, 'days').format('YYYY-MM-DD'))
12 | let addMydayDate = new Date(item.addMydayDate)
13 | let isShowMyday = (addMydayDate > curDate && addMydayDate < nextDate)
14 | console.log('isSHowMyday', isShowMyday)
15 | result.isShowMyday = isShowMyday
16 | }
17 | // 是否展示已过设定的截止日期
18 | if (item.due_date) {
19 | let curDate = new Date()
20 | let dueDate = new Date(item.due_date)
21 | let isShowDueDate = false
22 | if (item.done) {
23 | let completeDate = new Date(item.complete_date)
24 | if (completeDate > dueDate) {
25 | isShowDueDate = true
26 | }
27 | } else {
28 | if (curDate > dueDate) {
29 | isShowDueDate = true
30 | }
31 | }
32 | console.log('isShowDueDate', isShowDueDate)
33 | result.isShowDueDate = isShowDueDate
34 |
35 | }
36 |
37 | return result
38 | }
--------------------------------------------------------------------------------
/miniprogram/utils/todoDbHelper.js:
--------------------------------------------------------------------------------
1 | const db = wx.cloud.database()
2 | const dbCollection = db.collection('todos')
3 |
4 | /**
5 | * 通过id查询单个todo详情
6 | */
7 | export const queryTodoDetailById = (id) => {
8 | return dbCollection.where({
9 | _id: id
10 | }).get()
11 | }
12 |
13 | /**
14 | * 添加todoItem 三个地方,我的一天,重要,代办列表
15 | */
16 | export const addTodoItem = (params) => {
17 | const defaultParams = {
18 | // description: description, // 描述,标题
19 | create_date: new Date(), // 创建时间
20 | isMyday: false,
21 | addMydayDate: null, // 添加到我的一天的时间
22 | due_date: null, // 结束时间
23 | complete_date: null, // 完成时间
24 | done: false, // 是否完成
25 | isImportant: false, // 是否重要
26 | remark: '', // 备注
27 | type: 0,
28 | remind: false, // 是否提醒
29 | remind_date: null // 提醒时间
30 | }
31 | return dbCollection.add({
32 | data: {
33 | ...defaultParams,
34 | ...params
35 | }
36 | })
37 | }
38 |
39 | /**
40 | * 更新todoItem
41 | */
42 | export const updateTodoItem = (id, params) => {
43 | return dbCollection.doc(id).update({
44 | data: {
45 | ...params
46 | }
47 | })
48 | }
49 |
50 | /**
51 | * 删除todoItem
52 | */
53 |
54 | export const removeTodoItem = (id) => {
55 | return dbCollection.doc(id).remove()
56 | }
--------------------------------------------------------------------------------
/miniprogram/utils/tools.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | wx.$showToast = (title)=>{
4 | wx.showToast({
5 | title: title,
6 | })
7 | }
--------------------------------------------------------------------------------
/miniprogram/utils/utils.js:
--------------------------------------------------------------------------------
1 | export const formatDate = (val = null, noYear = false) => {
2 | let date = new Date()
3 | if (val) {
4 | date = new Date(val)
5 | }
6 | let year = date.getFullYear()
7 | let month = date.getMonth() + 1
8 | month = month < 10 ? ('0' + month) : month
9 | let day = date.getDate()
10 | day = day < 10 ? ('0' + day) : day
11 | let d = date.getDay(); //获取存储当前日期
12 | let weekday = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
13 | let weekday2 = ['星期天', "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
14 | if (noYear) {
15 | return `${month}月${day} ${weekday2[d]}`
16 | } else {
17 | return `${year}年${month}月${day} ${weekday[d]}`
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tododone",
3 | "version": "1.0.0",
4 | "description": "小程序版todolist",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/HelTi/todo-done.git"
12 | },
13 | "author": "helti",
14 | "license": "MIT",
15 | "bugs": {
16 | "url": "https://github.com/HelTi/todo-done/issues"
17 | },
18 | "homepage": "https://github.com/HelTi/todo-done#readme"
19 | }
20 |
--------------------------------------------------------------------------------