<RadioGroup v-model="selectType" type="button" @οnchange="selectTypeChange"> <Radio label="全部"></Radio> <Radio label="图文"></Radio> <Radio label="文件"></Radio> <Radio label="视频"></Radio> </RadioGroup>
通过点击变化的钩子函数进行匹配
selectTypeChange(val) { console.log(val) let _this = this; switch(val) { case "全部": _this.init(_this.searchText,_this.active,_this.currentState, _this.chooseDate[0], _this.chooseDate[1], '','',1) _this.selectType = '全部' break; case "图文": _this.init(_this.searchText,_this.active,_this.currentState, _this.chooseDate[0], _this.chooseDate[1], '05','00',1) _this.selectType = '图文' _this.st = '05' break; case "文件": _this.init(_this.searchText, _this.active, _this.currentState, _this.chooseDate[0], _this.chooseDate[1], '10','00',1) _this.selectType = '文件' _this.st = '10' break; case "视频": _this.init(_this.searchText, _this.active, _this.currentState, _this.chooseDate[0], _this.chooseDate[1], '15','00',1) _this.selectType = '视频' _this.st = '15' break; default: } },