Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.86 KB

问题.md

File metadata and controls

58 lines (39 loc) · 1.86 KB

解决

  • 修改 package.json;
  • 删除 node_modules
  • 删除 package-lock.json
  • npm install

注意: SVG 2 删除了对 xlink 命名空间的需要,所以不 xlink:href 应该使用 href。

ts 和 webpack 好像会冲突


Module parse failed: Unexpected token (8:27)
File was processed with these loaders:

- ./node_modules/vue-loader-v16/dist/templateLoader.js

history 模式下 path 的问题

当前环境下 history 模式,如果 path 的值为'/a/b'这种,会报错。但在 vue-router 官网示例中是可以的。

vue-router.esm-bundler.js?6c02:3302 Error at __webpack_exports__.default

vuex 模式无法识别

  • 加上 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>

css 样式

计算属性值

calc(100% - #{$sideBarWidth});符号和值之间要空格