上一页 1 2 3 4 5 6 7 8 9 10 ··· 60 下一页
摘要: .eslintrc.js的rules里面加入 'vue/no-multiple-template-root': 'off', 问题解决 阅读全文
posted @ 2023-07-31 11:20 洛晨随风 阅读(51) 评论(0) 推荐(0)
摘要: 参考:https://web.dev/optimize-long-tasks/?utm_source=devtools 阅读全文
posted @ 2023-07-17 14:38 洛晨随风 阅读(60) 评论(0) 推荐(0)
摘要: 1. 如果key重复的话,在对数据进行filter过滤后渲染到界面时会出现重复数据的情况,所以key不能重复 2.watch的监听顺序: watchSyncEffect → watchEffect → onBeforeUpdate → watchPostEffect → onUpdated 阅读全文
posted @ 2023-06-09 10:36 洛晨随风 阅读(24) 评论(0) 推荐(0)
摘要: interface Palette { red: number[]; green: string; blue: number[]; black?: boolean; } type Colors = 'red' | 'green' | 'blue'; type RGB = [number, numbe 阅读全文
posted @ 2023-05-11 10:36 洛晨随风 阅读(302) 评论(0) 推荐(0)
摘要: //infer 推断一个变量的类型 type arr<T> = Array<T extends () => infer U ? U : string>; //此时传入的类型T是number | string,不属于类型()=>infer U所以返回的是string type menus = arr< 阅读全文
posted @ 2023-03-28 11:25 洛晨随风 阅读(237) 评论(0) 推荐(0)
摘要: //引入 icon import { Select } from '@element-plus/icons-vue' return h(Select, { // 这里写属性 width: '1rem', height: '1.5rem' }) 阅读全文
posted @ 2023-02-27 16:51 洛晨随风 阅读(744) 评论(0) 推荐(0)
摘要: 对于TS,我用的是ts-node,npm全局安装, launch.json: { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "v 阅读全文
posted @ 2023-02-10 10:40 洛晨随风 阅读(403) 评论(0) 推荐(0)
摘要: 在vue3中,我用 reactive声明了一个属于form表单的state,我需要在提交时对其中的某些属性进行验证通过后调用emit方法提交数据到父组件,这时我对emit里面提交的数据做了如下处理: const ok = (ruleFormRef: any | undefined) => { if 阅读全文
posted @ 2023-02-07 11:11 洛晨随风 阅读(111) 评论(0) 推荐(0)
摘要: 父传子: <script> /** * @type {string} * 类型注释要这么写,相当于vue和react的props */ export let title; </script> <div> <!-- 如果你需要引用传递到组件中的所有道具,包括未使用export声明的道具,可以利用$$p 阅读全文
posted @ 2023-01-13 17:09 洛晨随风 阅读(670) 评论(0) 推荐(0)
摘要: <el-form :model="state" validate-on-rule-change="false"> <el-form-item :key="item.key" :label="item.field" :prop=//这里要使用:数据集合list.index.input组件绑定的值的名称 阅读全文
posted @ 2022-11-25 17:35 洛晨随风 阅读(2724) 评论(4) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 60 下一页