可以使用Watch机制,示例:
export default class HelloWorld extends Vue {
@Prop() name!: string;
@Watch("name")
public updateNames() {
// 在该函数中,针对name刷新的事件进行逻辑处理
}
}
可以使用Watch机制,示例:
export default class HelloWorld extends Vue {
@Prop() name!: string;
@Watch("name")
public updateNames() {
// 在该函数中,针对name刷新的事件进行逻辑处理
}
}