随笔分类 - Vue学习
摘要:1、创建vite项目,安装electron,electron从23开始不支持win7,win8.1所以我用最后一个版本 pnpm create vite pnpm ADD -D electron@22.3.27 pnpm i vite-plugin-electron -D 2、创建electron的
阅读全文
摘要:1、刚开始一直安装 vue-baidu-map,他适用于vue2,一直处于不识别_BMap 2改用:vue-baidu-map-3x 安装后配置main.ts import BaiduMap from "vue-baidu-map-3x"; app.use(BaiduMap, { // ak 是在百
阅读全文
摘要:1、改变vue模式为history,小编没有试 2、通过配置nginx实现 A、替换跳转网址中的#为其他字符串,例如我的 const url = this._getUrl( "https://open.weixin.qq.com/connect/oauth2/authorize", { appid:
阅读全文
摘要:<script src="https://cdn.bootcdn.net/ajax/libs/eruda/2.3.3/eruda.min.js"></script> <script>eruda.init()</script> <script src="https://unpkg.com/vconso
阅读全文
摘要:nvm 安装,下载exe https://github.com/coreybutler/nvm-windows/releases 安装建议设置安装路径其他: 配置nodejs的安装路径: 完成安装之后,可以通过window+R,输入powershell,在终端输入nvm -v检测是否安装成功。 nv
阅读全文
摘要:简介在我们日常使用中,经常会遇到需要去除前缀得情形,比如我们在做多个服务项目时,在nginx中我们需要把https://moonce.com/user-api/permission?userId=1 转发到 http://localhost:8089/permission?userId=1 完整代理
阅读全文
摘要:项目场景: vite、ts、vue3、element-plus、axios等技术的开发的后台管理系统。 问题描述 在开发中遇到一个问题,就是main.ts已经全局注册了ElementPlus,但是在业务开发的vue页面中,一些element-plus的el-row、el-card等提示JSX元素类型
阅读全文
摘要:点击【 Font class 】- 【 下载至本地 】,解压之后导入到项目【/src/assets/icon】,这个是【iconfont.css】文件。 然后在main.js中导入 import '@/assets/icon/iconfont.css' 然后引用就行 <span class="ico
阅读全文
摘要://key为string , value为numbervar map: { [key: string]: number; } = { "t" : 3, "o" : 5, "g" :10};for(let k in map){ console.log(map[k]);}
阅读全文
摘要:in ./node_modules/screenfull/index.js Module parse failed: Unexpected token (55:42) You may need an appropriate loader to handle this file type, curre
阅读全文
摘要:// typings.d.ts declare module '*.json' { const value: any; export default value; } 在项目的根目录中找到的tsconfig.json文件,然后添加一个新行:“resolveJsonModule”:true, 需要在t
阅读全文
摘要:在使用ts开发时,引入图片报错 import img from '../../assets/images/logo.png'; 找不到模块“../../assets/images/foo.png”或其相应的类型声明。 因为typescript无法识别非代码资源。我们需要主动的去声明这个module
阅读全文
摘要:Issues checking service aborted - probably out of memory. Check the `memoryLimit` option in the ForkTsCheckerWebpackPlugin configuration.If increasing
阅读全文
摘要:图片: .jpeg格式:image/jpeg .png格式: image/png .gif格式: image/gif 音频: .mp3格式:audio/mpeg 视频: .mp4格式:video/mp4 .m3u8格式:application/x-mpegURL .mov格式:video/x-ms-
阅读全文
摘要:const nav = (window.navigator as any); if (nav.msSaveOrOpenBlob) { nav.msSaveOrOpenBlob(data, filename); }
阅读全文
摘要:https://www.npmjs.com/package/vue3-sketch-ruler/v/1.1.5?activeTab=versions 安装后,发现 这个没有 复制完代码,准备运行,发现缺少 vue-demi 感觉vue2整的不彻底 ,没办法,yarn add vue-demi <te
阅读全文
摘要:最近使用vue ui创建了一个vue3+typescript项目,需要配置代码格式化和git提交信息规范。 使用vue UI创建的时候,使用eslint 选择项目总是错误。搞得一头雾水,没办法单独添加ESlint Vue3的开发插件使用了尤大推荐的Volar,Volar插件中没有Eslint和Pre
阅读全文
摘要:1、启用了变量语法校验,多类型可以加上问好 2、安装方式 vue add typescript 3、Ucc clasee-style component syntax?(是否使用class风格的组件语法,我不习惯) 选择NO,一起他一路yes 4、对象的定义,直接是interface 对象名称{对象
阅读全文
摘要:node版本对应的node-sass node-sass与sass-loader版本匹配 参见如上文章解决: 先卸载:npm uninstall sass-loadernpm uninstall node-sass -D12再安装使用cnpm安装,我用npm报错了cnpm install sass-
阅读全文
摘要:<a href="http://www.baidu.com" target="_blank" @click="afun($event)">百度</a> <a href="https://www.taobao.com" target="_blank" @click.prevent="dothis">淘
阅读全文