diff --git a/src/assets/main.css b/src/assets/main.css index d6e0d43a74f7c8adbf0c2f4e3fc77502f0761180..1f394c0e431d762a4079c565fb056403c88ecb78 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,10 +1,7 @@ @import "./base.css"; #app { - max-width: 1280px; - margin: 0 auto; padding: 2rem; - font-weight: normal; } @@ -23,13 +20,10 @@ a, @media (min-width: 1024px) { body { - display: flex; place-items: center; } #app { - display: grid; - grid-template-columns: 1fr 1fr; padding: 0 2rem; } } @@ -51,7 +45,7 @@ a, .match-width { width: 100%; } -fixtop { +.fix-top { position: fixed; top: 20px; right: 20px; diff --git a/src/views/lesson-1.vue b/src/views/lesson-1.vue index ac592018ce711c7a275a6d5bf86758d142a90172..e1e553af3087c4a7ea0e003b9621a582bd65159c 100644 --- a/src/views/lesson-1.vue +++ b/src/views/lesson-1.vue @@ -5,125 +5,143 @@
基本数据类型

num: {{num}}

- - 变量名 - 变量引用 - 变量值 - - - refNum - ref(num) - {{refNum}} +
+
变量名
+
变量引用
+
变量值
+
+
+
+
refNum
+
ref(num)
+
{{refNum}}
- - - reactNum - reactive(num) - {{reactNum}} +
+
+
reactNum
+
reactive(num)
+
{{reactNum}}
- +
对象类型 - -
-
-
obj: {{obj}}
-
refObj = ref(obj): {{refObj}}
-
reactObj = reactive(obj): {{reactObj}}
-
- - - 变量名 - 变量引用 - 变量值 - - -
-
- - - refObj.num - - {{'' + refObj.num}} +
+
obj: {{obj}}
+
refObj = ref(obj): {{refObj}}
+
reactObj= reactive(obj): {{reactObj}}
+
+ +
+
变量名
+
变量引用
+
变量值
+
+
+
+
refObj.num
+
+
{{'' + refObj.num}}
- - - reactObj.num - - {{'' + reactObj.num}} +
+
+
reactObj.num
+
+
{{'' + reactObj.num}}
- +
- - refObjNum - ref(obj).num - {{'' + refObjNum}} +
+
refObjNum
+
ref(obj).num
+
{{'' + refObjNum}}
- - - reactObjNum - reactObj.num - {{'' + reactObjNum}} +
+
+
reactObjNum
+
reactObj.num
+
{{'' + reactObjNum}}
- - - refObjValueNum - refObj.value.num - {{'' + refObjValueNum}} +
+
+
refObjValueNum
+
refObj.value.num
+
{{'' + refObjValueNum}}
- - - reactObjValueNum - reactObj.value.num - 代码错误 - - - - reactObjChild.a - reactObj.child.a - {{'' + reactObjChild.a}} - - +
+
+
reactObjValueNum
+
reactObj.value.num
+
代码错误
+ +
+ 对象类型 +
+
refObj = ref(obj): {{refObj}}
+
reactObj = reactive(obj): {{reactObj}}
+
refObjChild = refObj.child: {{refObjChild}}
+
reactObjChild = reactObj.child: {{reactObjChild}}
+
- - refObjNumToRef - toRef(refObj.num) - {{'' + refObjNumToRef}} +
+
变量名
+
变量引用
+
变量值
+
+
+
+
refObjChild.a
+
refObj.child.a
+
{{'' + refObjChild.a}}
+ +
+
+
reactObjChild.a
+
reactObj.child.a
+
{{'' + reactObjChild.a}}
+ +
+ +
- +
- +