dcloudio / dcloudio/uni-app

vue3版本开启virtualHost编译到抖音小程序watch监听不生效

Open
#5,007 4 comments 0 reactions 0 assignees View on GitHub
mp
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

```



test

test1



import { watch } from 'vue';
const emits = defineEmits(['click', 'upload']);
const props = defineProps({
name: {
type: String,
default: 'hello'
}
})
function test() {
emits('click');
}
function test1() {
emits('upload');
}
watch(() => props.name,
(val) => {
console.log(val)
}, {
immediate: true
})

```
```


点击修改name


import { ref } from 'vue';

const name = ref('test')
function test() {
console.log("click")
}
function upload() {
console.log('upload')
}

```
预期结果:打印aaaaaaaaaa
实际结果:无

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.