959 Star 5.1K Fork 1.6K

GVPsmallwei / Avue

 / 详情

avue dynamic 嵌套 table 使用样式异常

已完成
创建于  
2024-06-04 15:16

attributeTableOption: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '',
prop: 'dynamic',
type: 'dynamic',
labelWidth: 0,
span: 24,
children: {
align: 'center',
headerAlign: 'center',
rowAdd: (done) => {
this.$message.success('新增回调');
done({
input: '默认值'
});
},
rowDel: (row, done) => {
this.$message.success('删除回调' + JSON.stringify(row));
done();
},
column: [{
width: 200,
label: '销售属性',
allowCreate: true,
filterable: true,
prop: "input",
type: 'table',
children: {
border: true,
column: [{
label: '姓名',
width: 120,
search: true,
searchSpan: 24,
prop: 'name'
}, {
label: '性别',
prop: 'sex'
}],
},
formatter: (row) => {
if (!row.name) return ''
return row.name + '-' + row.sex
},
onLoad: ({ page, value, data }, callback) => {
//首次加载去查询对应的值
if (value) {
this.$message.success('首次查询' + value)
callback({
id: '0',
name: '张三',
sex: '男',
age: 18
})
return
}
if (data) {
this.$message.success('搜索查询参数' + JSON.stringify(data))
}
if (page) {
this.$message.success('分页参数' + JSON.stringify(page))
}
//分页查询信息
callback({
total: 2,
data: [{
id: '0',
name: '张三',
sex: '男',
age: 18
}, {
id: '1',
name: '李四',
sex: '女',
disabled: true,
age: 18
}, {
id: '2',
name: '王五',
sex: '女'
}]
})
},
props: {
disabled: 'disabled',
label: 'name',
value: 'id'
}
}, {
label: '参数值',
prop: "select",
type: 'select',
allowCreate: true,
filterable: true,
multiple: true,
dicData: [{
label: '6G',
value: 1
}, {
label: '12G',
value: 2
}]
}]
}
},
]
},

输入图片说明

评论 (1)

996 创建了任务

目前不支持嵌套

smallwei 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
632261 smallweigit 1588214431 5556829 big potato zhou 1578988442
JavaScript
1
https://gitee.com/smallweigit/avue.git
git@gitee.com:smallweigit/avue.git
smallweigit
avue
Avue

搜索帮助

344bd9b3 5694891 D2dac590 5694891