代码生成优化 其他一些小优化

This commit is contained in:
吕金泽
2022-04-01 20:35:18 +08:00
parent b91328dcc7
commit df0bb5c38f
12 changed files with 121 additions and 48 deletions
@@ -14,7 +14,7 @@
@close="$emit('close')"
>
<slot name="content" />
<template #footer>
<template v-if="showFooter" #footer>
<div slot="footer" class="dialog-footer">
<slot name="btns">
<el-button @click="hide">
@@ -48,6 +48,10 @@ export default {
destroyOnClose: {
type: Boolean,
default: true
},
showFooter: {
type: Boolean,
default: true
}
},
data() {
@@ -31,7 +31,11 @@
</el-button>
</template>
</div>
<el-image v-else-if="col.type === 'image'" :src="scope.row[col.field]" :preview-src-list="[scope.row[col.field]]" />
<el-image
v-else-if="col.type === 'image'"
:src="scope.row[col.field].startsWith('http') ? scope.row[col.field] : $global.baseApi + scope.row[col.field]"
:preview-src-list="[scope.row[col.field].startsWith('http') ? scope.row[col.field] : $global.baseApi + scope.row[col.field]]"
/>
<span v-else-if="col.type === 'html'" v-html="scope.row[col.field]"></span>
<span v-else-if="col.click">
<a style="color: blue" @click="col.click(scope.row)">{{ scope.row[col.field] }}</a>