├── src ├── store │ ├── modules │ │ └── user │ │ │ ├── type.ts │ │ │ └── index.ts │ ├── types.ts │ └── index.ts ├── style │ └── base.less ├── assets │ └── logo.png ├── declaration.d.ts ├── shims-vue.d.ts ├── config │ ├── conf.mock.ts │ ├── conf.test.ts │ ├── conf.prod.ts │ ├── conf.dev.ts │ ├── conf.d.ts │ └── index.ts ├── router │ └── index.ts ├── shims-tsx.d.ts ├── utils │ └── fetch.js ├── main.ts ├── views │ └── page │ │ └── index.vue ├── App.vue └── components │ ├── message │ └── message.vue │ └── Message │ └── index.js ├── .env.development ├── .env.production ├── public ├── robots.txt ├── favicon.ico ├── img │ └── icons │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── mstile-150x150.png │ │ ├── apple-touch-icon.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── msapplication-icon-144x144.png │ │ └── safari-pinned-tab.svg ├── manifest.json └── index.html ├── .browserslistrc ├── babel.config.js ├── postcss.config.js ├── README.md ├── .gitignore ├── tslint.json ├── tsconfig.json ├── package.json └── vue.config.js /src/store/modules/user/type.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/style/base.less: -------------------------------------------------------------------------------- 1 | @primary: #333; -------------------------------------------------------------------------------- /.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_REQUEST_URL=development.com -------------------------------------------------------------------------------- /.env.production: -------------------------------------------------------------------------------- 1 | VUE_APP_REQUEST_URL=production.com -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 8 4 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/favicon.ico -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/src/assets/logo.png -------------------------------------------------------------------------------- /src/declaration.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@/components/Message'; 2 | declare module 'vue-wechat-title'; -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue'; 3 | export default Vue; 4 | } 5 | -------------------------------------------------------------------------------- /public/img/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/favicon-16x16.png -------------------------------------------------------------------------------- /public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /public/img/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/mstile-150x150.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/img/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /src/config/conf.mock.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | env: 'mock', 3 | HOST: 'https://mock.com', 4 | API_HOST: 'https://mock.com/api' 5 | } 6 | -------------------------------------------------------------------------------- /src/config/conf.test.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | env: 'test', 3 | HOST: 'https://test.com', 4 | API_HOST: 'https://test.com/api' 5 | } 6 | -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /public/img/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /public/img/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IFmiss/vue-template/master/public/img/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /src/config/conf.prod.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | env: 'production', 3 | HOST: 'https://production.com', 4 | API_HOST: 'https://production.com/api' 5 | } 6 | -------------------------------------------------------------------------------- /src/config/conf.dev.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | env: 'development', 3 | HOST: 'https://development.com', 4 | API_HOST: 'https://development.com/api' 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## vue-template 2 | vue-cli3.0搭建的通用vue项目 3 | 4 | ### 内容 5 | - Vuex 6 | - axios 7 | - Vue-router 8 | - d-js-utlis 9 | - typescript 10 | - pug模板语法 11 | - less全局变量配置 12 | - .env.development + .env.production 13 | - 配置rem移动端初始化字体大小 14 | -------------------------------------------------------------------------------- /src/store/types.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 此文件是用于定义变量名称 3 | * state 4 | * getters 5 | * action 6 | * mutation 7 | */ 8 | export const USER_INFO_STATE = 'USER_INFO_STATE' 9 | export const USER_INFO_GETTER = 'USER_INFO_GETTER' 10 | export const USER_INFO_SETTER = 'USER_INFO_SETTER' 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /src/store/index.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | // 日志打印配置 4 | import createLogger from 'vuex/dist/logger' 5 | 6 | import user from './modules/user/index' 7 | 8 | Vue.use(Vuex) 9 | const store = new Vuex.Store({ 10 | plugins: [createLogger()], 11 | modules: { 12 | user 13 | } 14 | }) 15 | export default store 16 | -------------------------------------------------------------------------------- /src/router/index.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Router from 'vue-router'; 3 | Vue.use(Router); 4 | 5 | export default new Router({ 6 | routes: [ 7 | { 8 | path: '/', 9 | name: 'page', 10 | component: () => import('@/views/page/index.vue'), 11 | meta: { 12 | title: '首页' 13 | } 14 | } 15 | ] 16 | }); 17 | -------------------------------------------------------------------------------- /src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue'; 2 | 3 | declare global { 4 | namespace JSX { 5 | // tslint:disable no-empty-interface 6 | interface Element extends VNode {} 7 | // tslint:disable no-empty-interface 8 | interface ElementClass extends Vue {} 9 | interface IntrinsicElements { 10 | [elem: string]: any; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/config/conf.d.ts: -------------------------------------------------------------------------------- 1 | interface Config { 2 | env: string; 3 | HOST: string; 4 | API_HOST: string; 5 | } 6 | 7 | declare enum URL_HOST_NAME { 8 | /** 9 | * 开发环境hostname 10 | */ 11 | DEV = 'd-hfjzkt.hfjy.com', 12 | /** 13 | * 测试环境hostname 14 | */ 15 | TEST = 't-hfjzkt.hfjy.com', 16 | /** 17 | * 正式环境hostname 18 | */ 19 | PROD = 'hfjzkt.hfjy.com' 20 | } 21 | -------------------------------------------------------------------------------- /src/utils/fetch.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | axios.interceptors.request.use(function (config) { 3 | return config 4 | }, function (error) { 5 | return Promise.reject(error) 6 | }) 7 | 8 | axios.interceptors.response.use(res => { 9 | const { code, data, msg } = res.data 10 | if (parseInt(code, 10) != 200) { 11 | // 失败 需要添加提示 12 | return Promise.reject(res) 13 | } 14 | return data 15 | }, err => { 16 | return Promise.reject(err) 17 | }) 18 | 19 | export default axios 20 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-template", 3 | "short_name": "vue-template", 4 | "icons": [ 5 | { 6 | "src": "./img/icons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "./img/icons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "./index.html", 17 | "display": "standalone", 18 | "background_color": "#000000", 19 | "theme_color": "#4DBA87" 20 | } 21 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "warning", 3 | "extends": [ 4 | "tslint:recommended" 5 | ], 6 | "linterOptions": { 7 | "exclude": [ 8 | "node_modules/**" 9 | ] 10 | }, 11 | "rules": { 12 | "quotemark": [true, "single"], 13 | "indent": [true, "spaces", 2], 14 | "interface-name": false, 15 | "ordered-imports": false, 16 | "object-literal-sort-keys": false, 17 | "no-consecutive-blank-lines": false, 18 | "no-console": false, 19 | "semicolon": false, 20 | "space-before-function-paren": false, 21 | "trailing-comma": false 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/store/modules/user/index.ts: -------------------------------------------------------------------------------- 1 | 2 | import * as types from './../../types' 3 | const state = { 4 | [types.USER_INFO_STATE]: {} 5 | } 6 | 7 | const getters = { 8 | [types.USER_INFO_GETTER]: (s: any) => s.USER_INFO_STATE 9 | } 10 | 11 | const mutations = { 12 | [types.USER_INFO_SETTER]: (s: any, data: any) => { 13 | s[types.USER_INFO_STATE] = data 14 | } 15 | } 16 | 17 | const actions = { 18 | [types.USER_INFO_SETTER]: ({ commit }: any, data: any) => { 19 | commit(types.USER_INFO_SETTER, data) 20 | } 21 | } 22 | 23 | export default { 24 | state, 25 | getters, 26 | actions, 27 | mutations 28 | } 29 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vue通用项目模板 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | import router from '@/router/index.ts'; 4 | import store from '@/store/index.ts'; 5 | import { DeviceUtils } from '@dw/d-utils'; 6 | import VueTitle from 'vue-wechat-title'; 7 | import Message from '@/components/Message'; 8 | 9 | declare module 'vue/types/vue' { interface Vue { $msg: any } }; 10 | 11 | Vue.config.productionTip = false; 12 | 13 | DeviceUtils.initRem() 14 | DeviceUtils.checkLayoutOrientation() 15 | 16 | Vue.use(Message, { 17 | text: 'Hello world', duration: 3000, background: 'rgba(7,17,27,0.6)' 18 | }) 19 | 20 | Vue.use(VueTitle) 21 | 22 | new Vue({ 23 | router, 24 | store, 25 | render: (h: any) => h(App), 26 | }).$mount('#app'); 27 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "strict": true, 6 | "jsx": "preserve", 7 | "importHelpers": true, 8 | "moduleResolution": "node", 9 | "experimentalDecorators": true, 10 | "esModuleInterop": true, 11 | "allowSyntheticDefaultImports": true, 12 | "sourceMap": true, 13 | "baseUrl": ".", 14 | "types": [ 15 | "webpack-env" 16 | ], 17 | "paths": { 18 | "@/*": [ 19 | "src/*" 20 | ] 21 | }, 22 | "lib": [ 23 | "esnext", 24 | "dom", 25 | "dom.iterable", 26 | "scripthost" 27 | ] 28 | }, 29 | "include": [ 30 | "src/**/*.ts", 31 | "src/**/*.tsx", 32 | "src/**/*.vue", 33 | "tests/**/*.ts", 34 | "tests/**/*.tsx" 35 | ], 36 | "exclude": [ 37 | "node_modules" 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /src/views/page/index.vue: -------------------------------------------------------------------------------- 1 | 15 | 25 | 26 | 44 | -------------------------------------------------------------------------------- /src/config/index.ts: -------------------------------------------------------------------------------- 1 | import dev from './conf.dev' 2 | import test from './conf.test' 3 | import prod from './conf.prod' 4 | import mock from './conf.mock' 5 | 6 | /** 7 | * 这是针对运维 只执行一条命令的解决方案 8 | * 根据url判断环境 9 | */ 10 | 11 | let Conf!: Config 12 | 13 | if (process.env.NODE_ENV === 'production') { 14 | switch (window.location.hostname) { 15 | case URL_HOST_NAME.DEV: 16 | Conf = dev 17 | break 18 | case URL_HOST_NAME.TEST: 19 | Conf = test 20 | break 21 | case URL_HOST_NAME.PROD: 22 | Conf = prod 23 | break 24 | default: 25 | Conf = mock 26 | break 27 | } 28 | } else { 29 | switch (window.location.hostname) { 30 | case URL_HOST_NAME.DEV: 31 | Conf = dev 32 | break 33 | case URL_HOST_NAME.TEST: 34 | Conf = test 35 | break 36 | case URL_HOST_NAME.PROD: 37 | Conf = prod 38 | break 39 | default: 40 | Conf = mock 41 | break 42 | } 43 | } 44 | 45 | export default Conf 46 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 28 | 29 | 44 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-template", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vue-cli-service serve --mode development", 7 | "mock": "vue-cli-service serve --mode mock", 8 | "test": "vue-cli-service serve --mode test", 9 | "build:test": "vue-cli-service build --mode test", 10 | "build": "vue-cli-service build --mode production", 11 | "lint": "vue-cli-service lint", 12 | "prod": "npm run init && npm run build && cp -rf ./dist ./output" 13 | }, 14 | "dependencies": { 15 | "@dw/d-utils": "^1.1.18", 16 | "axios": "^0.18.0", 17 | "pug": "^2.0.3", 18 | "pug-plain-loader": "^1.0.0", 19 | "register-service-worker": "^1.5.2", 20 | "style-resources-loader": "^1.2.1", 21 | "vue": "^2.6.6", 22 | "vue-class-component": "^7.0.2", 23 | "vue-property-decorator": "^8.1.0", 24 | "vue-router": "^3.0.1", 25 | "vue-wechat-title": "^2.0.5", 26 | "vuex": "^3.0.1", 27 | "vuex-class": "^0.3.2" 28 | }, 29 | "devDependencies": { 30 | "@vue/cli-plugin-babel": "^3.4.0", 31 | "@vue/cli-plugin-pwa": "^3.4.0", 32 | "@vue/cli-plugin-typescript": "^3.4.0", 33 | "@vue/cli-service": "^3.4.0", 34 | "less": "^3.0.4", 35 | "less-loader": "^4.1.0", 36 | "typescript": "^3.0.0", 37 | "vue-template-compiler": "^2.5.21" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | console.log(process.env.NODE_ENV) 3 | function resolve (dir) { 4 | return path.join(__dirname, dir) 5 | } 6 | // vue 的配置 7 | module.exports = { 8 | // 部署应用时的基本 URL。用法和 webpack 本身的 output.publicPath 一致,但是 Vue CLI 在一些其他地方也需要用到这个值,所以请始终使用 baseUrl 而不要直接修改 webpack 的 output.publicPath 9 | publicPath: process.env.NODE_ENV === 'production' 10 | ? '/' 11 | : '/', 12 | // 当运行 vue-cli-service build 时生成的生产环境构建文件的目录。注意目标目录在构建之前会被清除 (构建时传入 --no-clean 可关闭该行为)。 13 | outputDir: 'dist', 14 | // 是否在开发环境下通过 eslint-loader 在每次保存时 lint 代码。这个值会在 @vue/cli-plugin-eslint 被安装之后生效。 15 | lintOnSave: 'error', 16 | productionSourceMap: false, 17 | // css相关 18 | css: { 19 | loaderOptions: { 20 | } 21 | }, 22 | devServer: { 23 | proxy: '', 24 | port: 1994 25 | }, 26 | chainWebpack: (config) => { 27 | // 配置alias 28 | config.resolve.alias 29 | .set('vue$', 'vue/dist/vue.esm.js') 30 | .set('@', resolve('src')) 31 | .set('assets', resolve('src/assets')) 32 | .set('components', resolve('src/components')) 33 | .set('config', resolve('src/config')) 34 | .set('style', resolve('src/style')) 35 | .set('utils', resolve('src/utils')) 36 | .set('views', resolve('src/views')) 37 | .set('store', resolve('src/store')) 38 | .set('api', resolve('src/api')) 39 | .set('filter', resolve('src/filter')) 40 | .set('directive', resolve('src/directive')) 41 | // less 42 | const types = ['vue-modules', 'vue', 'normal-modules', 'normal'] 43 | types.forEach(type => addStyleResource(config.module.rule('less').oneOf(type))) 44 | } 45 | } 46 | 47 | function addStyleResource (rule) { 48 | rule.use('style-resource') 49 | .loader('style-resources-loader') 50 | .options({ 51 | patterns: [ 52 | path.resolve(__dirname, './src/style/base.less'), 53 | ], 54 | }) 55 | } -------------------------------------------------------------------------------- /src/components/message/message.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 29 | 30 | -------------------------------------------------------------------------------- /src/components/Message/index.js: -------------------------------------------------------------------------------- 1 | import MyMessage from './Message.vue' 2 | 3 | const Message = { 4 | showMessage: false, 5 | showMessageNew: null, 6 | time: null, 7 | install (Vue, options) { 8 | if (typeof window !== 'undefined' && window.Vue) { 9 | Vue = window.Vue 10 | } 11 | Vue.component('Message', MyMessage) 12 | 13 | Vue.prototype.$msg = (obj, callBack) => { 14 | let opt = MyMessage.data() 15 | 16 | // 这是在main.js时 将用户use的配置写入 覆盖掉默认配置 但这不是最高的配置信息 17 | for (let property in options) { 18 | // 使用 options 的配置 19 | opt[property] = options[property] 20 | } 21 | 22 | // 如果$msg 中没有参数就设置默认的参数信息 23 | if (!(obj instanceof Object)) { 24 | // alert(JSON.stringify(opt)) 25 | // opt.text = obj ? obj : (options ? options.text : opt.text) 26 | if (obj) { 27 | opt.text = obj 28 | } else { 29 | for (let property in obj) { 30 | opt[property] = obj[property] 31 | } 32 | } 33 | } else { 34 | if (typeof obj === 'string') { 35 | opt.text = obj 36 | } else { 37 | // 这是选择优先级最高的参数当最终的参数信息 38 | for (let property in obj) { 39 | // 使用 obj 自己在$msg事实 的配置 40 | opt[property] = obj[property] 41 | } 42 | } 43 | } 44 | 45 | // 判断用户选择的提示类型 46 | var hasType = false 47 | for (var i = 0; i < opt.typeList.length; i++) { 48 | if (opt.typeList[i] === opt.type) { 49 | hasType = true 50 | break 51 | } 52 | } 53 | opt.type = hasType ? opt.type : 'default' 54 | 55 | if (Message.showMessage || Message.showMessageNew) { 56 | // 如果Message还在,则先删除前一个Message 的信息以及定时器 并充值默认信息 57 | clearTimeout(Message.time) 58 | Message.showMessage = false 59 | document.body.removeChild(Message.showMessageNew.$mount().$el) 60 | Message.showMessageNew = null 61 | } 62 | if (!Message.showMessageNew) { 63 | // 创建构造器,定义好提示信息的模板 64 | let MessageT = Vue.extend({ 65 | template: '
' + opt.text + '
', 66 | data () { 67 | return { 68 | isShow: Message.showMessage 69 | } 70 | } 71 | }) 72 | // 创建实例,挂载到文档以后的地方 73 | Message.showMessageNew = new MessageT() 74 | let tpl = Message.showMessageNew.$mount().$el 75 | document.body.appendChild(tpl) 76 | Message.showMessageNew.isShow = Message.showMessage = true 77 | } 78 | 79 | Message.time = setTimeout(function () { 80 | Message.showMessageNew.isShow = Message.showMessage = false 81 | if (typeof callBack === 'function') { 82 | callBack() 83 | } 84 | }, opt.duration) 85 | } 86 | } 87 | } 88 | export default Message -------------------------------------------------------------------------------- /public/img/icons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.11, written by Peter Selinger 2001-2013 9 | 10 | 12 | 148 | 149 | 150 | --------------------------------------------------------------------------------