随笔分类 -  Vue3

摘要:在尝试运行pnpm或npm命令时遇到安全错误,系统禁止了脚本的执行。解决方案是通过管理员权限打开Windows PowerShell,输入`set-ExecutionPolicy RemoteSigned`并确认更改执行策略,之后重启即可正常运行。 是Windows PowerShell 不是 命令 阅读全文
posted @ 2024-12-02 17:13 googlegis 阅读(265) 评论(0) 推荐(0) 编辑
摘要::active-value="1",这样是number类型,传值1, active-value="1",是字符串类型,传值需要“1” 阅读全文
posted @ 2024-03-26 11:13 googlegis 阅读(155) 评论(0) 推荐(0) 编辑
摘要:网上查应该是node导致的内存溢出,64位电脑默认1.4G,32位电脑默认0.7G 在package.json 中的 Scripts 中添加 node 的参数 "scripts": { "serve": "node --max_old_space_size=10240 node_modules/@v 阅读全文
posted @ 2023-03-23 13:40 googlegis 阅读(96) 评论(0) 推荐(0) 编辑
摘要:由于升级Nodejs版本造成的,一般创建项目时为16.7.0版本,然后安装或升级了更高版本,再进行run的时候,会提示。 Error message "error:0308010C:digital envelope routines::unsupported" 解决方法: 1. 降级nodejs的版 阅读全文
posted @ 2023-03-23 13:33 googlegis 阅读(124) 评论(0) 推荐(0) 编辑
摘要:HI!大家好,好久沒有記錄JavaScript的筆記了XD,在昨天研究Vue的時後突然看到了沒看過的東西,其實還有很多啦!只是這兩個function就剛好被我遇到,所以去查了一下他們的原理,欸!說了那麼多那到底是什麼?以下文章開始! 首先提一下JavaScript的事件,不管是onclick或onc 阅读全文
posted @ 2023-02-09 13:54 googlegis 阅读(28) 评论(0) 推荐(0) 编辑
摘要:在 a-tree 中设置了 :defaultExpandAll="true" 但是,tree 中的数据并没有展开, 那是因为默认设置在 tree 中的 data 为空的时候,就起作用了,所以当再赋值新的 数据时, 这个属性不会再次生效, 要在 a-tree 中加个条件,当数据长度大于0 , 再启用这 阅读全文
posted @ 2022-07-27 14:55 googlegis 阅读(1373) 评论(0) 推荐(1) 编辑
摘要:1 document.addEventListener("keyup", function(e) { 2 console.log("按键:", e.key) 3 if (e.key "Escape") { 4 ClearMapTool() 5 } 6 }) 直接使用document 的 keyup 阅读全文
posted @ 2022-07-25 14:37 googlegis 阅读(2546) 评论(0) 推荐(0) 编辑
摘要:1. 安装 mockjs 和 vite-plugin-mock npm i mockjs vite-plugin-mock --save-dev 2. 在 vite.config.ts 文件中配置 vite-plugin-mock , 貌似安装的mock相关在这里注册就可以,其它的文件不需要引用mo 阅读全文
posted @ 2022-07-20 09:05 googlegis 阅读(2293) 评论(0) 推荐(0) 编辑
摘要:1 import md5 from 'md5' 2 3 // 创建 Vue 实例 4 const app = createApp(App) 5 6 // 把插件的 API 挂载全局变量到实例上 7 app.config.globalProperties.$md5 = md5; 8 9 // 你也可以 阅读全文
posted @ 2022-07-09 15:34 googlegis 阅读(616) 评论(0) 推荐(0) 编辑
摘要:编写自定义插件 1 // src/plugins/directive.ts 2 import type { App } from 'vue' 3 4 // 插件选项的类型 5 interface Options { 6 // 文本高亮选项 7 highlight?: { 8 // 默认背景色 9 b 阅读全文
posted @ 2022-07-09 15:26 googlegis 阅读(544) 评论(0) 推荐(0) 编辑
摘要:1. style 中使用v-bind 不支持响应式渲染 1 <template> 2 <p class="msg">Hello World!</p> 3 </template> 4 5 <script lang="ts"> 6 import { defineComponent, ref } from 阅读全文
posted @ 2022-07-09 11:25 googlegis 阅读(288) 评论(0) 推荐(0) 编辑
摘要:1 <template> 2 <input 3 type="text" 4 v-model="tagsStr" 5 placeholder="请输入标签,多个标签用英文逗号隔开" 6 /> 7 </template> 8 9 <script lang="ts"> 10 import { define 阅读全文
posted @ 2022-07-09 10:44 googlegis 阅读(724) 评论(0) 推荐(0) 编辑
摘要:1 // 请求列表 2 const getArticleList = async (): Promise<void> => { 3 // ... 4 articleList.value = await axios({ 5 method: 'get', 6 url: apiUrl.value, 7 / 阅读全文
posted @ 2022-07-09 10:35 googlegis 阅读(544) 评论(0) 推荐(0) 编辑
摘要:1 // 不要忘了导入要用的 API 2 import { defineComponent, reactive, watch } from 'vue' 3 4 export default defineComponent({ 5 setup() { 6 // 定义一个响应式数据 7 const us 阅读全文
posted @ 2022-07-09 09:28 googlegis 阅读(3439) 评论(0) 推荐(1) 编辑
摘要:内容来自于: https://vue3.chengpeiquan.com/component.html#变量的读取与赋值-1 如果你使用常规的重置,会导致这个变量失去响应性: 1 /** 2 * 不推荐使用这种方式 3 * 异步添加数据后,模板不会响应更新 4 */ 5 let uids: numb 阅读全文
posted @ 2022-07-09 09:05 googlegis 阅读(2398) 评论(0) 推荐(0) 编辑
摘要:This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. 对引用的方式进行修改 import md5 阅读全文
posted @ 2022-07-08 14:40 googlegis 阅读(695) 评论(0) 推荐(0) 编辑

坐标合肥,非典型GIS开发人员 GitHub

点击右上角即可分享
微信分享提示