├── test
└── testcafe
│ ├── specs
│ └── test.js
│ └── index.js
├── .eslintignore
├── src
├── components
│ ├── ui
│ │ ├── index.js
│ │ └── UiButton
│ │ │ ├── index.vue
│ │ │ └── style.scss
│ ├── bootstrap
│ │ ├── index.js
│ │ └── rem.js
│ └── NotFound.vue
├── assets
│ ├── scss
│ │ ├── _mixin.scss
│ │ ├── _global.scss
│ │ ├── _utilities.scss
│ │ ├── mixins
│ │ │ ├── _single-line.scss
│ │ │ └── _clearfix.scss
│ │ ├── _animation.scss
│ │ ├── base.scss
│ │ ├── _functions.scss
│ │ ├── _layout.scss
│ │ ├── _variables.scss
│ │ ├── _reset.scss
│ │ ├── components
│ │ │ └── general.scss
│ │ └── _normalize.scss
│ ├── favicon.ico
│ ├── imgs
│ │ ├── logo.png
│ │ └── logo-circle.png
│ └── js
│ │ └── fastclick.js
└── pages
│ ├── index
│ ├── App.vue
│ ├── app.scss
│ ├── main.ejs
│ ├── main.js
│ └── views
│ │ └── Index.vue
│ └── components
│ ├── main.js
│ ├── views
│ ├── Buttons.vue
│ └── Index.vue
│ ├── main.ejs
│ ├── App.vue
│ ├── app.scss
│ └── router.js
├── docs
├── favicon.ico
├── assets
│ ├── css
│ │ ├── index.74e60a6c.css
│ │ ├── components.177bd0cf.css
│ │ └── vendor.48eb828b.css
│ └── js
│ │ ├── manifest.43a78824.js
│ │ ├── index.310fa50f.js
│ │ ├── 0.1197665f.js
│ │ ├── components.2f79672d.js
│ │ ├── vendor.6b4c4148.js
│ │ └── libs.c1c9bc03.js
├── index.html
└── components.html
├── .editorconfig
├── .babelrc
├── tools
├── config
│ ├── fileExist.js
│ ├── ip.js
│ └── index.js
├── webpack
│ ├── conf.docs.js
│ ├── conf.dev.js
│ ├── dev.server.js
│ ├── loaders.js
│ ├── conf.prod.js
│ └── conf.base.js
└── urls.js
├── .eslintrc.js
├── .gitignore
├── package.json
└── README.md
/test/testcafe/specs/test.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | tools/*.js
3 |
--------------------------------------------------------------------------------
/src/components/ui/index.js:
--------------------------------------------------------------------------------
1 | export { default as UiButton } from './UiButton'
2 |
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/blade254353074/multi-vue/HEAD/docs/favicon.ico
--------------------------------------------------------------------------------
/src/assets/scss/_mixin.scss:
--------------------------------------------------------------------------------
1 | @import "mixins/clearfix";
2 | @import "mixins/single-line";
3 |
--------------------------------------------------------------------------------
/src/assets/scss/_global.scss:
--------------------------------------------------------------------------------
1 | @import "functions";
2 | @import "variables";
3 | @import "mixin";
4 |
--------------------------------------------------------------------------------
/src/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/blade254353074/multi-vue/HEAD/src/assets/favicon.ico
--------------------------------------------------------------------------------
/src/assets/imgs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/blade254353074/multi-vue/HEAD/src/assets/imgs/logo.png
--------------------------------------------------------------------------------
/src/assets/imgs/logo-circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/blade254353074/multi-vue/HEAD/src/assets/imgs/logo-circle.png
--------------------------------------------------------------------------------
/src/assets/scss/_utilities.scss:
--------------------------------------------------------------------------------
1 | .clearfix {
2 | @include clearfix();
3 | }
4 |
5 | .single-line {
6 | @include single-line();
7 | }
8 |
--------------------------------------------------------------------------------
/src/assets/scss/mixins/_single-line.scss:
--------------------------------------------------------------------------------
1 | @mixin single-line () {
2 | overflow: hidden;
3 | text-overflow: ellipsis;
4 | white-space: nowrap;
5 | }
6 |
--------------------------------------------------------------------------------
/src/assets/scss/mixins/_clearfix.scss:
--------------------------------------------------------------------------------
1 | @mixin clearfix () {
2 | &::after {
3 | content: "";
4 | display: table;
5 | clear: both;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/src/pages/index/App.vue:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["es2015", { "modules": false }],
4 | "stage-2"
5 | ],
6 | "plugins": ["transform-runtime", "transform-vue-jsx"],
7 | "comments": false,
8 | "env": {
9 | "production": {
10 | "presets": ["babili"]
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tools/config/fileExist.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 | /**
3 | * @param {String} path to file/dir
4 | */
5 | module.exports = function fileExist (path) {
6 | try {
7 | fs.accessSync(path, fs.constants.R_OK)
8 | return true
9 | } catch (err) {
10 | return false
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/assets/scss/_animation.scss:
--------------------------------------------------------------------------------
1 | @keyframes fadeIn {
2 | 0% { opacity: 0; }
3 | 100% { opacity: 1; }
4 | }
5 |
6 | @keyframes fadeOut {
7 | 0% { opacity: 1; }
8 | 100% { opacity: 0; }
9 | }
10 |
11 | @keyframes circle {
12 | 0% { transform: rotate3d(0, 0, 1, 0deg); }
13 | 100% { transform: rotate3d(0, 0, 1, 360deg); }
14 | }
15 |
--------------------------------------------------------------------------------
/tools/config/ip.js:
--------------------------------------------------------------------------------
1 | const os = require('os')
2 | const interfaces = os.networkInterfaces()
3 |
4 | module.exports = Object.keys(interfaces)
5 | .reduce((arr, key) => arr.concat(interfaces[key]), [])
6 | .filter(item => item.family === 'IPv4' && item.internal === false)
7 | .reduce((local, item) => item && item.address || local, 'localhost')
8 |
--------------------------------------------------------------------------------
/src/assets/scss/base.scss:
--------------------------------------------------------------------------------
1 | // Core variables and mixins
2 | @import "global";
3 |
4 | // Reset and dependencies
5 | @import "normalize";
6 | @import "reset";
7 |
8 | // Core CSS
9 | @import "animation";
10 | @import "layout";
11 |
12 | // Components
13 | @import "components/general";
14 |
15 | // Components via JavaScript
16 |
17 | // Utilities
18 | @import "utilities";
19 |
--------------------------------------------------------------------------------
/src/pages/components/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueRouter from 'vue-router'
3 |
4 | import './app.scss'
5 | import App from './App'
6 | import router from './router'
7 |
8 | Vue.use(VueRouter)
9 | /* eslint-disable no-new */
10 | new Vue({
11 | el: '#app',
12 | router,
13 | render: h => h(App)
14 | })
15 |
16 | window.fetch('http://example.com/', { mode: 'no-cors' })
17 | .then(_ => { console.log('GET http://example.com/') })
18 | .catch(err => console.error(err))
19 |
--------------------------------------------------------------------------------
/tools/webpack/conf.docs.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 | const merge = require('webpack-merge')
3 |
4 | /* Config */
5 | const urls = require('../urls')
6 | const webpackConfProd = require('./conf.prod')
7 |
8 | const webpackConf = merge(
9 | webpackConfProd,
10 | {
11 | output: {
12 | path: urls.docs,
13 | publicPath: ''
14 | }
15 | }
16 | )
17 |
18 | fs.writeFileSync(`${urls.temp}/config.docs.json`, JSON.stringify(webpackConf, null, 2), 'utf8')
19 |
20 | module.exports = webpackConf
21 |
--------------------------------------------------------------------------------
/src/assets/scss/_functions.scss:
--------------------------------------------------------------------------------
1 | // Add percentage of white to a color
2 | @function tint($color, $percent){
3 | @return mix(white, $color, $percent);
4 | }
5 |
6 | // Add percentage of black to a color
7 | @function shade($color, $percent){
8 | @return mix(black, $color, $percent);
9 | }
10 |
11 | // Add size function
12 | @function size($size) {
13 | @return 1rem * $size * 2 / 100;
14 | }
15 |
16 | // Add size function
17 | // 2x screen
18 | @function size2($size) {
19 | @return 1rem * $size / 100;
20 | }
21 |
--------------------------------------------------------------------------------
/src/components/bootstrap/index.js:
--------------------------------------------------------------------------------
1 | import FastClick from 'assets/js/fastclick'
2 | import 'assets/scss/base'
3 | import './rem'
4 |
5 | function bootstrap () {
6 | /* fastclick */
7 | FastClick.attach(document.body)
8 | /*
9 | * ontouchstart bind ,
10 | * 避免 iPhone 整屏后面的按钮
11 | * 点击无法触发 active
12 | */
13 | document.ontouchstart = function () { }
14 | }
15 |
16 | if ('addEventListener' in document) {
17 | window.addEventListener('DOMContentLoaded', bootstrap)
18 | } else {
19 | window.onload = bootstrap
20 | }
21 |
--------------------------------------------------------------------------------
/src/pages/index/app.scss:
--------------------------------------------------------------------------------
1 | @import "~assets/scss/global";
2 |
3 | html {
4 | height: 100%;
5 | }
6 |
7 | body {
8 | display: flex;
9 | align-items: center;
10 | justify-content: center;
11 | height: 100%;
12 | }
13 |
14 | #app {
15 | color: #2c3e50;
16 | margin-top: -100px;
17 | max-width: size(300);
18 | font-family: Source Sans Pro, Helvetica, sans-serif;
19 | text-align: center;
20 | a {
21 | color: #42b983;
22 | text-decoration: none;
23 | }
24 | }
25 |
26 | .logo {
27 | width: 100px;
28 | height: 100px
29 | }
30 |
--------------------------------------------------------------------------------
/src/pages/components/views/Buttons.vue:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
20 |
21 |
22 |
26 |
--------------------------------------------------------------------------------
/src/pages/index/main.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Vue with flow
6 |
7 |
8 |
9 |
10 |
11 | <%= htmlWebpackPlugin.files.webpackManifest %>
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/pages/components/main.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Components - Vue
6 |
7 |
8 |
9 |
10 |
11 | <%= htmlWebpackPlugin.files.webpackManifest %>
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/pages/components/views/Index.vue:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
Components
11 |
组件
12 |
13 |
14 |
Hello World!
15 |
18 |
19 |
20 |
21 |
22 |
26 |
--------------------------------------------------------------------------------
/src/assets/scss/_layout.scss:
--------------------------------------------------------------------------------
1 | body, html {
2 | height: 100%;
3 | background-color: #f5f5f9;
4 | }
5 |
6 | .container,
7 | .page {
8 | position: absolute;
9 | z-index: 1;
10 | top: 0;
11 | right: 0;
12 | bottom: 0;
13 | left: 0;
14 | }
15 |
16 | .page {
17 | overflow-x: hidden;
18 | overflow-y: auto;
19 | -webkit-overflow-scrolling: touch;
20 | }
21 |
22 | .page-bd {
23 | padding: 0 size(16) size(32);
24 | &.no-side-space {
25 | padding: 0 0 size(32);
26 | }
27 | &.no-bottom-space {
28 | padding: 0 size(16);
29 | }
30 | &.no-space {
31 | padding: 0;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/test/testcafe/index.js:
--------------------------------------------------------------------------------
1 | import { expect } from 'chai'
2 | import { Selector } from 'testcafe'
3 |
4 | const getElementById = Selector(id => document.querySelector(`#${id}`))
5 |
6 | fixture `Getting Started`
7 | .page('https://devexpress.github.io/testcafe/example');
8 |
9 | test('My first test', async (t) => {
10 | // Test code
11 | await t
12 | .typeText('#developer-name', 'John Smith')
13 | .click('#submit-button')
14 |
15 | const articleHeader = await getElementById('article-header')
16 | const headerText = articleHeader.innerText
17 |
18 | expect(headerText).to.equal('Thank you, John Smith!')
19 | });
20 |
--------------------------------------------------------------------------------
/src/pages/index/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueRouter from 'vue-router'
3 |
4 | import './app.scss'
5 | import App from './App'
6 | import Index from './views/Index'
7 |
8 | const { origin } = window.location
9 | const isGithub = origin.indexOf('github.io') > -1
10 |
11 | const router = new VueRouter({
12 | mode: isGithub ? 'hash' : 'history',
13 | routes: [
14 | { path: '/', component: Index },
15 | { path: '*', component: () => System.import('components/NotFound') }
16 | ]
17 | })
18 |
19 | Vue.use(VueRouter)
20 | /* eslint-disable no-new */
21 | new Vue({
22 | el: '#app',
23 | router,
24 | render: h => h(App)
25 | })
26 |
--------------------------------------------------------------------------------
/src/pages/components/App.vue:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: 'babel-eslint',
4 | curly: 'warn',
5 | parserOptions: {
6 | sourceType: 'module'
7 | },
8 | env: {
9 | browser: true,
10 | es6: true,
11 | 'shared-node-browser': true
12 | },
13 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
14 | extends: 'standard',
15 | // required to lint *.vue files
16 | plugins: [
17 | 'html'
18 | ],
19 | // add your custom rules here
20 | 'rules': {
21 | // allow paren-less arrow functions
22 | 'arrow-parens': 0,
23 | // allow async-await
24 | 'generator-star-spacing': 0,
25 | // allow debugger during development
26 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/docs/assets/css/index.74e60a6c.css:
--------------------------------------------------------------------------------
1 | body,html{height:100%}body{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}#app{color:#2c3e50;margin-top:-100px;max-width:6rem;font-family:Source Sans Pro,Helvetica,sans-serif;text-align:center}#app a{color:#42b983;text-decoration:none}.logo{width:100px;height:100px}html[data-v-06d015d0]{height:100%}body[data-v-06d015d0]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:100%}#app[data-v-06d015d0]{color:#2c3e50;margin-top:-100px;max-width:90%;font-size:.48rem;font-family:Source Sans Pro,Helvetica,sans-serif;text-align:center}#app a[data-v-06d015d0]{color:#42b983;text-decoration:none}
--------------------------------------------------------------------------------
/docs/assets/css/components.177bd0cf.css:
--------------------------------------------------------------------------------
1 | .page{opacity:1}.slide-left-enter-active,.slide-left-leave-active{-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1)}.slide-left-enter{opacity:0;-webkit-transform:translateX(61.8%);transform:translateX(61.8%)}.slide-left-leave-active{opacity:0;-webkit-transform:translateX(-61.8%);transform:translateX(-61.8%)}.slide-right-enter-active,.slide-right-leave-active{-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1)}.slide-right-enter{opacity:0;-webkit-transform:translateX(-61.8%);transform:translateX(-61.8%)}.slide-right-leave-active{opacity:0;-webkit-transform:translateX(61.8%);transform:translateX(61.8%)}p{margin-bottom:.2rem}.page-hd{padding:.8rem}.pui-page-title{font-size:.48rem;font-weight:400;color:#404040;text-align:left}.pui-page-desc{margin-top:.06rem;color:#666;text-align:left;font-size:.28rem}
--------------------------------------------------------------------------------
/src/pages/index/views/Index.vue:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 | - libs
9 |
10 | - Vue
11 | - Vue-router
12 | - fastclick
13 | - whatwg-fetch
14 |
15 |
16 | /components
17 |
18 |
19 |
20 |
47 |
--------------------------------------------------------------------------------
/src/components/ui/UiButton/index.vue:
--------------------------------------------------------------------------------
1 |
30 |
31 |
32 |
42 |
43 |
--------------------------------------------------------------------------------
/src/assets/scss/_variables.scss:
--------------------------------------------------------------------------------
1 | // Corlors
2 |
3 | $primary: #00a0e9;
4 | /*$primary: #108ee9;*/
5 | $primary-click: shade($primary, 16%);
6 | $primary-hover: tint($primary, 20%);
7 | $primary-light: tint($primary, 80%);
8 | $primary-hover-bg: tint($primary, 90%);
9 |
10 | $success: #89CE6C;
11 | $success-click: shade($success, 16%);
12 | $success-hover: tint($success, 20%);
13 | $success-light: tint($success, 80%);
14 | $success-hover-bg: tint($success, 90%);
15 |
16 | $warning: #fa0;
17 | $warning-click: shade($warning, 16%);
18 | $warning-hover: tint($warning, 20%);
19 | $warning-light: tint($warning, 80%);
20 | $warning-hover-bg: tint($warning, 90%);
21 |
22 | $danger: #f50;
23 | $danger-click: shade($danger, 16%);
24 | $danger-hover: tint($danger, 20%);
25 | $danger-light: tint($danger, 80%);
26 | $danger-hover-bg: tint($danger, 90%);
27 |
28 | $gray-title: #404040;
29 | $gray: #666;
30 | $gray-help: #999;
31 | $gray-disabled: #ccc;
32 | $gray-border: #d9d9d9;
33 | $gray-hover: #ddd;
34 | $gray-split: #e9e9e9;
35 | $gray-disabled-bg: #f4f4f4;
36 | $gray-bg: #fbfbfb;
37 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 | *.pid.lock
11 |
12 | # Directory for instrumented libs generated by jscoverage/JSCover
13 | lib-cov
14 |
15 | # Coverage directory used by tools like istanbul
16 | coverage
17 |
18 | # nyc test coverage
19 | .nyc_output
20 |
21 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
22 | .grunt
23 |
24 | # node-waf configuration
25 | .lock-wscript
26 |
27 | # Compiled binary addons (http://nodejs.org/api/addons.html)
28 | build/Release
29 |
30 | # Dependency directories
31 | node_modules
32 | jspm_packages
33 |
34 | # Optional npm cache directory
35 | .npm
36 |
37 | # Optional eslint cache
38 | .eslintcache
39 |
40 | # Optional REPL history
41 | .node_repl_history
42 |
43 | # Output of 'npm pack'
44 | *.tgz
45 |
46 | # temp & happypack
47 | .temp
48 |
49 | # OSX DS_Store
50 | .DS_Store
51 |
52 | # test
53 | test/unit/coverage
54 | test/e2e/reports
55 |
56 | # yarn
57 | yarn-error.log
58 |
59 | # custom
60 | build
61 | records.json
62 |
--------------------------------------------------------------------------------
/tools/urls.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs-extra')
2 | const path = require('path')
3 | const cwd = process.cwd()
4 |
5 | // __dirname js 文件路径
6 | // process.cwd() node 运行的路径
7 | // path.resolve('node_modules') node 运行时路径 + node_modules
8 | const src = path.resolve('src')
9 |
10 | const urls = {
11 | /* base urls */
12 | project: cwd,
13 | src: src,
14 | build: path.resolve('build'),
15 | docs: path.resolve('docs'),
16 | node_modules: path.resolve('node_modules'),
17 | webpack: path.resolve('tools/webpack'),
18 | recordsPath: path.resolve('tools/webpack/records.json'),
19 | temp: path.resolve('tools/.temp'),
20 | /* resource urls */
21 | assets: path.resolve(src, 'assets'),
22 | components: path.resolve(src, 'components'),
23 | pages: path.resolve(src, 'pages'),
24 | favicon: path.resolve(src, 'assets/favicon.ico'),
25 | bootstrap: path.resolve(src, 'components/bootstrap'),
26 | helpers: path.resolve(src, 'handlebars/helpers'),
27 | templates: path.resolve(src, 'handlebars/templates')
28 | }
29 |
30 | fs.ensureDirSync(urls.temp) // Create .temp dir
31 |
32 | module.exports = urls
33 |
--------------------------------------------------------------------------------
/src/components/NotFound.vue:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
404
8 |
9 |
你似乎来到了封建时代...
10 |
来源链接是否正确?
11 |
12 |
13 | 返回首页 或者
14 | 返回上页
15 |
16 |
17 |
18 |
19 |
20 |
49 |
--------------------------------------------------------------------------------
/src/pages/components/app.scss:
--------------------------------------------------------------------------------
1 | @import "~assets/scss/global";
2 |
3 | .page {
4 | opacity: 1;
5 | }
6 | /* 前进 */
7 | .slide-left-enter-active, .slide-left-leave-active {
8 | transition: all .3s cubic-bezier(.645,.045,.355,1);
9 | }
10 | .slide-left-enter {
11 | opacity: 0;
12 | transform: translateX(61.8%);
13 | }
14 | .slide-left-leave-active {
15 | opacity: 0;
16 | transform: translateX(-61.8%);
17 | }
18 |
19 | /* 后退 */
20 | .slide-right-enter-active, .slide-right-leave-active {
21 | transition: all .3s cubic-bezier(.645,.045,.355,1);
22 | }
23 | .slide-right-enter {
24 | opacity: 0;
25 | transform: translateX(-61.8%);
26 | }
27 | .slide-right-leave-active {
28 | opacity: 0;
29 | transform: translateX(61.8%);
30 | }
31 |
32 | p {
33 | margin-bottom: size(10);
34 | }
35 |
36 | .page-hd {
37 | padding: size(40);
38 | }
39 |
40 | .pui-page-title {
41 | font-size: size(24);
42 | font-weight: 400;
43 | color: $gray-title;
44 | text-align: left;
45 | }
46 |
47 | .pui-page-desc {
48 | margin-top: size(3);
49 | color: $gray;
50 | text-align: left;
51 | font-size: size(14);
52 | }
53 |
--------------------------------------------------------------------------------
/tools/webpack/conf.dev.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 | const webpack = require('webpack')
3 | const merge = require('webpack-merge')
4 |
5 | /* Config */
6 | const port = 8080
7 | const ip = require('../config/ip')
8 | const urls = require('../urls')
9 | const webpackConfBase = require('./conf.base')
10 |
11 | /* Webpack Plugins */
12 | const DashboardPlugin = require('webpack-dashboard/plugin')
13 | const OpenBrowserPlugin = require('open-browser-webpack-plugin')
14 |
15 | const webpackConf = merge(webpackConfBase, {
16 | entry: {
17 | '[dev]': [
18 | `webpack-dev-server/client?http://${ip}:${port}`,
19 | 'webpack/hot/dev-server'
20 | ]
21 | },
22 | cache: true,
23 | devtool: '#source-map',
24 | plugins: [
25 | new webpack.DefinePlugin({
26 | 'process.env': { NODE_ENV: '"development"' }
27 | }),
28 | new webpack.HotModuleReplacementPlugin(),
29 | new webpack.NoEmitOnErrorsPlugin(),
30 | new webpack.NamedModulesPlugin(),
31 | new DashboardPlugin(),
32 | new OpenBrowserPlugin({ url: `http://localhost:${port}/` })
33 | ]
34 | })
35 |
36 | fs.writeFileSync(`${urls.temp}/config.dev.json`, JSON.stringify(webpackConf, null, 2), 'utf8')
37 |
38 | module.exports = webpackConf
39 |
--------------------------------------------------------------------------------
/tools/webpack/dev.server.js:
--------------------------------------------------------------------------------
1 | const webpack = require('webpack')
2 | const WebpackDevServer = require('webpack-dev-server')
3 |
4 | const host = '0.0.0.0'
5 | const port = 8080
6 | const ip = require('../config/ip')
7 | const webpackConfDev = require('./conf.dev')
8 |
9 | const compiler = webpack(webpackConfDev)
10 | const server = new WebpackDevServer(compiler, {
11 | hot: true,
12 | compress: true,
13 | historyApiFallback: {
14 | rewrites: [{
15 | from: /^\/([^/]+|(?!assets))(\/.*|\/$|$)/,
16 | to (context) {
17 | return `/${context.match[1]}.html`
18 | }
19 | }]
20 | },
21 | publicPath: '/',
22 | stats: {
23 | // Config for minimal console.log mess.
24 | assets: false,
25 | colors: true,
26 | version: true,
27 | hash: true,
28 | timings: true,
29 | chunks: true,
30 | chunkModules: false
31 | }
32 | })
33 |
34 | server.listen(port, host, function (err) {
35 | if (err) return console.error(err)
36 |
37 | const filledIp = ip + new Array(15 - ip.length).join(' ')
38 | console.info(`
39 | ┌----------------------------------┐
40 | ├ local IP address: ${filledIp} ┤
41 | | |
42 | ├ Listening at ${host}:${port} ┤
43 | └----------------------------------┘
44 | `.trim(''))
45 | })
46 |
--------------------------------------------------------------------------------
/src/assets/scss/_reset.scss:
--------------------------------------------------------------------------------
1 | *,
2 | :after,
3 | :before {
4 | box-sizing: inherit;
5 | -webkit-tap-highlight-color: transparent;
6 | }
7 |
8 | html {
9 | font-size: 50px;
10 | line-height: 1.15;
11 | box-sizing: border-box;
12 | text-rendering: optimizeLegibility;
13 | -webkit-font-smoothing: antialiased;
14 | -moz-osx-font-smoothing: grayscale;
15 | -webkit-text-size-adjust: 100%;
16 | -ms-text-size-adjust: 100%;
17 | user-select: none;
18 | }
19 |
20 | body {
21 | line-height: 1.5;
22 | color: #666;
23 | font-size: .28rem;
24 | font-family: PingFang SC, Helvetica Neue, Hiragino Sans GB, Helvetica, Microsoft YaHei, Arial;
25 | // -webkit-overflow-scrolling: touch;
26 | }
27 |
28 | :focus,
29 | a {
30 | outline: none
31 | }
32 |
33 | a {
34 | background: transparent;
35 | text-decoration: none
36 | }
37 |
38 | button,
39 | input,
40 | select,
41 | textarea {
42 | appearance: none;
43 | }
44 |
45 | ul,
46 | ol {
47 | list-style-type: none;
48 | }
49 |
50 | article,
51 | aside,
52 | blockquote,
53 | body,
54 | button,
55 | code,
56 | dd,
57 | details,
58 | div,
59 | dl,
60 | dt,
61 | fieldset,
62 | figcaption,
63 | figure,
64 | footer,
65 | form,
66 | h1,
67 | h2,
68 | h3,
69 | h4,
70 | h5,
71 | h6,
72 | header,
73 | hgroup,
74 | input,
75 | legend,
76 | li,
77 | menu,
78 | nav,
79 | ol,
80 | p,
81 | pre,
82 | section,
83 | td,
84 | textarea,
85 | th,
86 | ul {
87 | margin: 0;
88 | padding: 0;
89 | }
90 |
--------------------------------------------------------------------------------
/src/pages/components/router.js:
--------------------------------------------------------------------------------
1 | import VueRouter from 'vue-router'
2 | import Index from './views/Index'
3 | import Buttons from './views/Buttons'
4 |
5 | const { origin } = window.location
6 | const isGithub = origin.indexOf('github.io') > -1
7 |
8 | const router = new VueRouter({
9 | mode: isGithub ? 'hash' : 'history',
10 | base: '/components',
11 | routes: [
12 | { path: '/', component: Index },
13 | { path: '/buttons', component: Buttons },
14 | { path: '*', component: () => System.import('components/NotFound') }
15 | ],
16 | scrollBehavior (to, from, savedPosition) {
17 | if (savedPosition) {
18 | // savedPosition is only available for popstate navigations.
19 | return savedPosition
20 | } else {
21 | const position = {}
22 | // new navigation.
23 | // scroll to anchor by returning the selector
24 | if (to.hash) {
25 | position.selector = to.hash
26 | }
27 | // check if any matched route config has meta that requires scrolling to top
28 | if (to.matched.some(m => m.meta.scrollToTop)) {
29 | // cords will be used if no selector is provided,
30 | // or if the selector didn't match any element.
31 | position.x = 0
32 | position.y = 0
33 | }
34 | // if the returned position is falsy or an empty object,
35 | // will retain current scroll position.
36 | return position
37 | }
38 | }
39 | })
40 |
41 | export default router
42 |
--------------------------------------------------------------------------------
/src/components/bootstrap/rem.js:
--------------------------------------------------------------------------------
1 | (function (baseFontSize, fontscale) {
2 | var _baseFontSize = baseFontSize || 100
3 | var _fontscale = fontscale || 1
4 | var win = window
5 | var doc = win.document
6 | var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
7 |
8 | function reviewPort () {
9 | var ua = navigator.userAgent
10 | var matches = ua.match(/Android[\S\s]+AppleWebkit\/(\d{3})/i)
11 | var UCversion = ua.match(/U3\/((\d+|\.){5,})/i)
12 | var isUCHd = UCversion && parseInt(UCversion[1].split('.').join(''), 10) >= 80
13 | var isIos = navigator.appVersion.match(/(iphone|ipad|ipod)/gi)
14 | var dpr = win.devicePixelRatio || 1
15 |
16 | if (!isIos && !(matches && matches[1] > 534) && !isUCHd) {
17 | // 如果非iOS, 非Android4.3以上, 非UC内核, 就不执行高清, dpr设为1
18 | dpr = 1
19 | }
20 | var scale = 1 / dpr
21 |
22 | var metaEl = doc.querySelector('meta[name="viewport"]')
23 | if (!metaEl) {
24 | metaEl = doc.createElement('meta')
25 | metaEl.setAttribute('name', 'viewport')
26 | doc.head.appendChild(metaEl)
27 | }
28 | metaEl.setAttribute('content', 'width=device-width,user-scalable=no,initial-scale=' + scale + ',maximum-scale=' + scale + ',minimum-scale=' + scale)
29 | doc.documentElement.style.fontSize = _baseFontSize / 2 * dpr * _fontscale + 'px'
30 | window.viewportScale = dpr
31 | }
32 |
33 | reviewPort()
34 | win.addEventListener(resizeEvt, reviewPort, false)
35 | }())
36 |
--------------------------------------------------------------------------------
/docs/assets/js/manifest.43a78824.js:
--------------------------------------------------------------------------------
1 | !function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,i){for(var u,a,s,f=0,l=[];f {
8 | let extraParamChar
9 | if (/\?/.test(loader)) {
10 | loader = loader.replace(/\?/, '-loader?')
11 | extraParamChar = '&'
12 | } else {
13 | loader = `${loader}-loader`
14 | extraParamChar = '?'
15 | }
16 | return loader + (options.sourceMap ? `${extraParamChar}sourceMap` : '')
17 | }).join('!')
18 |
19 | return options.extract
20 | ? ExtractTextPlugin.extract({
21 | fallbackLoader: 'vue-style-loader',
22 | loader: sourceLoader
23 | })
24 | : ['vue-style-loader', sourceLoader].join('!')
25 | }
26 |
27 | return {
28 | css: generateLoaders(),
29 | postcss: generateLoaders(),
30 | less: generateLoaders('less'),
31 | sass: generateLoaders('sass?indentedSyntax'),
32 | scss: generateLoaders('sass'),
33 | stylus: generateLoaders('stylus'),
34 | styl: generateLoaders('stylus')
35 | }
36 | }
37 |
38 | // Generate loaders for standalone style files (outside of .vue)
39 | exports.style = function styleLoaders (options) {
40 | const loaders = exports.css(Object.assign({ style: true }, options))
41 | const output = []
42 |
43 | for (let ext in loaders) {
44 | output.push({
45 | test: new RegExp(`\\.${ext}$`),
46 | loaders: loaders[ext]
47 | })
48 | }
49 |
50 | return output
51 | }
52 |
--------------------------------------------------------------------------------
/docs/assets/js/index.310fa50f.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([3,5],{"/02Z":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={name:"App"}},2:function(e,n,t){e.exports=t("MhDc")},Gvgx:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={name:"Index"}},MhDc:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("qvlB"),o=t.n(r),i=t("lowN"),u=t.n(i),a=t("nq7v"),c=(t.n(a),t("qOuj")),s=t.n(c),l=t("vZuz"),v=t.n(l),f=window.location.origin,p=-1
2 |
3 |
4 |
5 | Vue with flow
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/docs/components.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Components - Vue
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/assets/scss/components/general.scss:
--------------------------------------------------------------------------------
1 | a {
2 | color: $primary;
3 | text-decoration: none;
4 | &:active {
5 | color: $primary-click;
6 | }
7 | }
8 |
9 | .text-right {
10 | text-align: right;
11 | }
12 |
13 | .text-center {
14 | text-align: center;
15 | }
16 |
17 | .pull-left {
18 | float: left;
19 | }
20 |
21 | .pull-right {
22 | float: right;
23 | }
24 |
25 | .text-title {
26 | color: $gray-title;
27 | }
28 |
29 | .text-highlight {
30 | color: $primary;
31 | }
32 |
33 | .text-warning {
34 | color: $warning;
35 | }
36 |
37 | .text-danger {
38 | color: $danger;
39 | }
40 |
41 | .text-helper {
42 | color: $gray-help;
43 | }
44 |
45 | .ui-selectable {
46 | user-select: all;
47 | }
48 |
49 | /* animations */
50 | .ui-hiding {
51 | animation: fadeOut .3s ease both;
52 | }
53 |
54 | .ui-icon-caret {
55 | display: flex;
56 | width: 0;
57 | height: 0;
58 | vertical-align: middle;
59 | border-top: 0.3em solid;
60 | border-right: 0.3em solid transparent;
61 | border-left: 0.3em solid transparent;
62 | }
63 |
64 | .ui-icon-help {
65 | display: flex;
66 | align-items: center;
67 | justify-content: space-around;
68 | width: size(20);
69 | height: size(20);
70 | vertical-align: text-top;
71 | color: #fff;
72 | background-color: $gray-border;
73 | border-radius: 100%;
74 | &::after {
75 | content: '?';
76 | line-height: 1em;
77 | font-size: size(16);
78 | font-weight: bolder;
79 | }
80 | &:active {
81 | background-color: $gray-help;
82 | }
83 | }
84 |
85 | @font-face {
86 | font-family: 'iconfont'; /* project id:"177001" */
87 | src: url('//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.eot');
88 | src: url('//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.eot?#iefix') format('embedded-opentype'),
89 | url('//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.woff') format('woff'),
90 | url('//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.ttf') format('truetype'),
91 | url('//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.svg#iconfont') format('svg');
92 | }
93 |
94 | .ui-icon {
95 | font-family: "iconfont" !important;
96 | font-size: size(16);
97 | font-style: normal;
98 | color: $primary;
99 | background-image: linear-gradient(42deg, $primary, #34b6f1);
100 | text-shadow: 0 size(4) size(12) tint($primary, 42%);
101 | -webkit-background-clip: text;
102 | -webkit-text-fill-color: transparent;
103 | -webkit-font-smoothing: antialiased;
104 | -webkit-text-stroke-width: 0.2px;
105 | -moz-osx-font-smoothing: grayscale;
106 | &.no-shadow {
107 | text-shadow: none;
108 | }
109 | }
110 |
111 | .ui-iconfont {
112 | font-family: "iconfont" !important;
113 | font-style: normal;
114 | color: currentColor;
115 | -webkit-font-smoothing: antialiased;
116 | -webkit-text-stroke-width: 0.2px;
117 | -moz-osx-font-smoothing: grayscale;
118 | }
119 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-multipage",
3 | "version": "1.0.0",
4 | "description": "multi-single-application",
5 | "repository": {
6 | "type": "git",
7 | "url": "https://github.com/blade254353074/multi-vue.git"
8 | },
9 | "main": "index.js",
10 | "scripts": {
11 | "start": "cross-env NODE_ENV=development webpack-dashboard -- node tools/webpack/dev.server.js",
12 | "dev": "cross-env NODE_ENV=development node tools/webpack/dev.server.js",
13 | "prebuild": "rimraf ./build/*",
14 | "build": "cross-env NODE_ENV=production webpack -p --progress --config ./tools/webpack/conf.prod.js",
15 | "predocs": "rimraf ./docs/*",
16 | "docs": "cross-env NODE_ENV=production webpack -p --progress --config ./tools/webpack/conf.docs.js",
17 | "test": "testcafe chrome ./test/testcafe/index.js"
18 | },
19 | "keywords": [
20 | "multi",
21 | "spa"
22 | ],
23 | "author": "blade254353074 ",
24 | "license": "MIT",
25 | "dependencies": {
26 | "es6-promise": "^4.0.5",
27 | "flow": "^0.2.3",
28 | "vue": "^2.1.10",
29 | "vue-router": "^2.2.0",
30 | "whatwg-fetch": "^2.0.2"
31 | },
32 | "devDependencies": {
33 | "autoprefixer": "^6.7.2",
34 | "babel-core": "^6.22.1",
35 | "babel-eslint": "^7.1.0",
36 | "babel-helper-vue-jsx-merge-props": "^2.0.2",
37 | "babel-loader": "^6.2.10",
38 | "babel-plugin-syntax-jsx": "^6.18.0",
39 | "babel-plugin-transform-runtime": "^6.22.0",
40 | "babel-plugin-transform-vue-jsx": "^3.1.2",
41 | "babel-preset-es2015": "^6.22.0",
42 | "babel-preset-stage-2": "^6.22.0",
43 | "babili": "^0.0.10",
44 | "chai": "^3.5.0",
45 | "compression-webpack-plugin": "^0.3.2",
46 | "cross-env": "^3.1.3",
47 | "css-loader": "^0.26.1",
48 | "ejs-loader": "^0.3.0",
49 | "eslint": "^3.14.1",
50 | "eslint-config-standard": "^6.2.1",
51 | "eslint-friendly-formatter": "^2.0.6",
52 | "eslint-loader": "^1.6.1",
53 | "eslint-plugin-html": "^2.0.0",
54 | "eslint-plugin-promise": "^3.3.1",
55 | "eslint-plugin-standard": "^2.0.1",
56 | "extract-text-webpack-plugin": "^2.0.0-rc.2",
57 | "file-loader": "^0.10.0",
58 | "fs-extra": "^2.0.0",
59 | "glob": "^7.1.1",
60 | "html-loader": "^0.4.4",
61 | "html-webpack-plugin": "^2.28.0",
62 | "imagemin-mozjpeg": "^6.0.0",
63 | "imagemin-webpack-plugin": "^1.2.1",
64 | "inline-manifest-webpack-plugin": "^3.0.1",
65 | "node-sass": "^4.5.0",
66 | "open-browser-webpack-plugin": "0.0.3",
67 | "postcss-loader": "^1.2.2",
68 | "rimraf": "^2.5.4",
69 | "sass-loader": "^4.1.0",
70 | "standard": "^8.5.0",
71 | "standard-loader": "^5.0.0",
72 | "testcafe": "^0.12.1",
73 | "url-loader": "^0.5.7",
74 | "vue-loader": "^10.2.0",
75 | "vue-style-loader": "^2.0.0",
76 | "vue-template-compiler": "^2.1.10",
77 | "webpack": "^2.2.1",
78 | "webpack-bundle-analyzer": "^2.1.1",
79 | "webpack-dashboard": "^0.3.0",
80 | "webpack-dev-server": "^1.16.3",
81 | "webpack-merge": "^2.6.1"
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/docs/assets/js/components.2f79672d.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([2,5],{1:function(t,e,n){t.exports=n("joi4")},"8dD1":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("DDv3");e.default={name:"UiButtons",components:{UiButton:o.UiButton}}},Coa0:function(t,e,n){var o=n("VU/8")(n("e8/2"),n("jQsE"),null,null);t.exports=o.exports},HqBs:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"UiIndex"}},MKfY:function(t,e){},MZVP:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t._m(0),t._v(" "),n("div",{staticClass:"page-bd"},[n("p",[n("UiButton",[t._v("default")])],1)])])},staticRenderFns:[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-hd"},[n("h1",{staticClass:"pui-page-title"},[t._v("Button")]),t._v(" "),n("p",{staticClass:"pui-page-desc"},[t._v("按钮")])])}]}},Mlw9:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t._m(0),t._v(" "),n("div",{staticClass:"page-bd"},[n("p",[t._v("Hello World!")]),t._v(" "),n("ul",[n("li",[n("router-link",{attrs:{to:"buttons",append:""}},[t._v("Button 按钮")])],1)])])])},staticRenderFns:[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"page-hd"},[n("h1",{staticClass:"pui-page-title"},[t._v("Components")]),t._v(" "),n("p",{staticClass:"pui-page-desc"},[t._v("组件")])])}]}},Ps4R:function(t,e,n){n("zOdG");var o=n("VU/8")(n("HqBs"),n("Mlw9"),"data-v-1e4f2204",null);t.exports=o.exports},"e8/2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"App",data:function(){return{transitionName:"slide-left"}},watch:{$route:function(t,e){var n=t.path.split("/").filter(function(t){return t.length}).length,o=e.path.split("/").filter(function(t){return t.length}).length;this.transitionName=n new HtmlWebpackPlugin(conf))
126 | ]
127 | }
128 |
--------------------------------------------------------------------------------
/tools/config/index.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 | const glob = require('glob')
3 | const urls = require('../urls')
4 | const fileExist = require('./fileExist')
5 | const NODE_ENV = process.env.NODE_ENV
6 | const templateExt = ['html', 'hbs', 'ejs']
7 |
8 | function constructEntries (templateFiles) {
9 | const pagesAttr = []
10 | templateFiles.map(template => {
11 | const dir = path.dirname(template)
12 | // key `dir/subpage1` or `poage1`
13 | const key = path.dirname(path.relative(urls.pages, template))
14 | const templateKey = `[template]${encodeURIComponent(key)}` // 让 template 模板可追踪
15 | const jsPath = path.resolve(dir, 'main.js')
16 | const page = {
17 | key,
18 | templateKey,
19 | template
20 | }
21 |
22 | if (fileExist(jsPath)) {
23 | page.js = jsPath || './' + path.relative(urls.project, jsPath)
24 | }
25 |
26 | /*
27 | page {
28 | key: 'dir/subpage1',
29 | templateKey: '-dir/subpage1',
30 | template: '/absolute/path/to/dir/subpage1/main.html',
31 | js: './src/pages/dir/subpage1/main.js' // optional
32 | }
33 | */
34 | pagesAttr.push(page)
35 | })
36 |
37 | return pagesAttr
38 | }
39 |
40 | function constructEntryObject (pagesAttr, type) {
41 | let entry = {}
42 | pagesAttr.map(page => {
43 | let entryPart = { [page.key]: [] }
44 | if (type === 'bind') {
45 | // 'dir/subpage1': [ jspath, htmlpath ]
46 | if (NODE_ENV !== 'production') {
47 | entryPart[page.key].push(page.template)
48 | }
49 | if (page.js) {
50 | entryPart[page.key].push(page.js)
51 | }
52 | } else {
53 | if (NODE_ENV !== 'production') {
54 | // 'dir/subpage1': jspath,
55 | // '-dir/subpage1': htmlpath
56 | // 为了让每个页面都跟随源 html 进行热更新,入口要加入源文件路径
57 | entryPart[page.templateKey] = page.template
58 | }
59 | if (page.js) {
60 | entryPart[page.key] = page.js
61 | }
62 | }
63 | Object.assign(entry, entryPart)
64 | })
65 |
66 | // 过滤无入口的键
67 | for (let key in entry) {
68 | if (entry[key].length < 1) {
69 | delete entry[key]
70 | }
71 | }
72 |
73 | return entry
74 | }
75 |
76 | function constructHtmlPluginsConfigArray (pagesAttr) {
77 | return pagesAttr.map(page => {
78 | const dependencies = ['manifest', 'libs', 'vendor']
79 | let chunks
80 | let inject
81 | let config
82 | if (NODE_ENV !== 'production') {
83 | inject = true // 注入到头部避免样式震动
84 | chunks = ['[dev]', page.templateKey].concat(dependencies)
85 | } else { // 生产环境
86 | inject = true
87 | chunks = dependencies
88 | }
89 | config = {
90 | _key: page.key,
91 | _templateKey: page.templateKey,
92 | filename: `${page.key}.html`,
93 | template: page.template,
94 | chunksSortMode: 'dependency', // 防止 [dev] 被放到最后
95 | favicon: urls.favicon,
96 | chunks,
97 | inject
98 | }
99 |
100 | if (page.js) {
101 | config.chunks.push(page.key)
102 | }
103 | /*
104 | config {
105 | _key: 'dir/page',
106 | _templateKey: '-dir/page',
107 | filename: 'dir/page.html',
108 | template: '/path/to/dir/page/main.html',
109 | favicon: '/path/to/favicon.ico'
110 | chunks: ['vendor', 'dir/page'],
111 | inject: true
112 | }
113 | */
114 | return config
115 | })
116 | }
117 |
118 | function getPagesConfig () {
119 | try {
120 | const templateFiles = glob.sync(`${urls.pages}/**/main.+(${templateExt.join('|')})`)
121 | const pagesAttr = constructEntries(templateFiles)
122 | const entry = constructEntryObject(pagesAttr, 'bind') // Object
123 | const htmls = constructHtmlPluginsConfigArray(pagesAttr) // Array
124 |
125 | return { entry, htmls }
126 | } catch (err) {
127 | console.log('\\007') // Beep
128 | console.error(err)
129 | }
130 | }
131 |
132 | module.exports = getPagesConfig()
133 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Multi Vue
2 |
3 | Multi Vue applications with webpack 2.
4 |
5 | ##### TODOS:
6 |
7 | - [ ] flow - static type check
8 | - [ ] testcafe - auto ui test
9 |
10 | With the newest enviroment(2016-12-17):
11 |
12 | * webpack@v2.2.1
13 | * webpack-dev-server@v2.2.0
14 | * extract-text-webpack-plugin@v2.0.0-rc.2
15 | * vue@^2.1.6
16 |
17 | Have these features:
18 |
19 | * webpack v2 config
20 | * **long-term cache**
21 | * multi entry, multi vue app
22 | * vue-jsx
23 | * 1px in every device (rem.js)
24 |
25 | Use these loader to build apps:
26 |
27 | * babel-loader
28 | * css-loader
29 | * file-loader
30 | * html-loader
31 | * json-loader
32 | * postcss-loader
33 | * sass-loader
34 | * standard-loader
35 | * url-loader
36 | * vue-loader
37 | * vue-style-loader
38 |
39 | Use these plugins to assist develop:
40 |
41 | * yarn
42 | * standardjs
43 | * webpack-dashboard
44 | * open-browser-webpack-plugin
45 |
46 | And these for production:
47 |
48 | * extract-text-webpack-plugin
49 | * webpack-manifest-plugin
50 | * webpack-md5-hash
51 | * imagemin-webpack-plugin
52 | * imagemin-mozjpeg
53 | * webpack-visualizer-plugin
54 |
55 | Upgrade webpack 1.x to webpack 2.x, these pages are helpful:
56 |
57 | * [How to Upgrade from Webpack 1?](https://webpack.js.org/how-to/upgrade-from-webpack-1/)
58 | * [What's new in webpack 2](https://gist.github.com/sokra/27b24881210b56bbaff7)
59 | * [postcss-loader#webpack-2x-config](https://github.com/postcss/postcss-loader#webpack-2x-config)
60 | * [configurations/advanced | vue-loader](http://vue-loader.vuejs.org/en/configurations/advanced.html)
61 | * [features/postcss | vue-loader](http://vue-loader.vuejs.org/en/features/postcss.html)
62 |
63 | # How to start:
64 |
65 | ```bash
66 | $ yarn # or npm install
67 | $ npm start # for development
68 | $ npm run build # for production
69 | ```
70 |
71 | # Problems about webpack 1.x to 2.x:
72 |
73 | I have some tips to metion you:
74 |
75 | ##### 1. Evenything beta with webpack 2.x:
76 |
77 | * webpack@^2.1.0-beta.25
78 | * webpack-dev-server@2.1.0-beta.9
79 | * extract-text-webpack-plugin@2.0.0-beta.4
80 |
81 | ##### 2. webpack config changes:
82 |
83 | Now webpack understands import and export without them being transformed to CommonJS,
84 | You can change `.babelrc` to tell Babel to not parse es6 module.
85 | ```json
86 | {
87 | "presets": [
88 | ["es2015", { "modules": false }]
89 | ]
90 | }
91 | ```
92 |
93 | We can use system.import to dynamic loading modules.
94 | Your browser must support Promise, for old browser you can use `es6-promise` to polyfill.
95 |
96 | ```javascript
97 | Promise.all([
98 | System.import('vue'),
99 | System.import('./App')
100 | ])
101 | .then(([Vue, App]) => {
102 | /* eslint-disable no-new */
103 | new Vue({
104 | el: '#app',
105 | render: h => h(App.default)
106 | })
107 | })
108 | .catch(err => {
109 | console.error(err)
110 | })
111 | ```
112 |
113 | A few config true into webpack.LoaderOptionsPlugin like:
114 | debug, uglify minimize, third part loader options...
115 |
116 | ```javascript
117 | new webpack.LoaderOptionsPlugin({
118 | debug: false, // debug
119 | minimize: true, // Uglify minimize options
120 | options: {
121 | context: urls.project, // sass-loader need this
122 | // vue & postcss options must write to here
123 | vue: {
124 | loaders: loaders.css({ sourceMap: true, extract: prod }),
125 | postcss: [autoprefixer({ browsers: ['last 2 versions'] })]
126 | },
127 | postcss: [autoprefixer({ browsers: ['last 2 versions'] })]
128 | }
129 | })
130 | ```
131 |
132 | UglifyJsPlugin sourceMap now defaults to false,
133 | if you need sourceMap in production, you need to pass `sourceMap: true`.
134 |
135 | ```javascript
136 | new UglifyJsPlugin({
137 | sourceMap: true
138 | })
139 | ```
140 |
141 | ```javascript
142 | // In webpack 2.x,
143 | // extensions can not push empty string ('')
144 | resolve.extensions: ['.js', '.jsx', '.vue']
145 | ```
146 |
147 | A webpack-dev-server undocument api, to reduce a lot of useless information
148 |
149 | ```javascript
150 | // webpack-dev-server node api
151 | stats: {
152 | // Config for minimal console.log mess.
153 | assets: false,
154 | colors: true,
155 | version: true,
156 | hash: true,
157 | timings: true,
158 | chunks: true,
159 | chunkModules: false
160 | }
161 | ```
162 |
163 | For more configuration infos, to see:
164 |
165 | * [How to Upgrade from Webpack 1?](https://webpack.js.org/how-to/upgrade-from-webpack-1/)
166 |
--------------------------------------------------------------------------------
/docs/assets/css/vendor.48eb828b.css:
--------------------------------------------------------------------------------
1 | .ui-button{position:relative;display:inline-block;padding:.12rem .24rem;font-size:.32rem;line-height:1.5;border:none;color:#404040;background-color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;border-radius:.06rem;cursor:pointer}.ui-button:active{color:#404040;background-color:#ddd}.ui-button.disabled,.ui-button:disabled{color:#999;border-color:#ccc;background-color:#ccc;background-image:-webkit-linear-gradient(48deg,#ababab,#b8b8b8);background-image:linear-gradient(42deg,#ababab,#b8b8b8);box-shadow:0 .08rem .24rem #e1e1e1;pointer-events:none;cursor:not-allowed}.ui-button.ui-button-small{padding:.08rem .16rem;font-size:.26rem;line-height:1.2}.ui-button-primary{background-color:#00a0e9;background-image:-webkit-linear-gradient(48deg,#00a0e9,#4dbdf0);background-image:linear-gradient(42deg,#00a0e9,#4dbdf0);color:#fff;box-shadow:0 .08rem .24rem #6bc8f2}.ui-button-primary:active{color:#e6f6fd;background-color:#0086c4;background-image:-webkit-linear-gradient(48deg,#0086c4,#419fca);background-image:linear-gradient(42deg,#0086c4,#419fca)}.ui-button-success{background-color:#89ce6c;background-image:-webkit-linear-gradient(48deg,#89ce6c,#acdd98);background-image:linear-gradient(42deg,#89ce6c,#acdd98);color:#fff;box-shadow:0 .08rem .24rem #bbe3aa}.ui-button-success:active{color:#f3faf0;background-color:#73ad5b;background-image:-webkit-linear-gradient(48deg,#73ad5b,#90ba80);background-image:linear-gradient(42deg,#73ad5b,#90ba80)}.ui-button-warning{background-color:#fa0;background-image:-webkit-linear-gradient(48deg,#fa0,#ffc44d);background-image:linear-gradient(42deg,#fa0,#ffc44d);color:#fff;box-shadow:0 .08rem .24rem #ffce6b}.ui-button-warning:active{color:#fff7e6;background-color:#d68f00;background-image:-webkit-linear-gradient(48deg,#d68f00,#d6a541);background-image:linear-gradient(42deg,#d68f00,#d6a541)}.ui-button-danger{background-color:#f50;background-image:-webkit-linear-gradient(48deg,#f50,#ff884d);background-image:linear-gradient(42deg,#f50,#ff884d);color:#fff;box-shadow:0 .08rem .24rem #ff9c6b}.ui-button-danger:active{color:#ffeee6;background-color:#d64700;background-image:-webkit-linear-gradient(48deg,#d64700,#d67241);background-image:linear-gradient(42deg,#d64700,#d67241)}.ui-button-block{display:block;width:100%;padding:.16rem .32rem}/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}[hidden],template{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}*,:after,:before{box-sizing:inherit;-webkit-tap-highlight-color:transparent}html{font-size:50px;line-height:1.15;box-sizing:border-box;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-user-select:none;user-select:none}body{line-height:1.5;color:#666;font-size:.28rem;font-family:PingFang SC,Helvetica Neue,Hiragino Sans GB,Helvetica,Microsoft YaHei,Arial}:focus,a{outline:none}a{background:transparent;text-decoration:none}button,input,select,textarea{-webkit-appearance:none;appearance:none}ol,ul{list-style-type:none}article,aside,blockquote,body,button,code,dd,details,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,input,legend,li,menu,nav,ol,p,pre,section,td,textarea,th,ul{margin:0;padding:0}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes circle{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circle{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body,html{height:100%;background-color:#f5f5f9}.container,.page{position:absolute;z-index:1;top:0;right:0;bottom:0;left:0}.page{overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.page-bd{padding:0 .32rem .64rem}.page-bd.no-side-space{padding:0 0 .64rem}.page-bd.no-bottom-space{padding:0 .32rem}.page-bd.no-space{padding:0}a{color:#00a0e9;text-decoration:none}a:active{color:#0086c4}.text-right{text-align:right}.text-center{text-align:center}.pull-left{float:left}.pull-right{float:right}.text-title{color:#404040}.text-highlight{color:#00a0e9}.text-warning{color:#fa0}.text-danger{color:#f50}.text-helper{color:#999}.ui-selectable{-webkit-user-select:all;user-select:all}.ui-hiding{-webkit-animation:fadeOut .3s ease both;animation:fadeOut .3s ease both}.ui-icon-caret{width:0;height:0;vertical-align:middle;border-top:.3em solid;border-right:.3em solid transparent;border-left:.3em solid transparent}.ui-icon-caret,.ui-icon-help{display:-webkit-box;display:-webkit-flex;display:flex}.ui-icon-help{-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-around;justify-content:space-around;width:.4rem;height:.4rem;vertical-align:text-top;color:#fff;background-color:#d9d9d9;border-radius:100%}.ui-icon-help:after{content:"?";line-height:1em;font-size:.32rem;font-weight:bolder}.ui-icon-help:active{background-color:#999}@font-face{font-family:iconfont;src:url("//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.eot");src:url("//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.eot?#iefix") format("embedded-opentype"),url("//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.woff") format("woff"),url("//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.ttf") format("truetype"),url("//at.alicdn.com/t/font_z4q9y7ysp7wopqfr.svg#iconfont") format("svg")}.ui-icon{font-family:iconfont!important;font-size:.32rem;font-style:normal;color:#00a0e9;background-image:-webkit-linear-gradient(48deg,#00a0e9,#34b6f1);background-image:linear-gradient(42deg,#00a0e9,#34b6f1);text-shadow:0 .08rem .24rem #6bc8f2;-webkit-background-clip:text;-webkit-text-fill-color:transparent;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.ui-icon.no-shadow{text-shadow:none}.ui-iconfont{font-family:iconfont!important;font-style:normal;color:currentColor;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.clearfix:after{content:"";display:table;clear:both}.single-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
--------------------------------------------------------------------------------
/src/assets/scss/_normalize.scss:
--------------------------------------------------------------------------------
1 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
2 |
3 | /**
4 | * 1. Change the default font family in all browsers (opinionated).
5 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
6 | */
7 |
8 | html {
9 | font-family: sans-serif; /* 1 */
10 | -ms-text-size-adjust: 100%; /* 2 */
11 | -webkit-text-size-adjust: 100%; /* 2 */
12 | }
13 |
14 | /**
15 | * Remove the margin in all browsers (opinionated).
16 | */
17 |
18 | body {
19 | margin: 0;
20 | }
21 |
22 | /* HTML5 display definitions
23 | ========================================================================== */
24 |
25 | /**
26 | * Add the correct display in IE 9-.
27 | * 1. Add the correct display in Edge, IE, and Firefox.
28 | * 2. Add the correct display in IE.
29 | */
30 |
31 | article,
32 | aside,
33 | details, /* 1 */
34 | figcaption,
35 | figure,
36 | footer,
37 | header,
38 | main, /* 2 */
39 | menu,
40 | nav,
41 | section,
42 | summary { /* 1 */
43 | display: block;
44 | }
45 |
46 | /**
47 | * Add the correct display in IE 9-.
48 | */
49 |
50 | audio,
51 | canvas,
52 | progress,
53 | video {
54 | display: inline-block;
55 | }
56 |
57 | /**
58 | * Add the correct display in iOS 4-7.
59 | */
60 |
61 | audio:not([controls]) {
62 | display: none;
63 | height: 0;
64 | }
65 |
66 | /**
67 | * Add the correct vertical alignment in Chrome, Firefox, and Opera.
68 | */
69 |
70 | progress {
71 | vertical-align: baseline;
72 | }
73 |
74 | /**
75 | * Add the correct display in IE 10-.
76 | * 1. Add the correct display in IE.
77 | */
78 |
79 | template, /* 1 */
80 | [hidden] {
81 | display: none;
82 | }
83 |
84 | /* Links
85 | ========================================================================== */
86 |
87 | /**
88 | * 1. Remove the gray background on active links in IE 10.
89 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
90 | */
91 |
92 | a {
93 | background-color: transparent; /* 1 */
94 | -webkit-text-decoration-skip: objects; /* 2 */
95 | }
96 |
97 | /**
98 | * Remove the outline on focused links when they are also active or hovered
99 | * in all browsers (opinionated).
100 | */
101 |
102 | a:active,
103 | a:hover {
104 | outline-width: 0;
105 | }
106 |
107 | /* Text-level semantics
108 | ========================================================================== */
109 |
110 | /**
111 | * 1. Remove the bottom border in Firefox 39-.
112 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
113 | */
114 |
115 | abbr[title] {
116 | border-bottom: none; /* 1 */
117 | text-decoration: underline; /* 2 */
118 | text-decoration: underline dotted; /* 2 */
119 | }
120 |
121 | /**
122 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
123 | */
124 |
125 | b,
126 | strong {
127 | font-weight: inherit;
128 | }
129 |
130 | /**
131 | * Add the correct font weight in Chrome, Edge, and Safari.
132 | */
133 |
134 | b,
135 | strong {
136 | font-weight: bolder;
137 | }
138 |
139 | /**
140 | * Add the correct font style in Android 4.3-.
141 | */
142 |
143 | dfn {
144 | font-style: italic;
145 | }
146 |
147 | /**
148 | * Correct the font size and margin on `h1` elements within `section` and
149 | * `article` contexts in Chrome, Firefox, and Safari.
150 | */
151 |
152 | h1 {
153 | font-size: 2em;
154 | margin: 0.67em 0;
155 | }
156 |
157 | /**
158 | * Add the correct background and color in IE 9-.
159 | */
160 |
161 | mark {
162 | background-color: #ff0;
163 | color: #000;
164 | }
165 |
166 | /**
167 | * Add the correct font size in all browsers.
168 | */
169 |
170 | small {
171 | font-size: 80%;
172 | }
173 |
174 | /**
175 | * Prevent `sub` and `sup` elements from affecting the line height in
176 | * all browsers.
177 | */
178 |
179 | sub,
180 | sup {
181 | font-size: 75%;
182 | line-height: 0;
183 | position: relative;
184 | vertical-align: baseline;
185 | }
186 |
187 | sub {
188 | bottom: -0.25em;
189 | }
190 |
191 | sup {
192 | top: -0.5em;
193 | }
194 |
195 | /* Embedded content
196 | ========================================================================== */
197 |
198 | /**
199 | * Remove the border on images inside links in IE 10-.
200 | */
201 |
202 | img {
203 | border-style: none;
204 | }
205 |
206 | /**
207 | * Hide the overflow in IE.
208 | */
209 |
210 | svg:not(:root) {
211 | overflow: hidden;
212 | }
213 |
214 | /* Grouping content
215 | ========================================================================== */
216 |
217 | /**
218 | * 1. Correct the inheritance and scaling of font size in all browsers.
219 | * 2. Correct the odd `em` font sizing in all browsers.
220 | */
221 |
222 | code,
223 | kbd,
224 | pre,
225 | samp {
226 | font-family: monospace, monospace; /* 1 */
227 | font-size: 1em; /* 2 */
228 | }
229 |
230 | /**
231 | * Add the correct margin in IE 8.
232 | */
233 |
234 | figure {
235 | margin: 1em 40px;
236 | }
237 |
238 | /**
239 | * 1. Add the correct box sizing in Firefox.
240 | * 2. Show the overflow in Edge and IE.
241 | */
242 |
243 | hr {
244 | box-sizing: content-box; /* 1 */
245 | height: 0; /* 1 */
246 | overflow: visible; /* 2 */
247 | }
248 |
249 | /* Forms
250 | ========================================================================== */
251 |
252 | /**
253 | * 1. Change font properties to `inherit` in all browsers (opinionated).
254 | * 2. Remove the margin in Firefox and Safari.
255 | */
256 |
257 | button,
258 | input,
259 | select,
260 | textarea {
261 | font: inherit; /* 1 */
262 | margin: 0; /* 2 */
263 | }
264 |
265 | /**
266 | * Restore the font weight unset by the previous rule.
267 | */
268 |
269 | optgroup {
270 | font-weight: bold;
271 | }
272 |
273 | /**
274 | * Show the overflow in IE.
275 | * 1. Show the overflow in Edge.
276 | */
277 |
278 | button,
279 | input { /* 1 */
280 | overflow: visible;
281 | }
282 |
283 | /**
284 | * Remove the inheritance of text transform in Edge, Firefox, and IE.
285 | * 1. Remove the inheritance of text transform in Firefox.
286 | */
287 |
288 | button,
289 | select { /* 1 */
290 | text-transform: none;
291 | }
292 |
293 | /**
294 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
295 | * controls in Android 4.
296 | * 2. Correct the inability to style clickable types in iOS and Safari.
297 | */
298 |
299 | button,
300 | html [type="button"], /* 1 */
301 | [type="reset"],
302 | [type="submit"] {
303 | -webkit-appearance: button; /* 2 */
304 | }
305 |
306 | /**
307 | * Remove the inner border and padding in Firefox.
308 | */
309 |
310 | button::-moz-focus-inner,
311 | [type="button"]::-moz-focus-inner,
312 | [type="reset"]::-moz-focus-inner,
313 | [type="submit"]::-moz-focus-inner {
314 | border-style: none;
315 | padding: 0;
316 | }
317 |
318 | /**
319 | * Restore the focus styles unset by the previous rule.
320 | */
321 |
322 | button:-moz-focusring,
323 | [type="button"]:-moz-focusring,
324 | [type="reset"]:-moz-focusring,
325 | [type="submit"]:-moz-focusring {
326 | outline: 1px dotted ButtonText;
327 | }
328 |
329 | /**
330 | * Change the border, margin, and padding in all browsers (opinionated).
331 | */
332 |
333 | fieldset {
334 | border: 1px solid #c0c0c0;
335 | margin: 0 2px;
336 | padding: 0.35em 0.625em 0.75em;
337 | }
338 |
339 | /**
340 | * 1. Correct the text wrapping in Edge and IE.
341 | * 2. Correct the color inheritance from `fieldset` elements in IE.
342 | * 3. Remove the padding so developers are not caught out when they zero out
343 | * `fieldset` elements in all browsers.
344 | */
345 |
346 | legend {
347 | box-sizing: border-box; /* 1 */
348 | color: inherit; /* 2 */
349 | display: table; /* 1 */
350 | max-width: 100%; /* 1 */
351 | padding: 0; /* 3 */
352 | white-space: normal; /* 1 */
353 | }
354 |
355 | /**
356 | * Remove the default vertical scrollbar in IE.
357 | */
358 |
359 | textarea {
360 | overflow: auto;
361 | }
362 |
363 | /**
364 | * 1. Add the correct box sizing in IE 10-.
365 | * 2. Remove the padding in IE 10-.
366 | */
367 |
368 | [type="checkbox"],
369 | [type="radio"] {
370 | box-sizing: border-box; /* 1 */
371 | padding: 0; /* 2 */
372 | }
373 |
374 | /**
375 | * Correct the cursor style of increment and decrement buttons in Chrome.
376 | */
377 |
378 | [type="number"]::-webkit-inner-spin-button,
379 | [type="number"]::-webkit-outer-spin-button {
380 | height: auto;
381 | }
382 |
383 | /**
384 | * 1. Correct the odd appearance in Chrome and Safari.
385 | * 2. Correct the outline style in Safari.
386 | */
387 |
388 | [type="search"] {
389 | -webkit-appearance: textfield; /* 1 */
390 | outline-offset: -2px; /* 2 */
391 | }
392 |
393 | /**
394 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
395 | */
396 |
397 | [type="search"]::-webkit-search-cancel-button,
398 | [type="search"]::-webkit-search-decoration {
399 | -webkit-appearance: none;
400 | }
401 |
402 | /**
403 | * Correct the text style of placeholders in Chrome, Edge, and Safari.
404 | */
405 |
406 | ::-webkit-input-placeholder {
407 | color: inherit;
408 | opacity: 0.54;
409 | }
410 |
411 | /**
412 | * 1. Correct the inability to style clickable types in iOS and Safari.
413 | * 2. Change font properties to `inherit` in Safari.
414 | */
415 |
416 | ::-webkit-file-upload-button {
417 | -webkit-appearance: button; /* 1 */
418 | font: inherit; /* 2 */
419 | }
420 |
--------------------------------------------------------------------------------
/docs/assets/js/vendor.6b4c4148.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([1,5],{"+E39":function(t,e,n){t.exports=!n("S82l")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"+ZMJ":function(t,e,n){var r=n("lOnJ");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"2Udc":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("bOdI"),o=n.n(r),i=n("N1Yo");n.n(i),e.default={name:"UiButton",props:{type:String,size:String,disabled:Boolean,role:{type:String,default:"button"}},computed:{classes:function(){var t,e=this.type,n=this.size;return t={"ui-button":!0},o()(t,"ui-button-"+e,-1<["primary","success","warning","danger"].indexOf(e)),o()(t,"ui-button-"+n,-1<["small","block"].indexOf(n)),t}}}},3:function(t,e,n){n("Cl4I"),n("DDv3"),t.exports=n("W5Vj")},"6hTs":function(t,e){},"77Pl":function(t,e,n){var r=n("EqjI");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"7KvD":function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"9bBU":function(t,e,n){n("mClu");var r=n("FeBl").Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},C4MV:function(t,e,n){t.exports={default:n("9bBU"),__esModule:!0}},Cl4I:function(t,e,n){"use strict";function r(t,e){function n(t,e){return function(){return t.apply(e,arguments)}}var o;if(e=e||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=e.touchBoundary||10,this.layer=t,this.tapDelay=e.tapDelay||200,this.tapTimeout=e.tapTimeout||700,!r.notNeeded(t)){for(var a=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],c=this,u=0,s=a.length;un.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},r.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},r.prototype.onTouchStart=function(t){var e,n,r;if(1n||Math.abs(e.pageY-this.touchStartY)>n},r.prototype.onTouchMove=function(t){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0)},r.prototype.findControl=function(t){return void 0===t.control?t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea"):t.control},r.prototype.onTouchEnd=function(t){var e,n,r,o,s,l=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,u&&(s=t.changedTouches[0],l=document.elementFromPoint(s.pageX-window.pageXOffset,s.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),r=l.tagName.toLowerCase(),"label"===r){if(e=this.findControl(l)){if(this.focus(l),i)return!1;l=e}}else if(this.needsFocus(l))return 100n.parts.length&&(r.parts.length=n.parts.length)}else{for(var i=[],o=0;o= 0;
90 | var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
91 | var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
92 | var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
93 | var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent);
94 | var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
95 |
96 | FastClick.prototype.needsClick = function(target) {
97 | switch (target.nodeName.toLowerCase()) {
98 |
99 | // Don't send a synthetic click to disabled inputs (issue #62)
100 | case 'button':
101 | case 'select':
102 | case 'textarea':
103 | if (target.disabled) {
104 | return true;
105 | }
106 |
107 | break;
108 | case 'input':
109 |
110 | // File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
111 | if ((deviceIsIOS && target.type === 'file') || target.disabled) {
112 | return true;
113 | }
114 |
115 | break;
116 | case 'label':
117 | case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
118 | case 'video':
119 | return true;
120 | }
121 |
122 | return (/\bneedsclick\b/).test(target.className);
123 | };
124 |
125 |
126 | FastClick.prototype.needsFocus = function(target) {
127 | switch (target.nodeName.toLowerCase()) {
128 | case 'textarea':
129 | return true;
130 | case 'select':
131 | return !deviceIsAndroid;
132 | case 'input':
133 | switch (target.type) {
134 | case 'button':
135 | case 'checkbox':
136 | case 'file':
137 | case 'image':
138 | case 'radio':
139 | case 'submit':
140 | return false;
141 | }
142 |
143 | // No point in attempting to focus disabled inputs
144 | return !target.disabled && !target.readOnly;
145 | default:
146 | return (/\bneedsfocus\b/).test(target.className);
147 | }
148 | };
149 |
150 |
151 | FastClick.prototype.sendClick = function(targetElement, event) {
152 | var clickEvent, touch;
153 |
154 | // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
155 | if (document.activeElement && document.activeElement !== targetElement) {
156 | document.activeElement.blur();
157 | }
158 |
159 | touch = event.changedTouches[0];
160 |
161 | // Synthesise a click event, with an extra attribute so it can be tracked
162 | clickEvent = document.createEvent('MouseEvents');
163 | clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
164 | clickEvent.forwardedTouchEvent = true;
165 | targetElement.dispatchEvent(clickEvent);
166 | };
167 |
168 | FastClick.prototype.determineEventType = function(targetElement) {
169 |
170 | //Issue #159: Android Chrome Select Box does not open with a synthetic click event
171 | if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
172 | return 'mousedown';
173 | }
174 |
175 | return 'click';
176 | };
177 |
178 | FastClick.prototype.focus = function(targetElement) {
179 | var length;
180 |
181 | // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
182 | if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
183 | length = targetElement.value.length;
184 | targetElement.setSelectionRange(length, length);
185 | } else {
186 | targetElement.focus();
187 | }
188 | };
189 |
190 | FastClick.prototype.updateScrollParent = function(targetElement) {
191 | var scrollParent, parentElement;
192 |
193 | scrollParent = targetElement.fastClickScrollParent;
194 |
195 | // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
196 | // target element was moved to another parent.
197 | if (!scrollParent || !scrollParent.contains(targetElement)) {
198 | parentElement = targetElement;
199 | do {
200 | if (parentElement.scrollHeight > parentElement.offsetHeight) {
201 | scrollParent = parentElement;
202 | targetElement.fastClickScrollParent = parentElement;
203 | break;
204 | }
205 |
206 | parentElement = parentElement.parentElement;
207 | } while (parentElement);
208 | }
209 |
210 | // Always update the scroll top tracker if possible.
211 | if (scrollParent) {
212 | scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
213 | }
214 | };
215 |
216 | FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
217 |
218 | // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
219 | if (eventTarget.nodeType === Node.TEXT_NODE) {
220 | return eventTarget.parentNode;
221 | }
222 |
223 | return eventTarget;
224 | };
225 |
226 | FastClick.prototype.onTouchStart = function(event) {
227 | var targetElement, touch, selection;
228 |
229 | // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
230 | if (event.targetTouches.length > 1) {
231 | return true;
232 | }
233 |
234 | targetElement = this.getTargetElementFromEventTarget(event.target);
235 | touch = event.targetTouches[0];
236 |
237 | if (deviceIsIOS) {
238 |
239 | // Only trusted events will deselect text on iOS (issue #49)
240 | selection = window.getSelection();
241 | if (selection.rangeCount && !selection.isCollapsed) {
242 | return true;
243 | }
244 |
245 | if (!deviceIsIOS4) {
246 |
247 | // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
248 | // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
249 | // with the same identifier as the touch event that previously triggered the click that triggered the alert.
250 | // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
251 | // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
252 | // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
253 | // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
254 | // random integers, it's safe to to continue if the identifier is 0 here.
255 | if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
256 | event.preventDefault();
257 | return false;
258 | }
259 |
260 | this.lastTouchIdentifier = touch.identifier;
261 |
262 | // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
263 | // 1) the user does a fling scroll on the scrollable layer
264 | // 2) the user stops the fling scroll with another tap
265 | // then the event.target of the last 'touchend' event will be the element that was under the user's finger
266 | // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
267 | // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
268 | this.updateScrollParent(targetElement);
269 | }
270 | }
271 |
272 | this.trackingClick = true;
273 | this.trackingClickStart = event.timeStamp;
274 | this.targetElement = targetElement;
275 |
276 | this.touchStartX = touch.pageX;
277 | this.touchStartY = touch.pageY;
278 |
279 | // Prevent phantom clicks on fast double-tap (issue #36)
280 | if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
281 | event.preventDefault();
282 | }
283 |
284 | return true;
285 | };
286 |
287 | FastClick.prototype.touchHasMoved = function(event) {
288 | var touch = event.changedTouches[0], boundary = this.touchBoundary;
289 |
290 | if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
291 | return true;
292 | }
293 |
294 | return false;
295 | };
296 |
297 | FastClick.prototype.onTouchMove = function(event) {
298 | if (!this.trackingClick) {
299 | return true;
300 | }
301 |
302 | // If the touch has moved, cancel the click tracking
303 | if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
304 | this.trackingClick = false;
305 | this.targetElement = null;
306 | }
307 |
308 | return true;
309 | };
310 |
311 | FastClick.prototype.findControl = function(labelElement) {
312 |
313 | // Fast path for newer browsers supporting the HTML5 control attribute
314 | if (labelElement.control !== undefined) {
315 | return labelElement.control;
316 | }
317 |
318 | // All browsers under test that support touch events also support the HTML5 htmlFor attribute
319 | if (labelElement.htmlFor) {
320 | return document.getElementById(labelElement.htmlFor);
321 | }
322 |
323 | // If no for attribute exists, attempt to retrieve the first labellable descendant element
324 | // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
325 | return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
326 | };
327 |
328 | FastClick.prototype.onTouchEnd = function(event) {
329 | var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
330 |
331 | if (!this.trackingClick) {
332 | return true;
333 | }
334 |
335 | // Prevent phantom clicks on fast double-tap (issue #36)
336 | if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
337 | this.cancelNextClick = true;
338 | return true;
339 | }
340 |
341 | if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {
342 | return true;
343 | }
344 |
345 | // Reset to prevent wrong click cancel on input (issue #156).
346 | this.cancelNextClick = false;
347 |
348 | this.lastClickTime = event.timeStamp;
349 |
350 | trackingClickStart = this.trackingClickStart;
351 | this.trackingClick = false;
352 | this.trackingClickStart = 0;
353 |
354 | // On some iOS devices, the targetElement supplied with the event is invalid if the layer
355 | // is performing a transition or scroll, and has to be re-detected manually. Note that
356 | // for this to function correctly, it must be called *after* the event target is checked!
357 | // See issue #57; also filed as rdar://13048589 .
358 | if (deviceIsIOSWithBadTarget) {
359 | touch = event.changedTouches[0];
360 |
361 | // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
362 | targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
363 | targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
364 | }
365 |
366 | targetTagName = targetElement.tagName.toLowerCase();
367 | if (targetTagName === 'label') {
368 | forElement = this.findControl(targetElement);
369 | if (forElement) {
370 | this.focus(targetElement);
371 | if (deviceIsAndroid) {
372 | return false;
373 | }
374 |
375 | targetElement = forElement;
376 | }
377 | } else if (this.needsFocus(targetElement)) {
378 |
379 | // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
380 | // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
381 | if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
382 | this.targetElement = null;
383 | return false;
384 | }
385 |
386 | this.focus(targetElement);
387 | this.sendClick(targetElement, event);
388 |
389 | // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
390 | // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
391 | if (!deviceIsIOS4 || targetTagName !== 'select') {
392 | this.targetElement = null;
393 | event.preventDefault();
394 | }
395 |
396 | return false;
397 | }
398 |
399 | if (deviceIsIOS && !deviceIsIOS4) {
400 |
401 | // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
402 | // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
403 | scrollParent = targetElement.fastClickScrollParent;
404 | if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
405 | return true;
406 | }
407 | }
408 |
409 | // Prevent the actual click from going though - unless the target node is marked as requiring
410 | // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
411 | if (!this.needsClick(targetElement)) {
412 | event.preventDefault();
413 | this.sendClick(targetElement, event);
414 | }
415 |
416 | return false;
417 | };
418 |
419 | FastClick.prototype.onTouchCancel = function() {
420 | this.trackingClick = false;
421 | this.targetElement = null;
422 | };
423 |
424 | FastClick.prototype.onMouse = function(event) {
425 |
426 | // If a target element was never set (because a touch event was never fired) allow the event
427 | if (!this.targetElement) {
428 | return true;
429 | }
430 |
431 | if (event.forwardedTouchEvent) {
432 | return true;
433 | }
434 |
435 | // Programmatically generated events targeting a specific element should be permitted
436 | if (!event.cancelable) {
437 | return true;
438 | }
439 |
440 | // Derive and check the target element to see whether the mouse event needs to be permitted;
441 | // unless explicitly enabled, prevent non-touch click events from triggering actions,
442 | // to prevent ghost/doubleclicks.
443 | if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
444 |
445 | // Prevent any user-added listeners declared on FastClick element from being fired.
446 | if (event.stopImmediatePropagation) {
447 | event.stopImmediatePropagation();
448 | } else {
449 |
450 | // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
451 | event.propagationStopped = true;
452 | }
453 |
454 | // Cancel the event
455 | event.stopPropagation();
456 | event.preventDefault();
457 |
458 | return false;
459 | }
460 |
461 | // If the mouse event is permitted, return true for the action to go through.
462 | return true;
463 | };
464 |
465 | FastClick.prototype.onClick = function(event) {
466 | var permitted;
467 |
468 | // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
469 | if (this.trackingClick) {
470 | this.targetElement = null;
471 | this.trackingClick = false;
472 | return true;
473 | }
474 |
475 | // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
476 | if (event.target.type === 'submit' && event.detail === 0) {
477 | return true;
478 | }
479 |
480 | permitted = this.onMouse(event);
481 |
482 | // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
483 | if (!permitted) {
484 | this.targetElement = null;
485 | }
486 |
487 | // If clicks are permitted, return true for the action to go through.
488 | return permitted;
489 | };
490 |
491 | FastClick.prototype.destroy = function() {
492 | var layer = this.layer;
493 |
494 | if (deviceIsAndroid) {
495 | layer.removeEventListener('mouseover', this.onMouse, true);
496 | layer.removeEventListener('mousedown', this.onMouse, true);
497 | layer.removeEventListener('mouseup', this.onMouse, true);
498 | }
499 |
500 | layer.removeEventListener('click', this.onClick, true);
501 | layer.removeEventListener('touchstart', this.onTouchStart, false);
502 | layer.removeEventListener('touchmove', this.onTouchMove, false);
503 | layer.removeEventListener('touchend', this.onTouchEnd, false);
504 | layer.removeEventListener('touchcancel', this.onTouchCancel, false);
505 | };
506 |
507 | FastClick.notNeeded = function(layer) {
508 | var metaViewport;
509 | var chromeVersion;
510 | var blackberryVersion;
511 | var firefoxVersion;
512 |
513 | // Devices that don't support touch don't need FastClick
514 | if (typeof window.ontouchstart === 'undefined') {
515 | return true;
516 | }
517 |
518 | // Chrome version - zero for other browsers
519 | chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
520 |
521 | if (chromeVersion) {
522 |
523 | if (deviceIsAndroid) {
524 | metaViewport = document.querySelector('meta[name=viewport]');
525 |
526 | if (metaViewport) {
527 | // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
528 | if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
529 | return true;
530 | }
531 | // Chrome 32 and above with width=device-width or less don't need FastClick
532 | if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
533 | return true;
534 | }
535 | }
536 |
537 | // Chrome desktop doesn't need FastClick (issue #15)
538 | } else {
539 | return true;
540 | }
541 | }
542 |
543 | if (deviceIsBlackBerry10) {
544 | blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
545 |
546 | // BlackBerry 10.3+ does not require Fastclick library.
547 | // https://github.com/ftlabs/fastclick/issues/251
548 | if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
549 | metaViewport = document.querySelector('meta[name=viewport]');
550 |
551 | if (metaViewport) {
552 | // user-scalable=no eliminates click delay.
553 | if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
554 | return true;
555 | }
556 | // width=device-width (or less than device-width) eliminates click delay.
557 | if (document.documentElement.scrollWidth <= window.outerWidth) {
558 | return true;
559 | }
560 | }
561 | }
562 | }
563 |
564 | // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
565 | if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
566 | return true;
567 | }
568 |
569 | // Firefox version - zero for other browsers
570 | firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
571 |
572 | if (firefoxVersion >= 27) {
573 | // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
574 |
575 | metaViewport = document.querySelector('meta[name=viewport]');
576 | if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
577 | return true;
578 | }
579 | }
580 |
581 | // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
582 | // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
583 | if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
584 | return true;
585 | }
586 |
587 | return false;
588 | };
589 |
590 |
591 | FastClick.attach = function(layer, options) {
592 | return new FastClick(layer, options);
593 | };
594 |
--------------------------------------------------------------------------------
/docs/assets/js/libs.c1c9bc03.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([4,5],{0:function(t,e){},4:function(t,e,n){n("MU8w"),n("rplX"),n("qvlB"),t.exports=n("lowN")},DuR2:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},MU8w:function(t,e,n){"use strict";t.exports=n("hKoQ").polyfill()},W2nU:function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(f===setTimeout)return setTimeout(t,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):y=-1,h.length&&s())}function s(){if(!v){var t=o(a);v=!0;for(var e=h.length;e;){for(d=h,h=[];++y1)for(var n=1;n0?Pt(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function s(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return jt(e);if(Array.isArray(n)){var r=[];return n.slice().forEach(function(t){void 0!==t&&(null===t?r.push(jt(e)):r.push(jt(e)+"="+jt(t)))}),r.join("&")}return jt(e)+"="+jt(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}function u(t,e,n){var r={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:e.query||{},params:e.params||{},fullPath:f(e),matched:t?c(t):[]};return n&&(r.redirectedFrom=f(n)),Object.freeze(r)}function c(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function f(t){var e=t.path,n=t.query;void 0===n&&(n={});var r=t.hash;return void 0===r&&(r=""),(e||"/")+s(n)+r}function l(t,e){return e===Rt?t===e:!!e&&(t.path&&e.path?t.path.replace(It,"")===e.path.replace(It,"")&&t.hash===e.hash&&p(t.query,e.query):!(!t.name||!e.name)&&t.name===e.name&&t.hash===e.hash&&p(t.query,e.query)&&p(t.params,e.params))}function p(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){return String(t[n])===String(e[n])})}function d(t,e){return 0===t.path.replace(It,"/").indexOf(e.path.replace(It,"/"))&&(!e.hash||t.hash===e.hash)&&h(t.query,e.query)}function h(t,e){for(var n in e)if(!(n in t))return!1;return!0}function v(t){if(!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.target&&t.target.getAttribute){var e=t.target.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function y(t){if(t)for(var e,n=0;n=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function b(t){return t.replace(/\/\//g,"/")}function w(t,e,n){var r=e||Object.create(null),o=n||Object.create(null);return t.forEach(function(t){x(r,o,t)}),{pathMap:r,nameMap:o}}function x(t,e,n,r,o){var i=n.path,a=n.name,s={path:A(i,r),components:n.components||{default:n.component},instances:{},name:a,parent:r,matchAs:o,redirect:n.redirect,beforeEnter:n.beforeEnter,meta:n.meta||{},props:null==n.props?{}:n.components?n.props:{default:n.props}};if(n.children&&n.children.forEach(function(n){x(t,e,n,s,o?b(o+"/"+n.path):void 0)}),void 0!==n.alias)if(Array.isArray(n.alias))n.alias.forEach(function(o){x(t,e,{path:o,children:n.children},r,s.path)});else{var u={path:n.alias,children:n.children};x(t,e,u,r,s.path)}t[s.path]||(t[s.path]=s),a&&(e[a]||(e[a]=s))}function A(t,e){return t=t.replace(/\/$/,""),"/"===t[0]?t:null==e?t:b(e.path+"/"+t)}function C(t,e){for(var n,r=[],o=0,i=0,a="",s=e&&e.delimiter||"/";null!=(n=Kt.exec(t));){var u=n[0],c=n[1],f=n.index;if(a+=t.slice(i,f),i=f+u.length,c)a+=c[1];else{var l=t[i],p=n[2],d=n[3],h=n[4],v=n[5],y=n[6],m=n[7];a&&(r.push(a),a="");var g=null!=p&&null!=l&&l!==p,_="+"===y||"*"===y,b="?"===y||"*"===y,w=n[2]||s,x=h||v;r.push({name:d||o++,prefix:p||"",delimiter:w,optional:b,repeat:_,partial:g,asterisk:!!m,pattern:x?S(x):m?".*":"[^"+E(w)+"]+?"})}}return i-1&&(r.params[u]=e.params[u]);if(i)return r.path=M(i.path,r.params,'named route "'+o+'"'),a(i,r,n)}else if(r.path){r.params={};for(var l in c)if(H(l,r.params,r.path))return a(c[l],r,n)}return a(null,r)}function o(t,e){var o=t.redirect,i="function"==typeof o?o(u(t,e)):o;if("string"==typeof i&&(i={path:i}),!i||"object"!=typeof i)return a(null,e);var s=i,c=s.name,l=s.path,p=e.query,d=e.hash,h=e.params;if(p=s.hasOwnProperty("query")?s.query:p,d=s.hasOwnProperty("hash")?s.hash:d,h=s.hasOwnProperty("params")?s.params:h,c)return f[c],n({_normalized:!0,name:c,query:p,hash:d,params:h},void 0,e);if(l){var v=V(l,t);return n({_normalized:!0,path:M(v,h,'redirect route with path "'+v+'"'),query:p,hash:d},void 0,e)}return r(!1,"invalid redirect option: "+JSON.stringify(i)),a(null,e)}function i(t,e,r){var o=M(r,e.params,'aliased route with path "'+r+'"'),i=n({_normalized:!0,path:o});if(i){var s=i.matched,u=s[s.length-1];return e.params=i.params,a(u,e)}return a(null,e)}function a(t,e,n){return t&&t.redirect?o(t,n||e):t&&t.matchAs?i(t,e,t.matchAs):u(t,e,n)}var s=w(t),c=s.pathMap,f=s.nameMap;return{match:n,addRoutes:e}}function H(t,e,n){var r=B(t),o=r.regexp,i=r.keys,a=n.match(o);if(!a)return!1;if(!e)return!0;for(var s=1,u=a.length;s=t.length?n():t[o]?e(t[o],function(){r(o+1)}):r(o+1)};r(0)}function it(t){if(!t)if(Bt){var e=document.querySelector("base");t=e?e.getAttribute("href"):"/"}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function at(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e:0)+"#"+t)}function kt(t,e,n){var r="hash"===n?"#"+e:e;return t?b(t+"/"+r):r}var Ot,$t={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,i=e.parent,a=e.data;a.routerView=!0;for(var s=n.name,u=i.$route,c=i._routerViewCache||(i._routerViewCache={}),f=0,l=!1;i;)i.$vnode&&i.$vnode.data.routerView&&f++,i._inactive&&(l=!0),i=i.$parent;if(a.routerViewDepth=f,l)return t(c[s],a,r);var p=u.matched[f];if(!p)return c[s]=null,t();var d=c[s]=p.components[s],h=a.hook||(a.hook={});return h.init=function(t){p.instances[s]=t.child},h.prepatch=function(t,e){p.instances[s]=e.child},h.destroy=function(t){p.instances[s]===t.child&&(p.instances[s]=void 0)},a.props=o(u,p.props&&p.props[s]),t(d,a,r)}},Tt=/[!'()*]/g,Et=function(t){return"%"+t.charCodeAt(0).toString(16)},St=/%2C/g,jt=function(t){return encodeURIComponent(t).replace(Tt,Et).replace(St,",")},Pt=decodeURIComponent,It=/\/?$/,Rt=u(null,{path:"/"}),Dt=[String,Object],Lt=[String,Array],Ut={name:"router-link",props:{to:{type:Dt,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,event:{type:Lt,default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),i=o.location,a=o.route,s=o.href,c={},f=this.activeClass||n.options.linkActiveClass||"router-link-active",p=i.path?u(null,i):a;c[f]=this.exact?l(r,p):d(r,p);var h=function(t){v(t)&&(e.replace?n.replace(i):n.push(i))},m={click:v};Array.isArray(this.event)?this.event.forEach(function(t){m[t]=h}):m[this.event]=h;var g={class:c};if("a"===this.tag)g.on=m,g.attrs={href:s};else{var _=y(this.$slots.default);if(_){_.isStatic=!1;var b=Ot.util.extend;(_.data=b({},_.data)).on=m,(_.data.attrs=b({},_.data.attrs)).href=s}else g.on=m}return t(this.tag,g,this.$slots.default)}},Bt="undefined"!=typeof window,Mt=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},Nt=Mt,qt=U,Ft=C,Ht=k,Vt=T,zt=L,Kt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");qt.parse=Ft,qt.compile=Ht,qt.tokensToFunction=Vt,qt.tokensToRegExp=zt;var Wt=Object.create(null),Jt=Object.create(null),Gt=Object.create(null),Xt=Bt&&function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&window.history&&"pushState"in window.history}(),Yt=Bt&&window.performance&&window.performance.now?window.performance:Date,Qt=Z(),Zt=function(t,e){this.router=t,this.base=it(e),this.current=Rt,this.pending=null,this.ready=!1,this.readyCbs=[]};Zt.prototype.listen=function(t){this.cb=t},Zt.prototype.onReady=function(t){this.ready?t():this.readyCbs.push(t)},Zt.prototype.transitionTo=function(t,e,n){var r=this,o=this.router.match(t,this.current);this.confirmTransition(o,function(){r.updateRoute(o),e&&e(o),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach(function(t){t(o)}))},n)},Zt.prototype.confirmTransition=function(t,e,n){var r=this,o=this.current,i=function(){n&&n()};if(l(t,o)&&t.matched.length===o.matched.length)return this.ensureURL(),i();var a=at(this.current.matched,t.matched),s=a.updated,u=a.deactivated,c=a.activated,f=[].concat(ct(u),this.router.beforeHooks,ft(s),c.map(function(t){return t.beforeEnter}),vt(c));this.pending=t;var p=function(e,n){return r.pending!==t?i():void e(t,o,function(t){t===!1?(r.ensureURL(!0),i()):"string"==typeof t||"object"==typeof t?("object"==typeof t&&t.replace?r.replace(t):r.push(t),i()):n(t)})};ot(f,p,function(){var n=[];ot(pt(c,n,function(){return r.current===t}),p,function(){return r.pending!==t?i():(r.pending=null,e(t),void(r.router.app&&r.router.app.$nextTick(function(){n.forEach(function(t){return t()})})))})})},Zt.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var te=function(t){function e(e,n){var r=this;t.call(this,e,n);var o=e.options.scrollBehavior;o&&z(),window.addEventListener("popstate",function(t){r.transitionTo(_t(r.base),function(t){o&&K(e,t,r.current,!0)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){nt(b(r.base+t.fullPath)),K(r.router,t,r.current,!1),e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){rt(b(r.base+t.fullPath)),K(r.router,t,r.current,!1),e&&e(t)},n)},e.prototype.ensureURL=function(t){if(_t(this.base)!==this.current.fullPath){var e=b(this.base+this.current.fullPath);t?nt(e):rt(e)}},e.prototype.getCurrentLocation=function(){return _t(this.base)},e}(Zt),ee=function(t){function e(e,n,r){t.call(this,e,n),r&&bt(this.base)||wt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;window.addEventListener("hashchange",function(){wt()&&t.transitionTo(xt(),function(t){Ct(t.fullPath)})})},e.prototype.push=function(t,e,n){this.transitionTo(t,function(t){At(t.fullPath),e&&e(t)},n)},e.prototype.replace=function(t,e,n){this.transitionTo(t,function(t){Ct(t.fullPath),e&&e(t)},n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;xt()!==e&&(t?At(e):Ct(e))},e.prototype.getCurrentLocation=function(){return xt()},e}(Zt),ne=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)},n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Zt),re=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.afterHooks=[],this.matcher=F(t.routes||[]);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Xt,this.fallback&&(e="hash"),Bt||(e="abstract"),this.mode=e,e){case"history":this.history=new te(this,t.base);break;case"hash":this.history=new ee(this,t.base,this.fallback);break;case"abstract":this.history=new ne(this,t.base)}},oe={currentRoute:{}};re.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},oe.currentRoute.get=function(){return this.history&&this.history.current},re.prototype.init=function(t){var e=this;if(this.apps.push(t),!this.app){this.app=t;var n=this.history;if(n instanceof te)n.transitionTo(n.getCurrentLocation());else if(n instanceof ee){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},re.prototype.beforeEach=function(t){this.beforeHooks.push(t)},re.prototype.afterEach=function(t){this.afterHooks.push(t)},re.prototype.onReady=function(t){this.history.onReady(t)},re.prototype.push=function(t,e,n){this.history.push(t,e,n)},re.prototype.replace=function(t,e,n){this.history.replace(t,e,n)},re.prototype.go=function(t){this.history.go(t)},re.prototype.back=function(){this.go(-1)},re.prototype.forward=function(){this.go(1)},re.prototype.getMatchedComponents=function(t){var e=t?this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},re.prototype.resolve=function(t,e,n){var r=N(t,e||this.history.current,n),o=this.match(r,e),i=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:kt(this.history.base,i,this.mode),normalizedTo:r,resolved:o}},re.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==Rt&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(re.prototype,oe),re.install=m,re.version="2.2.0",Bt&&window.Vue&&window.Vue.use(re),t.exports=re},qvlB:function(t,e,n){"use strict";(function(e){function n(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function r(t){var e=parseFloat(t);return isNaN(e)?t:e}function o(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}function a(t,e){return An.call(t,e)}function s(t){return"string"==typeof t||"number"==typeof t}function u(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function c(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function f(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function l(t,e){for(var n in e)t[n]=e[n];return t}function p(t){return null!==t&&"object"==typeof t}function d(t){return En.call(t)===Sn}function h(t){for(var e={},n=0;n1?f(n):n;for(var r=f(arguments,1),o=0,i=n.length;o=0&&vr[n].id>t.id;)n--;vr.splice(Math.max(n,_r)+1,0,t)}else vr.push(t);mr||(mr=!0,zn(Ot))}}function Tt(t){xr.clear(),Et(t,xr)}function Et(t,e){var n,r,o=Array.isArray(t);if((o||p(t))&&Object.isExtensible(t)){if(t.__ob__){var i=t.__ob__.dep.id;if(e.has(i))return;e.add(i)}if(o)for(n=t.length;n--;)Et(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)Et(t[r[n]],e)}}function St(t){t._watchers=[];var e=t.$options;e.props&&jt(t,e.props),e.methods&&Dt(t,e.methods),e.data?Pt(t):$(t._data={},!0),e.computed&&It(t,e.computed),e.watch&&Lt(t,e.watch)}function jt(t,e){var n=t.$options.propsData||{},r=t.$options._propKeys=Object.keys(e),o=!t.$parent;tr.shouldConvert=o;for(var i=function(o){var i=r[o];T(t,i,M(i,e,n,t))},a=0;a-1:t.test(e)}function Xt(t,e){for(var n in t){var r=t[n];if(r){var o=Jt(r.componentOptions);o&&!e(o)&&(Yt(r),t[n]=null)}}}function Yt(t){t&&(t.componentInstance._inactive||Ct(t.componentInstance,"deactivated"),t.componentInstance.$destroy())}function Qt(t){var e={};e.get=function(){return In},Object.defineProperty(t,"config",e),t.util=or,t.set=E,t.delete=S,t.nextTick=zn,t.options=Object.create(null),In._assetTypes.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,l(t.options.components,$r),Vt(t),zt(t),Kt(t),Wt(t)}function Zt(t){for(var e=t.data,n=t,r=t;r.componentInstance;)r=r.componentInstance._vnode,r.data&&(e=te(r.data,e));for(;n=n.parent;)n.data&&(e=te(e,n.data));return ee(e)}function te(t,e){return{staticClass:ne(t.staticClass,e.staticClass),class:t.class?[t.class,e.class]:e.class}}function ee(t){var e=t.class,n=t.staticClass;return n||e?ne(n,re(e)):""}function ne(t,e){return t?e?t+" "+e:t:e||""}function re(t){var e="";if(!t)return e;if("string"==typeof t)return t;if(Array.isArray(t)){for(var n,r=0,o=t.length;r-1?Fr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Fr[t]=/HTMLUnknownElement/.test(e.toString())}function ae(t){return"string"!=typeof t||(t=document.querySelector(t))?t:document.createElement("div")}function se(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&"multiple"in e.data.attrs&&n.setAttribute("multiple","multiple"),n)}function ue(t,e){return document.createElementNS(Br[t],e)}function ce(t){return document.createTextNode(t)}function fe(t){return document.createComment(t)}function le(t,e,n){t.insertBefore(e,n)}function pe(t,e){t.removeChild(e)}function de(t,e){t.appendChild(e)}function he(t){return t.parentNode}function ve(t){return t.nextSibling}function ye(t){return t.tagName}function me(t,e){t.textContent=e}function ge(t,e,n){t.setAttribute(e,n)}function _e(t,e){var n=t.data.ref;if(n){var r=t.context,o=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?i(a[n],o):a[n]===o&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])&&a[n].indexOf(o)<0?a[n].push(o):a[n]=[o]:a[n]=o}}function be(t){return null==t}function we(t){return null!=t}function xe(t,e){return t.key===e.key&&t.tag===e.tag&&t.isComment===e.isComment&&!t.data==!e.data}function Ae(t,e,n){var r,o,i={};for(r=e;r<=n;++r)o=t[r].key,we(o)&&(i[o]=r);return i}function Ce(t){function e(t){return new ir($.tagName(t).toLowerCase(),{},[],void 0,t)}function n(t,e){function n(){0===--n.listeners&&r(t)}return n.listeners=e,n}function r(t){var e=$.parentNode(t);e&&$.removeChild(e,t)}function i(t,e,n,r,o){if(t.isRootInsert=!o,!a(t,e,n,r)){var i=t.data,s=t.children,u=t.tag;we(u)?(t.elm=t.ns?$.createElementNS(t.ns,u):$.createElement(u,t),h(t),l(t,s,e),we(i)&&d(t,e),f(n,t.elm,r)):t.isComment?(t.elm=$.createComment(t.text),f(n,t.elm,r)):(t.elm=$.createTextNode(t.text),f(n,t.elm,r))}}function a(t,e,n,r){var o=t.data;if(we(o)){var i=we(t.componentInstance)&&o.keepAlive;if(we(o=o.hook)&&we(o=o.init)&&o(t,!1,n,r),we(t.componentInstance))return u(t,e),i&&c(t,e,n,r),!0}}function u(t,e){t.data.pendingInsert&&e.push.apply(e,t.data.pendingInsert),t.elm=t.componentInstance.$el,p(t)?(d(t,e),h(t)):(_e(t),e.push(t))}function c(t,e,n,r){for(var o,i=t;i.componentInstance;)if(i=i.componentInstance._vnode,we(o=i.data)&&we(o=o.transition)){for(o=0;op?(c=be(n[y+1])?null:n[y+1].elm,v(t,c,n,l,y,r)):l>y&&m(t,e,f,p)}function b(t,e,n,r){if(t!==e){if(e.isStatic&&t.isStatic&&e.key===t.key&&(e.isCloned||e.isOnce))return e.elm=t.elm,void(e.componentInstance=t.componentInstance);var o,i=e.data,a=we(i);a&&we(o=i.hook)&&we(o=o.prepatch)&&o(t,e);var s=e.elm=t.elm,u=t.children,c=e.children;if(a&&p(e)){for(o=0;o-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+t.getAttribute("class")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ze(t,e){if(e&&e.trim())if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e);else{for(var n=" "+t.getAttribute("class")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");t.setAttribute("class",n.trim())}}function Ke(t){vo(function(){vo(t)})}function We(t,e){(t._transitionClasses||(t._transitionClasses=[])).push(e),Ve(t,e)}function Je(t,e){t._transitionClasses&&i(t._transitionClasses,e),ze(t,e)}function Ge(t,e,n){var r=Xe(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===uo?lo:ho,u=0,c=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++u>=a&&c()};setTimeout(function(){u0&&(n=uo,f=a,l=i.length):e===co?c>0&&(n=co,f=c,l=u.length):(f=Math.max(a,c),n=f>0?a>c?uo:co:null,l=n?n===uo?i.length:u.length:0),{type:n,timeout:f,propCount:l,hasTransform:n===uo&&yo.test(r[fo+"Property"])}}function Ye(t,e){for(;t.length1,P=n._enterCb=nn(function(){S&&(Je(n,k),Je(n,C)),P.cancelled?(S&&Je(n,A),E&&E(n)):T&&T(n),n._enterCb=null});t.data.show||ot(t.data.hook||(t.data.hook={}),"insert",function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),$&&$(n,P)},"transition-insert"),O&&O(n),S&&(We(n,A),We(n,C),Ke(function(){We(n,k),Je(n,A),P.cancelled||j||Ge(n,i,P)})),t.data.show&&(e&&e(),$&&$(n,P)),S||j||P()}}}function tn(t,e){function n(){m.cancelled||(t.data.show||((r.parentNode._pending||(r.parentNode._pending={}))[t.key]=t),f&&f(r),v&&(We(r,s),We(r,c),Ke(function(){We(r,u),Je(r,s),m.cancelled||y||Ge(r,a,m)})),l&&l(r,m),v||y||m())}var r=t.elm;r._enterCb&&(r._enterCb.cancelled=!0,r._enterCb());var o=en(t.data.transition);if(!o)return e();if(!r._leaveCb&&1===r.nodeType){var i=o.css,a=o.type,s=o.leaveClass,u=o.leaveToClass,c=o.leaveActiveClass,f=o.beforeLeave,l=o.leave,p=o.afterLeave,d=o.leaveCancelled,h=o.delayLeave,v=i!==!1&&!Mn,y=l&&(l._length||l.length)>1,m=r._leaveCb=nn(function(){r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[t.key]=null),v&&(Je(r,u),Je(r,c)),m.cancelled?(v&&Je(r,s),d&&d(r)):(e(),p&&p(r)),r._leaveCb=null});h?h(n):n()}}function en(t){if(t){if("object"==typeof t){var e={};return t.css!==!1&&l(e,mo(t.name||"v")),l(e,t),e}return"string"==typeof t?mo(t):void 0}}function nn(t){var e=!1;return function(){e||(e=!0,t())}}function rn(t,e){e.data.show||Ze(e)}function on(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,u=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(m(sn(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function an(t,e){for(var n=0,r=e.length;n0,Nn=Un&&Un.indexOf("edge/")>0,qn=Un&&Un.indexOf("android")>0,Fn=Un&&/iphone|ipad|ipod|ios/.test(Un),Hn=function(){return void 0===bn&&(bn=!Ln&&"undefined"!=typeof e&&"server"===e.process.env.VUE_ENV),bn},Vn=Ln&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,zn=function(){function t(){r=!1;var t=n.slice(0);n.length=0;for(var e=0;e1&&(e[n[0].trim()]=n[1].trim())}}),e}),eo=/^--/,no=/\s*!important$/,ro=function(t,e,n){eo.test(e)?t.style.setProperty(e,n):no.test(n)?t.style.setProperty(e,n.replace(no,""),"important"):t.style[io(e)]=n},oo=["Webkit","Moz","ms"],io=u(function(t){if(Er=Er||document.createElement("div"),t=kn(t),"filter"!==t&&t in Er.style)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n-1?e:t}function d(t,e){e=e||{};var n=e.body;if(t instanceof d){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new o(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new o(e.headers)),this.method=p(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function v(t){var e=new o;return t.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}}),e}function y(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new o(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var m={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(m.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&g.indexOf(Object.prototype.toString.call(t))>-1};o.prototype.append=function(t,r){t=e(t),r=n(r);var o=this.map[t];this.map[t]=o?o+","+r:r},o.prototype.delete=function(t){delete this.map[e(t)]},o.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},o.prototype.set=function(t,r){this.map[e(t)]=n(r)},o.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},o.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},o.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},o.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},m.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},l.call(d.prototype),l.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];y.redirect=function(t,e){if(x.indexOf(e)===-1)throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=o,t.Request=d,t.Response=y,t.fetch=function(t,e){return new Promise(function(n,r){var o=new d(t,e),i=new XMLHttpRequest;i.onload=function(){var t={status:i.status,statusText:i.statusText,headers:v(i.getAllResponseHeaders()||"")};t.url="responseURL"in i?i.responseURL:t.headers.get("X-Request-URL"),n(new y("response"in i?i.response:i.responseText,t))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),o.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)}},[4]);
--------------------------------------------------------------------------------