diff --git a/gulpfile.js b/gulpfile.js index c673cfeb0..35f882d60 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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', diff --git a/package.json b/package.json index 64df71178..0b5989086 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "3.6.0", + "version": "3.6.3", "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项等...", "scripts": { "serve": "vue-cli-service serve", diff --git a/packages/form/src/form-item.js b/packages/form/src/form-item.js index f93d6b047..f68f8bce7 100644 --- a/packages/form/src/form-item.js +++ b/packages/form/src/form-item.js @@ -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), diff --git a/styles/footer.scss b/styles/footer.scss index 612a14b62..054a56ec7 100644 --- a/styles/footer.scss +++ b/styles/footer.scss @@ -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; - } - } - } -} diff --git a/styles/loading.scss b/styles/loading.scss index 153bc08bf..a3c581f4d 100644 --- a/styles/loading.scss +++ b/styles/loading.scss @@ -1,3 +1,5 @@ +/**Variable**/ + /*加载中*/ .vxe-loading { display: none; diff --git a/styles/modules.scss b/styles/modules.scss index a4b6df88d..889ac5f9a 100644 --- a/styles/modules.scss +++ b/styles/modules.scss @@ -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'; diff --git a/styles/table.scss b/styles/table.scss index 808354402..b3afb2e9f 100644 --- a/styles/table.scss +++ b/styles/table.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; + } + } + } +}