摘要:
转载:https://www.jianshu.com/p/dffc45236fda 其中涉及到的bota和atob函数参考:https://blog.csdn.net/MRlaochen/article/details/120284076 阅读全文
摘要:
目前已知的可以让大屏实现缩放的vue插件有: vue3-scale-box 等 具体可以在npm上找一下相关文档参考, 他们有一个问题就是所有内容只能显示在一屏里,这不免会造成图像的拉伸,所以解决方案就是采用滚动条的设计去容纳大屏的更多内容,直接上代码: // web定稿尺寸 1920*1080 l 阅读全文
摘要:
.eslintrc.js的rules里面加入 'vue/no-multiple-template-root': 'off', 问题解决 阅读全文
摘要:
参考:https://web.dev/optimize-long-tasks/?utm_source=devtools 阅读全文
摘要:
1. 如果key重复的话,在对数据进行filter过滤后渲染到界面时会出现重复数据的情况,所以key不能重复 2.watch的监听顺序: watchSyncEffect → watchEffect → onBeforeUpdate → watchPostEffect → onUpdated 阅读全文
摘要:
interface Palette { red: number[]; green: string; blue: number[]; black?: boolean; } type Colors = 'red' | 'green' | 'blue'; type RGB = [number, numbe 阅读全文
摘要:
//infer 推断一个变量的类型 type arr<T> = Array<T extends () => infer U ? U : string>; //此时传入的类型T是number | string,不属于类型()=>infer U所以返回的是string type menus = arr< 阅读全文
摘要:
//引入 icon import { Select } from '@element-plus/icons-vue' return h(Select, { // 这里写属性 width: '1rem', height: '1.5rem' }) 阅读全文
摘要:
对于TS,我用的是ts-node,npm全局安装, launch.json: { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "v 阅读全文
摘要:
在vue3中,我用 reactive声明了一个属于form表单的state,我需要在提交时对其中的某些属性进行验证通过后调用emit方法提交数据到父组件,这时我对emit里面提交的数据做了如下处理: const ok = (ruleFormRef: any | undefined) => { if 阅读全文