Sun May 21 15:12:00 UTC 2023 inscode

上级 0e59ac35
<script setup> <script setup>
import parent from './page/parent.vue'; import parent from './page/ziChuanFuVal/parent.vue';
import watchEffect from './page/watchEffect/watchEffect.vue';
</script> </script>
<template> <template>
<parent></parent> <!-- <parent></parent> -->
<watchEffect></watchEffect>
</template> </template>
<style scoped> <style scoped>
......
<script setup>
import { ref, watchEffect } from 'vue';
const changeVal = ref(0);
watchEffect(() => {
console.log("循环",changeVal.value);
})
const cs = () => {
changeVal.value = changeVal.value + 1;
}
</script>
<template>
<button @click="cs">点击循环</button>
</template>
<style scoped>
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册