mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-06 09:26:48 +08:00
style(button): 优化按钮样式和布局
- 调整了多个组件中的按钮样式,包括禁用状态的样式 - 优化了按钮的排列和间距 - 统一了按钮的样式类和属性 - 移除了部分冗余的代码
This commit is contained in:
@@ -60,6 +60,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.el-table {
|
||||
& .el-button {
|
||||
&.is-disabled {
|
||||
background: unset;
|
||||
color: #cecece;
|
||||
}
|
||||
}
|
||||
}
|
||||
//.el-pagination.is-background .el-pager li:not(.disabled).active {
|
||||
//
|
||||
//}
|
||||
|
||||
@@ -61,33 +61,33 @@ const RenderSlot = {
|
||||
if (params.column.isRedraw) {
|
||||
let content = data.props.render(h, params)
|
||||
let contentDiv = content.children
|
||||
if (contentDiv.length > 2) {
|
||||
// 切割掉第一个div
|
||||
const first = contentDiv.splice(0, 1)
|
||||
const other = contentDiv.splice(0, contentDiv.length)
|
||||
first[0].data.class = 'normal-button'
|
||||
first[0].data.props.type = null
|
||||
first[0].data.props.size = null
|
||||
other.forEach(item => {
|
||||
// item.data.class = 'normal-button '
|
||||
item.data.class = 'normal-button popver-button'
|
||||
})
|
||||
// if (contentDiv.length > 2) {
|
||||
// 切割掉第一个div
|
||||
// const first = contentDiv.splice(0, 1)
|
||||
// const other = contentDiv.splice(0, contentDiv.length)
|
||||
// first[0].data.class = 'normal-button'
|
||||
// first[0].data.props.type = null
|
||||
// first[0].data.props.size = null
|
||||
// other.forEach(item => {
|
||||
// // item.data.class = 'normal-button '
|
||||
// item.data.class = 'normal-button popver-button'
|
||||
// })
|
||||
//
|
||||
// content.children = [renderTooltip(first), renderPopver(other)]
|
||||
// // content.children = [renderTooltip(first), ...other]
|
||||
// return content
|
||||
// } else {
|
||||
// const first = contentDiv.splice(0, contentDiv)
|
||||
|
||||
content.children = [renderTooltip(first), renderPopver(other)]
|
||||
// content.children = [renderTooltip(first), ...other]
|
||||
return content
|
||||
} else {
|
||||
// const first = contentDiv.splice(0, contentDiv)
|
||||
|
||||
contentDiv = contentDiv.map(item => {
|
||||
item.data.class = 'normal-button'
|
||||
item.data.props.type = null
|
||||
item.data.props.size = null
|
||||
return renderTooltip([item])
|
||||
})
|
||||
content.children = contentDiv
|
||||
return content
|
||||
}
|
||||
contentDiv = contentDiv.map(item => {
|
||||
item.data.class = 'normal-button'
|
||||
item.data.props.type = null
|
||||
item.data.props.size = null
|
||||
return renderTooltip([item])
|
||||
})
|
||||
content.children = contentDiv
|
||||
return content
|
||||
// }
|
||||
// let div =
|
||||
} else {
|
||||
return data.props.render(h, params)
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
size="medium"
|
||||
icon="el-icon-plus"
|
||||
class="primary-button"
|
||||
disbaled
|
||||
@click="jumpAddKnowledge"
|
||||
>上传知识
|
||||
</el-button>
|
||||
@@ -91,7 +92,7 @@
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-edit-outline"
|
||||
icon="el-icon-help"
|
||||
size="medium"
|
||||
class="line-button"
|
||||
@click="handleMetaData"
|
||||
@@ -699,8 +700,8 @@ export default {
|
||||
on: {
|
||||
click: () => this.deleteKnowledge(params.row)
|
||||
}
|
||||
},
|
||||
'删除'
|
||||
}
|
||||
// '删除'
|
||||
),
|
||||
// h(
|
||||
// 'el-button',
|
||||
@@ -725,15 +726,15 @@ export default {
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'mini',
|
||||
icon: 'el-icon-tickets',
|
||||
icon: 'el-icon-help',
|
||||
title: '添加元数据',
|
||||
disabled: params.row.documentStatus !== 1
|
||||
},
|
||||
on: {
|
||||
click: () => this.handleAddMetadata(params.row)
|
||||
}
|
||||
},
|
||||
'标注元数据'
|
||||
}
|
||||
// '标注元数据'
|
||||
),
|
||||
params.row.optStatus < 4
|
||||
? h(
|
||||
@@ -743,14 +744,14 @@ export default {
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'mini',
|
||||
icon: 'el-icon-tickets',
|
||||
title: '添加元数据'
|
||||
icon: 'el-icon-video-play',
|
||||
title: '继续处理'
|
||||
},
|
||||
on: {
|
||||
click: () => this.jumpToUpload(params)
|
||||
}
|
||||
},
|
||||
'文件拆分处理'
|
||||
}
|
||||
// '文件拆分处理'
|
||||
)
|
||||
: ''
|
||||
])
|
||||
|
||||
@@ -54,8 +54,8 @@ export default {
|
||||
},
|
||||
class: 'normal-button',
|
||||
on: { click: () => this.handleEdit(params.row) }
|
||||
},
|
||||
'修改'
|
||||
}
|
||||
// '修改'
|
||||
),
|
||||
h(
|
||||
'el-button',
|
||||
@@ -70,8 +70,8 @@ export default {
|
||||
on: {
|
||||
click: () => this.handleDelete(params.row, params.index)
|
||||
}
|
||||
},
|
||||
'删除'
|
||||
}
|
||||
// '删除'
|
||||
)
|
||||
])
|
||||
}
|
||||
|
||||
@@ -179,8 +179,8 @@ export default {
|
||||
},
|
||||
class: 'normal-button',
|
||||
on: { click: () => this.handleDelete(params.row) }
|
||||
},
|
||||
'删除'
|
||||
}
|
||||
// '删除'
|
||||
),
|
||||
h(
|
||||
'el-button',
|
||||
@@ -195,8 +195,8 @@ export default {
|
||||
on: {
|
||||
click: () => this.handlePermissionVisible(params.row)
|
||||
}
|
||||
},
|
||||
'设置权限'
|
||||
}
|
||||
// '设置权限'
|
||||
)
|
||||
])
|
||||
}
|
||||
|
||||
@@ -177,43 +177,42 @@ export default {
|
||||
props: {
|
||||
type: 'text',
|
||||
size: 'mini',
|
||||
icon: 'el-icon-remove-outline',
|
||||
style:
|
||||
icon:
|
||||
params.row.status === 0
|
||||
? 'color: #F56C6C'
|
||||
: 'color: #67C23A'
|
||||
? 'el-icon-remove-outline'
|
||||
: 'el-icon-circle-check',
|
||||
title: params.row.status === 0 ? '停用' : '启用'
|
||||
},
|
||||
// style:
|
||||
// params.row.status === 0
|
||||
// ? 'color: #F56C6C'
|
||||
// : 'color: #67C23A',
|
||||
|
||||
on: { click: () => this.handleToggleStatus(params.row) }
|
||||
},
|
||||
params.row.status === 0 ? '停用' : '启用'
|
||||
}
|
||||
// params.row.status === 0 ? '停用' : '启用'
|
||||
),
|
||||
h(
|
||||
'el-button',
|
||||
{
|
||||
props: {
|
||||
type: 'text',
|
||||
size: 'mini',
|
||||
style: 'color: #409EFF',
|
||||
icon: 'el-icon-refresh-right'
|
||||
},
|
||||
class: 'normal-button',
|
||||
on: { click: () => this.handleResetPassword(params.row) }
|
||||
h('el-button', {
|
||||
props: {
|
||||
type: 'text',
|
||||
size: 'mini',
|
||||
style: 'color: #409EFF',
|
||||
icon: 'el-icon-refresh-right',
|
||||
title: '重置密码'
|
||||
},
|
||||
'重置密码'
|
||||
),
|
||||
h(
|
||||
'el-button',
|
||||
{
|
||||
props: {
|
||||
type: 'text',
|
||||
size: 'mini',
|
||||
style: 'color: #F56C6C',
|
||||
icon: 'el-icon-delete'
|
||||
},
|
||||
on: { click: () => this.handleDelete(params.row) }
|
||||
class: 'normal-button',
|
||||
on: { click: () => this.handleResetPassword(params.row) }
|
||||
}),
|
||||
h('el-button', {
|
||||
props: {
|
||||
type: 'text',
|
||||
size: 'mini',
|
||||
style: 'color: #F56C6C',
|
||||
icon: 'el-icon-delete',
|
||||
title: '删除'
|
||||
},
|
||||
'删除'
|
||||
)
|
||||
on: { click: () => this.handleDelete(params.row) }
|
||||
})
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user