├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .npmignore
├── LICENSE
├── README.md
├── TODO
├── examples
│ ├── picker-iscroll.vue
│ ├── timer.vue
│ └── transition.vue
├── src
│ ├── button-collection.vue
│ ├── grid.vue
│ ├── picker-iscroll.vue
│ ├── timer-task.vue
│ ├── timer.vue
│ └── transition.vue
└── stastic
│ ├── electricity-statistics.vue
│ ├── interval.vue
│ ├── utils.js
│ └── vue-stone-replace.css
├── bin
└── ghpages-merge.sh
├── build
├── build.js
├── check-versions.js
├── dev-client.js
├── dev-server.js
├── utils.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
├── prod.env.js
└── test.env.js
├── dist
├── iconfonts.css
├── iconfonts.js
├── img
│ └── iconfont.e9c89e5.svg
├── vue-stone.css
└── vue-stone.js
├── examples
├── App.vue
├── index.js
└── pages
│ ├── 404.vue
│ ├── _example_style.vue
│ ├── _tmpl_back.vue
│ ├── action-sheet.vue
│ ├── alert.vue
│ ├── button.vue
│ ├── checkboard.vue
│ ├── control-center.vue
│ ├── counter.vue
│ ├── days-picker.vue
│ ├── dialog.vue
│ ├── icons.vue
│ ├── input.vue
│ ├── modes.vue
│ ├── panel.vue
│ ├── picker-loop.vue
│ ├── picker.vue
│ ├── range.vue
│ ├── search.vue
│ ├── slider.vue
│ ├── switch.vue
│ ├── textarea.vue
│ ├── timepicker.vue
│ └── toast.vue
├── index.html
├── libs
├── dependencies.js
├── initializer.js
├── intactify.js
├── timepicker.vue
└── vue-logger.js
├── package-lock.json
├── package.json
├── postcss.config.js
├── src
├── assets
│ ├── home.png
│ ├── loading.png
│ ├── menu.png
│ ├── mute.png
│ └── return.png
├── components
│ ├── _style.vue
│ ├── _style_dependencies_fonts.vue
│ ├── _style_iconfonts.vue
│ ├── _style_transition.vue
│ ├── action-box.vue
│ ├── action-sheet.vue
│ ├── alert.vue
│ ├── button-group.vue
│ ├── button-switch.vue
│ ├── button.vue
│ ├── checkboard.vue
│ ├── confirm.vue
│ ├── control-center.vue
│ ├── counter.vue
│ ├── dayspicker.vue
│ ├── dialog.vue
│ ├── icon.vue
│ ├── input.vue
│ ├── loading.vue
│ ├── mask.vue
│ ├── modes.vue
│ ├── panel.vue
│ ├── picker-loop.vue
│ ├── picker.vue
│ ├── power.vue
│ ├── range.vue
│ ├── search.vue
│ ├── slide.vue
│ ├── switch.vue
│ ├── textarea.vue
│ ├── timepicker.vue
│ └── toast.vue
├── iconfonts.js
├── index.js
├── libs
│ └── iscroll-lite.js
├── styles
│ ├── animate.css
│ ├── base.css
│ ├── default-theme
│ │ ├── themes.css
│ │ └── variables.css
│ ├── dependenciesFonts
│ │ ├── fonts
│ │ │ ├── iconfont.svg
│ │ │ ├── iconfont.ttf
│ │ │ └── iconfont.woff
│ │ ├── selection.json
│ │ └── style.css
│ ├── fonts
│ │ ├── fonts
│ │ │ ├── iconfont.svg
│ │ │ ├── iconfont.ttf
│ │ │ └── iconfont.woff
│ │ ├── selection.json
│ │ └── style.css
│ ├── mixins.css
│ ├── normalize.css
│ └── utils.css
└── utils
│ ├── common.js
│ └── timer.js
├── test
├── e2e
│ ├── custom-assertions
│ │ └── elementCount.js
│ ├── nightwatch.conf.js
│ ├── reports
│ │ └── CHROME_55.0.2883.59_MAC_test.xml
│ ├── runner.js
│ └── specs
│ │ └── test.js
└── unit
│ ├── .eslintrc
│ ├── coverage
│ └── .DS_Store
│ ├── helper.js
│ ├── index.js
│ ├── karma.conf.js
│ └── specs
│ ├── power.spec.js
│ └── switch.spec.js
├── wiki
├── contribute-guide.md
├── doc-action-box.md
├── doc-action-sheet.md
├── doc-alert.md
├── doc-button-group.md
├── doc-button-switch.md
├── doc-button.md
├── doc-checkboard.md
├── doc-confirm.md
├── doc-control-center.md
├── doc-counter.md
├── doc-dayspicker.md
├── doc-dialog.md
├── doc-icon.md
├── doc-input.md
├── doc-loading.md
├── doc-mask.md
├── doc-modes.md
├── doc-panel.md
├── doc-picker-loop.md
├── doc-picker.md
├── doc-range.md
├── doc-search.md
├── doc-slide.md
├── doc-switch.md
├── doc-textarea.md
├── doc-timepicker.md
├── doc-timer.md
├── doc-toast.md
├── doc-transition.md
├── fe-code-style.md
├── format-of-docs.md
├── how-to-build-by-deps-in-project.md
└── how-to-generator-the-webfont.md
└── yarn.lock
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015", "stage-2"],
3 | "plugins": ["transform-runtime"],
4 | "comments": false
5 | }
6 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | config/*.js
3 | src/units/*.js
4 | postcss.config.js
5 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | "browser": true,
4 | },
5 | root: true,
6 | parser: 'babel-eslint',
7 | parserOptions: {
8 | sourceType: 'module'
9 | },
10 | extends: 'airbnb-base',
11 | // required to lint *.vue files
12 | plugins: [
13 | 'html'
14 | ],
15 | // check if imports actually resolve
16 | 'settings': {
17 | 'import/resolver': {
18 | 'webpack': {
19 | 'config': 'build/webpack.base.conf.js'
20 | }
21 | }
22 | },
23 | // add your custom rules here
24 | 'rules': {
25 |
26 | "no-restricted-syntax": ["off", "BinaryExpression[operator='in']"],
27 | // don't require .vue extension when importing
28 | 'import/extensions': ['error', 'always', {
29 | 'js': 'never',
30 | 'vue': 'never'
31 | }],
32 | "import/imports-first": 0,
33 | 'import/no-dynamic-require': 0,
34 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
35 | "no-use-before-define": ["error", { "functions": false,}],
36 | "no-unused-vars": 0,
37 | "no-console": 0,
38 | "no-underscore-dangle": 0,
39 | "arrow-parens": 0,
40 | "no-param-reassign": 0,
41 | "no-unused-expressions": 0,
42 | "padded-blocks": 0,
43 | "prefer-const": 1,
44 | "linebreak-style":0,
45 | "max-len":0,
46 | "import/no-extraneous-dependencies": 0,
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | npm-debug.log
4 | test/unit/coverage/
5 | .vscode/
6 | sfp-config.js
7 | Temp.md
8 |
9 | selenium-debug.log
10 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .babelrc
3 | .editorconfig
4 | .eslintrc.js
5 | .gitignore
6 | .eslintignore
7 | .karrierconfig.js
8 | index.html
9 | TODO.md
10 |
11 | npm-debug.log
12 | sfp-config.js
13 | selenium-debug.log
14 |
15 | test/unit/coverage/
16 | .vscode/
17 | node_modules/
18 | examples/
19 | config/
20 | build/
21 | wiki/
22 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Cong
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 | # vue-stone
2 | [](https://www.npmjs.com/package/vue-stone)
3 | [](https://www.npmjs.com/package/vue-stone)
4 | [](https://github.com/JD-Smart-FE/vue-stone/issues)
5 | [](https://github.com/JD-Smart-FE/vue-stone/blob/master/LICENSE)
6 | > A components library for vue2.x. 一个基于 vue2.x 的组件库
7 |
8 |
9 | ## 安装
10 |
11 | ```
12 | npm install --save vue-stone
13 | ```
14 |
15 | ## 使用
16 |
17 | ### 本项目版本号规定
18 |
19 | 在本项目发布 1.0.0 版本之前,第二位版本号的更新**将不向下兼容**,第三位版本号向下兼容,通常为优化或 BUG 修复更新。
20 |
21 | 因此请**注意这里**:将 package.json 中 dependencies 字段下 `"vue-stone": "^0.4.0"` 版本号前面的 "^" 更改为 "~",暨 `"vue-stone": "~0.4.0"`。这样再执行 npm install 时,将只会安装第三位版本号的最新版。
22 |
23 | ### 使用前注意
24 | 本项目采用了 rem 布局方案,因此在引入该组件库前请在 HTML 文件 head 标签內添加下面一段 script:
25 |
26 | ```html
27 |
47 | ```
48 |
49 | ### 开始使用
50 |
51 | Import vue-stone and register components
52 |
53 | ```js
54 | import Stone from 'vue-stone';
55 | import 'vue-stone/dist/vue-stone.css';
56 |
57 | // 如果你需要使用组件库中字体图标,请单独引入字体图标的 CSS 文件
58 | // import 'vue-stone/dist/iconfonts.css';
59 |
60 | import Vue from 'vue';
61 |
62 | Vue.use(Stone); // register components
63 | ```
64 |
65 | ### 按需打包组件
66 |
67 | 受 webpack 打包策略所限,我们目前并没有将按需打包做的很简练,但至少目前还是做到了,具体步骤请查阅 [按需加载组件](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/how-to-build-by-deps-in-project.md)
68 |
69 | 如果你有更好的 idea,欢迎你为 vue-stone 贡献出一份力量。
70 |
71 |
72 | ## 文档
73 | vue-stone 组件库提供了下述组件,每个组件都带有详细的文档,组件展示可参考 [example](https://jd-smart-fe.github.io/vue-stone/)
74 |
75 | - [Action-box](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-action-box.md)
76 | - [Action-sheet](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-action-sheet.md)
77 | - [Alert](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-alert.md)
78 | - [Button](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-button.md)
79 | - [Button-group](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-button-group.md)
80 | - [Button-switch](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-button-switch.md)
81 | - [Checkboard](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-checkboard.md)
82 | - [Confirm](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-confirm.md)
83 | - [Counter](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-counter.md)
84 | - [Dayspicker](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-dayspicker.md)
85 | - [Dialog](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-dialog.md)
86 | - [Input](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-input.md)
87 | - [Loading](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-loading.md)
88 | - [Mask](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-mask.md)
89 | - [Modes](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-modes.md)
90 | - [Panel](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-panel.md)
91 | - [Picker-loop](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-picker-loop.md)
92 | - [Picker](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-picker.md)
93 | - [Range](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-range.md)
94 | - [Slide](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-slide.md)
95 | - [Switch](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-switch.md)
96 | - [Timepicker](https://github.com/jd-smart-fe/vue-stone/blob/master/wiki/doc-timepicker.md)
97 | - [Toast](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-toast.md)
98 | - [Control-center](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-control-center.md)
99 | - [Search](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-search.md)
100 | - [Textarea](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/doc-textarea.md)
101 | - [icon](https://github.com/JD-Smart-FE/vue-stone/blob/next/wiki/doc-icon.md)
102 | ## Contribute
103 |
104 | 贡献代码请遵循[代码贡献规范](https://github.com/JD-Smart-FE/vue-stone/blob/master/wiki/contribute-guide.md)
105 |
106 | ## Release Notes
107 |
108 | [查看更新内容](https://github.com/JD-Smart-FE/vue-stone/releases)
109 |
--------------------------------------------------------------------------------
/TODO/examples/timer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
开关
18 |
19 | 开关
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | mainpage
29 |
30 |
31 | update
32 |
33 |
34 | get value
35 |
36 |
37 |
38 |
39 | {{ value }}
40 |
41 |
42 |
43 |
44 |
45 |
152 |
153 |
164 |
--------------------------------------------------------------------------------
/TODO/examples/transition.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
12 |
14 | 过渡效果
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
动画效果
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
71 |
72 |
82 |
--------------------------------------------------------------------------------
/TODO/src/button-collection.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
18 |
19 |
20 |
90 |
91 |
104 |
--------------------------------------------------------------------------------
/TODO/src/grid.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
14 |
15 |
27 |
--------------------------------------------------------------------------------
/TODO/src/transition.vue:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
23 |
24 |
25 |
26 |
27 |
171 |
181 |
--------------------------------------------------------------------------------
/TODO/stastic/interval.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
156 |
170 |
--------------------------------------------------------------------------------
/TODO/stastic/utils.js:
--------------------------------------------------------------------------------
1 | function getMonth(params) {
2 | return params.substr(5, 2);
3 | }
4 | function getDate(params) {
5 | return params.substr(8, 2);
6 | }
7 | const convertToCoordinate = params => {
8 | const unit = params.sum_unit;
9 | const sum = parseFloat(params.sum);
10 | const arg = parseFloat(params.arg);
11 | const axis = [];
12 | const details = [];
13 | let axisTimeUnit = '';
14 | let unitType = '';
15 | const originArr = params.detail;
16 | const originArrType = originArr.length ? originArr[0].desc : '';
17 | if (originArrType === '小时') {
18 | // 天
19 | axisTimeUnit = unitType = '点';
20 | } else if (originArrType.indexOf('星期') !== -1) {
21 | // 周
22 | axisTimeUnit = '';
23 | unitType = '日';
24 | } else if (originArrType.indexOf('-') !== -1) {
25 | // 月
26 | axisTimeUnit = unitType = '日';
27 | } else if (originArrType.indexOf('月') !== -1) {
28 | // 年
29 | axisTimeUnit = unitType = '月';
30 | }
31 | originArr.forEach((item, index) => {
32 | const axisItme = { time: '', value: 0 };
33 | const detailsItem = { time: '', desc: '' };
34 | // 用电量转为数值型,‘NaN’转为0
35 | if (item.value === 'NaN') {
36 | axisItme.value = 0;
37 | detailsItem.desc = '没有数据';
38 | } else {
39 | axisItme.value = parseFloat(item.value);
40 | detailsItem.desc = item.value;
41 | }
42 | // 坐标轴的时间变量
43 | if (axisTimeUnit === '点') {
44 | // 天
45 | // axisItme.time = parseInt(item.datetime, 10) + '';
46 | axisItme.time = parseInt(item.datetime, 10).toString();
47 | // detailsItem.time = item.datetime + ':00';
48 | detailsItem.time = `${item.datetime} :00`;
49 | } else if (axisTimeUnit === '') {
50 | // 周
51 | axisItme.time = getDate(item.datetime);
52 | detailsItem.time =
53 | // getMonth(item.datetime) + '月' + getDate(item.datetime) + '日';
54 | `${getMonth(item.datetime)}月${getDate(item.datetime)}日`;
55 | } else if (axisTimeUnit === '日') {
56 | // 月
57 | // axisItme.time = parseInt(getDate(item.datetime), 10) + '';
58 | axisItme.time = parseInt(getDate(item.datetime), 10).toString();
59 | detailsItem.time = item.datetime;
60 | } else if (axisTimeUnit === '月') {
61 | // 年
62 | // axisItme.time = parseInt(getMonth(item.datetime), 10) + '';
63 | axisItme.time = parseInt(getMonth(item.datetime), 10).toString();
64 | detailsItem.time = item.desc;
65 | }
66 | axis.push(axisItme);
67 | details.push(detailsItem);
68 | });
69 | return {
70 | axis,
71 | details,
72 | unit,
73 | sum,
74 | arg,
75 | unitType,
76 | };
77 | };
78 | export default convertToCoordinate;
79 |
--------------------------------------------------------------------------------
/TODO/stastic/vue-stone-replace.css:
--------------------------------------------------------------------------------
1 |
2 | .header .c-mode-4 .c-mode-item {
3 | height: .3rem;
4 | border: 0;
5 | border-left: 1px solid #45A3F1;
6 |
7 | }
8 | .header .c-mode-4 .c-mode-item:nth-child(1) {
9 | height: .3rem;
10 | border-left: 0;
11 |
12 | }
13 | .header .c-mode-item-active {
14 | background: #45a3f1;
15 |
16 | }
17 | .header .c-mode-item-text {
18 | font-size: 0.13rem;
19 | }
--------------------------------------------------------------------------------
/bin/ghpages-merge.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | git checkout gh-pages
4 | git merge -Xtheirs master -m "Merge branch master into branch gh-pages"
5 | git push
6 | git checkout master
7 |
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | // https://github.com/shelljs/shelljs
2 | require('./check-versions')()
3 | require('shelljs/global')
4 |
5 | env.NODE_ENV = 'production'
6 |
7 | var path = require('path')
8 | var config = require('../config')
9 | var ora = require('ora')
10 | var webpack = require('webpack')
11 | var webpackConfig = require('./webpack.prod.conf')
12 |
13 | console.log(
14 | ' Tip:\n' +
15 | ' Built files are meant to be served over an HTTP server.\n' +
16 | ' Opening index.html over file:// won\'t work.\n'
17 | )
18 |
19 | var spinner = ora('building for production...')
20 | spinner.start()
21 |
22 | var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
23 | rm('-rf', assetsPath)
24 | mkdir('-p', assetsPath)
25 | cp('-R', 'static/*', assetsPath)
26 |
27 | webpack(webpackConfig, function (err, stats) {
28 | spinner.stop()
29 | if (err) throw err
30 | process.stdout.write(stats.toString({
31 | colors: true,
32 | modules: false,
33 | children: false,
34 | chunks: false,
35 | chunkModules: false
36 | }) + '\n')
37 | })
38 |
39 |
40 |
--------------------------------------------------------------------------------
/build/check-versions.js:
--------------------------------------------------------------------------------
1 | var semver = require('semver')
2 | var chalk = require('chalk')
3 | var packageConfig = require('../package.json')
4 | var exec = function (cmd) {
5 | return require('child_process')
6 | .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 | name: 'npm',
17 | currentVersion: exec('npm --version'),
18 | versionRequirement: packageConfig.engines.npm
19 | }
20 | ]
21 |
22 | module.exports = function () {
23 | var warnings = []
24 | for (var i = 0; i < versionRequirements.length; i++) {
25 | var mod = versionRequirements[i]
26 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
27 | warnings.push(mod.name + ': ' +
28 | chalk.red(mod.currentVersion) + ' should be ' +
29 | chalk.green(mod.versionRequirement)
30 | )
31 | }
32 | }
33 |
34 | if (warnings.length) {
35 | console.log('')
36 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
37 | console.log()
38 | for (var i = 0; i < warnings.length; i++) {
39 | var warning = warnings[i]
40 | console.log(' ' + warning)
41 | }
42 | console.log()
43 | process.exit(1)
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/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/dev-server.js:
--------------------------------------------------------------------------------
1 | require('./check-versions')()
2 | var config = require('../config')
3 | if (!process.env.NODE_ENV) process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
4 | var path = require('path')
5 | var express = require('express')
6 | var webpack = require('webpack')
7 | var opn = require('opn')
8 | var proxyMiddleware = require('http-proxy-middleware')
9 | var webpackConfig = process.env.NODE_ENV === 'testing'
10 | ? require('./webpack.prod.conf')
11 | : require('./webpack.dev.conf')
12 |
13 | // default port where dev server listens for incoming traffic
14 | var port = process.env.PORT || config.dev.port
15 | // Define HTTP proxies to your custom API backend
16 | // https://github.com/chimurai/http-proxy-middleware
17 | var proxyTable = config.dev.proxyTable
18 |
19 | var app = express()
20 | var compiler = webpack(webpackConfig)
21 |
22 | var devMiddleware = require('webpack-dev-middleware')(compiler, {
23 | publicPath: webpackConfig.output.publicPath,
24 | stats: {
25 | colors: true,
26 | chunks: false
27 | }
28 | })
29 |
30 | var hotMiddleware = require('webpack-hot-middleware')(compiler)
31 | // force page reload when html-webpack-plugin template changes
32 | compiler.plugin('compilation', function (compilation) {
33 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
34 | hotMiddleware.publish({ action: 'reload' })
35 | cb()
36 | })
37 | })
38 |
39 | // proxy api requests
40 | Object.keys(proxyTable).forEach(function (context) {
41 | var options = proxyTable[context]
42 | if (typeof options === 'string') {
43 | options = { target: options }
44 | }
45 | app.use(proxyMiddleware(context, options))
46 | })
47 |
48 | // handle fallback for HTML5 history API
49 | app.use(require('connect-history-api-fallback')())
50 |
51 | // serve webpack bundle output
52 | app.use(devMiddleware)
53 |
54 | // enable hot-reload and state-preserving
55 | // compilation error display
56 | app.use(hotMiddleware)
57 |
58 | // serve pure static assets
59 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
60 | app.use(staticPath, express.static('./static'))
61 |
62 | module.exports = app.listen(port, function (err) {
63 | if (err) {
64 | console.log(err)
65 | return
66 | }
67 | var uri = 'http://localhost:' + port
68 | console.log('Listening at ' + uri + '\n')
69 |
70 | // when env is testing, don't need open it
71 | if (process.env.NODE_ENV !== 'testing') {
72 | opn(uri)
73 | }
74 | })
75 |
--------------------------------------------------------------------------------
/build/utils.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var config = require('../config')
3 | var ExtractTextPlugin = require('extract-text-webpack-plugin')
4 |
5 | exports.assetsPath = function (_path) {
6 | var assetsSubDirectory = process.env.NODE_ENV === 'production'
7 | ? config.build.assetsSubDirectory
8 | : config.dev.assetsSubDirectory
9 | return path.posix.join(assetsSubDirectory, _path)
10 | }
11 |
12 | exports.cssLoaders = function (options) {
13 | options = options || {}
14 | // generate loader string to be used with extract text plugin
15 | function generateLoaders (loaders) {
16 | var sourceLoader = loaders.map(function (loader) {
17 | var extraParamChar
18 | if (/\?/.test(loader)) {
19 | loader = loader.replace(/\?/, '-loader?')
20 | extraParamChar = '&'
21 | } else {
22 | loader = loader + '-loader'
23 | extraParamChar = '?'
24 | }
25 | return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
26 | }).join('!')
27 |
28 | // Extract CSS when that option is specified
29 | // (which is the case during production build)
30 | if (options.extract) {
31 | return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
32 | } else {
33 | return ['vue-style-loader', sourceLoader].join('!')
34 | }
35 | }
36 |
37 | // http://vuejs.github.io/vue-loader/en/configurations/extract-css.html
38 | return {
39 | css: generateLoaders(['css?-autoprefixer']),
40 | postcss: generateLoaders(['css?-autoprefixer']),
41 | less: generateLoaders(['css?-autoprefixer', 'less']),
42 | sass: generateLoaders(['css?-autoprefixer', 'sass?indentedSyntax']),
43 | scss: generateLoaders(['css?-autoprefixer', 'sass']),
44 | stylus: generateLoaders(['css?-autoprefixer', 'stylus']),
45 | styl: generateLoaders(['css?-autoprefixer', 'stylus'])
46 | }
47 | }
48 |
49 | // Generate loaders for standalone style files (outside of .vue)
50 | exports.styleLoaders = function (options) {
51 | var output = []
52 | var loaders = exports.cssLoaders(options)
53 | for (var extension in loaders) {
54 | var loader = loaders[extension]
55 | output.push({
56 | test: new RegExp('\\.' + extension + '$'),
57 | loader: loader
58 | })
59 | }
60 | return output
61 | }
62 |
--------------------------------------------------------------------------------
/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var config = require('../config')
3 | var utils = require('./utils')
4 | var precss = require('precss');
5 | var ContextReplacementPlugin = require("webpack/lib/ContextReplacementPlugin");
6 |
7 | var projectRoot = path.resolve(__dirname, '../')
8 | var list = require('../libs/initializer.js').components;
9 | var comsreg = new RegExp(`(${list.join('|')})\.vue$`);
10 |
11 | var env = process.env.NODE_ENV
12 | // check env & config/index.js to decide weither to enable CSS Sourcemaps for the
13 | // various preprocessor loaders added to vue-loader at the end of this file
14 | var cssSourceMapDev = (env === 'development' && config.dev.cssSourceMap)
15 | var cssSourceMapProd = (env === 'production' && config.build.productionSourceMap)
16 | var useCssSourceMap = cssSourceMapDev || cssSourceMapProd
17 |
18 | module.exports = {
19 | entry: {
20 | app: './examples/index.js'
21 | },
22 | output: {
23 | path: config.build.assetsRoot,
24 | publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath,
25 | filename: '[name].js'
26 | },
27 | resolve: {
28 | extensions: ['', '.js', '.vue'],
29 | fallback: [path.join(__dirname, '../node_modules')],
30 | alias: {
31 | 'vue$': 'vue/dist/vue.common.js',
32 | 'src': path.resolve(__dirname, '../src'),
33 | 'assets': path.resolve(__dirname, '../src/assets'),
34 | 'components': path.resolve(__dirname, '../src/components')
35 | }
36 | },
37 | resolveLoader: {
38 | fallback: [path.join(__dirname, '../node_modules')]
39 | },
40 | module: {
41 | preLoaders: [
42 | {
43 | test: /\.vue$/,
44 | loader: 'eslint',
45 | include: projectRoot,
46 | exclude: /node_modules/
47 | },
48 | {
49 | test: /\.js$/,
50 | loader: 'eslint',
51 | include: projectRoot,
52 | exclude: /node_modules/
53 | }
54 | ],
55 | loaders: [
56 | {
57 | test: /\.vue$/,
58 | loader: 'vue'
59 | },
60 | {
61 | test: /\.js$/,
62 | loader: 'babel',
63 | include: projectRoot,
64 | exclude: /node_modules/
65 | },
66 | {
67 | test: /\.json$/,
68 | loader: 'json'
69 | },
70 | {
71 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
72 | loader: 'url',
73 | query: {
74 | limit: 10000,
75 | name: utils.assetsPath('img/[name].[hash:7].[ext]')
76 | }
77 | },
78 | {
79 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
80 | loader: 'url',
81 | query: {
82 | limit: 100000,
83 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
84 | }
85 | }
86 | ]
87 | },
88 | eslint: {
89 | formatter: require('eslint-friendly-formatter')
90 | },
91 | plugins: [
92 | new ContextReplacementPlugin(
93 | /components$/,
94 | comsreg
95 | )
96 | ],
97 | vue: {
98 | loaders: utils.cssLoaders({ sourceMap: useCssSourceMap }),
99 | postcss: [
100 | precss,
101 | require('autoprefixer')({
102 | browsers: ['last 2 versions','Android >= 4.2','iOS >= 6', '>1%']
103 | })
104 | ]
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | var config = require('../config')
2 | var webpack = require('webpack')
3 | var merge = require('webpack-merge')
4 | var utils = require('./utils')
5 | var baseWebpackConfig = require('./webpack.base.conf')
6 | var HtmlWebpackPlugin = require('html-webpack-plugin')
7 |
8 | // add hot-reload related code to entry chunks
9 | Object.keys(baseWebpackConfig.entry).forEach(function (name) {
10 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
11 | })
12 |
13 | module.exports = merge(baseWebpackConfig, {
14 | module: {
15 | loaders: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
16 | },
17 | // eval-source-map is faster for development
18 | devtool: '#eval-source-map',
19 | plugins: [
20 | new webpack.DefinePlugin({
21 | 'process.env': config.dev.env
22 | }),
23 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
24 | new webpack.optimize.OccurenceOrderPlugin(),
25 | new webpack.HotModuleReplacementPlugin(),
26 | new webpack.NoErrorsPlugin(),
27 | // https://github.com/ampedandwired/html-webpack-plugin
28 | new HtmlWebpackPlugin({
29 | filename: 'index.html',
30 | template: 'index.html',
31 | inject: true
32 | })
33 | ]
34 | })
35 |
--------------------------------------------------------------------------------
/build/webpack.prod.conf.js:
--------------------------------------------------------------------------------
1 | var path = require('path')
2 | var config = require('../config')
3 | var utils = require('./utils')
4 | var webpack = require('webpack')
5 | var merge = require('webpack-merge')
6 | var baseWebpackConfig = require('./webpack.base.conf')
7 | var ExtractTextPlugin = require('extract-text-webpack-plugin')
8 | var HtmlWebpackPlugin = require('html-webpack-plugin')
9 | var env = process.env.NODE_ENV === 'testing'
10 | ? require('../config/test.env')
11 | : config.build.env
12 |
13 |
14 | var webpackConfig = merge(baseWebpackConfig, {
15 |
16 | entry: {
17 | 'vue-stone': './src/index.js',
18 | 'iconfonts': './src/iconfonts.js',
19 | },
20 |
21 | module: {
22 | loaders: utils.styleLoaders({ sourceMap: config.build.productionSourceMap, extract: true })
23 | },
24 | devtool: config.build.productionSourceMap ? '#source-map' : false,
25 | output: {
26 | path: config.build.assetsRoot,
27 | chunkFilename: utils.assetsPath('[id].js'),
28 |
29 | filename: utils.assetsPath('[name].js'),
30 | library: 'vue-stone',
31 | libraryTarget: 'umd',
32 | umdNamedDefine: true,
33 | },
34 | vue: {
35 | loaders: utils.cssLoaders({
36 | sourceMap: config.build.productionSourceMap,
37 | extract: true
38 | })
39 | },
40 | plugins: [
41 | // http://vuejs.github.io/vue-loader/en/workflow/production.html
42 | new webpack.DefinePlugin({
43 | 'process.env': env
44 | }),
45 | new webpack.optimize.UglifyJsPlugin({
46 | compress: {
47 | warnings: false
48 | }
49 | }),
50 | new webpack.optimize.OccurrenceOrderPlugin(),
51 |
52 | new ExtractTextPlugin(utils.assetsPath('[name].css')),
53 |
54 | // new HtmlWebpackPlugin({
55 | // filename: process.env.NODE_ENV === 'testing'
56 | // ? 'index.html'
57 | // : config.build.index,
58 | // template: 'index.html',
59 | // inject: true,
60 | // // necessary to consistently work with multiple chunks via CommonsChunkPlugin
61 | // chunksSortMode: 'dependency'
62 | // }),
63 | ]
64 | })
65 |
66 | delete webpackConfig.entry.app;
67 |
68 | if (config.build.productionGzip) {
69 | var CompressionWebpackPlugin = require('compression-webpack-plugin')
70 |
71 | webpackConfig.plugins.push(
72 | new CompressionWebpackPlugin({
73 | asset: '[path].gz[query]',
74 | algorithm: 'gzip',
75 | test: new RegExp(
76 | '\\.(' +
77 | config.build.productionGzipExtensions.join('|') +
78 | ')$'
79 | ),
80 | threshold: 10240,
81 | minRatio: 0.8
82 | })
83 | )
84 | }
85 |
86 | module.exports = webpackConfig
87 |
--------------------------------------------------------------------------------
/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 | },
19 | dev: {
20 | env: require('./dev.env'),
21 | port: 8086,
22 | assetsSubDirectory: 'static',
23 | assetsPublicPath: '/',
24 | proxyTable: {},
25 | // CSS Sourcemaps off by default because relative paths are "buggy"
26 | // with this option, according to the CSS-Loader README
27 | // (https://github.com/webpack/css-loader#sourcemaps)
28 | // In our experience, they generally work as expected,
29 | // just be aware of this issue when enabling this option.
30 | cssSourceMap: false
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/config/test.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var devEnv = require('./dev.env')
3 |
4 | module.exports = merge(devEnv, {
5 | NODE_ENV: '"testing"'
6 | })
7 |
--------------------------------------------------------------------------------
/dist/iconfonts.js:
--------------------------------------------------------------------------------
1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vue-stone",[],t):"object"==typeof exports?exports["vue-stone"]=t():e["vue-stone"]=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="/",t(0)}({0:function(e,t,o){"use strict";o(248)},1:function(e,t){e.exports=function(e,t,o,n){var r,u=e=e||{},c=typeof e.default;"object"!==c&&"function"!==c||(r=e,u=e.default);var f="function"==typeof u?u.options:u;if(t&&(f.render=t.render,f.staticRenderFns=t.staticRenderFns),o&&(f._scopeId=o),n){var s=f.computed||(f.computed={});Object.keys(n).forEach(function(e){var t=n[e];s[e]=function(){return t}})}return{esModule:r,exports:u,options:f}}},103:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={}},235:function(e,t){},248:function(e,t,o){o(235);var n=o(1)(o(103),null,null,null);e.exports=n.exports}})});
--------------------------------------------------------------------------------
/examples/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import VueRouter from 'vue-router';
3 |
4 | import App from './App';
5 | import Store from 'src/index';
6 | import '../src/components/_style_iconfonts';
7 |
8 | import './pages/_example_style';
9 | import TmplBack from './pages/_tmpl_back';
10 |
11 | const list = [{
12 | name: '404',
13 | }, {
14 | name: 'button',
15 | }, {
16 | name: 'range',
17 | }, {
18 | name: 'panel',
19 | }, {
20 | name: 'icons',
21 | }, {
22 | name: 'days-picker',
23 | }, {
24 | name: 'modes',
25 | }, {
26 | name: 'slider',
27 | }, {
28 | name: 'action-sheet',
29 | }, {
30 | name: 'dialog',
31 | }, {
32 | name: 'alert',
33 | }, {
34 | name: 'input',
35 | }, {
36 | name: 'counter',
37 | }, {
38 | name: 'picker-loop',
39 | }, {
40 | name: 'picker',
41 | }, {
42 | name: 'timepicker',
43 | }, {
44 | name: 'switch',
45 | }, {
46 | name: 'toast',
47 | }, {
48 | name: 'control-center',
49 | }, {
50 | name: 'search',
51 | }, {
52 | name: 'checkboard',
53 | }, {
54 | name: 'textarea',
55 | }];
56 |
57 | Vue.use(VueRouter);
58 | Vue.use(Store);
59 |
60 | Vue.component('tmpl-back', TmplBack);
61 |
62 | const routes = [{ path: '/', component: App },
63 | /* eslint-disable global-require */
64 | ...list.map((item) => {
65 | const route = {
66 | path: `/${item.name}`,
67 | component: require(`./pages/${item.name}`),
68 | };
69 | return route;
70 | }),
71 | ];
72 |
73 | const router = new VueRouter({
74 | routes,
75 | });
76 |
77 | /* eslint-disable no-new */
78 | const app = new Vue({
79 | router,
80 | template: `
81 |
82 |
83 |
84 |
85 |
86 | `,
87 | }).$mount('#app');
88 |
--------------------------------------------------------------------------------
/examples/pages/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 404 Not Find
5 |
6 |
7 |
8 |
9 |
16 |
17 |
22 |
--------------------------------------------------------------------------------
/examples/pages/_example_style.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
50 |
--------------------------------------------------------------------------------
/examples/pages/_tmpl_back.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
16 |
--------------------------------------------------------------------------------
/examples/pages/action-sheet.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Action Sheet
8 |
9 | Toggle
10 |
11 |
12 |
13 |
Action Box
14 |
15 | Toggle
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
29 |
30 |
自定义内容
31 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
32 |
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
33 |
34 |
close
35 |
36 |
37 |
38 |
39 |
40 |
76 |
77 |
81 |
--------------------------------------------------------------------------------
/examples/pages/alert.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 |
12 |
13 |
14 |
confirm
15 |
Show
16 |
17 |
18 |
19 |
20 |
65 |
--------------------------------------------------------------------------------
/examples/pages/checkboard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
15 |
16 |
17 |
18 | item1
19 |
20 |
21 | item2
22 |
23 |
24 | item3
25 |
26 |
27 | item4
28 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 | item1
41 |
42 |
43 | item2
44 |
45 |
46 | item3
47 |
48 |
49 | item4
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
80 |
81 |
85 |
--------------------------------------------------------------------------------
/examples/pages/counter.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
counter:
7 |
8 | {{ countNumber }}
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
禁用状态:
21 |
22 | {{ countNumber2 }}
23 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
65 |
66 |
79 |
--------------------------------------------------------------------------------
/examples/pages/days-picker.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
41 |
42 |
44 |
--------------------------------------------------------------------------------
/examples/pages/dialog.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Noraml Dialog
7 |
Show
8 |
9 |
10 |
Only Title Dialog
11 |
Show
12 |
13 |
14 |
Slot Area Dialog
15 |
Show
16 |
17 |
18 |
19 |
20 |
21 | There is slot area
22 |
23 |
24 |
25 |
55 |
56 |
69 |
--------------------------------------------------------------------------------
/examples/pages/input.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
15 |
16 |
22 |
23 |
24 |
25 |
28 |
29 |
35 |
36 |
37 |
38 |
59 |
60 |
81 |
82 |
83 |
84 |
85 |
105 |
106 |
110 |
--------------------------------------------------------------------------------
/examples/pages/modes.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
16 |
17 |
18 |
22 |
28 |
29 |
36 |
37 |
41 |
42 |
43 |
44 |
45 |
46 |
172 |
173 |
177 |
--------------------------------------------------------------------------------
/examples/pages/panel.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
27 |
30 |
31 |
32 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
33 |
34 |
35 |
36 |
37 |
38 |
39 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
40 |
41 |
42 |
43 |
44 |
45 |
46 |
60 |
61 |
69 |
--------------------------------------------------------------------------------
/examples/pages/range.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | range - disabled
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
116 |
117 |
120 |
--------------------------------------------------------------------------------
/examples/pages/search.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
90 |
91 |
95 |
--------------------------------------------------------------------------------
/examples/pages/slider.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
17 |
20 |
23 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
56 |
57 |
61 |
--------------------------------------------------------------------------------
/examples/pages/switch.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 |
12 |
Async Switch:
13 |
16 |
17 |
18 |
19 |
Disabled Switch:
20 |
21 |
22 |
23 |
24 |
25 |
29 |
30 |
31 |
32 |
33 |
69 |
70 |
74 |
--------------------------------------------------------------------------------
/examples/pages/textarea.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
30 |
--------------------------------------------------------------------------------
/examples/pages/timepicker.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
14 |
--------------------------------------------------------------------------------
/examples/pages/toast.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 |
12 |
Toast With Icon
13 |
Show
14 |
15 |
16 |
17 |
Loading
18 |
Show
19 |
20 |
21 |
22 |
23 |
24 |
25 |
73 |
74 |
77 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | stone
9 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/libs/dependencies.js:
--------------------------------------------------------------------------------
1 | const intactify = require('./intactify');
2 |
3 | /* eslint-disable no-var */
4 | /**
5 | * 列出了组件间的相互依赖关系
6 | */
7 | var dependencies = {
8 | alert: ['dialog'],
9 | confirm: ['dialog'],
10 | loading: ['toast'],
11 | dayspicker: ['button'],
12 | dialog: ['mask'],
13 | counter: ['button'],
14 | 'button-group': ['button'],
15 | 'button-switch': ['button'],
16 | 'action-sheet': ['mask', 'action-box'],
17 | 'action-box': ['mask'],
18 | timer: ['panel', 'timepicker', 'modes', 'dialog',
19 | 'switch', 'dayspicker', 'timer-task', 'input', 'checkboard',
20 | ],
21 | 'timer-task': ['panel', 'modes', 'range', 'counter'],
22 | timepicker: ['picker'],
23 | };
24 |
25 | module.exports = function dep(list) {
26 | return intactify(dependencies, list);
27 | };
28 |
--------------------------------------------------------------------------------
/libs/initializer.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | components: [
3 | 'dayspicker',
4 | 'range',
5 | 'switch',
6 | 'power',
7 | 'panel',
8 | 'dialog',
9 | 'alert',
10 | 'confirm',
11 | 'button',
12 | 'button-switch',
13 | 'button-group',
14 | 'counter',
15 | 'modes',
16 | 'mask',
17 | 'picker-loop',
18 | 'picker',
19 | 'checkboard',
20 | 'action-sheet',
21 | 'action-box',
22 | 'input',
23 | // 'timer',
24 | // 'timer-task',
25 | 'timepicker',
26 | // 'transition', // 引入了整个 animation.css 导致样式文件过大
27 | 'slide',
28 | 'toast',
29 | 'loading',
30 | 'control-center',
31 | 'search',
32 | 'textarea',
33 | 'icon',
34 | ],
35 | };
36 |
--------------------------------------------------------------------------------
/libs/intactify.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 这里用 export default 而不是 module.exports 是因为在 webpack2 下,
3 | * 会对 `module.exports intactify` 报错 `Cannot assign to read only property 'exports' of object '#