doc: Update README.md #786

This commit is contained in:
jaywcjlove 2024-07-09 01:16:04 +08:00
parent 4f4ac84ec9
commit 0d7f6653b6

View File

@ -511,7 +511,7 @@ watch(count, function() {
<!--rehype:className=wrap-text-->
### 监听多个值
<!--rehype:wrap-class=col-span-2-->
<!--rehype:wrap-class=col-span-2 row-span-2-->
```html
<template>
@ -549,14 +549,14 @@ watch(count, function() {
```
### 计算状态
<!--rehype:wrap-class=col-span-2-->
```html
<script setup>
import { ref, computed } from 'vue';
const text = ref('')
// computed 的回调函数里,会根据已有并用到的状态计算出新的状态
// computed 的回调函数里
// 会根据已有并用到的状态计算出新的状态
const capital = computed(function(){
return text.value.toUpperCase();
})