IDE
vscode setting.json 配置
增加 ↓↓↓
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
钉钉文档
1.主要
dv3 定义v3文件模版
dv3-page 以<Page>壳组件定义v3文件模版 ⭐️荐⭐️
Page接收type来识别使用哪个壳样式,type: UI | ''
v3- 使用vue3的片段
{
props: 使用传参,
data: 定义data,
cpu: 使用computed,
watch: 使用watch,
this: 使用proxy获取实例,
mounted: 使用挂载周期,
unmounted: 使用卸载周期
emit: 使用emit,
expose: 抛出事件可让父组件调用,
store: 使用inject注入store,
router: 使用router,
route: 使用route,
slot: 插入slot模版片段,
fakeData: 假数据方法,
}
uni-
使用uniapp的片段
init-
使用初始化通用代码
flex-
flex布局
fs 字号
txt-
字色
bg-
背景色
m
外边距
m0-5 m5-0 双向写法
ml | mt | mr | mb 一侧写法
p
内边距
p0-5 p5-0 双向写法
pl | pt | pr | pb 一侧写法
2. store
- 实例内
tstate
tcommit
tdispatch
- 仓库内
to
3. element
4. 组件
5. 工具类
- 假数据-dfakeData
- 判断类型-const type = this.$getType(v) // type为各类型的大驼峰写法字符串,如'Number','String'
6. 自定义模版
- 表单校验js方法,dvalidate-formjs
7. 定义类