|
@@ -2,7 +2,8 @@
|
|
|
<div>
|
|
<div>
|
|
|
<hr />
|
|
<hr />
|
|
|
<hr />
|
|
<hr />
|
|
|
- <Demo13 v-if="show"></Demo13>
|
|
|
|
|
|
|
+ <Demo14 :news="person"></Demo14>
|
|
|
|
|
+ <!-- <Demo13 v-if="show"></Demo13> -->
|
|
|
<!-- <Demo12 ref="main"></Demo12>
|
|
<!-- <Demo12 ref="main"></Demo12>
|
|
|
<button @click="getMain">展示</button> -->
|
|
<button @click="getMain">展示</button> -->
|
|
|
|
|
|
|
@@ -30,7 +31,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
-<script setup>
|
|
|
|
|
|
|
+<script lang="ts" setup>
|
|
|
import { ref, reactive } from "vue";
|
|
import { ref, reactive } from "vue";
|
|
|
// import Demo1 from "./components/Demo1.vue";
|
|
// import Demo1 from "./components/Demo1.vue";
|
|
|
// import Demo2 from "./components/Demo2.vue";
|
|
// import Demo2 from "./components/Demo2.vue";
|
|
@@ -44,12 +45,40 @@ import { ref, reactive } from "vue";
|
|
|
// import Demo10 from "./components/Demo10.vue";
|
|
// import Demo10 from "./components/Demo10.vue";
|
|
|
// import Demo11 from "./components/Demo11.vue";
|
|
// import Demo11 from "./components/Demo11.vue";
|
|
|
// import Demo12 from "./components/Demo12.vue";
|
|
// import Demo12 from "./components/Demo12.vue";
|
|
|
-import Demo13 from "./components/Demo13.vue";
|
|
|
|
|
|
|
+// import Demo13 from "./components/Demo13.vue";
|
|
|
|
|
+import Demo14 from "./components/Demo14.vue";
|
|
|
|
|
+
|
|
|
|
|
+interface x {
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ age: number;
|
|
|
|
|
+}
|
|
|
let main = ref();
|
|
let main = ref();
|
|
|
|
|
+
|
|
|
function getMain() {
|
|
function getMain() {
|
|
|
console.log(main.value);
|
|
console.log(main.value);
|
|
|
}
|
|
}
|
|
|
let show = ref(true);
|
|
let show = ref(true);
|
|
|
|
|
+let ww = reactive<{
|
|
|
|
|
+ desc: string;
|
|
|
|
|
+ num: string;
|
|
|
|
|
+}>({
|
|
|
|
|
+ desc: "图图",
|
|
|
|
|
+ num: "30",
|
|
|
|
|
+});
|
|
|
|
|
+let person = reactive<x[]>([
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "图图",
|
|
|
|
|
+ age: 3,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "孙悟空",
|
|
|
|
|
+ age: 500,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "猪八戒",
|
|
|
|
|
+ age: 400,
|
|
|
|
|
+ },
|
|
|
|
|
+]);
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|