mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-09 19:06:49 +08:00
refactor(knowledge): 优化知识库相关组件的样式和功能- 修改按钮样式,增加图标并隐藏文字
- 优化表格渲染逻辑,提高组件灵活性 -统一使用 outline 图标风格- 修复搜索框回车事件处理
This commit is contained in:
@@ -18,8 +18,8 @@ const RenderSlot = {
|
||||
{
|
||||
props: {
|
||||
placement: 'bottom-end',
|
||||
content: first[0].data.props.title,
|
||||
effect: 'light'
|
||||
content: first[0].data.props.title
|
||||
// effect: 'light'
|
||||
}
|
||||
},
|
||||
first
|
||||
@@ -76,12 +76,16 @@ const RenderSlot = {
|
||||
content.children = [renderTooltip(first), renderPopver(other)]
|
||||
return content
|
||||
} else {
|
||||
const first = contentDiv.splice(0, 1)
|
||||
first[0].data.class = 'normal-button'
|
||||
first[0].data.props.type = null
|
||||
first[0].data.props.size = null
|
||||
content.children = [renderTooltip(first)]
|
||||
// const first = contentDiv.splice(0, contentDiv)
|
||||
|
||||
contentDiv = contentDiv.map(item => {
|
||||
console.log(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 =
|
||||
|
||||
@@ -112,36 +112,33 @@ export default {
|
||||
prop: 'knowledgeDesc',
|
||||
width: '150px',
|
||||
align: 'center',
|
||||
isRedraw: true,
|
||||
render: (h, params) => {
|
||||
return h('span', {}, [
|
||||
h(
|
||||
'el-button',
|
||||
{
|
||||
class: 'floatSpan',
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'medium'
|
||||
},
|
||||
on: {
|
||||
click: () => this.handleEdit(params.row)
|
||||
}
|
||||
h('el-button', {
|
||||
class: 'floatSpan',
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'medium',
|
||||
title: '修改',
|
||||
icon: 'el-icon-edit-outline'
|
||||
},
|
||||
'修改'
|
||||
),
|
||||
h(
|
||||
'el-button',
|
||||
{
|
||||
class: 'floatSpan',
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'medium'
|
||||
},
|
||||
on: {
|
||||
click: () => this.handlePreview(params.row)
|
||||
}
|
||||
on: {
|
||||
click: () => this.handleEdit(params.row)
|
||||
}
|
||||
}),
|
||||
h('el-button', {
|
||||
class: 'floatSpan',
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'medium',
|
||||
title: '预览',
|
||||
icon: 'el-icon-view'
|
||||
},
|
||||
'预览'
|
||||
)
|
||||
on: {
|
||||
click: () => this.handlePreview(params.row)
|
||||
}
|
||||
})
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,36 +118,33 @@ export default {
|
||||
prop: 'knowledgeDesc',
|
||||
width: '150px',
|
||||
align: 'center',
|
||||
isRedraw: true,
|
||||
render: (h, params) => {
|
||||
return h('span', {}, [
|
||||
h(
|
||||
'el-button',
|
||||
{
|
||||
class: 'floatSpan',
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'medium'
|
||||
},
|
||||
on: {
|
||||
click: () => this.handleEdit(params.row)
|
||||
}
|
||||
h('el-button', {
|
||||
class: 'floatSpan',
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'medium',
|
||||
title: '修改',
|
||||
icon: 'el-icon-edit-outline'
|
||||
},
|
||||
'修改'
|
||||
),
|
||||
h(
|
||||
'el-button',
|
||||
{
|
||||
class: 'floatSpan',
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'medium'
|
||||
},
|
||||
on: {
|
||||
click: () => this.handlePreview(params.row)
|
||||
}
|
||||
on: {
|
||||
click: () => this.handleEdit(params.row)
|
||||
}
|
||||
}),
|
||||
h('el-button', {
|
||||
class: 'floatSpan',
|
||||
props: {
|
||||
type: 'primary',
|
||||
size: 'medium',
|
||||
title: '预览',
|
||||
icon: 'el-icon-view'
|
||||
},
|
||||
'预览'
|
||||
)
|
||||
on: {
|
||||
click: () => this.handlePreview(params.row)
|
||||
}
|
||||
})
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ export default {
|
||||
type: 'primary',
|
||||
size: 'mini',
|
||||
disabled: true,
|
||||
icon: 'el-icon-edit',
|
||||
icon: 'el-icon-edit-outline',
|
||||
title: '编辑'
|
||||
},
|
||||
on: {}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="index-container" class="container index-container">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-input placeholder="输入知识库名称" clearable v-model="nameLike" size="medium" class="underBorder">
|
||||
<el-input placeholder="输入知识库名称" clearable v-model="nameLike" size="medium" class="underBorder" @keydown.enter.native="getList">
|
||||
<template slot="prepend">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getList"></el-button>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user