- 修改 package.json;
- 删除 node_modules
- 删除 package-lock.json
- npm install
注意: SVG 2 删除了对 xlink 命名空间的需要,所以不 xlink:href 应该使用 href。
Module parse failed: Unexpected token (8:27)
File was processed with these loaders:
- ./node_modules/vue-loader-v16/dist/templateLoader.js
当前环境下 history 模式,如果 path 的值为'/a/b'这种,会报错。但在 vue-router 官网示例中是可以的。
vue-router.esm-bundler.js?6c02:3302 Error at __webpack_exports__.default
- 加上 namespaced: true 的话,当模块被注册后,它的所有 getter、action 及 mutation 我们就可以通过以下方式来写了,例如
store.commit('app/triggerSidebarOpened')
- 在 locale 文件夹下导入
import store from '@/store'
为 undefined
点击事件不能放在图标上
<div @click="toggle">
<el-tooltip
:content="$t('navBar.screenfull')"
:effect="effect"
placement="bottom"
>
<svg-icon :icon="isFullscreen ? 'exit-fullscreen' : 'fullscreen'" />
</el-tooltip>
</div>
calc(100% - #{$sideBarWidth});
符号和值之间要空格