feat:更新
This commit is contained in:
1 parent
5bc01ab257
commit
caf4fd2b86
55 files changed
+2666
-210
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div>
|
||||
<p>
|
||||
<button @click="clickHander">点击</button>
|
||||
</p>
|
||||
<br />
|
||||
<p>provide组件: {{ count }}</p>
|
||||
<br />
|
||||
<InjectBase />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, provide, readonly } from "vue";
|
||||
import InjectBase from "./InjectBase.vue";
|
||||
|
||||
|
||||
const count = ref(0);
|
||||
provide("num", readonly(count));
|
||||
|
||||
const clickHander = () => {
|
||||
count.value++;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped lang="less">
|
||||
button {
|
||||
padding: 8px;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user