|
|
@@ -36,22 +36,24 @@
|
|
|
```
|
|
|
import { onMounted, ref, computed} from 'vue'
|
|
|
<script setup>
|
|
|
- <!-- 函数new区 -->
|
|
|
+ <!-- 函数new区 -->
|
|
|
const test = new DataServer()
|
|
|
- <!-- data 数据声明区 -->
|
|
|
- exp:
|
|
|
- const test=ref(1)
|
|
|
- const test1:computed(()=>test)
|
|
|
|
|
|
- <!-- function 调用区 -->
|
|
|
- exp:
|
|
|
- function name(){
|
|
|
- console.log(123)
|
|
|
- }
|
|
|
+ <!-- data 声明区 -->
|
|
|
+ const test=ref(1)
|
|
|
+ const test1:computed(()=>test)
|
|
|
|
|
|
- <!-- 单独生命周期监听区 -->
|
|
|
- exp:
|
|
|
- onMounted(() => {test()})
|
|
|
+ <!-- fn 声明区 -->
|
|
|
+ function name(){
|
|
|
+ console.log(123)
|
|
|
+ }
|
|
|
+ test().then(res=>{})
|
|
|
+
|
|
|
+ <!-- vue 方法区 -->
|
|
|
+ onMounted(() => {test()})
|
|
|
+
|
|
|
+ <!-- 函数调用区 -->
|
|
|
+ name()
|
|
|
</script>
|
|
|
<template></template>
|
|
|
<style></style>
|
|
|
@@ -85,7 +87,8 @@ import { onMounted, ref, computed} from 'vue'
|
|
|
/**
|
|
|
* 这种用于描述类、复杂函数用途及参数等
|
|
|
*/
|
|
|
-
|
|
|
+* 函数调用
|
|
|
+ * async 在没有其它函数调用的情况下,写成.then
|
|
|
### CSS
|
|
|
* 不允许使用无封装或不唯一的全局类样式,必须使用时需备注说明并慎重选择类名
|
|
|
* 颜色赋值使用 `var(--color-a)` 写法,无特殊说明不允许直接赋值
|