
Vue3
喵喵虫
前端开发
展开
-
threeJS使用OutlinePass场景会变暗(颜色不对)
threeJS使用OutlinePass场景变暗原创 2023-07-11 20:15:46 · 2147 阅读 · 0 评论 -
vite+vue3配置rollupOptions打包报错
vite+vue3配置rollpupOptions打包报错原创 2023-05-22 15:52:38 · 4676 阅读 · 1 评论 -
uniapp开发App上传formData文件
在uniapp中上传文件(FormData)发现uni.request不支持FormData。使用chooseImage+uploadFiles解决原创 2022-12-20 14:10:04 · 5626 阅读 · 0 评论 -
TypeError: parentComponent.ctx.deactivate is not a function
vue3在使用keep-alive出现切换页面报错vue-router.esm-bundler.js?f6c4:3295 TypeError: parentComponent.ctx.deactivate is not a function at unmount (runtime-core.esm-bundler.js?9e79:4686) at patch (runtime-core.esm-bundler.js?9e79:3664) at Ob原创 2021-12-14 18:05:25 · 10293 阅读 · 0 评论 -
quasar2.0+vue3+cordova打包和开发遇到的问题
bug1(配置好安卓系统环境遍历后会出现undefined)ANDROID_SDK_ROOT=undefined (recommended setting)ANDRIOD_HOME=undefined(删除)解决办法使用开发者权限打开命令窗,然后跳转到目录执行命令,undefined就会变成路径。bug2(Installed Build Tools revision 31.0.0 is corrupted.)* What went wrong:Could not determine the原创 2021-12-12 14:27:44 · 2288 阅读 · 1 评论 -
[vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler
在使用webpack5打包vue的时候报错([vue-loader] vue-template-compiler must be installed as a peer dependency, or a compatible compiler implementation must be passed via options.)在网上查阅Webpack 默认只会解析[’.js’, ‘.json’, ‘.wasm’]这三种格式的文件,如果想识别vue需要使用extensionsmodule.exports原创 2021-11-05 10:49:23 · 767 阅读 · 0 评论 -
vue-cli3以上的项目中引入全局less文件并且可有使用less文件里面的变量
问题:在项目中的app页面中引入less文件没有设置scoped,在其他页面使用less文件变量发现报错。然后百度在官网看到解决办法作用:可以引入全局变量。第一步:cnpm i style-resources-loader -D第二步:在vue.config.js里面配置 官网案例...原创 2021-11-04 14:59:21 · 273 阅读 · 0 评论 -
Conflict: Multiple assets emit different content to the same filename static/js/.gz
在给vue.config.js配置gzip压缩时出现:Conflict: Multiple assets emit different content to the same filename static/js/.gz1)问题查找:上网查找是版本升级了,当前配置与版本不同// 当前插件版本 "compression-webpack-plugin": "^6.1.1", // 在vue.config.js的配置 config.plugins.push( new C原创 2021-11-04 11:31:43 · 3125 阅读 · 0 评论 -
vue设置全局变量解决‘Cesium‘ is not defined.
在vue-cli3脚手架以上的版本设置全局变量在项目最外层找到**.eslintrc.js**然后添加globalsmodule.exports = { root: true, env: { node: true }, globals: { "Cesium": true // 这里添加变量名称不会报错 }, extends: [ 'plugin:vue/vue3-essential', '@vue/standard' ], parserO原创 2021-11-03 13:04:54 · 4606 阅读 · 0 评论 -
webpack5+vue3+three.js打包vue插件遇到插件静态资源无法找到文件的问题(hdr,wasm,gltf,,,等静态文件)
问题描述:在使用webpack5+three.js写vue3插件时候,在加载hdr环境贴图使用的绝对路径无法正确加载main.js?be46:51335 THREE.RGBELoader Bad File Format: bad initial token // 加载hdr图片失败main.js?be46:65347 SyntaxError: Unexpected token < in JSON at position 0 // 加载模型失败 at JSON.parse (<an原创 2021-09-28 15:22:17 · 2522 阅读 · 0 评论 -
webpack5+vue-loader:{__file: ‘src/vue/compass.vue‘} __file:“src/vue/compass.vue“[[Prototype]]:Object
使用webpack5+vue-loader出现vue页面不解析:打印vue页面只是路径{__file: 'src/vue/compass.vue'}__file: "src/vue/compass.vue"[[Prototype]]: Object原因:<font color=#999AAA我在项目中处理了静态文件 // 其他资源 { exclude: /\.(css|js|html|json|less|png|jpg|gif)$/,原创 2021-09-23 09:29:48 · 285 阅读 · 0 评论 -
Error: [VueLoaderPlugin Error] No matching use for vue-loader is found. Make sure the rule matching
项目场景:使用webapck5打包vue3插件引入vue-loader出现Error: [VueLoaderPlugin Error] No matching use for vue-loader is found. Make sure the rule matching .vue files include vue-loader in its use.解决办法:把vue-loader拿到首位就可以解决 module: { rules: [ { tes原创 2021-09-22 16:45:02 · 4795 阅读 · 4 评论 -
webpack5打包vue3的插件(vue页面打包配置)
使用原生JavaScript+webpack5+vue3做vue3插件测试:使用webapck5插件:一定要查看是不是vue3,如果是vue2会编译器不一样 "vue": "^3.2.8", "vue-loader": "^16.5.0", "webpack": "^5.52.0", "@vue/compiler-sfc": "^3.2.8"webpack.config.js配置vueconst CopyWebpackPlugin = require('co原创 2021-09-05 00:11:57 · 856 阅读 · 0 评论 -
vue3动态路由懒加载Error: Cannot find module ‘@/views/xxx‘ at webpackEmptyContext
项目场景:最近在使用vue3+elementPlus做后台管理的权限管理,在动态添加路由懒加载出现问题问题描述:export const loadView = view => { // 路由懒加载 return () => import(`@/views/${view}`); // 报错 // return () => require(`@/views/${view}`); // 报错 // return resolve => requi原创 2021-07-28 08:54:06 · 2349 阅读 · 2 评论 -
Uncaught (in promise) TypeError: l.indexOf is not a function
项目场景:vue+element-plus问题描述:element-plus的table进行数据展示时出现Uncaught (in promise) TypeError: l.indexOf is not a function ![在这里插入图片描述](https://img-blog.csdnimg.cn/3a653b336982438eb381fcbd27fae6ef.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,sh原创 2021-07-23 09:04:25 · 2424 阅读 · 0 评论 -
TypeError: Cannot use ‘in‘ operator to search for ‘path‘ in undefined
项目场景:使用vue3+element-Puls开发项目问题描述:在写路由页面得router-view出现bug 原因分析: <div class="right-content"> <router-link /> </div>原来是名字写错了,link必须有to才会报那个错解决方案: <div class="right-content">原创 2021-07-13 10:53:00 · 7984 阅读 · 0 评论 -
安装sass/node-loader出现Syntax Error: TypeError: this.getOptions is not a function
项目场景:项目中使用scss出现问题描述:![在这里插入图片描述](https://img-blog.csdnimg.cn/20210709110517388.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L21taWFvQ2hvbmc=,size_16,color_FFFFFF,t_70 原因分析:网上查阅是node-sass和sa原创 2021-07-09 11:07:47 · 271 阅读 · 0 评论 -
vue3出现Component “default“ in record with path “xxx“ is a function that does not return aPromise.
项目场景:Component "default" in record with path "/build-detail" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.问题描述:单原创 2021-07-07 10:37:51 · 8354 阅读 · 1 评论 -
windowserver2008部署前端项目出现404
项目场景:在windowserver2008上面发布threejs模型网站问题描述:出现静态资源找不到:Failed to load resource: the server responded with a status of 404 原因分析:出现404是因为路径或者解析不了第一步查看项目部署的静态文件开启了没有如果没有开需要开启重启服务看是否成功。第二步如果上面还不行那就看访问的网站如果index页面可以加载进来,就是有些文件无法加载。那就有可能是因为无法解析请求。原创 2021-05-27 13:07:54 · 415 阅读 · 0 评论 -
vue3 出现‘obj‘ is never reassigned. Use ‘const‘ instead
‘obj’ is never reassigned. Use ‘const’ instead原因:这个报错的意思是检测到使用let关键字声明的变量,在初始分配后从未重新分配变量,将let替换成const,减少认知负荷并提高可维护性。解决办法:在.eslintrc.js文件中添加规则 { "rules":{ "prefer-const": "off" } }let改为const...原创 2021-05-09 17:33:55 · 6560 阅读 · 2 评论