|
@@ -13,11 +13,14 @@
|
|
|
<Demo9></Demo9> -->
|
|
|
<!-- <Demo14 v-if="isshow"></Demo14> -->
|
|
|
<!-- <Demo23></Demo23> -->
|
|
|
- <Demo24 ref="main"></Demo24>
|
|
|
+ <!-- <Demo24 ref="main"></Demo24> -->
|
|
|
<!-- <Demo10></Demo10>
|
|
|
<Demo11></Demo11>
|
|
|
<Demo12></Demo12>
|
|
|
<Demo13></Demo13> -->
|
|
|
+ <!-- <Demo25 :name="name1" :age="10"/>
|
|
|
+ <Demo25 :list1="list"/> -->
|
|
|
+ <Demo25/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -39,7 +42,7 @@ export default {
|
|
|
</script> -->
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { ref,onMounted } from "vue";
|
|
|
+import { ref,onMounted, reactive } from "vue";
|
|
|
import Demo1 from "./components/Demo1.vue";
|
|
|
import Demo2 from './components/Demo2.vue';
|
|
|
import Demo3 from './components/Demo3.vue';
|
|
@@ -61,12 +64,28 @@ import Demo18 from './components/Demo18.vue';
|
|
|
import Demo19 from './components/Demo19.vue';
|
|
|
import Demo23 from './components/Demo23.vue';
|
|
|
import Demo24 from './components/Demo24.vue';
|
|
|
+import Demo25 from './components/Demo25.vue';
|
|
|
let isshow = ref(true);
|
|
|
let main = ref<any>(null);
|
|
|
-onMounted(() => {
|
|
|
- console.log(main.value.a)
|
|
|
- console.log(main.value.b)
|
|
|
-})
|
|
|
+// onMounted(() => {
|
|
|
+// console.log(main.value.a)
|
|
|
+// console.log(main.value.b)
|
|
|
+// })
|
|
|
+let name1 = ref<string>("孙悟空")
|
|
|
+interface Person {
|
|
|
+ name1:string,
|
|
|
+ age1:number
|
|
|
+}
|
|
|
+let list:Person[] = reactive([{
|
|
|
+ name1:"小红",
|
|
|
+ age1:10
|
|
|
+},{
|
|
|
+ name1:"小黄",
|
|
|
+ age1:20
|
|
|
+},{
|
|
|
+ name1:"小粉",
|
|
|
+ age1:15
|
|
|
+}])
|
|
|
|
|
|
</script>
|
|
|
<style>
|