![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vuecli4
文章平均质量分 66
呆呆bg
时光短暂
展开
-
vue2的 vuex 模块化引入 require.context
store的index.js文件中: Vue.use(Vuex); const modulesFiles = require.context('./modules', true, /\.js$/) const modules = modulesFiles.keys().reduce((modules, modulePath) => { const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1') const value = mod原创 2020-11-25 09:52:31 · 662 阅读 · 0 评论 -
vue3 reactive ref getCurrentInstance watch 与生命周期 (简单todolist)
<template> <div class="user_list"> <p>{{aa}}</p> <p>{{userlist.adddata.name}}</p> <p>{{num}}</p> <input type="text" v-model="userlist.adddata.name"> <input原创 2020-10-12 21:14:51 · 5002 阅读 · 0 评论 -
vuecli4手机端 px自适应配置 (px转rem)
npm install amfe-flexible --S npm install postcss-pxtorem --S 在vue.config.js里面配置 ;如果没有这个文件夹在根目录下面创建一个 module.exports = { css: { loaderOptions: { postcss: { plugins: [ require("autoprefixer")({ // 配置使用原创 2020-08-19 16:08:38 · 360 阅读 · 1 评论 -
vuecli4 vue3.0改变路径为hash路径
history: createWebHashHistory(process.env.BASE_URL), hash 路由 createWebHistory history 路由 createMemoryHistory 带缓存 history 路由 parseQuery 查询参数反序列化 stringifyQuery 查询参数序列化 onBeforeRouteLeave 路由离开钩子 作者:直立猿 链接:https://www.jianshu.com/p/2b7001c0b6e0 来源:简书 著作权归作者转载 2020-08-19 16:05:17 · 2504 阅读 · 0 评论