├── template ├── src │ ├── pages │ │ ├── home │ │ │ ├── home.css │ │ │ ├── home.js │ │ │ └── home.html │ │ ├── index │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── message │ │ │ ├── message.css │ │ │ ├── message.js │ │ │ └── message.html │ │ └── person │ │ │ ├── person.css │ │ │ ├── person.js │ │ │ └── person.html │ ├── assets │ │ └── img │ │ │ ├── home.png │ │ │ ├── message.png │ │ │ ├── person.png │ │ │ ├── home-active.png │ │ │ ├── message-active.png │ │ │ └── person-active.png │ └── common │ │ ├── js │ │ ├── app.js │ │ └── dom.js │ │ └── css │ │ └── app.css ├── .gitignore ├── static │ ├── lib │ │ ├── fonts │ │ │ └── mui.ttf │ │ ├── css │ │ │ └── mui.min.css │ │ └── js │ │ │ └── mui.min.js │ └── manifest.json ├── postcss.config.js ├── template.js ├── vendor.config.json ├── template.html ├── package.json └── gulpfile.js ├── README.md ├── package.json ├── LICENSE └── meta.js /template/src/pages/home/home.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /template/src/pages/index/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /template/src/pages/message/message.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /template/src/pages/person/person.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /template/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ -------------------------------------------------------------------------------- /template/src/assets/img/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vue-html5plus/vue-html5plus-template/HEAD/template/src/assets/img/home.png -------------------------------------------------------------------------------- /template/static/lib/fonts/mui.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vue-html5plus/vue-html5plus-template/HEAD/template/static/lib/fonts/mui.ttf -------------------------------------------------------------------------------- /template/src/assets/img/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vue-html5plus/vue-html5plus-template/HEAD/template/src/assets/img/message.png -------------------------------------------------------------------------------- /template/src/assets/img/person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vue-html5plus/vue-html5plus-template/HEAD/template/src/assets/img/person.png -------------------------------------------------------------------------------- /template/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('postcss-cssnext'), 4 | require('postcss-import') 5 | ] 6 | } -------------------------------------------------------------------------------- /template/src/assets/img/home-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vue-html5plus/vue-html5plus-template/HEAD/template/src/assets/img/home-active.png -------------------------------------------------------------------------------- /template/src/assets/img/message-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vue-html5plus/vue-html5plus-template/HEAD/template/src/assets/img/message-active.png -------------------------------------------------------------------------------- /template/src/assets/img/person-active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vue-html5plus/vue-html5plus-template/HEAD/template/src/assets/img/person-active.png -------------------------------------------------------------------------------- /template/template.js: -------------------------------------------------------------------------------- 1 | new Vue({ 2 | el: '#app', 3 | data: { 4 | 5 | }, 6 | plusReady () { 7 | 8 | }, 9 | methods: { 10 | 11 | } 12 | }) -------------------------------------------------------------------------------- /template/src/pages/person/person.js: -------------------------------------------------------------------------------- 1 | new Vue({ 2 | el: '#app', 3 | data: { 4 | 5 | }, 6 | plusReady () { 7 | 8 | }, 9 | methods: { 10 | 11 | } 12 | }) -------------------------------------------------------------------------------- /template/src/pages/message/message.js: -------------------------------------------------------------------------------- 1 | new Vue({ 2 | el: '#app', 3 | data: { 4 | 5 | }, 6 | plusReady () { 7 | 8 | }, 9 | methods: { 10 | 11 | } 12 | }) -------------------------------------------------------------------------------- /template/vendor.config.json: -------------------------------------------------------------------------------- 1 | [ 2 | "node_modules/vue/dist/vue.min.js", 3 | "node_modules/babel-polyfill/dist/polyfill.min.js", 4 | "node_modules/vue-html5plus/lib/vue-html5plus.js" 5 | ] -------------------------------------------------------------------------------- /template/src/common/js/app.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | const loadHTML = (response) => { 3 | let code = document.createElement('code') 4 | code.innerHTML = response 5 | return code 6 | } 7 | 8 | window.app = { 9 | loadHTML 10 | }; 11 | })(window); 12 | 13 | -------------------------------------------------------------------------------- /template/src/common/css/app.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --white: #fff; 3 | --grey: #1e1e1d; 4 | --yellow: #ffad15; 5 | --offwhite: #f8f8f8; 6 | --red: #ff0000; 7 | --appColor: #26a2ff; 8 | } 9 | .mui-bar.mui-bar-nav { 10 | background-color: var(--appColor); 11 | box-shadow: none; 12 | } 13 | .mui-bar.mui-bar-nav .mui-title, 14 | .mui-bar.mui-bar-nav .mui-icon { 15 | color: #fff; 16 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-html5plus-template 2 | 3 | A template for building App with vue.js and html5plus. 4 | 5 | ## Usage 6 | 7 | install vue-cli: 8 | 9 | ``` 10 | $ npm install -g vue-cli 11 | ``` 12 | 13 | download template: 14 | ``` 15 | $ vue init vue-html5plus/vue-html5plus-template my-project 16 | $ cd my-project 17 | $ npm install 18 | $ npm run start 19 | $ npm run dev 20 | ``` 21 | -------------------------------------------------------------------------------- /template/src/pages/home/home.js: -------------------------------------------------------------------------------- 1 | new Vue({ 2 | el: '#app', 3 | data: { 4 | city: '', 5 | networkType: '' 6 | }, 7 | plusReady () { 8 | // 获取定位信息 9 | this.$geolocation.getCurrentPosition().then((position) => { 10 | this.city = position.address.city; 11 | console.log(JSON.stringify(position)); 12 | }).catch((error) => { 13 | console.log(error); 14 | }); 15 | // 获取网络信息 16 | this.networkType = this.$networkinfo.getCurrentNetworkType(); 17 | console.log(this.networkType); 18 | }, 19 | mounted () { 20 | console.log(JSON.stringify(this.os)); 21 | } 22 | }) -------------------------------------------------------------------------------- /template/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |