Browse Source

更新readme

Caner 3 years ago
parent
commit
be27b2d8a5
1 changed files with 17 additions and 14 deletions
  1. 17 14
      README.md

+ 17 - 14
README.md

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