Commit cb78d38b by xinlaa

聊天侧边栏调试

1 parent f30aae32
......@@ -2,15 +2,12 @@ import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/chat'
/**
*
* 侧边栏列表
* @param {*} params
*/
export function getList(params) {
export function getList() {
return request({
url: service + '/side/list',
params: {
h5: 0,
},
})
}
......
......@@ -80,6 +80,7 @@ export default {
update(data)
.then(() => {
this.msgSuccess('操作成功')
this.$set(data, 'isEdit', false)
this.loading = false
})
.catch(() => {
......@@ -110,11 +111,31 @@ export default {
{{ mediaType[scope.row.mediaType] }}
</template>
</el-table-column>
<el-table-column
label="聊天工具栏名称"
align="center"
prop="sideName"
/>
<el-table-column label="聊天工具栏名称" align="center" prop="sideName">
<template slot-scope="{ row }">
<el-input
class="bfc-d"
style="width: 100px;"
v-if="row.isEdit"
v-model="row.sideName"
placeholder="请输入"
></el-input>
<div v-else>
{{ row.sideName }}
</div>
<i
v-if="!row.isEdit"
class="row-icon el-icon-edit"
@click="$set(row, 'isEdit', true)"
></i>
<i
v-else
class="row-icon el-icon-circle-check"
@click="update(row)"
></i>
</template>
</el-table-column>
<el-table-column label="已抓取素材数量" align="center" prop="total" />
<el-table-column
label="是否启用"
......@@ -241,4 +262,19 @@ export default {
width: 100%;
}
}
.el-table__row {
.el-icon-edit {
visibility: hidden;
}
&:hover {
.el-icon-edit {
visibility: visible;
}
}
}
.row-icon {
font-size: 18px;
vertical-align: middle;
margin: 7px 0 0 10px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!