We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.将文字按钮组件拖入插槽处 4. 按钮绑定事件,传入参数,其中事件的传入参数为{ "data": this.data.record },在methods中定义按钮绑定事件,将操作列的参数传入并赋值给当前项变量 5. 拖入对话框-普通型组件,绑定是否可见为showDetail,在对话框中拖入2个文本,分别绑定为 this.currentRow.name和this.currentRow.address 6. 点击预览按钮,在页面点击详情,不断出现如下告警,对话框没有正常展示
预览模式中点击详情按钮可以正常展示对话框,并且文本数据正确渲染
import { defineComponent,toRaw } from 'vue';
export default defineComponent({ props: { style: { type: Object, default: {} }, }, data: () => ({ text: "outer", showDetail: false, searchVal:'', currentRow:{}, allList: [{ "id": "1", "name": "毛不易", "age": 32, "address": "西湖区湖底公园1号", "tag":"幼鸟指南" }, { "id": "2", "name": "邓紫棋", "age": 28, "address": "滨江区网商路699号", "tag":"高音天后" }], userList: [], }), methods: { onDetail(e,data){ this.currentRow = toRaw(data); console.log('打开详情', this.currentRow,data); this.showDetail = true; }, onCloseDetail(){ this.showDetail = false; }, testFunc() { console.log('test func'); }, filterList(){ if(!this.searchVal) { this.userList = [...this.allList]; return; } const origin = [...this.allList]; this.userList = origin.filter(item=>{ return item.name === this.searchVal; }) }, onSelectChange(val,option){ this.searchVal = option.label?option.label:''; this.filterList(); }, onDeselect(e){ console.log('取消选中',e); }, expandedRowRender(record,index){ console.log('record',record); return ${record.tag}; } }, mounted() { this.userList = [...this.allList]; console.log('did mount'); }, beforeMount() { console.log('will unmount'); }, })
${record.tag}
The text was updated successfully, but these errors were encountered:
keuby
No branches or pull requests
复现步骤
3.将文字按钮组件拖入插槽处
4. 按钮绑定事件,传入参数,其中事件的传入参数为{ "data": this.data.record },在methods中定义按钮绑定事件,将操作列的参数传入并赋值给当前项变量
5. 拖入对话框-普通型组件,绑定是否可见为showDetail,在对话框中拖入2个文本,分别绑定为
this.currentRow.name和this.currentRow.address
6. 点击预览按钮,在页面点击详情,不断出现如下告警,对话框没有正常展示
预期
预览模式中点击详情按钮可以正常展示对话框,并且文本数据正确渲染
源码面板js
export default defineComponent({
props: {
style: {
type: Object,
default: {}
},
},
data: () => ({
text: "outer",
showDetail: false,
searchVal:'',
currentRow:{},
allList: [{
"id": "1",
"name": "毛不易",
"age": 32,
"address": "西湖区湖底公园1号",
"tag":"幼鸟指南"
}, {
"id": "2",
"name": "邓紫棋",
"age": 28,
"address": "滨江区网商路699号",
"tag":"高音天后"
}],
userList: [],
}),
methods: {
onDetail(e,data){
this.currentRow = toRaw(data);
console.log('打开详情', this.currentRow,data);
this.showDetail = true;
},
onCloseDetail(){
this.showDetail = false;
},
testFunc() {
console.log('test func');
},
filterList(){
if(!this.searchVal) {
this.userList = [...this.allList];
return;
}
const origin = [...this.allList];
this.userList = origin.filter(item=>{
return item.name === this.searchVal;
})
},
onSelectChange(val,option){
this.searchVal = option.label?option.label:'';
this.filterList();
},
onDeselect(e){
console.log('取消选中',e);
},
expandedRowRender(record,index){
console.log('record',record);
return
${record.tag}
;}
},
mounted() {
this.userList = [...this.allList];
console.log('did mount');
},
beforeMount() {
console.log('will unmount');
},
})
The text was updated successfully, but these errors were encountered: