|
|
@ -35,11 +35,6 @@ a { |
|
|
|
<!-- v-memo 类似于 v-one 数组内的值变换时会更新 --> |
|
|
|
<p v-memo="[b]"> |
|
|
|
{{count}} |
|
|
|
<a href="https://vitejs.dev/guide/features.html" target="_blank"> |
|
|
|
Vite Documentation |
|
|
|
</a> |
|
|
|
| |
|
|
|
<a href="https://v3.vuejs.org/" target="_blank">Vue 3 Documentation</a> |
|
|
|
</p> |
|
|
|
<div class="demo">1-<span>2</span></div> |
|
|
|
<button type="button" @click="count++">count is: {{ count }}</button> |
|
|
@ -47,6 +42,8 @@ a { |
|
|
|
<span>Edit</span>{{foo}} |
|
|
|
<code>components/HelloWorld.vue</code> to test hot module replacement. |
|
|
|
</p> |
|
|
|
--{{num}} |
|
|
|
<hello-world v-if="num>0" :num="num-1" msg="-----msg----"/> |
|
|
|
</template> |
|
|
|
<script setup> |
|
|
|
import { ref, useAttrs, useSlots, useCssVars, inject, defineExpose } from 'vue' |
|
|
@ -55,7 +52,8 @@ a { |
|
|
|
console.log(useAttrs(),'-------useAttrs-------') |
|
|
|
console.log(useSlots(),'---------useSlots--') |
|
|
|
defineProps({ |
|
|
|
msg: String |
|
|
|
msg: String, |
|
|
|
num: Number |
|
|
|
}) |
|
|
|
useCssVars(e=>{ |
|
|
|
console.log(e,"-----------ctx----") |
|
|
|