![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue3
昔人'
觉今是而昨非
展开
-
尤大都说Vue3 + script setup + TS + Volar真香,你说香不香?
前两天尤大官宣发布了Vue3.2,支持了好几个很不错的新特性,而且自信放话:<script setup> + TS + Volar = 真香,是时候了想看Vue3.2更新的内容文档的读者可以滑到文章底部点击「阅读原文」相信你已经开始使用或者迫不及待地想尝试Vue3.2了,其实我群里的小伙伴早已经开始使用,而且踩了很多坑了,今天给大家分享一下他的实践投稿文章,希望大家多多支持!正文如下目前setup sugar已经进行了定稿,而vue3 + setup sugar + TS的写法看起来很香,所以我转载 2021-10-14 15:08:49 · 1616 阅读 · 2 评论 -
vue3: vuex (4.x) useStore() 使用; 及useStore() 方法 PC端返回 state ;移动端不返回state
vuex (4.x) useStore() 方法 打印出来 PC端返回 state ;移动端不返回state;state只读import {useStore} from 'vuex'export default { setup(props,context) { const store = useStore() const myStoreData = computed(() => store.state.myStoreData); console.log(store ) /原创 2021-07-21 16:41:31 · 13999 阅读 · 0 评论 -
vue3 watchEffect
watchEffectwatch : 既要知名监视的属性 又要指明监视的回调watchEffect : 不用指明监视那个属性,监视的回调中用到那个属性就监视那个属性watchEffect有点像computedcomputed注重的计算出来的值(回调函数返回值),必须有returnwatchEffect 更注重过程(回调函数的函数体)不需要写return返回setup(){ let someNodes = reactive({ name:"大",原创 2021-10-11 17:48:54 · 191 阅读 · 0 评论 -
vue3 watch
watch监视reactive定义的响应式数据时,oldValue无法正确获取,强制开启了深度监视(deep配置无效)监视reactive定义的响应式数据中的某一个属性时,deep配置有效,setup(){ let num = ref(0), str = ref("strofdn"), persons = reactive({ name:"艾利欧", age:21, work:{ mo:{ award:11原创 2021-10-11 17:12:01 · 132 阅读 · 0 评论