|
@@ -1,58 +1,26 @@
|
|
|
<template>
|
|
|
- <div id="app">
|
|
|
- <!-- html -->
|
|
|
- <Demo9></Demo9>
|
|
|
- <!-- <h2 ref="address">哈尔滨</h2>
|
|
|
- <button @click="getMain">获取</button>
|
|
|
- <Demo8 ref="haha"></Demo8> -->
|
|
|
- <!-- <Demo7></Demo7> -->
|
|
|
- <!-- <Demo6></Demo6> -->
|
|
|
- <!-- <Demo5></Demo5> -->
|
|
|
- <!-- <Demo4></Demo4> -->
|
|
|
- <!-- <Demo3></Demo3> -->
|
|
|
- <!-- <Demo2></Demo2> -->
|
|
|
- <!-- <Demo1></Demo1> -->
|
|
|
- <!-- <Demo></Demo> -->
|
|
|
- </div>
|
|
|
+ <div class="app">
|
|
|
+ <Demo11 v-if="isShow"></Demo11>
|
|
|
+ <!-- <Demo10 :list1="list"></Demo10> -->
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
-import Demo9 from './components/Demo9.vue'
|
|
|
-import Demo8 from './components/Demo8.vue'
|
|
|
-import Demo7 from './components/Demo7.vue'
|
|
|
-import Demo6 from './components/Demo6.vue'
|
|
|
-import Demo5 from './components/Demo5.vue'
|
|
|
-import Demo4 from './components/Demo4.vue'
|
|
|
-import Demo3 from './components/Demo3.vue'
|
|
|
-import Demo2 from './components/Demo2.vue'
|
|
|
-import Demo1 from './components/Demo1.vue'
|
|
|
-// import Demo from './components/Demo.vue'
|
|
|
-export default {
|
|
|
- // js或ts
|
|
|
- components: {
|
|
|
- // Demo,
|
|
|
- // Demo1,
|
|
|
- // Demo2,
|
|
|
- // Demo3,
|
|
|
- // Demo4,
|
|
|
- // Demo5,
|
|
|
- // Demo6,
|
|
|
- // Demo7,
|
|
|
- Demo8,
|
|
|
- Demo9
|
|
|
- },
|
|
|
-}
|
|
|
-</script>
|
|
|
-<script setup>
|
|
|
- import {ref} from 'vue';
|
|
|
- let address = ref();
|
|
|
- let haha = ref();
|
|
|
- function getMain() {
|
|
|
- // console.log(address.value,'app页')
|
|
|
- console.log(haha.value,'app')
|
|
|
- }
|
|
|
+<script setup lang="ts" name="App">
|
|
|
+import Demo10 from './components/Demo10.vue';
|
|
|
+import Demo11 from './components/Demo11.vue';
|
|
|
+import {PersonList} from '@/types/Demo10.ts'
|
|
|
+import {reactive,ref,onMounted} from 'vue'
|
|
|
+let list = reactive<PersonList>([
|
|
|
+ {id:1,name:"孙悟空",age:10,hobby:"吃饭"},
|
|
|
+ {id:2,name:"猪八戒",age:20,hobby:"睡觉"},
|
|
|
+ {id:3,name:"图图",age:3,hobby:"打豆豆"}
|
|
|
+])
|
|
|
+let isShow = ref(true);
|
|
|
+onMounted(()=>{
|
|
|
+ console.log("app挂载")
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
- /* 样式 */
|
|
|
+<style>
|
|
|
+
|
|
|
</style>
|