├── .babelrc
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── LICENSE
├── README.md
├── build
├── build.js
├── check-versions.js
├── dev-client.js
├── dev-server.js
├── utils.js
├── vue-loader.conf.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
└── prod.env.js
├── index.html
├── package.json
├── project.config.json
├── src
├── App.vue
├── app.json
├── config.js
├── main.js
├── pages
│ ├── action-sheet
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── area
│ │ ├── area.js
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── badge
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── button
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── card
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── cell
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── checkbox
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── col
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── collapse
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── dashboard
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── datetime-picker
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── dialog
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── field
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── goods-action
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── icon
│ │ ├── config.js
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── loading
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── nav-bar
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── notice-bar
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── notify
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── panel
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── popup
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── progress
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── radio
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── rate
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── search
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── slider
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── stepper
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── steps
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── submit-bar
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── swipe-cell
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── switch-cell
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── switch
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── tab
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── tabbar
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── tag
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── toast
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ ├── transition
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
│ └── tree-select
│ │ ├── config.js
│ │ ├── index.vue
│ │ ├── main.js
│ │ └── main.json
└── utils
│ └── index.js
└── static
├── .gitkeep
└── vant
├── action-sheet
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── area
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── badge-group
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── badge
├── 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.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
├── common
├── class-names.js
├── color.js
├── component.js
├── index.wxss
├── style
│ ├── clearfix.wxss
│ ├── ellipsis.wxss
│ ├── hairline.wxss
│ ├── mixins
│ │ ├── clearfix.wxss
│ │ ├── ellipsis.wxss
│ │ └── hairline.wxss
│ └── var.wxss
├── utils.js
└── utils.wxs
├── datetime-picker
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── demo-block
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── dialog
├── dialog.js
├── index.js
├── index.json
├── index.wxml
└── 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
├── icon
├── 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
├── iphonex.js
├── link.js
├── observer
│ ├── behavior.js
│ ├── index.js
│ └── props.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.wxss
├── picker
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── popup
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── progress
├── index.js
├── index.json
├── index.wxml
└── 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
├── 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
├── submit-bar
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── swipe-cell
├── index.js
├── index.json
├── index.wxml
└── index.wxss
├── switch-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.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.wxss
└── wxs
├── array.wxs
├── bem.wxs
├── memoize.wxs
├── object.wxs
└── utils.wxs
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-runtime"],
12 | "env": {
13 | "test": {
14 | "presets": ["env", "stage-2"],
15 | "plugins": ["istanbul"]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Editor directories and files
9 | .idea
10 | *.suo
11 | *.ntvs*
12 | *.njsproj
13 | *.sln
14 |
15 | yarn.lock
16 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-mpvue-wxss": {}
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 wkl
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 | # mpvue-vant-weapp
2 |
3 | >使用mpvue通过usingComponents导入[vant-weapp](https://github.com/youzan/vant-weapp)
4 |
5 | ## 预览
6 |
7 | ``` bash
8 | 1. git clone
9 | git clone https://github.com/wkl007/mpvue-vant-weapp.git
10 |
11 | 2. 安装依赖
12 | cd mpvue-vant-weapp && npm install
13 |
14 | 3. 启动程序
15 | npm run dev
16 |
17 | 4. 预览
18 | 打开微信开发者工具,新建项目,将目录指向 /dist 即可
19 | ```
20 |
21 | ## 问题
22 | - 小程序中`this.$emit(event,data)`中:
23 | `event`有些使用中划线命名法,在mpvue中不支持,需要修改
24 | - 小程序中`this.trigger('click', index)`中:
25 | `mpvue`无法从`event.mp`中读取到正确的`detail`,原因是因为`mpvue`将`click`事件编译为`tap`导致`this.trigger('click', index)`无法找到`click`句柄
26 |
27 | ## 解决方案
28 | `this.$emit('click-left'); => this.$emit('clickLeft');`
29 | `this.trigger('click', index);=>this.trigger('iclick', index);`
30 |
31 | > 注:本次示例中修改了`nav-bar`、`tabs`、`field`、`tree-select`组件
32 |
33 | ## 受影响组件(仅传值情况受影响)
34 | 1. nav-bar
35 | 2. tabs
36 | 3. field
37 | 4. tree-select
38 |
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | require('./check-versions')()
2 |
3 | process.env.NODE_ENV = 'production'
4 |
5 | var ora = require('ora')
6 | var rm = require('rimraf')
7 | var path = require('path')
8 | var chalk = require('chalk')
9 | var webpack = require('webpack')
10 | var config = require('../config')
11 | var webpackConfig = require('./webpack.prod.conf')
12 |
13 | var spinner = ora('building for production...')
14 | spinner.start()
15 |
16 | rm(path.join(config.build.assetsRoot, '*'), err => {
17 | if (err) throw err
18 | webpack(webpackConfig, function (err, stats) {
19 | spinner.stop()
20 | if (err) throw err
21 | process.stdout.write(stats.toString({
22 | colors: true,
23 | modules: false,
24 | children: false,
25 | chunks: false,
26 | chunkModules: false
27 | }) + '\n\n')
28 |
29 | if (stats.hasErrors()) {
30 | console.log(chalk.red(' Build failed with errors.\n'))
31 | process.exit(1)
32 | }
33 |
34 | console.log(chalk.cyan(' Build complete.\n'))
35 | console.log(chalk.yellow(
36 | ' Tip: built files are meant to be served over an HTTP server.\n' +
37 | ' Opening index.html over file:// won\'t work.\n'
38 | ))
39 | })
40 | })
41 |
--------------------------------------------------------------------------------
/build/check-versions.js:
--------------------------------------------------------------------------------
1 | var chalk = require('chalk')
2 | var semver = require('semver')
3 | var packageConfig = require('../package.json')
4 | var shell = require('shelljs')
5 | function exec (cmd) {
6 | return require('child_process').execSync(cmd).toString().trim()
7 | }
8 |
9 | var versionRequirements = [
10 | {
11 | name: 'node',
12 | currentVersion: semver.clean(process.version),
13 | versionRequirement: packageConfig.engines.node
14 | }
15 | ]
16 |
17 | if (shell.which('npm')) {
18 | versionRequirements.push({
19 | name: 'npm',
20 | currentVersion: exec('npm --version'),
21 | versionRequirement: packageConfig.engines.npm
22 | })
23 | }
24 |
25 | module.exports = function () {
26 | var warnings = []
27 | for (var i = 0; i < versionRequirements.length; i++) {
28 | var mod = versionRequirements[i]
29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
30 | warnings.push(mod.name + ': ' +
31 | chalk.red(mod.currentVersion) + ' should be ' +
32 | chalk.green(mod.versionRequirement)
33 | )
34 | }
35 | }
36 |
37 | if (warnings.length) {
38 | console.log('')
39 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
40 | console.log()
41 | for (var i = 0; i < warnings.length; i++) {
42 | var warning = warnings[i]
43 | console.log(' ' + warning)
44 | }
45 | console.log()
46 | process.exit(1)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/build/dev-client.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | require('eventsource-polyfill')
3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
4 |
5 | hotClient.subscribe(function (event) {
6 | if (event.action === 'reload') {
7 | window.location.reload()
8 | }
9 | })
10 |
--------------------------------------------------------------------------------
/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | var utils = require('./utils')
2 | var config = require('../config')
3 | // var isProduction = process.env.NODE_ENV === 'production'
4 | // for mp
5 | var isProduction = true
6 |
7 | module.exports = {
8 | loaders: utils.cssLoaders({
9 | sourceMap: isProduction
10 | ? config.build.productionSourceMap
11 | : config.dev.cssSourceMap,
12 | extract: isProduction
13 | }),
14 | transformToRequire: {
15 | video: 'src',
16 | source: 'src',
17 | img: 'src',
18 | image: 'xlink:href'
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 |
4 | module.exports = {
5 | build: {
6 | env: require('./prod.env'),
7 | index: path.resolve(__dirname, '../dist/index.html'),
8 | assetsRoot: path.resolve(__dirname, '../dist'),
9 | assetsSubDirectory: '',
10 | assetsPublicPath: '/',
11 | productionSourceMap: false,
12 | // Gzip off by default as many popular static hosts such as
13 | // Surge or Netlify already gzip all static assets for you.
14 | // Before setting to `true`, make sure to:
15 | // npm install --save-dev compression-webpack-plugin
16 | productionGzip: false,
17 | productionGzipExtensions: ['js', 'css'],
18 | // Run the build command with an extra argument to
19 | // View the bundle analyzer report after build finishes:
20 | // `npm run build --report`
21 | // Set to `true` or `false` to always turn it on or off
22 | bundleAnalyzerReport: process.env.npm_config_report
23 | },
24 | dev: {
25 | env: require('./dev.env'),
26 | port: 8080,
27 | // 在小程序开发者工具中不需要自动打开浏览器
28 | autoOpenBrowser: false,
29 | assetsSubDirectory: '',
30 | assetsPublicPath: '/',
31 | proxyTable: {},
32 | // CSS Sourcemaps off by default because relative paths are "buggy"
33 | // with this option, according to the CSS-Loader README
34 | // (https://github.com/webpack/css-loader#sourcemaps)
35 | // In our experience, they generally work as expected,
36 | // just be aware of this issue when enabling this option.
37 | cssSourceMap: false
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | mpvue-vant-weapp
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "setting": {
4 | "urlCheck": true,
5 | "es6": false,
6 | "postcss": true,
7 | "minified": true,
8 | "newFeature": true
9 | },
10 | "miniprogramRoot": "./dist/",
11 | "compileType": "miniprogram",
12 | "appid": "touristappid",
13 | "projectname": "mpvue-vant-weapp",
14 | "condition": {
15 | "search": {
16 | "current": -1,
17 | "list": []
18 | },
19 | "conversation": {
20 | "current": -1,
21 | "list": []
22 | },
23 | "game": {
24 | "currentL": -1,
25 | "list": []
26 | },
27 | "miniprogram": {
28 | "current": -1,
29 | "list": []
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
4 |
5 |
31 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App'
3 |
4 | Vue.config.productionTip = false
5 | App.mpType = 'app'
6 |
7 | const app = new Vue(App)
8 | app.$mount()
9 |
--------------------------------------------------------------------------------
/src/pages/action-sheet/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/action-sheet/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "ActionSheet 上拉菜单"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/area/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
27 |
28 |
29 |
30 |
31 |
32 |
51 |
52 |
55 |
--------------------------------------------------------------------------------
/src/pages/area/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/area/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Area 省市区选择"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/badge/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
31 |
32 |
44 |
--------------------------------------------------------------------------------
/src/pages/badge/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/badge/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Badge 徽章"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/button/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 主要按钮
6 | 危险按钮
7 |
8 | 默认按钮
9 | 警告按钮
10 |
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 |
38 |
39 |
40 |
49 |
50 |
60 |
--------------------------------------------------------------------------------
/src/pages/button/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/button/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Button 按钮"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/card/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
23 |
24 | 满减
25 |
26 |
27 | 按钮
28 | 按钮
29 |
30 |
31 |
32 |
33 |
34 |
35 |
46 |
47 |
58 |
--------------------------------------------------------------------------------
/src/pages/card/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/card/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Card 卡片"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/cell/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 单元格
35 | 标签
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
56 |
57 |
64 |
--------------------------------------------------------------------------------
/src/pages/cell/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/cell/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Cell 单元格"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/checkbox/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/checkbox/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Checkbox 复选框"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/col/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | span: 8
6 | span: 8
7 | span: 8
8 |
9 |
10 |
11 | span: 4
12 | offset: 4, span: 10
13 |
14 |
15 |
16 | offset: 12, span: 12
17 |
18 |
19 |
20 |
21 | span: 8
22 | span: 8
23 | span: 8
24 |
25 |
26 |
27 |
28 |
29 |
38 |
39 |
59 |
--------------------------------------------------------------------------------
/src/pages/col/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/col/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Layout 布局"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/collapse/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/collapse/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Collapse 折叠面板"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/dashboard/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/dashboard/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Vant Weapp"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/datetime-picker/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
20 |
21 |
22 |
23 |
29 |
30 |
31 |
32 |
40 |
41 |
42 |
43 |
44 |
68 |
69 |
81 |
--------------------------------------------------------------------------------
/src/pages/datetime-picker/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/datetime-picker/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "DatetimePicker 时间选择"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/dialog/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/dialog/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Dialog 弹出框"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/field/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/field/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Field 输入框"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/goods-action/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
15 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
58 |
59 |
64 |
--------------------------------------------------------------------------------
/src/pages/goods-action/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/goods-action/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "GoodsAction 商品页行动点"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/icon/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/icon/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Icon 图标"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/loading/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
24 |
25 |
36 |
--------------------------------------------------------------------------------
/src/pages/loading/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/loading/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Loading 加载"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/nav-bar/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
38 |
39 |
45 |
--------------------------------------------------------------------------------
/src/pages/nav-bar/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/nav-bar/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "NavBar 导航栏"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/notice-bar/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
32 |
33 |
36 |
--------------------------------------------------------------------------------
/src/pages/notice-bar/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/notice-bar/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "NoticeBar 通告栏"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/notify/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 显示消息通知
5 |
6 |
7 |
8 | 显示自定义消息通知
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
38 |
39 |
42 |
--------------------------------------------------------------------------------
/src/pages/notify/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/notify/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Notify 消息通知"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/panel/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 内容
6 |
7 |
8 |
9 |
10 |
11 | 内容
12 |
16 |
17 |
18 |
19 |
20 |
21 |
30 |
31 |
42 |
--------------------------------------------------------------------------------
/src/pages/panel/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/panel/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Panel 面板"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/popup/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/popup/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Popup 弹出层"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/progress/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
24 |
25 |
34 |
35 |
41 |
--------------------------------------------------------------------------------
/src/pages/progress/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/progress/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Progress 进度条"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/radio/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 单选框 1
6 | 单选框 2
7 |
8 |
9 |
10 |
11 | 单选框 1
12 | 单选框 2
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
52 |
53 |
62 |
--------------------------------------------------------------------------------
/src/pages/radio/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/radio/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Radio 单选框"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/rate/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
19 |
20 |
21 |
22 |
32 |
33 |
34 |
35 |
41 |
42 |
43 |
44 |
45 |
63 |
64 |
69 |
--------------------------------------------------------------------------------
/src/pages/rate/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/rate/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Rate 评分"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/search/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
21 |
22 |
23 |
24 |
31 | 搜索
32 |
33 |
34 |
35 |
36 |
37 |
38 |
68 |
69 |
72 |
--------------------------------------------------------------------------------
/src/pages/search/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/search/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Search 搜索"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/slider/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
29 |
30 |
31 |
32 |
33 |
34 |
51 |
52 |
57 |
--------------------------------------------------------------------------------
/src/pages/slider/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/slider/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Slider 滑块"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/stepper/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
36 |
37 |
40 |
--------------------------------------------------------------------------------
/src/pages/stepper/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/stepper/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Stepper 步进器"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/steps/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 | 下一步
11 |
12 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
57 |
58 |
61 |
--------------------------------------------------------------------------------
/src/pages/steps/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/steps/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Steps 步骤条"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/submit-bar/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
21 |
22 |
23 |
24 |
31 |
32 |
33 |
34 |
41 | 标签
42 |
43 | 您的收货地址不支持同城送
44 | 修改地址
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
70 |
71 |
85 |
--------------------------------------------------------------------------------
/src/pages/submit-bar/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/submit-bar/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "SubmitBar 提交订单栏"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/swipe-cell/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 选择
6 |
7 |
8 |
9 | 删除
10 |
11 |
12 |
13 |
14 |
15 | 选择
16 |
17 |
18 |
19 | 删除
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
55 |
56 |
74 |
--------------------------------------------------------------------------------
/src/pages/swipe-cell/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/swipe-cell/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "SwipeCell 滑动单元格"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/switch-cell/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
22 |
23 |
24 |
25 |
26 |
32 |
33 |
34 |
35 |
36 |
37 |
52 |
53 |
56 |
--------------------------------------------------------------------------------
/src/pages/switch-cell/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/switch-cell/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "SwitchCell 开关单元格"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/switch/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
24 |
25 |
26 |
27 |
32 |
33 |
34 |
35 |
36 |
65 |
66 |
69 |
--------------------------------------------------------------------------------
/src/pages/switch/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/switch/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Switch 开关"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/tab/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/tab/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Tab 标签页"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/tabbar/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 标签
6 | 标签
7 | 标签
8 | 标签
9 |
10 |
11 |
12 |
13 |
14 | 自定义
15 |
16 |
17 |
18 | 标签
19 | 标签
20 |
21 |
22 |
23 |
24 |
25 |
48 |
49 |
55 |
--------------------------------------------------------------------------------
/src/pages/tabbar/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/tabbar/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Tabbar 标签栏"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/tag/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/tag/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Tag 标记"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/toast/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 文字提示
5 |
6 |
7 |
8 | 加载提示
9 |
10 |
11 |
12 | 成功提示
13 | 失败提示
14 |
15 |
16 |
17 | 高级用法
18 |
19 |
20 |
21 |
22 |
23 |
24 |
67 |
68 |
71 |
--------------------------------------------------------------------------------
/src/pages/toast/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/toast/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Toast 轻提示"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/transition/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/transition/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "Transition 动画"
3 | }
4 |
--------------------------------------------------------------------------------
/src/pages/tree-select/config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | pro1Name: '浙江',
3 | pro1: [{
4 | text: '杭州',
5 | id: 1001
6 | }, {
7 | text: '温州',
8 | id: 1002
9 | }, {
10 | text: '宁波',
11 | id: 1003
12 | }, {
13 | text: '义乌',
14 | id: 1004
15 | }],
16 | pro2Name: '江苏',
17 | pro2: [{
18 | text: '无锡',
19 | id: 1011
20 | }, {
21 | text: '常州',
22 | id: 1012
23 | }, {
24 | text: '莆田',
25 | id: 1013
26 | }, {
27 | text: '三明',
28 | id: 1014
29 | }]
30 | };
31 |
--------------------------------------------------------------------------------
/src/pages/tree-select/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
51 |
52 |
55 |
--------------------------------------------------------------------------------
/src/pages/tree-select/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './index'
3 |
4 | const app = new Vue(App)
5 | app.$mount()
6 |
--------------------------------------------------------------------------------
/src/pages/tree-select/main.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "TreeSelect 分类选择"
3 | }
4 |
--------------------------------------------------------------------------------
/src/utils/index.js:
--------------------------------------------------------------------------------
1 | function formatNumber (n) {
2 | const str = n.toString()
3 | return str[1] ? str : `0${str}`
4 | }
5 |
6 | export function formatTime (date) {
7 | const year = date.getFullYear()
8 | const month = date.getMonth() + 1
9 | const day = date.getDate()
10 |
11 | const hour = date.getHours()
12 | const minute = date.getMinutes()
13 | const second = date.getSeconds()
14 |
15 | const t1 = [year, month, day].map(formatNumber).join('/')
16 | const t2 = [hour, minute, second].map(formatNumber).join(':')
17 |
18 | return `${t1} ${t2}`
19 | }
20 |
21 | export default {
22 | formatNumber,
23 | formatTime
24 | }
25 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wkl007/mpvue-vant-weapp/0c47bb713d440605c4413d218be35e028772b5f6/static/.gitkeep
--------------------------------------------------------------------------------
/static/vant/action-sheet/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { iphonex } from '../mixins/iphonex';
3 | VantComponent({
4 | mixins: [iphonex],
5 | props: {
6 | show: Boolean,
7 | title: String,
8 | cancelText: String,
9 | zIndex: {
10 | type: Number,
11 | value: 100
12 | },
13 | actions: {
14 | type: Array,
15 | value: []
16 | },
17 | overlay: {
18 | type: Boolean,
19 | value: true
20 | },
21 | closeOnClickOverlay: {
22 | type: Boolean,
23 | value: true
24 | }
25 | },
26 | methods: {
27 | onSelect: function onSelect(event) {
28 | var index = event.currentTarget.dataset.index;
29 | var item = this.data.actions[index];
30 |
31 | if (item && !item.disabled && !item.loading) {
32 | this.$emit('select', item);
33 | }
34 | },
35 | onCancel: function onCancel() {
36 | this.$emit('cancel');
37 | },
38 | onClose: function onClose() {
39 | this.$emit('close');
40 | }
41 | }
42 | });
--------------------------------------------------------------------------------
/static/vant/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 |
--------------------------------------------------------------------------------
/static/vant/action-sheet/index.wxml:
--------------------------------------------------------------------------------
1 |
11 |
19 |
20 |
21 |
35 |
36 |
41 | {{ cancelText }}
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/static/vant/action-sheet/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel:active,.van-action-sheet__item:active{background-color:#e8e8e8}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel::before{display:block;content:' ';height:10px;background-color:#f8f8f8}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled:active{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999}
--------------------------------------------------------------------------------
/static/vant/area/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-picker": "../picker/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/area/index.wxml:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/static/vant/area/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant/badge-group/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { isNumber } from '../common/utils';
3 | VantComponent({
4 | relation: {
5 | name: 'badge',
6 | type: 'descendant',
7 | linked: function linked(target) {
8 | this.badges.push(target);
9 | this.setActive();
10 | },
11 | unlinked: function unlinked(target) {
12 | this.badges = this.badges.filter(function (item) {
13 | return item !== target;
14 | });
15 | this.setActive();
16 | }
17 | },
18 | props: {
19 | active: {
20 | type: Number,
21 | value: 0
22 | }
23 | },
24 | watch: {
25 | active: 'setActive'
26 | },
27 | beforeCreate: function beforeCreate() {
28 | this.badges = [];
29 | this.currentActive = -1;
30 | },
31 | methods: {
32 | setActive: function setActive(badge) {
33 | var active = this.data.active;
34 | var badges = this.badges;
35 |
36 | if (badge && !isNumber(badge)) {
37 | active = badges.indexOf(badge);
38 | }
39 |
40 | if (active === this.currentActive) {
41 | return;
42 | }
43 |
44 | if (this.currentActive !== -1 && badges[this.currentActive]) {
45 | this.$emit('change', active);
46 | badges[this.currentActive].setActive(false);
47 | }
48 |
49 | if (badges[active]) {
50 | badges[active].setActive(true);
51 | this.currentActive = active;
52 | }
53 | }
54 | }
55 | });
--------------------------------------------------------------------------------
/static/vant/badge-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/badge-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/vant/badge-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-badge-group{width:85px}
--------------------------------------------------------------------------------
/static/vant/badge/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | type: 'ancestor',
5 | name: 'badge-group'
6 | },
7 | props: {
8 | info: null,
9 | title: String
10 | },
11 | methods: {
12 | onClick: function onClick() {
13 | var group = this.getRelationNodes('../badge-group/index')[0];
14 |
15 | if (group) {
16 | group.setActive(this);
17 | }
18 | },
19 | setActive: function setActive(active) {
20 | this.set({
21 | active: active
22 | });
23 | }
24 | }
25 | });
--------------------------------------------------------------------------------
/static/vant/badge/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/badge/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 | {{ title }}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/static/vant/badge/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-badge{display:block;overflow:hidden;font-size:14px;line-height:1.4;-webkit-user-select:none;user-select:none;color:#7d7e80;word-break:break-all;box-sizing:border-box;padding:20px 12px 20px 9px;background-color:#f8f8f8;border-left:3px solid transparent}.van-badge:active{background-color:#e8e8e8}.van-badge::after{border-bottom-width:1px}.van-badge--active{font-weight:700;color:#333;border-color:#f44}.van-badge--active::after{border-right-width:1px}.van-badge--active,.van-badge--active:active{background-color:#fff}.van-badge__text{position:relative}
--------------------------------------------------------------------------------
/static/vant/button/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { button } from '../mixins/button';
3 | import { openType } from '../mixins/open-type';
4 | VantComponent({
5 | classes: ['loading-class'],
6 | mixins: [button, openType],
7 | props: {
8 | plain: Boolean,
9 | block: Boolean,
10 | round: Boolean,
11 | square: Boolean,
12 | loading: Boolean,
13 | disabled: Boolean,
14 | type: {
15 | type: String,
16 | value: 'default'
17 | },
18 | size: {
19 | type: String,
20 | value: 'normal'
21 | }
22 | },
23 | methods: {
24 | onClick: function onClick() {
25 | if (!this.data.disabled && !this.data.loading) {
26 | this.$emit('click');
27 | }
28 | }
29 | }
30 | });
--------------------------------------------------------------------------------
/static/vant/button/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-loading": "../loading/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/static/vant/button/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
29 |
--------------------------------------------------------------------------------
/static/vant/button/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-button{position:relative;padding:0;display:inline-block;height:44px;line-height:42px;border-radius:2px;box-sizing:border-box;font-size:16px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button::after{content:" ";position:absolute;top:50%;left:50%;opacity:0;width:100%;height:100%;border:inherit;border-color:#000;background-color:#000;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button:active::after{opacity:.15}.van-button--unclickable::after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#07c160;border:1px solid #07c160}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#07c160}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;padding:0 8px;min-width:60px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;line-height:20px;font-size:10px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{width:100%;display:block}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5}
--------------------------------------------------------------------------------
/static/vant/card/index.js:
--------------------------------------------------------------------------------
1 | import { link } from '../mixins/link';
2 | import { VantComponent } from '../common/component';
3 | VantComponent({
4 | classes: ['num-class', 'desc-class', 'thumb-class', 'title-class', 'price-class', 'origin-price-class'],
5 | mixins: [link],
6 | props: {
7 | tag: String,
8 | num: String,
9 | desc: String,
10 | thumb: String,
11 | title: String,
12 | price: String,
13 | centered: Boolean,
14 | lazyLoad: Boolean,
15 | thumbLink: String,
16 | originPrice: String,
17 | thumbMode: {
18 | type: String,
19 | value: 'aspectFit'
20 | },
21 | currency: {
22 | type: String,
23 | value: '¥'
24 | }
25 | },
26 | methods: {
27 | onClickThumb: function onClickThumb() {
28 | this.jumpLink('thumbLink');
29 | }
30 | }
31 | });
--------------------------------------------------------------------------------
/static/vant/card/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-tag": "../tag/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/card/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
38 |
39 |
42 |
43 |
--------------------------------------------------------------------------------
/static/vant/card/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-card{position:relative;padding:5px 15px;font-size:12px;color:#333;box-sizing:border-box;background-color:#fafafa}.van-card--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__header{display:-webkit-flex;display:flex}.van-card__thumb{position:relative;width:90px;height:90px;margin-right:10px;-webkit-flex:none;flex:none}.van-card__thumb:empty{display:none}.van-card__img{width:100%;height:100%}.van-card__content{position:relative;-webkit-flex:1;flex:1;height:90px;min-width:0}.van-card__desc,.van-card__title{word-break:break-all}.van-card__title{max-height:32px;line-height:16px;font-weight:700}.van-card__desc{max-height:20px;line-height:20px;color:#7d7e80}.van-card__bottom{position:absolute;bottom:0;left:0;width:100%;line-height:18px}.van-card__price{display:inline-block;font-weight:700;color:#f44}.van-card__origin-price{display:inline-block;margin-left:5px;font-size:10px;color:#7d7e80;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{width:100%;text-align:right;-webkit-flex:none;flex:none}
--------------------------------------------------------------------------------
/static/vant/cell-group/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | border: {
5 | type: Boolean,
6 | value: true
7 | }
8 | }
9 | });
--------------------------------------------------------------------------------
/static/vant/cell-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant/cell-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/vant/cell-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant/cell/index.js:
--------------------------------------------------------------------------------
1 | import { link } from '../mixins/link';
2 | import { VantComponent } from '../common/component';
3 | VantComponent({
4 | classes: ['title-class', 'label-class', 'value-class', 'right-icon-class'],
5 | mixins: [link],
6 | props: {
7 | title: null,
8 | value: null,
9 | icon: String,
10 | size: String,
11 | label: String,
12 | center: Boolean,
13 | isLink: Boolean,
14 | required: Boolean,
15 | clickable: Boolean,
16 | titleWidth: String,
17 | customStyle: String,
18 | arrowDirection: String,
19 | border: {
20 | type: Boolean,
21 | value: true
22 | }
23 | },
24 | methods: {
25 | onClick: function onClick(event) {
26 | this.$emit('click', event.detail);
27 | this.jumpLink();
28 | }
29 | }
30 | });
--------------------------------------------------------------------------------
/static/vant/cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/static/vant/cell/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
14 |
15 |
16 |
20 |
21 | {{ title }}
22 | {{ label }}
23 |
24 |
25 |
26 |
27 |
28 | {{ value }}
29 |
30 |
31 |
32 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/static/vant/cell/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-cell{width:100%;display:-webkit-flex;display:flex;padding:10px 15px;box-sizing:border-box;line-height:24px;position:relative;background-color:#fff;color:#333;font-size:14px}.van-cell::after{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless::after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{color:#999;font-size:12px;margin-top:3px;line-height:18px}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__value{color:#999;overflow:hidden;text-align:right;vertical-align:middle}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;font-size:16px}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#999}.van-cell__left-icon{line-height:24px;vertical-align:middle}.van-cell__right-icon{line-height:24px}.van-cell--clickable:active{background-color:#e8e8e8}.van-cell--required{overflow:visible}.van-cell--required::before{content:'*';position:absolute;left:7px;font-size:14px;color:#f44}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px}.van-cell--large .van-cell__label{font-size:14px}
--------------------------------------------------------------------------------
/static/vant/checkbox-group/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | relation: {
5 | name: 'checkbox',
6 | type: 'descendant',
7 | linked: function linked(target) {
8 | var _this$data = this.data,
9 | value = _this$data.value,
10 | disabled = _this$data.disabled;
11 | target.set({
12 | value: value.indexOf(target.data.name) !== -1,
13 | disabled: disabled || target.data.disabled
14 | });
15 | }
16 | },
17 | props: {
18 | max: Number,
19 | value: Array,
20 | disabled: Boolean
21 | },
22 | watch: {
23 | value: function value(_value) {
24 | var children = this.getRelationNodes('../checkbox/index');
25 | children.forEach(function (child) {
26 | child.set({
27 | value: _value.indexOf(child.data.name) !== -1
28 | });
29 | });
30 | },
31 | disabled: function disabled(_disabled) {
32 | var children = this.getRelationNodes('../checkbox/index');
33 | children.forEach(function (child) {
34 | child.set({
35 | disabled: _disabled || child.data.disabled
36 | });
37 | });
38 | }
39 | }
40 | });
--------------------------------------------------------------------------------
/static/vant/checkbox-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/checkbox-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/static/vant/checkbox-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant/checkbox/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | relation: {
5 | name: 'checkbox-group',
6 | type: 'ancestor'
7 | },
8 | classes: ['icon-class', 'label-class'],
9 | props: {
10 | value: null,
11 | disabled: Boolean,
12 | useIconSlot: Boolean,
13 | checkedColor: String,
14 | labelPosition: String,
15 | labelDisabled: Boolean,
16 | shape: {
17 | type: String,
18 | value: 'round'
19 | }
20 | },
21 | methods: {
22 | emitChange: function emitChange(value) {
23 | var parent = this.getRelationNodes('../checkbox-group/index')[0];
24 |
25 | if (parent) {
26 | this.setParentValue(parent, value);
27 | } else {
28 | this.$emit('input', value);
29 | this.$emit('change', value);
30 | }
31 | },
32 | toggle: function toggle() {
33 | if (!this.data.disabled) {
34 | this.emitChange(!this.data.value);
35 | }
36 | },
37 | onClickLabel: function onClickLabel() {
38 | if (!this.data.disabled && !this.data.labelDisabled) {
39 | this.emitChange(!this.data.value);
40 | }
41 | },
42 | setParentValue: function setParentValue(parent, value) {
43 | var parentValue = parent.data.value.slice();
44 | var name = this.data.name;
45 |
46 | if (value) {
47 | if (parent.data.max && parentValue.length >= parent.data.max) {
48 | return;
49 | }
50 | /* istanbul ignore else */
51 |
52 |
53 | if (parentValue.indexOf(name) === -1) {
54 | parentValue.push(name);
55 | parent.$emit('input', parentValue);
56 | parent.$emit('change', parentValue);
57 | }
58 | } else {
59 | var index = parentValue.indexOf(name);
60 | /* istanbul ignore else */
61 |
62 | if (index !== -1) {
63 | parentValue.splice(index, 1);
64 | parent.$emit('input', parentValue);
65 | parent.$emit('change', parentValue);
66 | }
67 | }
68 | }
69 | }
70 | });
--------------------------------------------------------------------------------
/static/vant/checkbox/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/checkbox/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/static/vant/checkbox/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-checkbox{overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{display:inline-block;line-height:20px;vertical-align:middle}.van-checkbox__icon{display:block;font-size:14px;width:20px;height:20px;color:transparent;text-align:center;box-sizing:border-box;border:1px solid #e5e5e5;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;border-color:#1989fa;background-color:#1989fa}.van-checkbox__icon--disabled{border-color:#c9c9c9;background-color:#eee}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:#c9c9c9}.van-checkbox__label{color:#333;margin-left:10px}.van-checkbox__label--left{float:left;margin:0 10px 0 0}.van-checkbox__label--disabled{color:#c9c9c9}.van-checkbox__label:empty{margin:0}
--------------------------------------------------------------------------------
/static/vant/col/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'row',
5 | type: 'ancestor'
6 | },
7 | props: {
8 | span: Number,
9 | offset: Number
10 | },
11 | data: {
12 | style: ''
13 | },
14 | methods: {
15 | setGutter: function setGutter(gutter) {
16 | var padding = gutter / 2 + "px";
17 | var style = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : '';
18 |
19 | if (style !== this.data.style) {
20 | this.set({
21 | style: style
22 | });
23 | }
24 | }
25 | }
26 | });
--------------------------------------------------------------------------------
/static/vant/col/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/col/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/static/vant/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%}
--------------------------------------------------------------------------------
/static/vant/collapse-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/collapse-item/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
20 |
24 |
25 |
29 |
30 |
36 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/static/vant/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:.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:#c9c9c9!important}.van-collapse-item__title--disabled .van-cell:active{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{color:#999;padding:15px;font-size:13px;line-height:1.5;background-color:#fff}
--------------------------------------------------------------------------------
/static/vant/collapse/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'collapse-item',
5 | type: 'descendant',
6 | linked: function linked(child) {
7 | this.set({
8 | items: [].concat(this.data.items, [child])
9 | }, function () {
10 | child.updateExpanded();
11 | });
12 | }
13 | },
14 | props: {
15 | accordion: Boolean,
16 | value: null
17 | },
18 | data: {
19 | items: []
20 | },
21 | watch: {
22 | value: function value() {
23 | this.data.items.forEach(function (child) {
24 | child.updateExpanded();
25 | });
26 | },
27 | accordion: function accordion() {
28 | this.data.items.forEach(function (child) {
29 | child.updateExpanded();
30 | });
31 | }
32 | },
33 | methods: {
34 | switch: function _switch(name, expanded) {
35 | var _this$data = this.data,
36 | accordion = _this$data.accordion,
37 | value = _this$data.value;
38 |
39 | if (!accordion) {
40 | name = expanded ? value.concat(name) : value.filter(function (activeName) {
41 | return activeName !== name;
42 | });
43 | } else {
44 | name = expanded ? name : '';
45 | }
46 |
47 | this.$emit('change', name);
48 | this.$emit('input', name);
49 | }
50 | }
51 | });
--------------------------------------------------------------------------------
/static/vant/collapse/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/collapse/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/vant/common/class-names.js:
--------------------------------------------------------------------------------
1 | var hasOwn = {}.hasOwnProperty;
2 | export function classNames() {
3 | var classes = [];
4 |
5 | for (var i = 0; i < arguments.length; i++) {
6 | var arg = arguments[i];
7 | if (!arg) continue;
8 | var argType = typeof arg;
9 |
10 | if (argType === 'string' || argType === 'number') {
11 | classes.push(arg);
12 | } else if (Array.isArray(arg) && arg.length) {
13 | var inner = classNames.apply(null, arg);
14 |
15 | if (inner) {
16 | classes.push(inner);
17 | }
18 | } else if (argType === 'object') {
19 | for (var key in arg) {
20 | if (hasOwn.call(arg, key) && arg[key]) {
21 | classes.push(key);
22 | }
23 | }
24 | }
25 | }
26 |
27 | return classes.join(' ');
28 | }
29 | ;
--------------------------------------------------------------------------------
/static/vant/common/color.js:
--------------------------------------------------------------------------------
1 | export var RED = '#f44';
2 | export var BLUE = '#1989fa';
3 | export var GREEN = '#07c160';
--------------------------------------------------------------------------------
/static/vant/common/component.js:
--------------------------------------------------------------------------------
1 | import { basic } from '../mixins/basic';
2 | import { observe } from '../mixins/observer/index';
3 |
4 | function mapKeys(source, target, map) {
5 | Object.keys(map).forEach(function (key) {
6 | if (source[key]) {
7 | target[map[key]] = source[key];
8 | }
9 | });
10 | }
11 |
12 | function VantComponent(vantOptions) {
13 | if (vantOptions === void 0) {
14 | vantOptions = {};
15 | }
16 |
17 | var options = {};
18 | mapKeys(vantOptions, options, {
19 | data: 'data',
20 | props: 'properties',
21 | mixins: 'behaviors',
22 | methods: 'methods',
23 | beforeCreate: 'created',
24 | created: 'attached',
25 | mounted: 'ready',
26 | relations: 'relations',
27 | destroyed: 'detached',
28 | classes: 'externalClasses'
29 | });
30 | var _vantOptions = vantOptions,
31 | relation = _vantOptions.relation;
32 |
33 | if (relation) {
34 | options.relations = Object.assign(options.relations || {}, {
35 | ["../" + relation.name + "/index"]: relation
36 | });
37 | } // add default externalClasses
38 |
39 |
40 | options.externalClasses = options.externalClasses || [];
41 | options.externalClasses.push('custom-class'); // add default behaviors
42 |
43 | options.behaviors = options.behaviors || [];
44 | options.behaviors.push(basic); // map field to form-field behavior
45 |
46 | if (vantOptions.field) {
47 | options.behaviors.push('wx://form-field');
48 | } // add default options
49 |
50 |
51 | options.options = {
52 | multipleSlots: true,
53 | addGlobalClass: true
54 | };
55 | observe(vantOptions, options);
56 | Component(options);
57 | }
58 |
59 | export { VantComponent };
--------------------------------------------------------------------------------
/static/vant/common/index.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-clearfix::after{content:'';display:table;clear:both}.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{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.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}
--------------------------------------------------------------------------------
/static/vant/common/style/clearfix.wxss:
--------------------------------------------------------------------------------
1 | .van-clearfix::after{content:'';display:table;clear:both}
--------------------------------------------------------------------------------
/static/vant/common/style/ellipsis.wxss:
--------------------------------------------------------------------------------
1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}
--------------------------------------------------------------------------------
/static/vant/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{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.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}
--------------------------------------------------------------------------------
/static/vant/common/style/mixins/clearfix.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wkl007/mpvue-vant-weapp/0c47bb713d440605c4413d218be35e028772b5f6/static/vant/common/style/mixins/clearfix.wxss
--------------------------------------------------------------------------------
/static/vant/common/style/mixins/ellipsis.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wkl007/mpvue-vant-weapp/0c47bb713d440605c4413d218be35e028772b5f6/static/vant/common/style/mixins/ellipsis.wxss
--------------------------------------------------------------------------------
/static/vant/common/style/mixins/hairline.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wkl007/mpvue-vant-weapp/0c47bb713d440605c4413d218be35e028772b5f6/static/vant/common/style/mixins/hairline.wxss
--------------------------------------------------------------------------------
/static/vant/common/style/var.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wkl007/mpvue-vant-weapp/0c47bb713d440605c4413d218be35e028772b5f6/static/vant/common/style/var.wxss
--------------------------------------------------------------------------------
/static/vant/common/utils.js:
--------------------------------------------------------------------------------
1 | function isDef(value) {
2 | return value !== undefined && value !== null;
3 | }
4 |
5 | function isObj(x) {
6 | var type = typeof x;
7 | return x !== null && (type === 'object' || type === 'function');
8 | }
9 |
10 | function isNumber(value) {
11 | return /^\d+$/.test(value);
12 | }
13 |
14 | function range(num, min, max) {
15 | return Math.min(Math.max(num, min), max);
16 | }
17 |
18 | export { isObj, isDef, isNumber, range };
--------------------------------------------------------------------------------
/static/vant/common/utils.wxs:
--------------------------------------------------------------------------------
1 | function isSrc(url) {
2 | return url.indexOf('http') === 0 || url.indexOf('data:image') === 0;
3 | }
4 |
5 | module.exports.isSrc = isSrc;
6 |
--------------------------------------------------------------------------------
/static/vant/datetime-picker/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-picker": "../picker/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/datetime-picker/index.wxml:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/static/vant/datetime-picker/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-picker{-webkit-text-size-adjust:100%;position:relative;overflow:hidden;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;height:44px;line-height:44px}.van-picker__cancel,.van-picker__confirm{color:#1989fa;padding:0 15px;font-size:14px}.van-picker__cancel:active,.van-picker__confirm:active{background-color:#e8e8e8}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative}.van-picker__loading{display:-webkit-flex;display:flex;z-index:4;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background-color:rgba(255,255,255,.9)}.van-picker-column{-webkit-flex:1;flex:1;overflow:hidden;font-size:16px;text-align:center}.van-picker-column__item{padding:0 5px;color:#999}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3}
--------------------------------------------------------------------------------
/static/vant/demo-block/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | title: String,
4 | padding: Boolean
5 | },
6 |
7 | externalClasses: ['custom-class']
8 | });
9 |
--------------------------------------------------------------------------------
/static/vant/demo-block/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/demo-block/index.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{ title }}
3 |
4 |
5 |
--------------------------------------------------------------------------------
/static/vant/demo-block/index.wxss:
--------------------------------------------------------------------------------
1 | .demo-block__title {
2 | margin: 0;
3 | font-weight: 400;
4 | font-size: 14px;
5 | color: rgba(69,90,100,.6);
6 | padding: 20px 15px 15px;
7 | }
8 |
9 | .demo-block--padding {
10 | padding: 0 15px;
11 | }
12 |
13 | .demo-block--padding .demo-block__title {
14 | padding-left: 0;
15 | }
16 |
--------------------------------------------------------------------------------
/static/vant/dialog/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-popup": "../popup/index",
5 | "van-button": "../button/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant/dialog/index.wxml:
--------------------------------------------------------------------------------
1 |
10 |
16 |
17 |
18 |
22 | {{ message }}
23 |
24 |
25 |
53 |
54 |
--------------------------------------------------------------------------------
/static/vant/dialog/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-dialog{width:85%;font-size:16px;overflow:hidden;border-radius:4px;background-color:#fff}.van-dialog__header{font-weight:500;padding-top:25px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{padding:25px;font-size:14px;line-height:1.5;max-height:60vh;overflow-y:auto;text-align:center;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:12px;color:#7d7e80}.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__confirm,.van-dialog__confirm:active{color:#1989fa!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)}
--------------------------------------------------------------------------------
/static/vant/field/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index",
5 | "van-icon": "../icon/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/static/vant/field/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{border:0;margin:0;padding:0;width:100%;height:24px;resize:none;display:block;text-align:left;min-height:24px;color:#333;line-height:inherit;box-sizing:border-box;background-color:transparent}.van-field__input--disabled{opacity:1;color:#999;background-color:transparent}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__input--error{color:#f44}.van-field__placeholder{color:#999}.van-field__clear-root{height:24px}.van-field__button,.van-field__clear,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear,.van-field__icon-container{padding:0 10px;line-height:inherit;margin-right:-10px;vertical-align:middle}.van-field__clear{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon{display:block!important}.van-field__button{padding-left:10px}.van-field__error-message{color:#f44;font-size:12px;text-align:left}
--------------------------------------------------------------------------------
/static/vant/goods-action-button/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { link } from '../mixins/link';
3 | import { button } from '../mixins/button';
4 | import { openType } from '../mixins/open-type';
5 | VantComponent({
6 | mixins: [link, button, openType],
7 | props: {
8 | text: String,
9 | loading: Boolean,
10 | disabled: Boolean,
11 | type: {
12 | type: String,
13 | value: 'danger'
14 | }
15 | },
16 | methods: {
17 | onClick: function onClick(event) {
18 | this.$emit('click', event.detail);
19 | this.jumpLink();
20 | }
21 | }
22 | });
--------------------------------------------------------------------------------
/static/vant/goods-action-button/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-button": "../button/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/goods-action-button/index.wxml:
--------------------------------------------------------------------------------
1 |
24 | {{ text }}
25 |
26 |
--------------------------------------------------------------------------------
/static/vant/goods-action-button/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';:host{-webkit-flex:1;flex:1}
--------------------------------------------------------------------------------
/static/vant/goods-action-icon/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { link } from '../mixins/link';
3 | import { button } from '../mixins/button';
4 | import { openType } from '../mixins/open-type';
5 | VantComponent({
6 | mixins: [link, button, openType],
7 | props: {
8 | text: String,
9 | info: String,
10 | icon: String
11 | },
12 | methods: {
13 | onClick: function onClick(event) {
14 | this.$emit('click', event.detail);
15 | this.jumpLink();
16 | }
17 | }
18 | });
--------------------------------------------------------------------------------
/static/vant/goods-action-icon/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-button": "../button/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant/goods-action-icon/index.wxml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
30 | {{ text }}
31 |
32 |
33 |
--------------------------------------------------------------------------------
/static/vant/goods-action-icon/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-goods-action-icon{width:50px!important;border:none!important}.van-goods-action-icon__content{height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:10px;color:#7d7e80;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-goods-action-icon__icon{margin-bottom:4px}
--------------------------------------------------------------------------------
/static/vant/goods-action/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { iphonex } from '../mixins/iphonex';
3 | VantComponent({
4 | mixins: [iphonex]
5 | });
--------------------------------------------------------------------------------
/static/vant/goods-action/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/goods-action/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/static/vant/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;background-color:#fff}.van-goods-action--safe{padding-bottom:34px}
--------------------------------------------------------------------------------
/static/vant/icon/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | info: null,
5 | name: String,
6 | size: String,
7 | color: String,
8 | customStyle: String,
9 | classPrefix: {
10 | type: String,
11 | value: 'van-icon'
12 | }
13 | },
14 | methods: {
15 | onClick: function onClick() {
16 | this.$emit('click');
17 | }
18 | }
19 | });
--------------------------------------------------------------------------------
/static/vant/icon/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/icon/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/static/vant/info/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | info: null,
5 | customStyle: String
6 | }
7 | });
--------------------------------------------------------------------------------
/static/vant/info/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/info/index.wxml:
--------------------------------------------------------------------------------
1 |
6 | {{ info }}
7 |
8 |
--------------------------------------------------------------------------------
/static/vant/info/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-info{position:absolute;right:0;top:-8px;color:#fff;font-size:12px;font-weight:500;font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;text-align:center;box-sizing:border-box;padding:0 3px;min-width:16px;line-height:14px;border:1px solid #fff;border-radius:16px;background-color:#f44;-webkit-transform:translateX(50%);transform:translateX(50%);-webkit-transform-origin:100%;transform-origin:100%}
--------------------------------------------------------------------------------
/static/vant/loading/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | size: {
5 | type: String,
6 | value: '30px'
7 | },
8 | type: {
9 | type: String,
10 | value: 'circular'
11 | },
12 | color: {
13 | type: String,
14 | value: '#c9c9c9'
15 | }
16 | }
17 | });
--------------------------------------------------------------------------------
/static/vant/loading/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant/loading/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
9 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/static/vant/mixins/basic.js:
--------------------------------------------------------------------------------
1 | export var basic = Behavior({
2 | methods: {
3 | $emit: function $emit() {
4 | this.triggerEvent.apply(this, arguments);
5 | },
6 | getRect: function getRect(selector, all) {
7 | var _this = this;
8 |
9 | return new Promise(function (resolve) {
10 | wx.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
11 | if (all && Array.isArray(rect) && rect.length) {
12 | resolve(rect);
13 | }
14 |
15 | if (!all && rect) {
16 | resolve(rect);
17 | }
18 | }).exec();
19 | });
20 | }
21 | }
22 | });
--------------------------------------------------------------------------------
/static/vant/mixins/button.js:
--------------------------------------------------------------------------------
1 | export var button = Behavior({
2 | properties: {
3 | id: String,
4 | sessionFrom: String,
5 | appParameter: String,
6 | sendMessageImg: String,
7 | sendMessagePath: String,
8 | showMessageCard: String,
9 | sendMessageTitle: String,
10 | lang: {
11 | type: String,
12 | value: 'en'
13 | }
14 | }
15 | });
--------------------------------------------------------------------------------
/static/vant/mixins/iphonex.js:
--------------------------------------------------------------------------------
1 | var isIPhoneX = null;
2 |
3 | function getIsIPhoneX() {
4 | return new Promise(function (resolve, reject) {
5 | if (isIPhoneX !== null) {
6 | resolve(isIPhoneX);
7 | } else {
8 | wx.getSystemInfo({
9 | success: function success(_ref) {
10 | var model = _ref.model,
11 | screenHeight = _ref.screenHeight;
12 | var iphoneX = /iphone x/i.test(model);
13 | var iphoneNew = /iPhone11/i.test(model) && screenHeight === 812;
14 | isIPhoneX = iphoneX || iphoneNew;
15 | resolve(isIPhoneX);
16 | },
17 | fail: reject
18 | });
19 | }
20 | });
21 | }
22 |
23 | export var iphonex = Behavior({
24 | properties: {
25 | safeAreaInsetBottom: {
26 | type: Boolean,
27 | value: true
28 | }
29 | },
30 | created: function created() {
31 | var _this = this;
32 |
33 | getIsIPhoneX().then(function (isIPhoneX) {
34 | _this.set({
35 | isIPhoneX: isIPhoneX
36 | });
37 | });
38 | }
39 | });
--------------------------------------------------------------------------------
/static/vant/mixins/link.js:
--------------------------------------------------------------------------------
1 | export var link = Behavior({
2 | properties: {
3 | url: String,
4 | linkType: {
5 | type: String,
6 | value: 'navigateTo'
7 | }
8 | },
9 | methods: {
10 | jumpLink: function jumpLink(urlKey) {
11 | if (urlKey === void 0) {
12 | urlKey = 'url';
13 | }
14 |
15 | var url = this.data[urlKey];
16 |
17 | if (url) {
18 | wx[this.data.linkType]({
19 | url: url
20 | });
21 | }
22 | }
23 | }
24 | });
--------------------------------------------------------------------------------
/static/vant/mixins/observer/behavior.js:
--------------------------------------------------------------------------------
1 | function setAsync(context, data) {
2 | return new Promise(function (resolve) {
3 | context.setData(data, resolve);
4 | });
5 | }
6 |
7 | ;
8 | export var behavior = Behavior({
9 | created: function created() {
10 | var _this = this;
11 |
12 | if (!this.$options) {
13 | return;
14 | }
15 |
16 | var cache = {};
17 |
18 | var _this$$options = this.$options(),
19 | computed = _this$$options.computed;
20 |
21 | var keys = Object.keys(computed);
22 |
23 | this.calcComputed = function () {
24 | var needUpdate = {};
25 | keys.forEach(function (key) {
26 | var value = computed[key].call(_this);
27 |
28 | if (cache[key] !== value) {
29 | cache[key] = needUpdate[key] = value;
30 | }
31 | });
32 | return needUpdate;
33 | };
34 | },
35 | attached: function attached() {
36 | this.set();
37 | },
38 | methods: {
39 | // set data and set computed data
40 | set: function set(data, callback) {
41 | var _this2 = this;
42 |
43 | var stack = [];
44 |
45 | if (data) {
46 | stack.push(setAsync(this, data));
47 | }
48 |
49 | if (this.calcComputed) {
50 | stack.push(setAsync(this, this.calcComputed()));
51 | }
52 |
53 | return Promise.all(stack).then(function (res) {
54 | if (callback && typeof callback === 'function') {
55 | callback.call(_this2);
56 | }
57 |
58 | return res;
59 | });
60 | }
61 | }
62 | });
--------------------------------------------------------------------------------
/static/vant/mixins/observer/index.js:
--------------------------------------------------------------------------------
1 | import { behavior } from './behavior';
2 | import { observeProps } from './props';
3 | export function observe(vantOptions, options) {
4 | var watch = vantOptions.watch,
5 | computed = vantOptions.computed;
6 | options.behaviors.push(behavior);
7 |
8 | if (watch) {
9 | var props = options.properties || {};
10 | Object.keys(watch).forEach(function (key) {
11 | if (key in props) {
12 | var prop = props[key];
13 |
14 | if (prop === null || !('type' in prop)) {
15 | prop = {
16 | type: prop
17 | };
18 | }
19 |
20 | prop.observer = watch[key];
21 | props[key] = prop;
22 | }
23 | });
24 | options.properties = props;
25 | }
26 |
27 | if (computed) {
28 | options.methods = options.methods || {};
29 |
30 | options.methods.$options = function () {
31 | return vantOptions;
32 | };
33 |
34 | if (options.properties) {
35 | observeProps(options.properties);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/static/vant/mixins/observer/props.js:
--------------------------------------------------------------------------------
1 | export function observeProps(props) {
2 | if (!props) {
3 | return;
4 | }
5 |
6 | Object.keys(props).forEach(function (key) {
7 | var prop = props[key];
8 |
9 | if (prop === null || !('type' in prop)) {
10 | prop = {
11 | type: prop
12 | };
13 | }
14 |
15 | var _prop = prop,
16 | observer = _prop.observer;
17 |
18 | prop.observer = function () {
19 | if (observer) {
20 | if (typeof observer === 'string') {
21 | observer = this[observer];
22 | }
23 |
24 | observer.apply(this, arguments);
25 | }
26 |
27 | this.set();
28 | };
29 |
30 | props[key] = prop;
31 | });
32 | }
--------------------------------------------------------------------------------
/static/vant/mixins/open-type.js:
--------------------------------------------------------------------------------
1 | export var openType = Behavior({
2 | properties: {
3 | openType: String
4 | },
5 | methods: {
6 | bindGetUserInfo: function bindGetUserInfo(event) {
7 | this.$emit('getuserinfo', event.detail);
8 | },
9 | bindContact: function bindContact(event) {
10 | this.$emit('contact', event.detail);
11 | },
12 | bindGetPhoneNumber: function bindGetPhoneNumber(event) {
13 | this.$emit('getphonenumber', event.detail);
14 | },
15 | bindOpenSetting: function bindOpenSetting(event) {
16 | this.$emit('opensetting', event.detail);
17 | },
18 | bindError: function bindError(event) {
19 | this.$emit('error', event.detail);
20 | }
21 | }
22 | });
--------------------------------------------------------------------------------
/static/vant/mixins/touch.js:
--------------------------------------------------------------------------------
1 | export var touch = Behavior({
2 | methods: {
3 | touchStart: function touchStart(event) {
4 | this.direction = '';
5 | this.deltaX = 0;
6 | this.deltaY = 0;
7 | this.offsetX = 0;
8 | this.offsetY = 0;
9 | this.startX = event.touches[0].clientX;
10 | this.startY = event.touches[0].clientY;
11 | },
12 | touchMove: function touchMove(event) {
13 | var touch = event.touches[0];
14 | this.deltaX = touch.clientX - this.startX;
15 | this.deltaY = touch.clientY - this.startY;
16 | this.offsetX = Math.abs(this.deltaX);
17 | this.offsetY = Math.abs(this.deltaY);
18 | this.direction = this.offsetX > this.offsetY ? 'horizontal' : this.offsetX < this.offsetY ? 'vertical' : '';
19 | }
20 | }
21 | });
--------------------------------------------------------------------------------
/static/vant/mixins/transition.js:
--------------------------------------------------------------------------------
1 | export var transition = function transition(showDefaultValue) {
2 | return Behavior({
3 | properties: {
4 | customStyle: String,
5 | show: {
6 | type: Boolean,
7 | value: showDefaultValue,
8 | observer: 'observeShow'
9 | },
10 | duration: {
11 | type: Number,
12 | value: 300
13 | }
14 | },
15 | data: {
16 | type: '',
17 | inited: false,
18 | display: false,
19 | supportAnimation: true
20 | },
21 | attached: function attached() {
22 | if (this.data.show) {
23 | this.show();
24 | }
25 |
26 | this.detectSupport();
27 | },
28 | methods: {
29 | detectSupport: function detectSupport() {
30 | var _this = this;
31 |
32 | wx.getSystemInfo({
33 | success: function success(info) {
34 | if (info && info.system && info.system.indexOf('iOS 8') === 0) {
35 | _this.set({
36 | supportAnimation: false
37 | });
38 | }
39 | }
40 | });
41 | },
42 | observeShow: function observeShow(value) {
43 | if (value) {
44 | this.show();
45 | } else {
46 | if (this.data.supportAnimation) {
47 | this.set({
48 | type: 'leave'
49 | });
50 | } else {
51 | this.set({
52 | display: false
53 | });
54 | }
55 | }
56 | },
57 | show: function show() {
58 | this.set({
59 | inited: true,
60 | display: true,
61 | type: 'enter'
62 | });
63 | },
64 | onAnimationEnd: function onAnimationEnd() {
65 | if (!this.data.show) {
66 | this.set({
67 | display: false
68 | });
69 | }
70 | }
71 | }
72 | });
73 | };
--------------------------------------------------------------------------------
/static/vant/nav-bar/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | classes: ['title-class'],
4 | props: {
5 | title: String,
6 | fixed: Boolean,
7 | leftText: String,
8 | rightText: String,
9 | leftArrow: Boolean,
10 | border: {
11 | type: Boolean,
12 | value: true
13 | },
14 | zIndex: {
15 | type: Number,
16 | value: 1
17 | }
18 | },
19 | methods: {
20 | onClickLeft: function onClickLeft() {
21 | this.$emit('clickLeft');
22 | },
23 | onClickRight: function onClickRight() {
24 | this.$emit('clickRight');
25 | }
26 | }
27 | });
28 |
--------------------------------------------------------------------------------
/static/vant/nav-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/nav-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
13 | {{ leftText }}
14 |
15 |
16 |
17 |
18 | {{ title }}
19 |
20 |
21 |
22 | {{ rightText }}
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/static/vant/nav-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-nav-bar{height:46px;position:relative;-webkit-user-select:none;user-select:none;text-align:center;line-height:46px;background-color:#fff}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{top:0;left:0;width:100%;position:fixed}.van-nav-bar__title{margin:0 auto;max-width:60%;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{bottom:0;font-size:14px;position:absolute}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px}.van-nav-bar__text{color:#1989fa;margin:0 -15px;padding:0 15px;display:inline-block;vertical-align:middle}.van-nav-bar__text:active{background-color:#e8e8e8}
--------------------------------------------------------------------------------
/static/vant/notice-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/static/vant/notice-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 | {{ text }}
13 |
14 |
15 |
16 |
17 |
23 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/static/vant/notice-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;height:40px;padding:0 15px;font-size:14px;line-height:24px;-webkit-align-items:center;align-items:center}.van-notice-bar--within-icon{position:relative;padding-right:40px}.van-notice-bar__left-icon{height:18px;min-width:20px;box-sizing:border-box}.van-notice-bar__left-icon>image{width:16px;height:16px}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px;font-size:16px}.van-notice-bar__content-wrap{-webkit-flex:1;flex:1;height:24px;overflow:hidden;position:relative}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%}
--------------------------------------------------------------------------------
/static/vant/notify/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { RED } from '../common/color';
3 | VantComponent({
4 | props: {
5 | text: String,
6 | color: {
7 | type: String,
8 | value: '#fff'
9 | },
10 | backgroundColor: {
11 | type: String,
12 | value: RED
13 | },
14 | duration: {
15 | type: Number,
16 | value: 3000
17 | }
18 | },
19 | methods: {
20 | show: function show() {
21 | var _this = this;
22 |
23 | var duration = this.data.duration;
24 | clearTimeout(this.timer);
25 | this.set({
26 | show: true
27 | });
28 |
29 | if (duration > 0 && duration !== Infinity) {
30 | this.timer = setTimeout(function () {
31 | _this.hide();
32 | }, duration);
33 | }
34 | },
35 | hide: function hide() {
36 | clearTimeout(this.timer);
37 | this.set({
38 | show: false
39 | });
40 | }
41 | }
42 | });
--------------------------------------------------------------------------------
/static/vant/notify/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-transition": "../transition/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/notify/index.wxml:
--------------------------------------------------------------------------------
1 |
7 | {{ text }}
8 |
9 |
--------------------------------------------------------------------------------
/static/vant/notify/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-notify{z-index:110;position:fixed;top:0;width:100%;text-align:center;box-sizing:border-box;padding:6px 15px;font-size:14px;line-height:20px}
--------------------------------------------------------------------------------
/static/vant/notify/notify.js:
--------------------------------------------------------------------------------
1 | import { isObj } from '../common/utils';
2 | var defaultOptions = {
3 | selector: '#van-notify',
4 | duration: 3000
5 | };
6 |
7 | function parseOptions(text) {
8 | return isObj(text) ? text : {
9 | text: text
10 | };
11 | }
12 |
13 | function getContext() {
14 | var pages = getCurrentPages();
15 | return pages[pages.length - 1];
16 | }
17 |
18 | export default function Notify(options) {
19 | if (options === void 0) {
20 | options = {};
21 | }
22 |
23 | options = Object.assign({}, defaultOptions, parseOptions(options));
24 | var context = options.context || getContext();
25 | var notify = context.selectComponent(options.selector);
26 | delete options.selector;
27 |
28 | if (notify) {
29 | notify.set(options);
30 | notify.show();
31 | } else {
32 | console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确');
33 | }
34 | }
--------------------------------------------------------------------------------
/static/vant/overlay/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | show: Boolean,
5 | mask: Boolean,
6 | customStyle: String,
7 | zIndex: {
8 | type: Number,
9 | value: 1
10 | }
11 | },
12 | methods: {
13 | onClick: function onClick() {
14 | this.$emit('click');
15 | },
16 | // for prevent touchmove
17 | noop: function noop() {}
18 | }
19 | });
--------------------------------------------------------------------------------
/static/vant/overlay/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-transition": "../transition/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/overlay/index.wxml:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/static/vant/overlay/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-overlay{position:fixed;top:0;left:0;right:0;bottom:0}
--------------------------------------------------------------------------------
/static/vant/panel/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | classes: ['header-class', 'footer-class'],
4 | props: {
5 | desc: String,
6 | title: String,
7 | status: String,
8 | useFooterSlot: Boolean
9 | }
10 | });
--------------------------------------------------------------------------------
/static/vant/panel/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/panel/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/static/vant/panel/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-panel{background:#fff}.van-panel__header-value{color:#f44}.van-panel__footer{padding:10px 15px}
--------------------------------------------------------------------------------
/static/vant/picker-column/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant/picker-column/index.wxml:
--------------------------------------------------------------------------------
1 |
9 |
10 | {{ getOptionText(option, valueKey) }}
19 |
20 |
21 |
22 |
23 | function isObj(x) {
24 | var type = typeof x;
25 | return x !== null && (type === 'object' || type === 'function');
26 | }
27 |
28 | module.exports = function (option, valueKey) {
29 | return isObj(option) && option[valueKey] ? option[valueKey] : option;
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/static/vant/picker-column/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-picker-column{overflow:hidden;font-size:16px;text-align:center}.van-picker-column__item{padding:0 5px;color:#999}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3}
--------------------------------------------------------------------------------
/static/vant/picker/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "picker-column": "../picker-column/index",
5 | "loading": "../loading/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant/picker/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | {{ cancelButtonText || '取消' }}
8 |
9 | {{ title }}
10 |
11 | {{ confirmButtonText || '确认' }}
12 |
13 |
14 |
15 |
16 |
17 |
22 |
36 |
40 |
41 |
42 |
43 |
44 | function isSimple(columns) {
45 | return columns.length && !columns[0].values;
46 | }
47 | module.exports = isSimple;
48 |
49 |
--------------------------------------------------------------------------------
/static/vant/picker/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-picker{position:relative;overflow:hidden;-webkit-text-size-adjust:100%;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;height:44px;line-height:44px;-webkit-justify-content:space-between;justify-content:space-between}.van-picker__cancel,.van-picker__confirm{padding:0 15px;font-size:14px;color:#1989fa}.van-picker__cancel:active,.van-picker__confirm:active{background-color:#e8e8e8}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.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;background-color:rgba(255,255,255,.9);-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-picker__frame,.van-picker__loading .van-loading{position:absolute;top:50%;left:0;z-index:1;width:100%;pointer-events:none;-webkit-transform:translateY(-50%);transform:translateY(-50%)}
--------------------------------------------------------------------------------
/static/vant/popup/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { transition } from '../mixins/transition';
3 | import { iphonex } from '../mixins/iphonex';
4 | VantComponent({
5 | mixins: [transition(false), iphonex],
6 | props: {
7 | transition: String,
8 | customStyle: String,
9 | overlayStyle: String,
10 | zIndex: {
11 | type: Number,
12 | value: 100
13 | },
14 | overlay: {
15 | type: Boolean,
16 | value: true
17 | },
18 | closeOnClickOverlay: {
19 | type: Boolean,
20 | value: true
21 | },
22 | position: {
23 | type: String,
24 | value: 'center'
25 | }
26 | },
27 | methods: {
28 | onClickOverlay: function onClickOverlay() {
29 | this.$emit('click-overlay');
30 |
31 | if (this.data.closeOnClickOverlay) {
32 | this.$emit('close');
33 | }
34 | }
35 | }
36 | });
--------------------------------------------------------------------------------
/static/vant/popup/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-overlay": "../overlay/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/popup/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
19 |
--------------------------------------------------------------------------------
/static/vant/progress/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { BLUE } from '../common/color';
3 | VantComponent({
4 | props: {
5 | inactive: Boolean,
6 | percentage: Number,
7 | pivotText: String,
8 | pivotColor: String,
9 | showPivot: {
10 | type: Boolean,
11 | value: true
12 | },
13 | color: {
14 | type: String,
15 | value: BLUE
16 | },
17 | textColor: {
18 | type: String,
19 | value: '#fff'
20 | }
21 | },
22 | data: {
23 | pivotWidth: 0,
24 | progressWidth: 0
25 | },
26 | watch: {
27 | pivotText: 'getWidth',
28 | showPivot: 'getWidth'
29 | },
30 | computed: {
31 | portionStyle: function portionStyle() {
32 | var width = (this.data.progressWidth - this.data.pivotWidth) * this.data.percentage / 100 + 'px';
33 | var background = this.getCurrentColor();
34 | return "width: " + width + "; background: " + background + "; ";
35 | },
36 | pivotStyle: function pivotStyle() {
37 | var color = this.data.textColor;
38 | var background = this.data.pivotColor || this.getCurrentColor();
39 | return "color: " + color + "; background: " + background;
40 | },
41 | text: function text() {
42 | return this.data.pivotText || this.data.percentage + '%';
43 | }
44 | },
45 | mounted: function mounted() {
46 | this.getWidth();
47 | },
48 | methods: {
49 | getCurrentColor: function getCurrentColor() {
50 | return this.data.inactive ? '#cacaca' : this.data.color;
51 | },
52 | getWidth: function getWidth() {
53 | var _this = this;
54 |
55 | this.getRect('.van-progress').then(function (rect) {
56 | _this.set({
57 | progressWidth: rect.width
58 | });
59 | });
60 | this.getRect('.van-progress__pivot').then(function (rect) {
61 | _this.set({
62 | pivotWidth: rect.width || 0
63 | });
64 | });
65 | }
66 | }
67 | });
--------------------------------------------------------------------------------
/static/vant/progress/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/progress/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 | {{ text }}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/static/vant/progress/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-progress{height:4px;position:relative;border-radius:4px;background:#e5e5e5}.van-progress__portion{left:0;height:100%;position:absolute;border-radius:inherit}.van-progress__portion--with-pivot{border-top-right-radius:0;border-bottom-right-radius:0}.van-progress__pivot{top:50%;right:0;min-width:2em;padding:0 5px;font-size:10px;position:absolute;line-height:1.6;text-align:center;border-radius:1em;word-break:keep-all;box-sizing:border-box;background-color:#e5e5e5;-webkit-transform:translate(100%,-50%);transform:translate(100%,-50%)}
--------------------------------------------------------------------------------
/static/vant/radio-group/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | relation: {
5 | name: 'radio',
6 | type: 'descendant',
7 | linked: function linked(target) {
8 | var _this$data = this.data,
9 | value = _this$data.value,
10 | disabled = _this$data.disabled;
11 | target.set({
12 | value: value,
13 | disabled: disabled || target.data.disabled
14 | });
15 | }
16 | },
17 | props: {
18 | value: null,
19 | disabled: Boolean
20 | },
21 | watch: {
22 | value: function value(_value) {
23 | var children = this.getRelationNodes('../radio/index');
24 | children.forEach(function (child) {
25 | child.set({
26 | value: _value
27 | });
28 | });
29 | },
30 | disabled: function disabled(_disabled) {
31 | var children = this.getRelationNodes('../radio/index');
32 | children.forEach(function (child) {
33 | child.set({
34 | disabled: _disabled || child.data.disabled
35 | });
36 | });
37 | }
38 | }
39 | });
--------------------------------------------------------------------------------
/static/vant/radio-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/radio-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/static/vant/radio-group/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';
--------------------------------------------------------------------------------
/static/vant/radio/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | relation: {
5 | name: 'radio-group',
6 | type: 'ancestor'
7 | },
8 | classes: ['icon-class', 'label-class'],
9 | props: {
10 | name: null,
11 | value: null,
12 | disabled: Boolean,
13 | labelDisabled: Boolean,
14 | labelPosition: String,
15 | checkedColor: String
16 | },
17 | methods: {
18 | emitChange: function emitChange(value) {
19 | var instance = this.getRelationNodes('../radio-group/index')[0] || this;
20 | instance.$emit('input', value);
21 | instance.$emit('change', value);
22 | },
23 | onChange: function onChange(event) {
24 | this.emitChange(event.detail.value);
25 | },
26 | onClickLabel: function onClickLabel() {
27 | if (!this.data.disabled && !this.data.labelDisabled) {
28 | this.emitChange(this.data.name);
29 | }
30 | }
31 | }
32 | });
--------------------------------------------------------------------------------
/static/vant/radio/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/radio/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/static/vant/radio/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-radio{overflow:hidden;line-height:1;-webkit-user-select:none;user-select:none}.van-radio__input,.van-radio__label{display:inline-block;vertical-align:middle}.van-radio__input{position:relative;font-size:20px}.van-radio__control{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;margin:0;opacity:0}.van-radio__label{margin-left:10px;color:#333;font-size:16px;line-height:20px}.van-radio__label--left{margin:0 10px 0 0;float:left}.van-radio__label:empty{margin:0}.van-radio__icon{pointer-events:none;display:block;line-height:0}.van-radio__icon--disabled{color:#e5e5e5}.van-radio__icon--checked{color:#1989fa}.van-radio__icon--check{color:#c9c9c9}
--------------------------------------------------------------------------------
/static/vant/rate/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/rate/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
16 |
17 |
--------------------------------------------------------------------------------
/static/vant/rate/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-rate{-webkit-user-select:none;user-select:none}.van-rate__item{width:1em;padding:0 2px;box-sizing:content-box}
--------------------------------------------------------------------------------
/static/vant/row/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'col',
5 | type: 'descendant',
6 | linked: function linked(target) {
7 | if (this.data.gutter) {
8 | target.setGutter(this.data.gutter);
9 | }
10 | }
11 | },
12 | props: {
13 | gutter: Number
14 | },
15 | watch: {
16 | gutter: 'setGutter'
17 | },
18 | mounted: function mounted() {
19 | if (this.data.gutter) {
20 | this.setGutter();
21 | }
22 | },
23 | methods: {
24 | setGutter: function setGutter() {
25 | var _this = this;
26 |
27 | var gutter = this.data.gutter;
28 | var margin = "-" + Number(gutter) / 2 + "px";
29 | var style = gutter ? "margin-right: " + margin + "; margin-left: " + margin + ";" : '';
30 | this.set({
31 | style: style
32 | });
33 | this.getRelationNodes('../col/index').forEach(function (col) {
34 | col.setGutter(_this.data.gutter);
35 | });
36 | }
37 | }
38 | });
--------------------------------------------------------------------------------
/static/vant/row/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/row/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/static/vant/row/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-row::after{content:"";display:table;clear:both}
--------------------------------------------------------------------------------
/static/vant/search/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | classes: ['field-class', 'input-class', 'cancel-class'],
5 | props: {
6 | focus: Boolean,
7 | error: Boolean,
8 | disabled: Boolean,
9 | readonly: Boolean,
10 | inputAlign: String,
11 | showAction: Boolean,
12 | useActionSlot: Boolean,
13 | placeholder: String,
14 | placeholderStyle: String,
15 | background: {
16 | type: String,
17 | value: '#f2f2f2'
18 | },
19 | maxlength: {
20 | type: Number,
21 | value: -1
22 | }
23 | },
24 | methods: {
25 | onChange: function onChange(event) {
26 | this.set({
27 | value: event.detail
28 | });
29 | this.$emit('change', event.detail);
30 | },
31 | onCancel: function onCancel() {
32 | this.set({
33 | value: ''
34 | });
35 | this.$emit('cancel');
36 | this.$emit('change', '');
37 | },
38 | onSearch: function onSearch() {
39 | this.$emit('search', this.data.value);
40 | },
41 | onFocus: function onFocus() {
42 | this.$emit('focus');
43 | },
44 | onBlur: function onBlur() {
45 | this.$emit('blur');
46 | },
47 | onClear: function onClear() {
48 | this.$emit('clear');
49 | }
50 | }
51 | });
--------------------------------------------------------------------------------
/static/vant/search/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-field": "../field/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant/search/index.wxml:
--------------------------------------------------------------------------------
1 |
5 |
29 |
30 |
31 | 取消
32 |
33 |
34 |
--------------------------------------------------------------------------------
/static/vant/search/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-search{display:-webkit-flex;display:flex;padding:7px 15px;-webkit-align-items:center;align-items:center;box-sizing:border-box}.van-search__field{overflow:hidden;border-radius:4px;-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#999}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:0 10px;font-size:14px;line-height:30px;color:#7d7e80}.van-search__action:active{background-color:#e8e8e8}
--------------------------------------------------------------------------------
/static/vant/slider/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/slider/index.wxml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
17 |
21 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/static/vant/slider/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#1989fa}.van-slider__button{width:20px;height:20px;border-radius:50%;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button-wrapper{position:absolute;top:50%;right:0;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper::after{content:'';position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3}
--------------------------------------------------------------------------------
/static/vant/stepper/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant/stepper/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
21 |
22 |
--------------------------------------------------------------------------------
/static/vant/stepper/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__input-wrapper,.van-stepper__minus,.van-stepper__plus{display:inline-block;vertical-align:middle;background-color:#fff}.van-stepper__minus,.van-stepper__plus{position:relative;width:40px;height:30px;padding:5px;border:1px solid #eee;box-sizing:border-box}.van-stepper__minus::before,.van-stepper__plus::before{width:9px;height:1px}.van-stepper__minus::after,.van-stepper__plus::after{width:1px;height:9px}.van-stepper__minus::after,.van-stepper__minus::before,.van-stepper__plus::after,.van-stepper__plus::before{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;background-color:#7d7e80;content:''}.van-stepper__minus:active,.van-stepper__plus:active{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f8f8f8}.van-stepper__minus--disabled::after,.van-stepper__minus--disabled::before,.van-stepper__plus--disabled::after,.van-stepper__plus--disabled::before{background-color:#c9c9c9}.van-stepper__minus--disabled:active,.van-stepper__plus--disabled:active{background-color:#f8f8f8}.van-stepper__minus{border-radius:2px 0 0 2px}.van-stepper__minus::after{display:none}.van-stepper__plus{border-radius:0 2px 2px 0}.van-stepper__input-wrapper{position:relative;width:35px;height:30px;padding:1px;font-size:14px;color:#7d7e80;text-align:center;border:1px solid #eee;border-width:1px 0;border-radius:0;box-sizing:border-box}.van-stepper__input-wrapper--disabled{color:#c9c9c9;background-color:#f8f8f8}.van-stepper__input{position:absolute;top:50%;left:50%;width:100%;min-height:0;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-appearance:none;appearance:none}
--------------------------------------------------------------------------------
/static/vant/steps/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { GREEN } from '../common/color';
3 | VantComponent({
4 | props: {
5 | icon: String,
6 | steps: Array,
7 | active: Number,
8 | direction: {
9 | type: String,
10 | value: 'horizontal'
11 | },
12 | activeColor: {
13 | type: String,
14 | value: GREEN
15 | }
16 | },
17 | watch: {
18 | steps: 'formatSteps',
19 | active: 'formatSteps'
20 | },
21 | created: function created() {
22 | this.formatSteps();
23 | },
24 | methods: {
25 | formatSteps: function formatSteps() {
26 | var _this = this;
27 |
28 | var steps = this.data.steps;
29 | steps.forEach(function (step, index) {
30 | step.status = _this.getStatus(index);
31 | });
32 | this.set({
33 | steps: steps
34 | });
35 | },
36 | getStatus: function getStatus(index) {
37 | var active = this.data.active;
38 |
39 | if (index < active) {
40 | return 'finish';
41 | } else if (index === active) {
42 | return 'process';
43 | }
44 |
45 | return '';
46 | }
47 | }
48 | });
--------------------------------------------------------------------------------
/static/vant/steps/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/steps/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 | {{ item.text }}
11 | {{ item.desc }}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/static/vant/submit-bar/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { iphonex } from '../mixins/iphonex';
3 | VantComponent({
4 | mixins: [iphonex],
5 | classes: ['bar-class', 'price-class', 'button-class'],
6 | props: {
7 | tip: null,
8 | type: Number,
9 | price: null,
10 | label: String,
11 | loading: Boolean,
12 | disabled: Boolean,
13 | buttonText: String,
14 | currency: {
15 | type: String,
16 | value: '¥'
17 | },
18 | buttonType: {
19 | type: String,
20 | value: 'danger'
21 | }
22 | },
23 | computed: {
24 | hasPrice: function hasPrice() {
25 | return typeof this.data.price === 'number';
26 | },
27 | priceStr: function priceStr() {
28 | return (this.data.price / 100).toFixed(2);
29 | },
30 | tipStr: function tipStr() {
31 | var tip = this.data.tip;
32 | return typeof tip === 'string' ? tip : '';
33 | }
34 | },
35 | methods: {
36 | onSubmit: function onSubmit(event) {
37 | this.$emit('submit', event.detail);
38 | }
39 | }
40 | });
--------------------------------------------------------------------------------
/static/vant/submit-bar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-button": "../button/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/submit-bar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{ tipStr }}
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{ label || '合计:' }}
15 |
16 | {{ currency }} {{ priceStr }}
17 |
18 |
19 |
20 |
30 | {{ loading ? '' : buttonText }}
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/static/vant/submit-bar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-submit-bar{z-index:100;position:fixed;bottom:0;left:0;width:100%;-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:10px;color:#f56723;font-size:12px;line-height:18px;background-color:#fff7cc}.van-submit-bar__bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:50px;background-color:#fff;font-size:14px}.van-submit-bar__bar--safe{padding-bottom:34px}.van-submit-bar__text{-webkit-flex:1;flex:1;color:#333;font-weight:500;text-align:right}.van-submit-bar__price{color:#f44;font-size:18px;padding-right:12px}.van-submit-bar__currency{font-size:14px}.van-submit-bar__button button{width:110px}
--------------------------------------------------------------------------------
/static/vant/swipe-cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/swipe-cell/index.wxml:
--------------------------------------------------------------------------------
1 |
10 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/static/vant/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)}
--------------------------------------------------------------------------------
/static/vant/switch-cell/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | props: {
5 | title: String,
6 | border: Boolean,
7 | checked: Boolean,
8 | loading: Boolean,
9 | disabled: Boolean,
10 | activeColor: String,
11 | inactiveColor: String,
12 | size: {
13 | type: String,
14 | value: '24px'
15 | }
16 | },
17 | watch: {
18 | checked: function checked(value) {
19 | this.set({
20 | value: value
21 | });
22 | }
23 | },
24 | created: function created() {
25 | this.set({
26 | value: this.data.checked
27 | });
28 | },
29 | methods: {
30 | onChange: function onChange(event) {
31 | this.$emit('change', event.detail);
32 | }
33 | }
34 | });
--------------------------------------------------------------------------------
/static/vant/switch-cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-cell": "../cell/index",
5 | "van-switch": "../switch/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant/switch-cell/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
17 |
18 |
--------------------------------------------------------------------------------
/static/vant/switch-cell/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-switch-cell{padding-top:9px;padding-bottom:9px}.van-switch-cell__switch{vertical-align:middle}
--------------------------------------------------------------------------------
/static/vant/switch/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | field: true,
4 | classes: ['node-class'],
5 | props: {
6 | checked: Boolean,
7 | loading: Boolean,
8 | disabled: Boolean,
9 | activeColor: String,
10 | inactiveColor: String,
11 | size: {
12 | type: String,
13 | value: '30px'
14 | }
15 | },
16 | watch: {
17 | checked: function checked(value) {
18 | this.set({
19 | value: value
20 | });
21 | }
22 | },
23 | created: function created() {
24 | this.set({
25 | value: this.data.checked
26 | });
27 | },
28 | methods: {
29 | onClick: function onClick() {
30 | if (!this.data.disabled && !this.data.loading) {
31 | var checked = !this.data.checked;
32 | this.$emit('input', checked);
33 | this.$emit('change', checked);
34 | }
35 | }
36 | }
37 | });
--------------------------------------------------------------------------------
/static/vant/switch/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-loading": "../loading/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/switch/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/static/vant/switch/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-switch{display:inline-block;position:relative;width:2em;height:1em;border:1px solid rgba(0,0,0,.1);border-radius:1em;box-sizing:content-box;background-color:#fff;transition:background-color .3s}.van-switch__node{top:0;left:0;position:absolute;border-radius:100%;width:1em;height:1em;z-index:1;transition:.3s;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);background-color:#fff}.van-switch__loading{top:25%;left:25%;position:absolute!important}.van-switch--on{background-color:#1989fa}.van-switch--on .van-switch__node{-webkit-transform:translateX(1em);transform:translateX(1em)}.van-switch--disabled{opacity:.4}
--------------------------------------------------------------------------------
/static/vant/tab/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | relation: {
4 | name: 'tabs',
5 | type: 'ancestor'
6 | },
7 | props: {
8 | dot: Boolean,
9 | info: null,
10 | title: String,
11 | disabled: Boolean,
12 | titleStyle: String
13 | },
14 | data: {
15 | width: null,
16 | inited: false,
17 | active: false,
18 | animated: false
19 | },
20 | watch: {
21 | title: 'update',
22 | disabled: 'update',
23 | dot: 'update',
24 | info: 'update',
25 | titleStyle: 'update'
26 | },
27 | methods: {
28 | update: function update() {
29 | var parent = this.getRelationNodes('../tabs/index')[0];
30 |
31 | if (parent) {
32 | parent.updateTabs();
33 | }
34 | }
35 | }
36 | });
--------------------------------------------------------------------------------
/static/vant/tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant/tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/static/vant/tab/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tab__pane{box-sizing:border-box;overflow-y:auto}.van-tab__pane--active{height:auto}.van-tab__pane--inactive{height:0;overflow:visible}
--------------------------------------------------------------------------------
/static/vant/tabbar-item/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | info: null,
5 | icon: String,
6 | dot: Boolean
7 | },
8 | relation: {
9 | name: 'tabbar',
10 | type: 'ancestor'
11 | },
12 | data: {
13 | active: false
14 | },
15 | methods: {
16 | onClick: function onClick() {
17 | var parent = this.getRelationNodes('../tabbar/index')[0];
18 |
19 | if (parent) {
20 | parent.onChange(this);
21 | }
22 |
23 | this.$emit('click');
24 | },
25 | setActive: function setActive(_ref) {
26 | var active = _ref.active,
27 | color = _ref.color;
28 |
29 | if (this.data.active !== active) {
30 | this.set({
31 | active: active,
32 | color: color
33 | });
34 | }
35 | }
36 | }
37 | });
--------------------------------------------------------------------------------
/static/vant/tabbar-item/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-info": "../info/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant/tabbar-item/index.wxml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
17 |
18 |
19 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/static/vant/tabbar-item/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#7d7e80;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon--dot::after{top:0;right:-8px;width:8px;height:8px;content:' ';position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:30px;height:18px;display:block}.van-tabbar-item--active{color:#1989fa}
--------------------------------------------------------------------------------
/static/vant/tabbar/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { iphonex } from '../mixins/iphonex';
3 | VantComponent({
4 | mixins: [iphonex],
5 | relation: {
6 | name: 'tabbar-item',
7 | type: 'descendant',
8 | linked: function linked(target) {
9 | var _this = this;
10 |
11 | this.data.items.push(target);
12 | setTimeout(function () {
13 | _this.setActiveItem();
14 | });
15 | },
16 | unlinked: function unlinked(target) {
17 | var _this2 = this;
18 |
19 | this.data.items = this.data.items.filter(function (item) {
20 | return item !== target;
21 | });
22 | setTimeout(function () {
23 | _this2.setActiveItem();
24 | });
25 | }
26 | },
27 | props: {
28 | active: Number,
29 | activeColor: String,
30 | fixed: {
31 | type: Boolean,
32 | value: true
33 | },
34 | zIndex: {
35 | type: Number,
36 | value: 1
37 | }
38 | },
39 | data: {
40 | items: [],
41 | currentActive: -1
42 | },
43 | watch: {
44 | active: function active(_active) {
45 | this.set({
46 | currentActive: _active
47 | });
48 | this.setActiveItem();
49 | }
50 | },
51 | created: function created() {
52 | this.set({
53 | currentActive: this.data.active
54 | });
55 | },
56 | methods: {
57 | setActiveItem: function setActiveItem() {
58 | var _this3 = this;
59 |
60 | this.data.items.forEach(function (item, index) {
61 | item.setActive({
62 | active: index === _this3.data.currentActive,
63 | color: _this3.data.activeColor
64 | });
65 | });
66 | },
67 | onChange: function onChange(child) {
68 | var active = this.data.items.indexOf(child);
69 |
70 | if (active !== this.data.currentActive && active !== -1) {
71 | this.$emit('change', active);
72 | this.set({
73 | currentActive: active
74 | });
75 | this.setActiveItem();
76 | }
77 | }
78 | }
79 | });
--------------------------------------------------------------------------------
/static/vant/tabbar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
4 |
--------------------------------------------------------------------------------
/static/vant/tabbar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/static/vant/tabbar/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;width:100%;height:50px;background-color:#fff}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:34px}
--------------------------------------------------------------------------------
/static/vant/tabs/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-info": "../info/index"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/static/vant/tabs/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
13 |
14 |
22 |
23 | {{ item.title }}
24 |
29 |
30 |
31 |
32 |
33 |
34 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/static/vant/tabs/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{position:absolute;top:0;right:0;left:0}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{position:relative;display:-webkit-flex;display:flex;background-color:#fff;-webkit-user-select:none;user-select:none}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{line-height:30px;color:#f44;border-right:1px solid #f44}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{position:absolute;bottom:0;left:0;z-index:1;height:3px;background-color:#f44;border-radius:3px}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tabs__content{overflow:hidden}.van-tabs__track{position:relative}.van-tab{position:relative;min-width:0;padding:0 5px;font-size:14px;line-height:44px;color:#7d7e80;text-align:center;cursor:pointer;background-color:#fff;box-sizing:border-box;-webkit-flex:1;flex:1}.van-tab--active{font-weight:500;color:#333}.van-tab--disabled{color:#c9c9c9}.van-tab__title--dot::after{display:inline-block;width:8px;height:8px;vertical-align:middle;background-color:#f44;border-radius:100%;content:''}.van-tab__title__info{position:relative!important;top:-1px!important;display:inline-block;-webkit-transform:translateX(0)!important;transform:translateX(0)!important}
--------------------------------------------------------------------------------
/static/vant/tag/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { RED, BLUE, GREEN } from '../common/color';
3 | var DEFAULT_COLOR = '#999';
4 | var COLOR_MAP = {
5 | danger: RED,
6 | primary: BLUE,
7 | success: GREEN
8 | };
9 | VantComponent({
10 | props: {
11 | size: String,
12 | type: String,
13 | mark: Boolean,
14 | color: String,
15 | plain: Boolean,
16 | round: Boolean,
17 | textColor: String
18 | },
19 | computed: {
20 | style: function style() {
21 | var color = this.data.color || COLOR_MAP[this.data.type] || DEFAULT_COLOR;
22 | var key = this.data.plain ? 'color' : 'background-color';
23 | var style = {
24 | [key]: color
25 | };
26 |
27 | if (this.data.textColor) {
28 | style.color = this.data.textColor;
29 | }
30 |
31 | return Object.keys(style).map(function (key) {
32 | return key + ": " + style[key];
33 | }).join(';');
34 | }
35 | }
36 | });
--------------------------------------------------------------------------------
/static/vant/tag/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant/tag/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/static/vant/tag/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tag{color:#fff;font-size:10px;padding:.2em .5em;line-height:normal;border-radius:.2em;display:inline-block}.van-tag::after{border-color:currentColor;border-radius:.4em}.van-tag--mark{padding-right:.6em;border-radius:0 .8em .8em 0}.van-tag--mark::after{border-radius:0 1.6em 1.6em 0}.van-tag--round{border-radius:.8em}.van-tag--round::after{border-radius:1.6em}.van-tag--medium{font-size:12px}.van-tag--large{font-size:14px}
--------------------------------------------------------------------------------
/static/vant/toast/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | VantComponent({
3 | props: {
4 | show: Boolean,
5 | mask: Boolean,
6 | message: String,
7 | forbidClick: Boolean,
8 | zIndex: {
9 | type: Number,
10 | value: 1000
11 | },
12 | type: {
13 | type: String,
14 | value: 'text'
15 | },
16 | loadingType: {
17 | type: String,
18 | value: 'circular'
19 | },
20 | position: {
21 | type: String,
22 | value: 'middle'
23 | }
24 | },
25 | methods: {
26 | clear: function clear() {
27 | this.set({
28 | show: false
29 | });
30 | },
31 | // for prevent touchmove
32 | noop: function noop() {}
33 | }
34 | });
--------------------------------------------------------------------------------
/static/vant/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 |
--------------------------------------------------------------------------------
/static/vant/toast/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
16 |
17 | {{ message }}
18 |
19 |
20 |
21 |
27 |
28 | {{ message }}
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/static/vant/toast/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;color:#fff;font-size:14px;line-height:20px;border-radius:4px;word-break:break-all;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;box-sizing:content-box;background-color:rgba(51,51,51,.88)}.van-toast__container{position:fixed;top:50%;left:50%;max-width:70%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-toast--text{padding:8px 12px;min-width:96px}.van-toast--icon{width:90px;padding:15px;min-height:90px}.van-toast--icon .van-toast__icon{font-size:48px}.van-toast--icon .van-toast__text{padding-top:5px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translate(0,-30vh);transform:translate(0,-30vh)}.van-toast--bottom{-webkit-transform:translate(0,30vh);transform:translate(0,30vh)}
--------------------------------------------------------------------------------
/static/vant/transition/index.js:
--------------------------------------------------------------------------------
1 | import { VantComponent } from '../common/component';
2 | import { transition } from '../mixins/transition';
3 | VantComponent({
4 | mixins: [transition(true)],
5 | props: {
6 | name: {
7 | type: String,
8 | value: 'fade'
9 | }
10 | }
11 | });
--------------------------------------------------------------------------------
/static/vant/transition/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/static/vant/transition/index.wxml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/static/vant/tree-select/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "van-icon": "../icon/index",
5 | "van-cell": "../cell/index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/static/vant/tree-select/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
15 | {{ item.text }}
16 |
17 |
18 |
23 |
30 | {{ item.text }}
31 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/static/vant/tree-select/index.wxss:
--------------------------------------------------------------------------------
1 | @import '../common/index.wxss';.van-tree-select{position:relative;font-size:14px;-webkit-user-select:none;user-select:none}.van-tree-select__nav{position:absolute;top:0;bottom:0;left:0;width:35%;min-width:120px;background-color:#fafafa}.van-tree-select__nitem{position:relative;padding:0 9px 0 15px;line-height:44px}.van-tree-select__nitem--active::after,.van-tree-select__nitem:active::after{position:absolute;top:0;bottom:0;left:0;width:3.6px;background-color:#f44;content:''}.van-tree-select__nitem--active{font-weight:700;background-color:#fff}.van-tree-select__nitem--disabled{color:#999}.van-tree-select__nitem--disabled:active::after{display:none}.van-tree-select__content{width:65%;padding-left:15px;margin-left:35%;background-color:#fff;box-sizing:border-box}.van-tree-select__item{position:relative;font-weight:700;line-height:44px}.van-tree-select__item--active,.van-tree-select__item:active{color:#f44}.van-tree-select__item--disabled,.van-tree-select__item--disabled:active{color:#999}.van-tree-select__selected{position:absolute;top:0;right:15px;bottom:0;height:24px;margin:auto 0;line-height:24px}
--------------------------------------------------------------------------------
/static/vant/wxs/array.wxs:
--------------------------------------------------------------------------------
1 | function isArray(array) {
2 | return array && array.constructor === 'Array';
3 | }
4 |
5 | module.exports.isArray = isArray;
6 |
--------------------------------------------------------------------------------
/static/vant/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 |
--------------------------------------------------------------------------------
/static/vant/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 |
--------------------------------------------------------------------------------
/static/vant/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 |
--------------------------------------------------------------------------------
/static/vant/wxs/utils.wxs:
--------------------------------------------------------------------------------
1 | var bem = require('./bem.wxs').bem;
2 | var memoize = require('./memoize.wxs').memoize;
3 |
4 | function isSrc(url) {
5 | return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0;
6 | }
7 |
8 | module.exports = {
9 | bem: memoize(bem),
10 | isSrc: isSrc,
11 | memoize: memoize
12 | };
13 |
--------------------------------------------------------------------------------