1、this.$nextTick,更改如下:
import { nextTick} from "vue";
nextTick(function() {})
2、uni.createSelectorQuery().in(this),其他相似api需要this应该也是一样的,更改如下:
uniapp文档示例(选择组合式api):https://uniapp.dcloud.net.cn/api/ui/nodes-info.html#selectorquery-in
import { getCurrentInstance } from "vue";
const instance = getCurrentInstance();
const that = instance.proxy; // 相当于vue2的this
const query = uni.createSelectorQuery().in(that);
评论区”朱小“的发问,加.in(that)和不加的区别。以下是查找到的内容,仅供参考: