This commit is contained in:
yanran200730
2023-02-08 16:36:35 +08:00
parent bf508e8cb8
commit 4670ffee85
2 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
<template>
<section class="AiEditInput" :class="{[align]:true,error}">
<el-input v-if="edit" size="small" v-model="content" @change="handleChange" @blur="cancel" clearable autofocus/>
<div class="valueText" v-else v-text="value" @click="edit=true"/>
<div class="valueText" v-if="!edit && value" v-text="value" @click="edit=true"/>
<i v-if="!edit && !value" class="el-icon-edit" @click="edit = true"></i>
</section>
</template>
@@ -54,7 +55,8 @@ export default {
.valueText {
width: 100%;
height: 100%;
min-height: 32px;
min-width: 43px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;

View File

@@ -32,7 +32,7 @@
<ai-table v-if="moduleId" :tableData="cateList" :col-configs="cateColConfigs" :isShowPagination="false" @getList="getCateList">
<el-table-column slot="category" label="分类名称" align="center">
<template slot-scope="{row}">
<ai-edit-input v-model="row.categoryName" :error.sync="row.error"/>
<ai-edit-input v-model="row.categoryName" :key="row.id" :error.sync="row.error"/>
</template>
</el-table-column>
<el-table-column slot="options" width="220px" fixed="right" label="操作" align="center">