This commit is contained in:
Fanzink
2023-02-08 18:13:08 +08:00
parent bbe5e63075
commit 28303e4c5f
37 changed files with 580 additions and 345 deletions

View File

@@ -27,11 +27,13 @@
:disabled="isDetail" />
<el-radio v-if="getType(n, c) === 'radio'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
<el-checkbox v-if="getType(n, c) === 'check'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
<!-- 全部selcet下拉框可输入搜索 filterable-->
<el-select
v-if="getType(n, c) === 'select'"
:placeholder="getPlaceholder(n, c)"
v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]"
clearable
filterable
:disabled="isDetail || configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].isDisabled"
@change="emitSelectChange(configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name, $event)">

View File

@@ -4,20 +4,21 @@
* @Author: fzq
* @Date: 2022-11-25 09:51:46
* @LastEditors: fzq
* @LastEditTime: 2023-02-03 14:30:23
* @LastEditTime: 2023-02-08 17:16:47
-->
<template>
<!-- 数字代表多级表头最小列宽 -->
<!-- :width="opt.width || null" -->
<!-- :width="flexColumnWidth(opt.prop || null)" -->
<!-- header-align="center" align="center" -->
<el-table-column
:label="opt.label ? opt.label : opt.name"
:prop="opt.prop || null"
:width="flexColumnWidth(opt.prop || null)"
:min-width="opt.minWidth || null"
:fixed="opt.fixed || null"
:show-overflow-tooltip="opt.showOverflowTooltip || false"
filter-placement="top"
:align="opt.align || null"
:align="opt.align || 'center'"
v-bind="opt.more"
>
<template v-if="opt.prop" slot-scope="scope">

View File

@@ -55,6 +55,7 @@
"
v-bind="head.more"></el-table-column>
<!-- 普通的表头 -->
<!-- :align="head.align || null" 表头居中 -->
<el-table-column
v-else
:key="idx + 'else'"
@@ -66,7 +67,7 @@
:show-overflow-tooltip="head.showOverflowTooltip || true"
:tooltip-effect="head.tooltipEffect || 'light'"
filter-placement="top"
:align="head.align || null"
:align="head.align || 'center'"
v-bind="head.more">
<!-- 子组件 编辑/删除 -->
<template v-if="head.prop" slot-scope="scope">
@@ -77,7 +78,7 @@
<!-- 多级表头 -->
<template v-if="!head.prop && head.children">
<TableHead v-for="(subhead, subindex) in head.children" :key="'subhead-' + idx + '-subindex-' + subindex" :opt="subhead" />
<TableHead v-for="(subhead, subindex) in head.children" :key="'subhead-' + idx + '-subindex-' + subindex" :opt="subhead" fixed/>
</template>
</el-table-column>
</template>