|
|
@@ -2,16 +2,16 @@
|
|
|
<div>
|
|
|
<h1 class="h-26 text-6xl">孙组件</h1>
|
|
|
<button @click="showMain">展示</button>
|
|
|
- <!-- <h1 class="h-26 text-6xl">展示:{{ x1 }}</h1> -->
|
|
|
+ <h1 class="h-26 text-6xl">展示:{{ x.flower }}</h1>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { ref, inject } from "vue";
|
|
|
-function showMain() {
|
|
|
- let x1 = inject("x");
|
|
|
- console.log(inject("xxxx"));
|
|
|
-}
|
|
|
+
|
|
|
+let x = inject("x");
|
|
|
+console.log(inject("x"));
|
|
|
+function showMain() {}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|