├── .babelrc ├── .editorconfig ├── .eslintignore ├── .gitignore ├── README.md ├── build ├── build.js ├── dev-client.js ├── dev-server.js ├── utils.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── dev.env.js ├── index.js ├── prod.env.js └── test.env.js ├── dist ├── demo1.html └── static │ ├── css │ └── app.1f662e6662a7b6e363fe39efbd6f6c48.css │ └── js │ ├── app.0a83ddd8bf2595912a27.js │ ├── manifest.6d94a3918eec6f3970a8.js │ └── vendor.abc00cb1d5a1d826744c.js ├── index.html ├── package.json ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ ├── drawer.vue │ └── drawer.vue1.0 └── main.js └── static └── .gitkeep /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "stage-2"], 3 | "plugins": ["transform-runtime"], 4 | "comments": false 5 | } 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | npm-debug.log 4 | selenium-debug.log 5 | test/unit/coverage 6 | test/e2e/reports 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # drawerlayout 2 | a vue.js drawer with more function for vue2.x 3 | > A Vue.js project 4 | 5 | ## demo 6 | 7 | [online-demo](https://cdn.rawgit.com/bajian/vue-drawer/master/dist/demo1.html) 8 | 9 | ## Build Setup 10 | 11 | ``` bash 12 | # install dependencies 13 | npm install 14 | 15 | # serve with hot reload at localhost:8080 16 | npm run dev 17 | 18 | # build for production with minification 19 | npm run build 20 | 21 | ``` 22 | 23 | ```html 24 | 25 | 29 | 30 |
31 |

bajian drawer

32 | 35 |
36 | 37 |

38 |

39 | 40 |
41 | 42 | 43 | changeDrawerShow(state) { 44 | this.drawerShow=state; 45 | } 46 | ``` 47 | 48 | ## Api 49 | ### Properties 50 | | Name | Type | Default | Description | 51 | |----------------------|-----------|--------------|--------------------------------------------------------------------| 52 | | pos | `String` | `left` | the position where the drawer is:`left`/`right` | 53 | | tran | `String` | `overlay` | the transition that the drawer beharior:`overlay`/`push` | 54 | | show.sync | `Boolean` | `false` | the drawer visibility,set `true` to show the drawer | 55 | | on-hide | `Function` | `undefined` | the drawer hide listener | 56 | | on-show | `Function` | `undefined` | the drawer show listener | 57 | | change-show | `Function` | `undefined` | as vue2.0 deprecated the `sync`,this event must be called to change drawer state by the component itself | 58 | | ==================== | ========= | ============ | =================== | 59 | 60 | 61 | For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 62 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | // https://github.com/shelljs/shelljs 2 | require('shelljs/global') 3 | env.NODE_ENV = 'production' 4 | 5 | var path = require('path') 6 | var config = require('../config') 7 | var ora = require('ora') 8 | var webpack = require('webpack') 9 | var webpackConfig = require('./webpack.prod.conf') 10 | 11 | console.log( 12 | ' Tip:\n' + 13 | ' Built files are meant to be served over an HTTP server.\n' + 14 | ' Opening index.html over file:// won\'t work.\n' 15 | ) 16 | 17 | var spinner = ora('building for production...') 18 | spinner.start() 19 | 20 | var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory) 21 | rm('-rf', assetsPath) 22 | mkdir('-p', assetsPath) 23 | cp('-R', 'static/', assetsPath) 24 | 25 | webpack(webpackConfig, function (err, stats) { 26 | spinner.stop() 27 | if (err) throw err 28 | process.stdout.write(stats.toString({ 29 | colors: true, 30 | modules: false, 31 | children: false, 32 | chunks: false, 33 | chunkModules: false 34 | }) + '\n') 35 | }) 36 | -------------------------------------------------------------------------------- /build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /build/dev-server.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var express = require('express') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var proxyMiddleware = require('http-proxy-middleware') 6 | var webpackConfig = process.env.NODE_ENV === 'testing' 7 | ? require('./webpack.prod.conf') 8 | : require('./webpack.dev.conf') 9 | 10 | // default port where dev server listens for incoming traffic 11 | var port = process.env.PORT || config.dev.port 12 | // Define HTTP proxies to your custom API backend 13 | // https://github.com/chimurai/http-proxy-middleware 14 | var proxyTable = config.dev.proxyTable 15 | 16 | var app = express() 17 | var compiler = webpack(webpackConfig) 18 | 19 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 20 | publicPath: webpackConfig.output.publicPath, 21 | stats: { 22 | colors: true, 23 | chunks: false 24 | } 25 | }) 26 | 27 | var hotMiddleware = require('webpack-hot-middleware')(compiler) 28 | // force page reload when html-webpack-plugin template changes 29 | compiler.plugin('compilation', function (compilation) { 30 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 31 | hotMiddleware.publish({ action: 'reload' }) 32 | cb() 33 | }) 34 | }) 35 | 36 | // proxy api requests 37 | Object.keys(proxyTable).forEach(function (context) { 38 | var options = proxyTable[context] 39 | if (typeof options === 'string') { 40 | options = { target: options } 41 | } 42 | app.use(proxyMiddleware(context, options)) 43 | }) 44 | 45 | // handle fallback for HTML5 history API 46 | app.use(require('connect-history-api-fallback')()) 47 | 48 | // serve webpack bundle output 49 | app.use(devMiddleware) 50 | 51 | // enable hot-reload and state-preserving 52 | // compilation error display 53 | app.use(hotMiddleware) 54 | 55 | // serve pure static assets 56 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 57 | app.use(staticPath, express.static('./static')) 58 | 59 | module.exports = app.listen(port, function (err) { 60 | if (err) { 61 | console.log(err) 62 | return 63 | } 64 | console.log('Listening at http://localhost:' + port + '\n') 65 | }) 66 | -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 4 | 5 | exports.assetsPath = function (_path) { 6 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 7 | ? config.build.assetsSubDirectory 8 | : config.dev.assetsSubDirectory 9 | return path.posix.join(assetsSubDirectory, _path) 10 | } 11 | 12 | exports.cssLoaders = function (options) { 13 | options = options || {} 14 | // generate loader string to be used with extract text plugin 15 | function generateLoaders (loaders) { 16 | var sourceLoader = loaders.map(function (loader) { 17 | var extraParamChar 18 | if (/\?/.test(loader)) { 19 | loader = loader.replace(/\?/, '-loader?') 20 | extraParamChar = '&' 21 | } else { 22 | loader = loader + '-loader' 23 | extraParamChar = '?' 24 | } 25 | return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '') 26 | }).join('!') 27 | 28 | if (options.extract) { 29 | return ExtractTextPlugin.extract('vue-style-loader', sourceLoader) 30 | } else { 31 | return ['vue-style-loader', sourceLoader].join('!') 32 | } 33 | } 34 | 35 | // http://vuejs.github.io/vue-loader/configurations/extract-css.html 36 | return { 37 | css: generateLoaders(['css']), 38 | postcss: generateLoaders(['css']), 39 | less: generateLoaders(['css', 'less']), 40 | sass: generateLoaders(['css', 'sass?indentedSyntax']), 41 | scss: generateLoaders(['css', 'sass']), 42 | stylus: generateLoaders(['css', 'stylus']), 43 | styl: generateLoaders(['css', 'stylus']) 44 | } 45 | } 46 | 47 | // Generate loaders for standalone style files (outside of .vue) 48 | exports.styleLoaders = function (options) { 49 | var output = [] 50 | var loaders = exports.cssLoaders(options) 51 | for (var extension in loaders) { 52 | var loader = loaders[extension] 53 | output.push({ 54 | test: new RegExp('\\.' + extension + '$'), 55 | loader: loader 56 | }) 57 | } 58 | return output 59 | } 60 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var utils = require('./utils') 4 | var projectRoot = path.resolve(__dirname, '../') 5 | 6 | module.exports = { 7 | entry: { 8 | app: './src/main.js' 9 | }, 10 | output: { 11 | path: config.build.assetsRoot, 12 | publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath, 13 | filename: '[name].js' 14 | }, 15 | resolve: { 16 | extensions: ['', '.js', '.vue'], 17 | fallback: [path.join(__dirname, '../node_modules')], 18 | alias: { 19 | 'src': path.resolve(__dirname, '../src'), 20 | 'assets': path.resolve(__dirname, '../src/assets'), 21 | 'components': path.resolve(__dirname, '../src/components') 22 | } 23 | }, 24 | resolveLoader: { 25 | fallback: [path.join(__dirname, '../node_modules')] 26 | }, 27 | module: { 28 | loaders: [ 29 | { 30 | test: /\.vue$/, 31 | loader: 'vue' 32 | }, 33 | { 34 | test: /\.js$/, 35 | loader: 'babel', 36 | include: projectRoot, 37 | exclude: /node_modules/ 38 | }, 39 | { 40 | test: /\.json$/, 41 | loader: 'json' 42 | }, 43 | { 44 | test: /\.html$/, 45 | loader: 'vue-html' 46 | }, 47 | { 48 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 49 | loader: 'url', 50 | query: { 51 | limit: 10000, 52 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 53 | } 54 | }, 55 | { 56 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 57 | loader: 'url', 58 | query: { 59 | limit: 10000, 60 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 61 | } 62 | } 63 | ] 64 | }, 65 | vue: { 66 | loaders: utils.cssLoaders() 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var config = require('../config') 2 | var webpack = require('webpack') 3 | var merge = require('webpack-merge') 4 | var utils = require('./utils') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | 8 | // add hot-reload related code to entry chunks 9 | Object.keys(baseWebpackConfig.entry).forEach(function (name) { 10 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 11 | }) 12 | 13 | module.exports = merge(baseWebpackConfig, { 14 | module: { 15 | loaders: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 16 | }, 17 | // eval-source-map is faster for development 18 | devtool: '#eval-source-map', 19 | plugins: [ 20 | new webpack.DefinePlugin({ 21 | 'process.env': config.dev.env 22 | }), 23 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 24 | new webpack.optimize.OccurenceOrderPlugin(), 25 | new webpack.HotModuleReplacementPlugin(), 26 | new webpack.NoErrorsPlugin(), 27 | // https://github.com/ampedandwired/html-webpack-plugin 28 | new HtmlWebpackPlugin({ 29 | filename: 'index.html', 30 | template: 'index.html', 31 | inject: true 32 | }) 33 | ] 34 | }) 35 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var utils = require('./utils') 4 | var webpack = require('webpack') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 8 | var HtmlWebpackPlugin = require('html-webpack-plugin') 9 | var env = process.env.NODE_ENV === 'testing' 10 | ? require('../config/test.env') 11 | : config.build.env 12 | 13 | var webpackConfig = merge(baseWebpackConfig, { 14 | module: { 15 | loaders: utils.styleLoaders({ sourceMap: config.build.productionSourceMap, extract: true }) 16 | }, 17 | devtool: config.build.productionSourceMap ? '#source-map' : false, 18 | output: { 19 | path: config.build.assetsRoot, 20 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 21 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 22 | }, 23 | vue: { 24 | loaders: utils.cssLoaders({ 25 | sourceMap: config.build.productionSourceMap, 26 | extract: true 27 | }) 28 | }, 29 | plugins: [ 30 | // http://vuejs.github.io/vue-loader/workflow/production.html 31 | new webpack.DefinePlugin({ 32 | 'process.env': env 33 | }), 34 | new webpack.optimize.UglifyJsPlugin({ 35 | compress: { 36 | warnings: false 37 | } 38 | }), 39 | new webpack.optimize.OccurenceOrderPlugin(), 40 | // extract css into its own file 41 | new ExtractTextPlugin(utils.assetsPath('css/[name].[contenthash].css')), 42 | // generate dist index.html with correct asset hash for caching. 43 | // you can customize output by editing /index.html 44 | // see https://github.com/ampedandwired/html-webpack-plugin 45 | new HtmlWebpackPlugin({ 46 | filename: process.env.NODE_ENV === 'testing' 47 | ? 'index.html' 48 | : config.build.index, 49 | template: 'index.html', 50 | inject: true, 51 | minify: { 52 | removeComments: true, 53 | collapseWhitespace: true, 54 | removeAttributeQuotes: true 55 | // more options: 56 | // https://github.com/kangax/html-minifier#options-quick-reference 57 | }, 58 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 59 | chunksSortMode: 'dependency' 60 | }), 61 | // split vendor js into its own file 62 | new webpack.optimize.CommonsChunkPlugin({ 63 | name: 'vendor', 64 | minChunks: function (module, count) { 65 | // any required modules inside node_modules are extracted to vendor 66 | return ( 67 | module.resource && 68 | /\.js$/.test(module.resource) && 69 | module.resource.indexOf( 70 | path.join(__dirname, '../node_modules') 71 | ) === 0 72 | ) 73 | } 74 | }), 75 | // extract webpack runtime and module manifest to its own file in order to 76 | // prevent vendor hash from being updated whenever app bundle is updated 77 | new webpack.optimize.CommonsChunkPlugin({ 78 | name: 'manifest', 79 | chunks: ['vendor'] 80 | }) 81 | ] 82 | }) 83 | 84 | if (config.build.productionGzip) { 85 | var CompressionWebpackPlugin = require('compression-webpack-plugin') 86 | 87 | webpackConfig.plugins.push( 88 | new CompressionWebpackPlugin({ 89 | asset: '[path].gz[query]', 90 | algorithm: 'gzip', 91 | test: new RegExp( 92 | '\\.(' + 93 | config.build.productionGzipExtensions.join('|') + 94 | ')$' 95 | ), 96 | threshold: 10240, 97 | minRatio: 0.8 98 | }) 99 | ) 100 | } 101 | 102 | module.exports = webpackConfig 103 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../dist/index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'static', 10 | assetsPublicPath: '/', 11 | productionSourceMap: true, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'] 18 | }, 19 | dev: { 20 | env: require('./dev.env'), 21 | port: 8080, 22 | assetsSubDirectory: 'static', 23 | assetsPublicPath: '/', 24 | proxyTable: {}, 25 | // CSS Sourcemaps off by default because relative paths are "buggy" 26 | // with this option, according to the CSS-Loader README 27 | // (https://github.com/webpack/css-loader#sourcemaps) 28 | // In our experience, they generally work as expected, 29 | // just be aware of this issue when enabling this option. 30 | cssSourceMap: false 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /config/test.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var devEnv = require('./dev.env') 3 | 4 | module.exports = merge(devEnv, { 5 | NODE_ENV: '"testing"' 6 | }) 7 | -------------------------------------------------------------------------------- /dist/demo1.html: -------------------------------------------------------------------------------- 1 | drawerlayout -------------------------------------------------------------------------------- /dist/static/css/app.1f662e6662a7b6e363fe39efbd6f6c48.css: -------------------------------------------------------------------------------- 1 | *{margin:0;padding:0}body,html{height:100%}body{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#app{color:#2c3e50;margin-top:-100px;max-width:600px;font-family:Source Sans Pro,Helvetica,sans-serif;text-align:center;background-color:#eee}#app a{color:#42b983;text-decoration:none}.layout{width:300px}a.button,button,input[type=button]{color:#fff;background-color:#3779d0;border:0;font-size:14px;border-radius:4px;padding:0 8px;height:40px;min-width:40px;line-height:40px;overflow:hidden;display:inline-block;outline:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all;transition:all;-webkit-transition-timing-function:linear;transition-timing-function:linear;-webkit-transition-duration:.2s;transition-duration:.2s}button:active{color:#fff;background-color:#377000}.vue-drawer[_v-440f5bca]{display:block;position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.vue-drawer>.main[_v-440f5bca]{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-transition:visibility .38s,-webkit-transform .38s ease-in-out;transition:visibility .38s,-webkit-transform .38s ease-in-out;transition:transform .38s ease-in-out,visibility .38s;transition:transform .38s ease-in-out,visibility .38s,-webkit-transform .38s ease-in-out}.vue-drawer>.main>.mask[_v-440f5bca]{position:absolute;top:0;left:0;right:0;bottom:0;visibility:hidden;opacity:0;-webkit-transition:opacity .38s ease-in-out,visibility .38s ease-in-out;transition:opacity .38s ease-in-out,visibility .38s ease-in-out;background-color:rgba(0,0,0,.3)}.vue-drawer>.main>.active[_v-440f5bca]{visibility:visible;opacity:1}.vue-drawer>.drawer[_v-440f5bca]{background-color:#fff;position:fixed;top:0;height:100%;overflow:hidden;pointer-events:none;visibility:hidden;-webkit-transition:visibility .38s,-webkit-transform .38s ease-in-out;transition:visibility .38s,-webkit-transform .38s ease-in-out;transition:transform .38s ease-in-out,visibility .38s;transition:transform .38s ease-in-out,visibility .38s,-webkit-transform .38s ease-in-out;will-change:none}.vue-drawer>.drawer-left[_v-440f5bca]{left:0;-webkit-transform:translateX(-102%);transform:translateX(-102%)}.vue-drawer>.drawer-right[_v-440f5bca]{right:0;-webkit-transform:translateX(102%);transform:translateX(102%)}.vue-drawer>.active[_v-440f5bca]{pointer-events:inherit;visibility:visible;-webkit-transform:translateX(0);transform:translateX(0)} 2 | /*# sourceMappingURL=app.1f662e6662a7b6e363fe39efbd6f6c48.css.map*/ -------------------------------------------------------------------------------- /dist/static/js/app.0a83ddd8bf2595912a27.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([1,0],[function(t,e,o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var n=o(3),i=r(n),s=o(8),a=r(s);new i["default"]({el:"body",components:{App:a["default"]}})},function(t,e){},function(t,e){},,function(t,e){t.exports='




'},function(t,e){t.exports="
"},function(t,e,o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=o(9),i=r(n);e["default"]={data:function(){return{pos:"left",tran:"overlay",drawerShow:!1,navItems:["decide the width u like","Item2","Item3","Item4","Item5"]}},methods:{directionFlip:function(){var t=this;this.pos="left"==this.pos?"right":"left",setTimeout(function(){t.drawerToggle()},500)},tranFlip:function(){var t=this;this.tran="overlay"==this.tran?"push":"overlay",setTimeout(function(){t.drawerToggle()},0)},drawerToggle:function(){this.drawerShow=!this.drawerShow},onHide:function(){console.log("hide")},onShow:function(){console.log("show")}},components:{Drawer:i["default"]}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={props:{show:{type:Boolean,"default":!1},pos:{type:String,"default":"left"},tran:{type:String,"default":"overlay"}},data:function(){return{drawerWidth:0,translateX:0}},watch:{show:function(){this.show?this.$emit("on-show"):this.$emit("on-hide"),"overlay"!=this.tran&&(this.show?this.translateX="left"==this.pos?this.drawerWidth:-this.drawerWidth:this.translateX=0)}},ready:function(){this.drawerWidth=this.$els.drawer.clientWidth},methods:{hideMask:function(){this.show=!1}}}},function(t,e,o){var r,n,i={};o(1),r=o(6),n=o(4),t.exports=r||{},t.exports.__esModule&&(t.exports=t.exports["default"]);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;n&&(s.template=n),s.computed||(s.computed={}),Object.keys(i).forEach(function(t){var e=i[t];s.computed[t]=function(){return e}})},function(t,e,o){var r,n,i={};o(2),r=o(7),n=o(5),t.exports=r||{},t.exports.__esModule&&(t.exports=t.exports["default"]);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;n&&(s.template=n),s.computed||(s.computed={}),Object.keys(i).forEach(function(t){var e=i[t];s.computed[t]=function(){return e}})}]); 2 | //# sourceMappingURL=app.0a83ddd8bf2595912a27.js.map -------------------------------------------------------------------------------- /dist/static/js/manifest.6d94a3918eec6f3970a8.js: -------------------------------------------------------------------------------- 1 | !function(e){function t(a){if(n[a])return n[a].exports;var r=n[a]={exports:{},id:a,loaded:!1};return e[a].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var a=window.webpackJsonp;window.webpackJsonp=function(c,o){for(var p,s,l=0,d=[];l1?t.apply(e,arguments):t.call(e,i):t.call(e)}}function m(t,e){e=e||0;for(var i=t.length-e,n=new Array(i);i--;)n[i]=t[i+e];return n}function g(t,e){for(var i=Object.keys(e),n=i.length;n--;)t[i[n]]=e[i[n]];return t}function _(t){return null!==t&&"object"==typeof t}function y(t){return Ji.call(t)===qi}function b(t,e,i,n){Object.defineProperty(t,e,{value:i,enumerable:!!n,writable:!0,configurable:!0})}function w(t,e){var i,n,r,s,o,a=function h(){var a=Date.now()-s;a=0?i=setTimeout(h,e-a):(i=null,o=t.apply(r,n),i||(r=n=null))};return function(){return r=this,n=arguments,s=Date.now(),i||(i=setTimeout(a,e)),o}}function C(t,e){for(var i=t.length;i--;)if(t[i]===e)return i;return-1}function $(t){var e=function i(){if(!i.cancelled)return t.apply(this,arguments)};return e.cancel=function(){e.cancelled=!0},e}function k(t,e){return t==e||!(!_(t)||!_(e))&&JSON.stringify(t)===JSON.stringify(e)}function x(t){this.size=0,this.limit=t,this.head=this.tail=void 0,this._keymap=Object.create(null)}function A(){return fn.charCodeAt(vn+1)}function O(){return fn.charCodeAt(++vn)}function T(){return vn>=dn}function N(){for(;A()===Tn;)O()}function j(t){return t===kn||t===xn}function E(t){return Nn[t]}function S(t,e){return jn[t]===e}function F(){for(var t,e=O();!T();)if(t=O(),t===On)O();else if(t===e)break}function D(t){for(var e=0,i=t;!T();)if(t=A(),j(t))F();else if(i===t&&e++,S(i,t)&&e--,O(),0===e)break}function R(){for(var t=vn;!T();)if(mn=A(),j(mn))F();else if(E(mn))D(mn);else if(mn===An){if(O(),mn=A(),mn!==An){gn!==bn&&gn!==$n||(gn=wn);break}O()}else{if(mn===Tn&&(gn===Cn||gn===$n)){N();break}gn===wn&&(gn=Cn),O()}return fn.slice(t+1,vn)||null}function P(){for(var t=[];!T();)t.push(L());return t}function L(){var t,e={};return gn=wn,e.name=R().trim(),gn=$n,t=M(),t.length&&(e.args=t),e}function M(){for(var t=[];!T()&&gn!==wn;){var e=R();if(!e)break;t.push(H(e))}return t}function H(t){if(yn.test(t))return{value:h(t),dynamic:!1};var e=c(t),i=e===t;return{value:i?t:e,dynamic:i}}function I(t){var e=_n.get(t);if(e)return e;fn=t,pn={},dn=fn.length,vn=-1,mn="",gn=bn;var i;return fn.indexOf("|")<0?pn.expression=fn.trim():(pn.expression=R().trim(),i=P(),i.length&&(pn.filters=i)),_n.put(t,pn),pn}function B(t){return t.replace(Sn,"\\$&")}function W(){var t=B(In.delimiters[0]),e=B(In.delimiters[1]),i=B(In.unsafeDelimiters[0]),n=B(In.unsafeDelimiters[1]);Dn=new RegExp(i+"((?:.|\\n)+?)"+n+"|"+t+"((?:.|\\n)+?)"+e,"g"),Rn=new RegExp("^"+i+"((?:.|\\n)+?)"+n+"$"),Fn=new x(1e3)}function V(t){Fn||W();var e=Fn.get(t);if(e)return e;if(!Dn.test(t))return null;for(var i,n,r,s,o,a,h=[],l=Dn.lastIndex=0;i=Dn.exec(t);)n=i.index,n>l&&h.push({value:t.slice(l,n)}),r=Rn.test(i[0]),s=r?i[1]:i[2],o=s.charCodeAt(0),a=42===o,s=a?s.slice(1):s,h.push({tag:!0,value:s.trim(),html:r,oneTime:a}),l=n+i[0].length;return l1?t.map(function(t){return U(t,e)}).join("+"):U(t[0],e,!0)}function U(t,e,i){return t.tag?t.oneTime&&e?'"'+e.$eval(t.value)+'"':J(t.value,i):'"'+t.value+'"'}function J(t,e){if(Pn.test(t)){var i=I(t);return i.filters?"this._applyFilters("+i.expression+",null,"+JSON.stringify(i.filters)+",false)":"("+t+")"}return e?t:"("+t+")"}function q(t,e,i,n){Z(t,1,function(){e.appendChild(t)},i,n)}function Q(t,e,i,n){Z(t,1,function(){it(t,e)},i,n)}function G(t,e,i){Z(t,-1,function(){rt(t)},e,i)}function Z(t,e,i,n,r){var s=t.__v_trans;if(!s||!s.hooks&&!rn||!n._isCompiled||n.$parent&&!n.$parent._isCompiled)return i(),void(r&&r());var o=e>0?"enter":"leave";s[o](i,r)}function X(t){if("string"==typeof t){t=document.querySelector(t)}return t}function Y(t){if(!t)return!1;var e=t.ownerDocument.documentElement,i=t.parentNode;return e===t||e===i||!(!i||1!==i.nodeType||!e.contains(i))}function K(t,e){var i=t.getAttribute(e);return null!==i&&t.removeAttribute(e),i}function tt(t,e){var i=K(t,":"+e);return null===i&&(i=K(t,"v-bind:"+e)),i}function et(t,e){return t.hasAttribute(e)||t.hasAttribute(":"+e)||t.hasAttribute("v-bind:"+e)}function it(t,e){e.parentNode.insertBefore(t,e)}function nt(t,e){e.nextSibling?it(t,e.nextSibling):e.parentNode.appendChild(t)}function rt(t){t.parentNode.removeChild(t)}function st(t,e){e.firstChild?it(t,e.firstChild):e.appendChild(t)}function ot(t,e){var i=t.parentNode;i&&i.replaceChild(e,t)}function at(t,e,i,n){t.addEventListener(e,i,n)}function ht(t,e,i){t.removeEventListener(e,i)}function lt(t){var e=t.className;return"object"==typeof e&&(e=e.baseVal||""),e}function ct(t,e){tn&&!/svg$/.test(t.namespaceURI)?t.className=e:t.setAttribute("class",e)}function ut(t,e){if(t.classList)t.classList.add(e);else{var i=" "+lt(t)+" ";i.indexOf(" "+e+" ")<0&&ct(t,(i+e).trim())}}function ft(t,e){if(t.classList)t.classList.remove(e);else{for(var i=" "+lt(t)+" ",n=" "+e+" ";i.indexOf(n)>=0;)i=i.replace(n," ");ct(t,i.trim())}t.className||t.removeAttribute("class")}function pt(t,e){var i,n;if(mt(t)&&wt(t.content)&&(t=t.content),t.hasChildNodes())for(dt(t),n=e?document.createDocumentFragment():document.createElement("div");i=t.firstChild;)n.appendChild(i);return n}function dt(t){for(var e;e=t.firstChild,vt(e);)t.removeChild(e);for(;e=t.lastChild,vt(e);)t.removeChild(e)}function vt(t){return t&&(3===t.nodeType&&!t.data.trim()||8===t.nodeType)}function mt(t){return t.tagName&&"template"===t.tagName.toLowerCase()}function gt(t,e){var i=In.debug?document.createComment(t):document.createTextNode(e?" ":"");return i.__v_anchor=!0,i}function _t(t){if(t.hasAttributes())for(var e=t.attributes,i=0,n=e.length;i=h.length){for(var t=0;t=97&&e<=122||e>=65&&e<=90?"ident":e>=49&&e<=57?"number":"else"}function Wt(t){var e=t.trim();return("0"!==t.charAt(0)||!isNaN(t))&&(s(e)?c(e):"*"+e)}function Vt(t){function e(){var e=t[c+1];if(u===ur&&"'"===e||u===fr&&'"'===e)return c++,n="\\"+e,p[ir](),!0}var i,n,r,s,o,a,h,l=[],c=-1,u=or,f=0,p=[];for(p[nr]=function(){void 0!==r&&(l.push(r),r=void 0)},p[ir]=function(){void 0===r?r=n:r+=n},p[rr]=function(){p[ir](),f++},p[sr]=function(){if(f>0)f--,u=cr,p[ir]();else{if(f=0,r=Wt(r),r===!1)return!1;p[nr]()}};null!=u;)if(c++,i=t[c],"\\"!==i||!e()){if(s=Bt(i),h=vr[u],o=h[s]||h["else"]||dr,o===dr)return;if(u=o[0],a=p[o[1]],a&&(n=o[2],n=void 0===n?i:n,a()===!1))return;if(u===pr)return l.raw=t,l}}function zt(t){var e=er.get(t);return e||(e=Vt(t),e&&er.put(t,e)),e}function Ut(t,e){return te(e).get(t)}function Jt(t,e,n){var r=t;if("string"==typeof e&&(e=Vt(e)),!e||!_(t))return!1;for(var s,o,a=0,h=e.length;a-1?i.replace(xr,Zt):i,e+"scope."+i)}function Zt(t,e){return Nr[e]}function Xt(t){wr.test(t),Nr.length=0;var e=t.replace(kr,Qt).replace(Cr,"");return e=(" "+e).replace(Or,Gt).replace(xr,Zt),Yt(e)}function Yt(t){try{return new Function("scope","return "+t+";")}catch(e){return qt}}function Kt(t){var e=zt(t);if(e)return function(t,i){Jt(t,e,i)}}function te(t,e){t=t.trim();var i=gr.get(t);if(i)return e&&!i.set&&(i.set=Kt(i.exp)),i;var n={exp:t};return n.get=ee(t)&&t.indexOf("[")<0?Yt("scope."+t):Xt(t),e&&(n.set=Kt(t)),gr.put(t,n),n}function ee(t){return Ar.test(t)&&!Tr.test(t)&&"Math."!==t.slice(0,5)}function ie(){Er.length=0,Sr.length=0,Fr={},Dr={},Rr=!1}function ne(){for(var t=!0;t;)t=!1,re(Er),re(Sr),Er.length?t=!0:(Xi&&In.devtools&&Xi.emit("flush"),ie())}function re(t){for(var e=0;e0){var o=s+(n?e:Ct(e));r=Gr.get(o),r||(r=Qe(i,t.$options,!0),Gr.put(o,r))}else r=Qe(i,t.$options,!0);this.linker=r}function we(t,e,i){var n=t.node.previousSibling;if(n){for(t=n.__v_frag;!(t&&t.forId===i&&t.inserted||n===e);){if(n=n.previousSibling,!n)return;t=n.__v_frag}return t}}function Ce(t){for(var e=-1,i=new Array(Math.floor(t));++e47&&e<58?parseInt(t,10):1===t.length&&(e=t.toUpperCase().charCodeAt(0),e>64&&e<91)?e:ms[t]});return i=[].concat.apply([],i),function(e){if(i.indexOf(e.keyCode)>-1)return t.call(this,e)}}function Oe(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function Te(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Ne(t){return function(e){if(e.target===e.currentTarget)return t.call(this,e)}}function je(t){if(ws[t])return ws[t];var e=Ee(t);return ws[t]=ws[e]=e,e}function Ee(t){t=p(t);var e=u(t),i=e.charAt(0).toUpperCase()+e.slice(1);Cs||(Cs=document.createElement("div"));var n,r=_s.length;if("filter"!==e&&e in Cs.style)return{kebab:t,camel:e};for(;r--;)if(n=ys[r]+i,n in Cs.style)return{kebab:_s[r]+t,camel:n}}function Se(t){var e=[];if(Qi(t))for(var i=0,n=t.length;i=r?i():t[s].call(e,n)}var r=t.length,s=0;t[0].call(e,n)}function Re(t,e,i){for(var n,r,o,a,h,l,c,f=[],d=i.$options.propsData,v=Object.keys(e),m=v.length;m--;)if(r=v[m],n=e[r]||Ms,h=u(r),Hs.test(h)){if(c={name:r,path:h,options:n,mode:Ls.ONE_WAY,raw:null},o=p(r),null===(a=tt(t,o))&&(null!==(a=tt(t,o+".sync"))?c.mode=Ls.TWO_WAY:null!==(a=tt(t,o+".once"))&&(c.mode=Ls.ONE_TIME)),null!==a)c.raw=a,l=I(a),a=l.expression,c.filters=l.filters,s(a)&&!l.filters?c.optimizedLiteral=!0:c.dynamic=!0,c.parentPath=a;else if(null!==(a=K(t,o)))c.raw=a;else if(d&&null!==(a=d[r]||d[h]))c.raw=a;else;f.push(c)}return Pe(f)}function Pe(t){return function(e,i){e._props={};for(var n,s,o,a,u,f=e.$options.propsData,d=t.length;d--;)if(n=t[d],u=n.raw,s=n.path,o=n.options,e._props[s]=n,f&&r(f,s)&&Me(e,n,f[s]),null===u)Me(e,n,void 0);else if(n.dynamic)n.mode===Ls.ONE_TIME?(a=(i||e._context||e).$get(n.parentPath),Me(e,n,a)):e._context?e._bindDir({name:"prop",def:Bs,prop:n},null,null,i):Me(e,n,e.$get(n.parentPath));else if(n.optimizedLiteral){var v=c(u);a=v===u?l(h(u)):v,Me(e,n,a)}else a=o.type===Boolean&&(""===u||u===p(n.name))||u,Me(e,n,a)}}function Le(t,e,i,n){var r=e.dynamic&&ee(e.parentPath),s=i;void 0===s&&(s=Ie(t,e)),s=We(e,s,t);var o=s!==i;Be(e,s,t)||(s=void 0),r&&!o?Dt(function(){n(s)}):n(s)}function Me(t,e,i){Le(t,e,i,function(i){Ht(t,e.path,i)})}function He(t,e,i){Le(t,e,i,function(i){t[e.path]=i})}function Ie(t,e){var i=e.options;if(!r(i,"default"))return i.type!==Boolean&&void 0;var n=i["default"];return _(n),"function"==typeof n&&i.type!==Function?n.call(t):n}function Be(t,e,i){if(!t.options.required&&(null===t.raw||null==e))return!0;var n=t.options,r=n.type,s=!r,o=[];if(r){Qi(r)||(r=[r]);for(var a=0;ae?-1:t===e?0:1});for(e=0,i=c.length;ep.priority)&&(p=f,c=r.name,a=vi(r.name),o=r.value,l=h[1],u=h[2]));return p?pi(t,l,o,i,p,c,u,a):void 0}function fi(){}function pi(t,e,i,n,r,s,o,a){var h=I(i),l={name:e,arg:o,expression:h.expression,filters:h.filters,raw:i,attr:s,modifiers:a,def:r};"for"!==e&&"if"!==e&&"router-view"!==e||(l.ref=_t(t));var c=function(t,e,i,n,r){l.ref&&Ht((n||t).$refs,l.ref,null),t._bindDir(l,e,i,n,r)};return c.terminal=!0,c}function di(t,e){function i(t,e,i){var n=i&&gi(i),r=!n&&I(s);v.push({name:t,attr:o,raw:a,def:e,arg:l,modifiers:c,expression:r&&r.expression,filters:r&&r.filters,interp:i,hasOneTime:n})}for(var n,r,s,o,a,h,l,c,u,f,p,d=t.length,v=[];d--;)if(n=t[d],r=o=n.name,s=a=n.value,f=V(s),l=null,c=vi(r),r=r.replace(io,""),f)s=z(f),l=r,i("bind",Ds.bind,f);else if(no.test(r))c.literal=!Ks.test(r),i("transition",Ys.transition);else if(to.test(r))l=r.replace(to,""),i("on",Ds.on);else if(Ks.test(r))h=r.replace(Ks,""),"style"===h||"class"===h?i(h,Ys[h]):(l=h,i("bind",Ds.bind));else if(p=r.match(eo)){if(h=p[1],l=p[2],"else"===h)continue;u=St(e,"directives",h,!0),u&&i(h,u)}if(v.length)return mi(v)}function vi(t){var e=Object.create(null),i=t.match(io);if(i)for(var n=i.length;n--;)e[i[n].slice(1)]=!0;return e}function mi(t){return function(e,i,n,r,s){for(var o=t.length;o--;)e._bindDir(t[o],i,n,r,s)}}function gi(t){for(var e=t.length;e--;)if(t[e].oneTime)return!0}function _i(t){return"SCRIPT"===t.tagName&&(!t.hasAttribute("type")||"text/javascript"===t.getAttribute("type"))}function yi(t,e){return e&&(e._containerAttrs=wi(t)),mt(t)&&(t=fe(t)),e&&(e._asComponent&&!e.template&&(e.template=""),e.template&&(e._content=pt(t),t=bi(t,e))),wt(t)&&(st(gt("v-start",!0),t),t.appendChild(gt("v-end",!0))),t}function bi(t,e){var i=e.template,n=fe(i,!0);if(n){var r=n.firstChild;if(!r)return n;var s=r.tagName&&r.tagName.toLowerCase();return e.replace?(t===document.body,n.childNodes.length>1||1!==r.nodeType||"component"===s||St(e,"components",s)||et(r,"is")||St(e,"elementDirectives",s)||r.hasAttribute("v-for")||r.hasAttribute("v-if")?n:(e._replacerAttrs=wi(r),Ci(t,r),r)):(t.appendChild(n),t)}}function wi(t){if(1===t.nodeType&&t.hasAttributes())return m(t.attributes)}function Ci(t,e){for(var i,n,r=t.attributes,s=r.length;s--;)i=r[s].name,n=r[s].value,e.hasAttribute(i)||oo.test(i)?"class"===i&&!V(n)&&(n=n.trim())&&n.split(/\s+/).forEach(function(t){ut(e,t)}):e.setAttribute(i,n)}function $i(t,e){if(e){for(var i,n,r=t._slotContents=Object.create(null),s=0,o=e.children.length;s1?m(i):i;var r=e&&i.some(function(t){return t._fromParent});r&&(n=!1);for(var s=m(arguments,1),o=0,a=i.length;oe?s:-s}var i=null,n=void 0;t=po(t);var r=m(arguments,1),s=r[r.length-1];"number"==typeof s?(s=s<0?-1:1,r=r.length>1?r.slice(0,-1):r):s=1;var o=r[0];return o?("function"==typeof o?i=function(t,e){return o(t,e)*s}:(n=Array.prototype.concat.apply([],r),i=function(t,r,s){return s=s||0,s>=n.length-1?e(t,r,s):e(t,r,s)||i(t,r,s+1)}),t.slice().sort(i)):t}function Hi(t,e){var i;if(y(t)){var n=Object.keys(t);for(i=n.length;i--;)if(Hi(t[n[i]],e))return!0}else if(Qi(t)){for(i=t.length;i--;)if(Hi(t[i],e))return!0}else if(null!=t)return t.toString().toLowerCase().indexOf(e)>-1}function Ii(t){function e(t){return new Function("return function "+d(t)+" (options) { this._init(options) }")()}t.options={directives:Ds,elementDirectives:fo,filters:mo,transitions:{},components:{},partials:{},replace:!0},t.util=Kn,t.config=In,t.set=i,t["delete"]=n,t.nextTick=ln,t.compiler=ao,t.FragmentFactory=be,t.internalDirectives=Ys,t.parsers={path:mr,text:Ln,template:qr,directive:En,expression:jr},t.cid=0;var r=1;t.extend=function(t){t=t||{};var i=this,n=0===i.cid;if(n&&t._Ctor)return t._Ctor;var s=t.name||i.options.name,o=e(s||"VueComponent");return o.prototype=Object.create(i.prototype),o.prototype.constructor=o,o.cid=r++,o.options=Et(i.options,t),o["super"]=i,o.extend=i.extend,In._assetTypes.forEach(function(t){o[t]=i[t]}),s&&(o.options.components[s]=o),n&&(t._Ctor=o),o},t.use=function(t){if(!t.installed){var e=m(arguments,1);return e.unshift(this),"function"==typeof t.install?t.install.apply(t,e):t.apply(null,e),t.installed=!0,this}},t.mixin=function(e){t.options=Et(t.options,e)},In._assetTypes.forEach(function(e){t[e]=function(i,n){return n?("component"===e&&y(n)&&(n.name||(n.name=i),n=t.extend(n)),this.options[e+"s"][i]=n,n):this.options[e+"s"][i]}}),g(t.transition,Wn)}var Bi=Object.prototype.hasOwnProperty,Wi=/^\s?(true|false|-?[\d\.]+|'[^']*'|"[^"]*")\s?$/,Vi=/-(\w)/g,zi=/([^-])([A-Z])/g,Ui=/(?:^|[-_\/])(\w)/g,Ji=Object.prototype.toString,qi="[object Object]",Qi=Array.isArray,Gi="__proto__"in{},Zi="undefined"!=typeof window&&"[object Object]"!==Object.prototype.toString.call(window),Xi=Zi&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Yi=Zi&&window.navigator.userAgent.toLowerCase(),Ki=Yi&&Yi.indexOf("trident")>0,tn=Yi&&Yi.indexOf("msie 9.0")>0,en=Yi&&Yi.indexOf("android")>0,nn=void 0,rn=void 0,sn=void 0,on=void 0;if(Zi&&!tn){var an=void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend,hn=void 0===window.onanimationend&&void 0!==window.onwebkitanimationend;nn=an?"WebkitTransition":"transition",rn=an?"webkitTransitionEnd":"transitionend",sn=hn?"WebkitAnimation":"animation",on=hn?"webkitAnimationEnd":"animationend"}var ln=function(){function t(){r=!1;var t=n.slice(0);n=[];for(var e=0;e=this.length&&(this.length=Number(t)+1),this.splice(t,1,e)[0]}),b(Gn,"$remove",function(t){if(this.length){var e=C(this,t);return e>-1?this.splice(e,1):void 0}});var Xn=Object.getOwnPropertyNames(Zn),Yn=!0;Rt.prototype.walk=function(t){for(var e=Object.keys(t),i=0,n=e.length;i",""],tr:[2,"","
"],col:[2,"","
"]};Br.td=Br.th=[3,"","
"],Br.option=Br.optgroup=[1,'"],Br.thead=Br.tbody=Br.colgroup=Br.caption=Br.tfoot=[1,"","
"],Br.g=Br.defs=Br.symbol=Br.use=Br.image=Br.text=Br.circle=Br.ellipse=Br.line=Br.path=Br.polygon=Br.polyline=Br.rect=[1,'',""];var Wr=/<([\w:-]+)/,Vr=/&#?\w+?;/,zr=/ 10 | 11 | 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "drawerlayout", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "bajian", 6 | "private": true, 7 | "scripts": { 8 | "dev": "node build/dev-server.js", 9 | "build": "node build/build.js", 10 | "test": "" 11 | }, 12 | "dependencies": { 13 | "vue": "^2.0.0", 14 | "babel-runtime": "^6.0.0" 15 | }, 16 | "devDependencies": { 17 | "babel-core": "^6.0.0", 18 | "babel-loader": "^6.0.0", 19 | "babel-plugin-transform-runtime": "^6.0.0", 20 | "babel-preset-es2015": "^6.0.0", 21 | "babel-preset-stage-2": "^6.0.0", 22 | "babel-register": "^6.0.0", 23 | "connect-history-api-fallback": "^1.1.0", 24 | "css-loader": "^0.23.0", 25 | "eventsource-polyfill": "^0.9.6", 26 | "express": "^4.13.3", 27 | "extract-text-webpack-plugin": "^1.0.1", 28 | "file-loader": "^0.8.4", 29 | "function-bind": "^1.0.2", 30 | "html-webpack-plugin": "^2.8.1", 31 | "http-proxy-middleware": "^0.12.0", 32 | "json-loader": "^0.5.4", 33 | "ora": "^0.2.0", 34 | "shelljs": "^0.6.0", 35 | "url-loader": "^0.5.7", 36 | "vue-hot-reload-api": "^1.2.0", 37 | "vue-html-loader": "^1.0.0", 38 | "vue-loader": "^9.0.0", 39 | "vue-style-loader": "^1.0.0", 40 | "webpack": "^1.12.2", 41 | "webpack-dev-middleware": "^1.4.0", 42 | "webpack-hot-middleware": "^2.6.0", 43 | "webpack-merge": "^0.8.3" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 70 | 71 | 140 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajian/vue-drawer/d7560f7d1d7c7d5079c4fdbcc007e63fe6d72b99/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/drawer.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 71 | 72 | 142 | -------------------------------------------------------------------------------- /src/components/drawer.vue1.0: -------------------------------------------------------------------------------- 1 | 18 | 19 | 68 | 69 | 135 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App' 3 | 4 | /* eslint-disable no-new */ 5 | new Vue({ 6 | el: 'app', 7 | render: h => h(App) 8 | }) 9 | -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bajian/vue-drawer/d7560f7d1d7c7d5079c4fdbcc007e63fe6d72b99/static/.gitkeep --------------------------------------------------------------------------------