# 待解决 ## 严格模式下的 vuex 与表单 v-model 双向绑定冲突问题,每个属性单独用 copmputed 定义 getter、setter 可以解决但是太繁琐,目前是在页面上单独定义对象双向绑定监听变化存入 vuex > xwk 2022.4.7 # 踩坑日记 ## perttier 格式化失效 > xwk 2022.4.6 > 详情见 https://github.com/prettier/prettier-vscode/issues/2466 > 禁用 prettier 插件重新启用\安装 ## 多个路由引用同一个 vue 页面时,打开这几个路由后就会有多个 TAB 页,切换 TAB 页时因为这几个路由引用的其实是同一个组件,所以初始数据会保持一致。比如新增页面应该是没有数据的,编辑数据需要回显,但是先打开新增页面再打开编辑页面,新增页面就会同步为编辑页面。 > xwk 2022.4.1 > 一般都是通过监听路由参数变化初始化数据,同时判断路由名称分别处理即可解决 ## perttier 保存时不会自动格式化属性排序、需要执行命令才能格式化 > xwk 2022.3.23 > 在 .vscode/settings.json 配置 ```json { "editor.codeActionsOnSave": { "source.fixAll": true } } ``` ## [Vue Router warn]: Unexpected error when starting the router: SyntaxError: Unexpected token '<' > xwk 2022.3.26 > script 中使用了 jsx 语法但是 lang 没有定义为 jsx 或者 tsx ## [Vue warn]: Maximum recursive updates exceeded. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function. > xwk 0328 > el-tabs 使用 label 插槽,应该是 ElementPlus 的 BUG,[Github 已有 Issues](https://github.com/element-plus/element-plus/issues/6839) > ElementPlus 已在 2.1.7 版本修复了这个 BUG ## Uncaught (in promise) TypeError: Cannot read properties of null (reading 'shapeFlag') > xwk 0330 > 对 props 使用对象展开符可能会展开 null ## 偶现 SVG 图标颜色渲染异常 > xwk 0328 > 可能是 vite-plugin-svg-icons 插件导致的问题,改用 vite-svg-loader 插件