摘要:
Promise封装 Created: Sep 12, 2020 3:42 PM 分类: promise 文件路径: utils/asyncWx.js 使用Promise封装小程序常用方法以封装解决回调地狱问题 /** * promise形式 getSetting * @returns {Promis 阅读全文
摘要:
官方文档: evrone/postcss-px-to-viewport 安装 npm install postcss-px-to-viewport --save-dev vue.config.js module.exports = { css: { loaderOptions: { postcss: 阅读全文
摘要:
图片上传 Created: Aug 26, 2020 4:32 PM 分类: 技术点 技术: 图片上传 文件: src/views/Edit.vue /** * 图片上传 * @param file 图片 * @returns {Promise<void>} */ async afterRead(f 阅读全文
摘要:
Vue路由 meta属性 Created: Aug 26, 2020 4:07 PM 分类: 技术点 技术: meta, router 文件: src/router/index.js 设置meta属性 { path: '/userinfo', component: userinfo, meta: { 阅读全文
摘要:
icon图标使用 Created: Aug 26, 2020 11:13 AM 分类: 技术点 技术: 字体图标 文件: src/assets/fonts 下载字体图标库 https://icomoon.io/ https://www.iconfont.cn/ 将目录解压,将font文件夹移动到as 阅读全文
摘要:
keep-alive组件 Created: Aug 25, 2020 10:51 PM 分类: 技术点 技术: keep-alive 文件: src/App.vue 这个是官网的简介 Props: include - 字符串或正则表达式。只有名称匹配的组件会被缓存。 exclude - 字符串或正则 阅读全文
摘要:
监听路由 Created: Aug 26, 2020 4:27 PM 分类: 技术点 技术: 路由监听 文件: src/views/Article.vue watch: { /** * 监听路由变化重新渲染 */ $route() { this.articleItemData() this.comm 阅读全文
摘要:
VueX Created: Aug 15, 2020 4:42 PM 分类: 技术点 技术: VueX 文件: src/store/action.js, src/store/index.js, src/store/mutation.js Vuex 是一个专为 Vue.js 应用程序开发的状态管理模式 阅读全文
摘要:
router常用方法 Created: Aug 15, 2020 4:42 PM 分类: 技术点 技术: router 文件: src/components/NavHeader.vue Vue-router常用方法 通过push跳转 this.$router.push('/cart') //官方介绍 阅读全文
摘要:
路由预加载 Created: Aug 14, 2020 11:18 PM 分类: 小技巧 技术: 路由懒加载, 预加载 文件: src/router/index.js, vue.config.js 当打包构建应用时,JavaScript 包会变得非常大,影响页面加载。如果我们能把不同路由对应的组件分 阅读全文