随笔分类 - VUE
摘要:现有如下场景,点击父组件的li元素跳转到子组件中,并携带参数,便于子组件获取数据。 父组件中: methods: 方案一: getDescribe(id) { // 直接调用$router.push 实现携带参数的跳转 this.$router.push({ path: , }) { path: '
阅读全文
摘要:``` selected(item) { if (!item.isShow) { item.isShow = true; this.selectedList.push(item.id) } else { item...
阅读全文
摘要:``` @change="(value) => selected(value, item)" selected(val, item) { if (val === true) { this.selectedData.push(item.courseware_id) } else { let index = this.select...
阅读全文
摘要:1). location方式 2). router方式 3). provide/inject方式 App.vue export default { name: 'App', // 提供reload方法 provide: function () { return { reload: this.relo
阅读全文

浙公网安备 33010602011771号