doc: Update README.md #786
This commit is contained in:
parent
4f4ac84ec9
commit
0d7f6653b6
@ -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();
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user