问题1:Duplicate export of 'default'或者SyntaxError: Identifier '.default' has already been declared

解决:修改line separator为CRLF。使用的webstorm开发新建的vue文件,应该是默认的LF,所有旧的组件路由都没有问题,就只有这个比较新的报错了,具体原因不懂为啥这个都能导致报错

问题2:You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build无法在运行时版本中使用 Vue 的模板编译功能

解决:将该组件单独抽出为一个vue文件,通过组件方式引入使用


余命三日Coder
1 声望0 粉丝