人生人山人海人来人往,自己自尊自|

青柠i

园龄:4年3个月粉丝:11关注:1

10 2022 档案

Vue3 Composition API
摘要:一、响应式基础 前提:你会使用 setup 函数或 <script setup>语法 1.reactive 我们可以使用 reactive() 函数创建一个响应式对象或数组: import { reactive } from 'vue' const state = reactive({ count:
156
0
0
Vue3-CompositionAPI-响应式基础
摘要:一、响应式基础 前提:你会使用 setup 函数或 <script setup>语法 1.reactive 我们可以使用 reactive() 函数创建一个响应式对象或数组: import { reactive } from 'vue' const state = reactive({ count:
75
0
0
组件上的 v-model
摘要:💥💥💥 环境为:Vue3 1. 原生元素上的 v-model <p>{{ msg }}</p> <input v-model="msg" /> <!-- 上面的代码其实等价于下面这段 (编译器会对 v-model 进行展开): --> <input :value="msg" @input="m
28
0
0
Property 'style' does not exist on type 'Element' in TS
摘要:1.报错情况: 当前环境:TS 发生错误的实例: 原因: 通过document.getElementsByClassName函数返回的类型为HTMLCollectionOf<Element>,而Element类型上不存在style属性。需要通过**类型断言**设置正确的类型。 2. 解决 1.使用d
173
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起