mirror of
https://gitee.com/xuliangzhan_admin/vxe-table.git
synced 2026-01-21 05:27:57 +08:00
修复form表单自定义布局必填星号无法显示问题
This commit is contained in:
@@ -17,7 +17,6 @@ const components = [
|
||||
'v-x-e-table',
|
||||
'vxe-table',
|
||||
|
||||
'icon',
|
||||
'filter',
|
||||
'menu',
|
||||
'edit',
|
||||
@@ -27,6 +26,8 @@ const components = [
|
||||
'header',
|
||||
'footer',
|
||||
|
||||
'icon',
|
||||
'loading',
|
||||
'column',
|
||||
'colgroup',
|
||||
'toolbar',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vxe-table",
|
||||
"version": "3.6.0",
|
||||
"version": "3.6.3",
|
||||
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项等...",
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
||||
@@ -12,8 +12,14 @@ const props = {
|
||||
size: String,
|
||||
span: [String, Number],
|
||||
align: String,
|
||||
titleAlign: String,
|
||||
titleWidth: [String, Number],
|
||||
titleAlign: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
titleWidth: {
|
||||
type: [String, Number],
|
||||
default: null
|
||||
},
|
||||
titleColon: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
@@ -23,7 +29,10 @@ const props = {
|
||||
default: null
|
||||
},
|
||||
className: [String, Function],
|
||||
titleOverflow: { type: [Boolean, String], default: null },
|
||||
titleOverflow: {
|
||||
type: [Boolean, String],
|
||||
default: null
|
||||
},
|
||||
titlePrefix: Object,
|
||||
titleSuffix: Object,
|
||||
resetValue: { default: null },
|
||||
@@ -42,14 +51,16 @@ Object.keys(props).forEach(name => {
|
||||
})
|
||||
|
||||
const renderItem = (h, _vm, item, slots) => {
|
||||
const { _e, rules, data, collapseAll, validOpts, titleOverflow: allTitleOverflow } = _vm
|
||||
const { _e, rules, data, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow } = _vm
|
||||
const { title, folding, visible, field, collapseNode, itemRender, showError, errRule, className, titleOverflow } = item
|
||||
const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
|
||||
const itemClassName = compConf ? compConf.itemClassName : ''
|
||||
const span = item.span || _vm.span
|
||||
const align = item.align || _vm.align
|
||||
const titleAlign = item.titleAlign || _vm.titleAlign
|
||||
const titleWidth = item.titleWidth || _vm.titleWidth
|
||||
const titleAlign = XEUtils.eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign
|
||||
const titleWidth = XEUtils.eqNull(item.titleWidth) ? allTitleWidth : item.titleWidth
|
||||
const titleColon = XEUtils.eqNull(item.titleColon) ? allTitleColon : item.titleColon
|
||||
const titleAsterisk = XEUtils.eqNull(item.titleAsterisk) ? allTitleAsterisk : item.titleAsterisk
|
||||
const itemOverflow = (XEUtils.isUndefined(titleOverflow) || XEUtils.isNull(titleOverflow)) ? allTitleOverflow : titleOverflow
|
||||
const showEllipsis = itemOverflow === 'ellipsis'
|
||||
const showTitle = itemOverflow === 'title'
|
||||
@@ -91,6 +102,8 @@ const renderItem = (h, _vm, item, slots) => {
|
||||
itemClassName ? (XEUtils.isFunction(itemClassName) ? itemClassName(params) : itemClassName) : '',
|
||||
{
|
||||
'is--title': title,
|
||||
'is--colon': titleColon,
|
||||
'is--asterisk': titleAsterisk,
|
||||
'is--required': isRequired,
|
||||
'is--hidden': folding && collapseAll,
|
||||
'is--active': isActivetem(_vm, item),
|
||||
|
||||
@@ -1,23 +1 @@
|
||||
/**Variable**/
|
||||
|
||||
.vxe-table--footer-wrapper {
|
||||
color: $vxe-table-footer-font-color;
|
||||
margin-top: -1px;
|
||||
&.body--wrapper{
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.vxe-footer--column {
|
||||
&.col--ellipsis {
|
||||
& > .vxe-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.vxe-cell--item {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/**Variable**/
|
||||
|
||||
/*加载中*/
|
||||
.vxe-loading {
|
||||
display: none;
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
@import './icon.scss';
|
||||
@import './loading.scss';
|
||||
@import './table.scss';
|
||||
@import './column.scss';
|
||||
@import './colgroup.scss';
|
||||
@import './header.scss';
|
||||
@import './footer.scss';
|
||||
@import './filter.scss';
|
||||
@import './menu.scss';
|
||||
@import './export.scss';
|
||||
|
||||
@import './table.scss';
|
||||
@import './grid.scss';
|
||||
@import './toolbar.scss';
|
||||
@import './pager.scss';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
@import './helpers/mixin.scss';
|
||||
@import './base/checked.scss';
|
||||
@import './base/common.scss';
|
||||
@import './loading.scss';
|
||||
|
||||
%DefaultColumnHeight {
|
||||
height: $vxe-table-row-height-default;
|
||||
@@ -1300,3 +1301,26 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*footer*/
|
||||
.vxe-table--footer-wrapper {
|
||||
color: $vxe-table-footer-font-color;
|
||||
margin-top: -1px;
|
||||
&.body--wrapper{
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.vxe-footer--column {
|
||||
&.col--ellipsis {
|
||||
& > .vxe-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.vxe-cell--item {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user