logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

vue3 render()函数与 h()函数联合使用

先把源码放出来,result是上一篇文章生成的虚拟节点const render = ((...args) => {ensureRenderer().render(...args);})let renderer;const extend = Object.assignfunction ensureRenderer() {return (renderer ||(renderer = create

#vue.js#前端#javascript
vue3 watch 和watchEffect()

// const isFunction = (val) =>typeof val === 'function'//options 为可选参数function watch(source, cb, options) {if (!isFunction(cb)) {//vue2中的 watch(fn,options?)已移动到单独的API。vue3中要使用watchEffect(fn,options

#vue.js#javascript#前端
vue3 toRefs()函数用法

function isReactive(value) {if (isReadonly(value)) {return isReactive(value["__v_raw" /* RAW */]);}return !!(value && value["__v_isReactive" /* IS_REACTIVE */]);}function isReadonly(value) {re

#vue.js#javascript#前端
vue3中 h()函数

先看结果//类型判断函数const isObject = (val) => val !==null && typeof val === 'object'const isString = (val) => typeof val === 'string'const isFunction = (val) => typeof val === 'function';cons

#vue.js#javascript#ecmascript
vue3 通过ref获取dom元素并修改style样式

// html<div class="ans-item" v-for="(item1,index1) in item.answer" :key="index1"><div class="item"><div class="circle" :ref="setItemRef">{{anslist[index1]}}</div><div class=

#elementui#vue.js#javascript
uni-app库lottie-miniapp使用方法

lottie库在uni-app中的使用

#uni-app#动画
到底了