ts + vue 的項目不能直接在標簽上加ref來獲得組件的實例,需要定義$refs,並引用組件實例
1 export default class TableWarp extends Vue { 2 public $refs!: { 3 page: page 4 } 5 }
之后再正常使用即可
this.$refs.page.xxx
ts + vue 的項目不能直接在標簽上加ref來獲得組件的實例,需要定義$refs,並引用組件實例
1 export default class TableWarp extends Vue { 2 public $refs!: { 3 page: page 4 } 5 }
之后再正常使用即可
this.$refs.page.xxx
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。