开发者社区 问答 正文

Vue中Watcher代码是什么呀?

Vue中Watcher代码是什么呀?

展开
收起
游客r3yctwty2duzw 2022-08-11 21:28:35 301 分享 版权
1 条回答
写回答
取消 提交回答
  • Watcher
    
    var watchExampleVM = new Vue(f
    el:
    
    *#watch-example'
    data: {
    
    question:
    answer: I cannot give you an answer until you ask a question!'
    
    watchi f
    
    question: function (newQuestion, oldQuestion) (
    
    this.answer = 'Waiting for you to stop typing...
    
    this.debouncedGetAnswer)
    
    created: function ()
    
    this.debouncedGetAnswer=
    
    •debounce(this.getAnswer,500)
    
    2022-08-12 08:31:42
    赞同 展开评论
问答分类:
问答标签:
问答地址: