eoss 0.1.0-alpha.47 → 0.1.0-alpha.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/3.js +1 -1
- package/lib/autocomplete.js +6 -6
- package/lib/ca-login.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/cascader-panel.js +2 -2
- package/lib/cascader.js +4 -4
- package/lib/code-editor.js +2 -2
- package/lib/collapse-item.js +2 -2
- package/lib/collapse.js +2 -2
- package/lib/color-picker.js +2 -2
- package/lib/cron.js +4 -4
- package/lib/data-table.js +366 -20
- package/lib/date-picker.js +3 -3
- package/lib/dialog.js +12 -10
- package/lib/drawer.js +2 -2
- package/lib/dropdown-item.js +23 -4
- package/lib/dropdown.js +4 -4
- package/lib/empty.js +2 -2
- package/lib/eoss.common.js +734 -322
- package/lib/flow-group.js +2 -2
- package/lib/flow.js +7 -7
- package/lib/form-editor.js +2 -2
- package/lib/form.js +12 -11
- package/lib/guide.js +2 -2
- package/lib/icons.js +4 -4
- package/lib/index.js +1 -1
- package/lib/input.js +2 -2
- package/lib/loading.js +4 -4
- package/lib/lowcode-view.js +2 -2
- package/lib/lowcode.js +7 -50
- package/lib/main.js +5 -5
- package/lib/menu-item-group.js +5 -1
- package/lib/menu.js +33 -43
- package/lib/message-box.js +4 -4
- package/lib/message.js +2 -2
- package/lib/notification.js +2 -2
- package/lib/pagination.js +2 -2
- package/lib/process-module.js +2 -2
- package/lib/rate.js +2 -2
- package/lib/scrollbar.js +71 -87
- package/lib/select.js +23 -13
- package/lib/selector-panel.js +2 -2
- package/lib/selector.js +16 -18
- package/lib/slider.js +2 -2
- package/lib/step.js +2 -2
- package/lib/steps.js +4 -4
- package/lib/submenu.js +16 -24
- package/lib/switch.js +2 -2
- package/lib/table-column.js +69 -3
- package/lib/table.js +162 -56
- package/lib/tabs.js +2 -2
- package/lib/theme-chalk/autocomplete.css +1 -1
- package/lib/theme-chalk/cascader-panel.css +1 -1
- package/lib/theme-chalk/cascader.css +1 -1
- package/lib/theme-chalk/data-table.css +1 -1
- package/lib/theme-chalk/date-picker.css +1 -1
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/input-number.css +1 -1
- package/lib/theme-chalk/input.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/message-box.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/scrollbar.css +1 -1
- package/lib/theme-chalk/select.css +1 -1
- package/lib/theme-chalk/selector.css +1 -1
- package/lib/theme-chalk/slider.css +1 -1
- package/lib/theme-chalk/table.css +1 -1
- package/lib/theme-chalk/time-picker.css +1 -1
- package/lib/theme-chalk/time-select.css +1 -1
- package/lib/theme-chalk/transfer.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/time-picker.js +2 -2
- package/lib/time-select.js +6 -6
- package/lib/toolbar.js +2 -2
- package/lib/transfer.js +4 -4
- package/lib/tree.js +8 -15
- package/lib/upload.js +20 -20
- package/lib/utils/popup/popup-manager.js +24 -8
- package/package.json +4 -1
- package/packages/data-table/src/data-table.vue +43 -8
- package/packages/data-table/src/sizer.vue +104 -87
- package/packages/dialog/src/dialog.vue +4 -2
- package/packages/dropdown/src/dropdown-item.vue +21 -3
- package/packages/form/src/form.vue +5 -8
- package/packages/icons/src/icons.vue +2 -2
- package/packages/lowcode/src/util/components.js +0 -59
- package/packages/menu/src/menu.vue +7 -21
- package/packages/menu/src/mixins.js +6 -1
- package/packages/menu/src/submenu.vue +7 -16
- package/packages/scrollbar/src/main.js +64 -78
- package/packages/select/src/select.vue +13 -6
- package/packages/selector/src/selector.vue +6 -13
- package/packages/table/src/config.js +48 -0
- package/packages/table/src/store/index.js +19 -4
- package/packages/table/src/store/watcher.js +14 -3
- package/packages/table/src/table-body.js +9 -4
- package/packages/table/src/table-column.js +17 -3
- package/packages/table/src/table-footer.js +4 -2
- package/packages/table/src/table-header.js +9 -6
- package/packages/table/src/table.vue +48 -27
- package/packages/theme-chalk/src/data-table.scss +4 -0
- package/packages/theme-chalk/src/form.scss +3 -0
- package/packages/theme-chalk/src/input.scss +2 -2
- package/packages/theme-chalk/src/menu.scss +8 -0
- package/packages/theme-chalk/src/mixins/function.scss +61 -12
- package/packages/theme-chalk/src/mixins/utils.scss +12 -0
- package/packages/theme-chalk/src/scrollbar.scss +4 -5
- package/packages/theme-chalk/src/selector.scss +6 -1
- package/packages/theme-chalk/src/table.scss +40 -0
- package/packages/theme-chalk/src/tree.scss +7 -6
- package/packages/theme-chalk/src/upload.scss +5 -0
- package/packages/tree/src/tree.vue +2 -13
- package/packages/upload/src/upload-list.vue +5 -10
- package/src/index.js +1 -1
- package/src/utils/popup/popup-manager.js +24 -9
package/lib/table-column.js
CHANGED
|
@@ -1224,7 +1224,19 @@ var columnIdSeed = 1;
|
|
|
1224
1224
|
type: String,
|
|
1225
1225
|
default: 'default'
|
|
1226
1226
|
},
|
|
1227
|
-
|
|
1227
|
+
/**
|
|
1228
|
+
* 列的规则;type 为 drag 时用它判定行是否可拖:
|
|
1229
|
+
* 函数按行判定(返回 false 该行不可拖),false 表示整列不可拖。
|
|
1230
|
+
* 必须显式写 default: undefined:类型里带 Boolean 时,Vue 会把未传的
|
|
1231
|
+
* 值铸成 false,那就等于默认把整列拖拽关掉了
|
|
1232
|
+
* @type {Function|Boolean|Array|Object}
|
|
1233
|
+
*/
|
|
1234
|
+
rules: {
|
|
1235
|
+
type: [Function, Boolean, Array, Object],
|
|
1236
|
+
default: undefined
|
|
1237
|
+
},
|
|
1238
|
+
// Boolean 必须在 String 前:裸写 filterColumn 时 Vue 才会把空串铸成 true(同 sortable 的约定)
|
|
1239
|
+
filterColumn: [Boolean, String],
|
|
1228
1240
|
label: String,
|
|
1229
1241
|
labelKey: String,
|
|
1230
1242
|
valueKey: String,
|
|
@@ -1631,11 +1643,13 @@ var columnIdSeed = 1;
|
|
|
1631
1643
|
filterPlacement: '',
|
|
1632
1644
|
isColumnGroup: false,
|
|
1633
1645
|
filterOpened: false,
|
|
1634
|
-
|
|
1646
|
+
filterColumn: this.filterColumn,
|
|
1635
1647
|
// 排序相关属性
|
|
1636
1648
|
sortable: sortable,
|
|
1637
1649
|
// 索引列
|
|
1638
|
-
index: this.index
|
|
1650
|
+
index: this.index,
|
|
1651
|
+
// drag 列用它控制行是否可拖(见 config.js 的 cellForced.drag)
|
|
1652
|
+
rules: this.rules
|
|
1639
1653
|
});
|
|
1640
1654
|
|
|
1641
1655
|
// 收集不同类型的属性
|
|
@@ -1744,6 +1758,13 @@ var cellStarts = {
|
|
|
1744
1758
|
minWidth: 48,
|
|
1745
1759
|
realWidth: 48,
|
|
1746
1760
|
order: ''
|
|
1761
|
+
},
|
|
1762
|
+
drag: {
|
|
1763
|
+
width: 48,
|
|
1764
|
+
minWidth: 48,
|
|
1765
|
+
realWidth: 48,
|
|
1766
|
+
order: '',
|
|
1767
|
+
className: 'es-table__drag-column'
|
|
1747
1768
|
}
|
|
1748
1769
|
};
|
|
1749
1770
|
|
|
@@ -1908,6 +1929,51 @@ var cellForced = {
|
|
|
1908
1929
|
sortable: false,
|
|
1909
1930
|
resizable: false,
|
|
1910
1931
|
className: 'es-table__expand-column'
|
|
1932
|
+
},
|
|
1933
|
+
|
|
1934
|
+
drag: {
|
|
1935
|
+
/**
|
|
1936
|
+
* 拖拽列默认不渲染表头文案
|
|
1937
|
+
* @param {Function} h - createElement函数
|
|
1938
|
+
* @param {Object} options - 包含列配置的对象
|
|
1939
|
+
* @returns {VNode} Vue虚拟节点
|
|
1940
|
+
*/
|
|
1941
|
+
renderHeader: function renderHeader(h, _ref7) {
|
|
1942
|
+
var column = _ref7.column;
|
|
1943
|
+
|
|
1944
|
+
return column.label || '';
|
|
1945
|
+
},
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* 渲染拖拽手柄图标:这一列存在即代表开启行拖拽排序(见 table.vue 的
|
|
1949
|
+
* dragEnabled),Sortable 的 handle 指向 es-table__drag-handle。
|
|
1950
|
+
* rules 为函数时按行判定(返回假值该行不可拖),rules 显式为 false 时
|
|
1951
|
+
* 整列不可拖;不可拖时不给手柄类,Sortable 自然拖不动该行
|
|
1952
|
+
* @param {Function} h - createElement函数
|
|
1953
|
+
* @param {Object} options - 包含行数据、列配置等的对象
|
|
1954
|
+
* @returns {VNode} Vue虚拟节点
|
|
1955
|
+
*/
|
|
1956
|
+
renderCell: function renderCell(h, _ref8) {
|
|
1957
|
+
var row = _ref8.row,
|
|
1958
|
+
column = _ref8.column,
|
|
1959
|
+
$index = _ref8.$index,
|
|
1960
|
+
store = _ref8.store;
|
|
1961
|
+
|
|
1962
|
+
var rules = column.rules;
|
|
1963
|
+
var byRules = typeof rules === 'function' ? rules(row, { row: row, column: column, $index: $index, store: store }) !== false : rules !== false;
|
|
1964
|
+
// 行数据 fixed 为 true 的行本来就不可拖(tr 上的 drag-sort-disabled
|
|
1965
|
+
// 会被 Sortable 的 filter 拦掉),图标同步置灰
|
|
1966
|
+
var enabled = byRules && !(row && row.fixed);
|
|
1967
|
+
var classes = ['es-icon-tuozhuai'];
|
|
1968
|
+
if (enabled) {
|
|
1969
|
+
classes.push('es-table__drag-handle');
|
|
1970
|
+
} else {
|
|
1971
|
+
classes.push('is-disabled');
|
|
1972
|
+
}
|
|
1973
|
+
return h('i', { 'class': classes });
|
|
1974
|
+
},
|
|
1975
|
+
sortable: false,
|
|
1976
|
+
resizable: false
|
|
1911
1977
|
}
|
|
1912
1978
|
};
|
|
1913
1979
|
|
package/lib/table.js
CHANGED
|
@@ -1319,8 +1319,8 @@ function renderDom(h, _ref5) {
|
|
|
1319
1319
|
// ESM COMPAT FLAG
|
|
1320
1320
|
__webpack_require__.r(__webpack_exports__);
|
|
1321
1321
|
|
|
1322
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=template&id=
|
|
1323
|
-
var
|
|
1322
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/table/src/table.vue?vue&type=template&id=4f193eb2&
|
|
1323
|
+
var tablevue_type_template_id_4f193eb2_render = function () {
|
|
1324
1324
|
var _vm = this
|
|
1325
1325
|
var _h = _vm.$createElement
|
|
1326
1326
|
var _c = _vm._self._c || _h
|
|
@@ -1528,7 +1528,7 @@ var tablevue_type_template_id_10e33a98_render = function () {
|
|
|
1528
1528
|
1
|
|
1529
1529
|
)
|
|
1530
1530
|
: _vm._e(),
|
|
1531
|
-
_vm.fixedColumns.length > 0 && !_vm.
|
|
1531
|
+
_vm.fixedColumns.length > 0 && !_vm.dragEnabled
|
|
1532
1532
|
? _c(
|
|
1533
1533
|
"div",
|
|
1534
1534
|
{
|
|
@@ -1686,7 +1686,7 @@ var tablevue_type_template_id_10e33a98_render = function () {
|
|
|
1686
1686
|
]
|
|
1687
1687
|
)
|
|
1688
1688
|
: _vm._e(),
|
|
1689
|
-
_vm.rightFixedColumns.length > 0 && !_vm.
|
|
1689
|
+
_vm.rightFixedColumns.length > 0 && !_vm.dragEnabled
|
|
1690
1690
|
? _c(
|
|
1691
1691
|
"div",
|
|
1692
1692
|
{
|
|
@@ -1891,10 +1891,10 @@ var tablevue_type_template_id_10e33a98_render = function () {
|
|
|
1891
1891
|
)
|
|
1892
1892
|
}
|
|
1893
1893
|
var staticRenderFns = []
|
|
1894
|
-
|
|
1894
|
+
tablevue_type_template_id_4f193eb2_render._withStripped = true
|
|
1895
1895
|
|
|
1896
1896
|
|
|
1897
|
-
// CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=template&id=
|
|
1897
|
+
// CONCATENATED MODULE: ./packages/table/src/table.vue?vue&type=template&id=4f193eb2&
|
|
1898
1898
|
|
|
1899
1899
|
// EXTERNAL MODULE: external "throttle-debounce"
|
|
1900
1900
|
var external_throttle_debounce_ = __webpack_require__(13);
|
|
@@ -1907,7 +1907,7 @@ var mousewheel_js_ = __webpack_require__(155);
|
|
|
1907
1907
|
var mousewheel_js_default = /*#__PURE__*/__webpack_require__.n(mousewheel_js_);
|
|
1908
1908
|
|
|
1909
1909
|
// EXTERNAL MODULE: external "eoss/lib/mixins/migrating.js"
|
|
1910
|
-
var migrating_js_ = __webpack_require__(
|
|
1910
|
+
var migrating_js_ = __webpack_require__(30);
|
|
1911
1911
|
var migrating_js_default = /*#__PURE__*/__webpack_require__.n(migrating_js_);
|
|
1912
1912
|
|
|
1913
1913
|
// EXTERNAL MODULE: external "vue"
|
|
@@ -2642,7 +2642,12 @@ var doFlattenColumns = function doFlattenColumns(columns) {
|
|
|
2642
2642
|
*/
|
|
2643
2643
|
updateColumns: function updateColumns() {
|
|
2644
2644
|
var states = this.states;
|
|
2645
|
-
|
|
2645
|
+
// hide 是「是否隐藏列」的列级契约(文档 thead 列配置):隐藏列不参与
|
|
2646
|
+
// 渲染与布局,在列构建入口统一剔除,首屏与运行中换 thead(setThead)
|
|
2647
|
+
// 都经这一条路径生效;states._columns 仍保留全量供增删列等操作使用
|
|
2648
|
+
var _columns = (states._columns || []).filter(function (column) {
|
|
2649
|
+
return !column.hide;
|
|
2650
|
+
});
|
|
2646
2651
|
|
|
2647
2652
|
// 计算固定列和右侧固定列
|
|
2648
2653
|
states.fixedColumns = _columns.filter(function (column) {
|
|
@@ -2658,11 +2663,17 @@ var doFlattenColumns = function doFlattenColumns(columns) {
|
|
|
2658
2663
|
states.fixedColumns.unshift(_columns[0]);
|
|
2659
2664
|
}
|
|
2660
2665
|
|
|
2666
|
+
// 开启拖拽排序时左右固定层不渲染(见 table.vue 的 dragEnabled),fixed 不生效,
|
|
2667
|
+
// 也就不做「固定列前置」重排,保持声明顺序,避免列序被静默打乱
|
|
2668
|
+
var dragEnabled = _columns.some(function (column) {
|
|
2669
|
+
return column.type === 'drag';
|
|
2670
|
+
});
|
|
2671
|
+
|
|
2661
2672
|
// 计算非固定列并生成原始列配置
|
|
2662
2673
|
var notFixedColumns = _columns.filter(function (column) {
|
|
2663
2674
|
return !column.fixed;
|
|
2664
2675
|
});
|
|
2665
|
-
states.originColumns = [].concat(states.fixedColumns, notFixedColumns, states.rightFixedColumns);
|
|
2676
|
+
states.originColumns = dragEnabled ? [].concat(_columns) : [].concat(states.fixedColumns, notFixedColumns, states.rightFixedColumns);
|
|
2666
2677
|
|
|
2667
2678
|
// 扁平化各类列配置
|
|
2668
2679
|
var leafColumns = doFlattenColumns(notFixedColumns);
|
|
@@ -2675,7 +2686,7 @@ var doFlattenColumns = function doFlattenColumns(columns) {
|
|
|
2675
2686
|
states.rightFixedLeafColumnsLength = rightFixedLeafColumns.length;
|
|
2676
2687
|
|
|
2677
2688
|
// 生成最终的列配置和复杂度标记
|
|
2678
|
-
states.columns = [].concat(fixedLeafColumns, leafColumns, rightFixedLeafColumns);
|
|
2689
|
+
states.columns = dragEnabled ? doFlattenColumns(_columns) : [].concat(fixedLeafColumns, leafColumns, rightFixedLeafColumns);
|
|
2679
2690
|
states.isComplex = states.fixedColumns.length > 0 || states.rightFixedColumns.length > 0;
|
|
2680
2691
|
},
|
|
2681
2692
|
|
|
@@ -3275,14 +3286,17 @@ watcher.prototype.mutations = {
|
|
|
3275
3286
|
// 特殊类型列不设置默认 renderHeader,交由 setColumnRenders 应用 cellForced 的强制渲染(如 selection 复选框)
|
|
3276
3287
|
var columnId = 'es-table_1_column_' + Math.floor(Math.random() * 10000);
|
|
3277
3288
|
var column = null;
|
|
3278
|
-
if (type === 'selection' || type === 'index' || type === 'expand') {
|
|
3289
|
+
if (type === 'selection' || type === 'index' || type === 'expand' || type === 'drag') {
|
|
3279
3290
|
column = store_extends({
|
|
3280
3291
|
id: columnId,
|
|
3281
3292
|
type: type,
|
|
3282
3293
|
label: _label,
|
|
3283
3294
|
prop: _field,
|
|
3284
3295
|
property: _field
|
|
3285
|
-
}, src_config["b" /* cellStarts */][type], normalized, config
|
|
3296
|
+
}, src_config["b" /* cellStarts */][type], normalized, config, {
|
|
3297
|
+
// drag 列用 rules 控制行是否可拖(见 config.js)
|
|
3298
|
+
rules: rules
|
|
3299
|
+
});
|
|
3286
3300
|
} else {
|
|
3287
3301
|
column = store_extends({
|
|
3288
3302
|
id: columnId,
|
|
@@ -3291,7 +3305,9 @@ watcher.prototype.mutations = {
|
|
|
3291
3305
|
property: _field,
|
|
3292
3306
|
formatter: formatter
|
|
3293
3307
|
}, normalized, {
|
|
3294
|
-
required: _required
|
|
3308
|
+
required: _required,
|
|
3309
|
+
// 保留 rules 到列对象:drag 列用它控制行是否可拖(见 config.js)
|
|
3310
|
+
rules: rules
|
|
3295
3311
|
});
|
|
3296
3312
|
}
|
|
3297
3313
|
var childrens = null;
|
|
@@ -3463,7 +3479,7 @@ watcher.prototype.mutations = {
|
|
|
3463
3479
|
};
|
|
3464
3480
|
} else if (children) {
|
|
3465
3481
|
column.children = createColumns(children);
|
|
3466
|
-
} else if (type === 'selection' || type === 'index' || type === 'expand') {
|
|
3482
|
+
} else if (type === 'selection' || type === 'index' || type === 'expand' || type === 'drag') {
|
|
3467
3483
|
// 特殊类型列不设置默认 renderCell,由 setColumnRenders 套用 cellForced 中的强制渲染函数
|
|
3468
3484
|
} else {
|
|
3469
3485
|
// 如果用户配置了render函数,则使用用户的render函数
|
|
@@ -3545,6 +3561,11 @@ watcher.prototype.mutations = {
|
|
|
3545
3561
|
|
|
3546
3562
|
states._columns = createColumns(thead);
|
|
3547
3563
|
this.updateColumns();
|
|
3564
|
+
// 换 thead 后列对象全部新建、realWidth 为空,若不重排布局,
|
|
3565
|
+
// 表头与表体 colgroup 会各自按内容回退自动表格布局,列宽错位(sizer 确认改表头后必现)
|
|
3566
|
+
if (this.table && this.table.$ready) {
|
|
3567
|
+
this.scheduleLayout();
|
|
3568
|
+
}
|
|
3548
3569
|
},
|
|
3549
3570
|
|
|
3550
3571
|
|
|
@@ -3866,7 +3887,7 @@ function mapStates(mapper) {
|
|
|
3866
3887
|
return result;
|
|
3867
3888
|
}
|
|
3868
3889
|
// EXTERNAL MODULE: external "eoss/lib/utils/scrollbar.js"
|
|
3869
|
-
var scrollbar_js_ = __webpack_require__(
|
|
3890
|
+
var scrollbar_js_ = __webpack_require__(33);
|
|
3870
3891
|
|
|
3871
3892
|
// CONCATENATED MODULE: ./packages/table/src/table-layout.js
|
|
3872
3893
|
var table_layout_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
@@ -4991,8 +5012,8 @@ var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator =
|
|
|
4991
5012
|
},
|
|
4992
5013
|
|
|
4993
5014
|
|
|
4994
|
-
//
|
|
4995
|
-
'
|
|
5015
|
+
// 监听拖拽列(type: 'drag')的增删,有则开启拖拽排序
|
|
5016
|
+
'table.dragEnabled': function tableDragEnabled(val) {
|
|
4996
5017
|
if (val) {
|
|
4997
5018
|
this.initSortable();
|
|
4998
5019
|
} else {
|
|
@@ -5015,7 +5036,7 @@ var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator =
|
|
|
5015
5036
|
});
|
|
5016
5037
|
},
|
|
5017
5038
|
mounted: function mounted() {
|
|
5018
|
-
if (this
|
|
5039
|
+
if (this.table.dragEnabled) {
|
|
5019
5040
|
this.initSortable();
|
|
5020
5041
|
}
|
|
5021
5042
|
},
|
|
@@ -5040,7 +5061,9 @@ var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator =
|
|
|
5040
5061
|
this.$nextTick(function () {
|
|
5041
5062
|
try {
|
|
5042
5063
|
_this3._sortable = new external_sortablejs_default.a(_this3.$refs.dragSort, {
|
|
5043
|
-
|
|
5064
|
+
// 手柄就是拖拽列里的图标;不可拖的行(rules 判定为假、
|
|
5065
|
+
// 或行数据 fixed 为 true)不带这个类,因此拖不动
|
|
5066
|
+
handle: '.es-table__drag-handle',
|
|
5044
5067
|
animation: 150,
|
|
5045
5068
|
onUpdate: _this3.handleUpdate,
|
|
5046
5069
|
filter: '.drag-sort-disabled'
|
|
@@ -5090,6 +5113,9 @@ var table_body_typeof = typeof Symbol === "function" && typeof Symbol.iterator =
|
|
|
5090
5113
|
} else if (this.fixed === 'right') {
|
|
5091
5114
|
return index < this.columnsCount - this.rightFixedLeafCount;
|
|
5092
5115
|
} else {
|
|
5116
|
+
// 开启拖拽排序时左右固定层不渲染(见 table.vue 的 dragEnabled),
|
|
5117
|
+
// 固定列只能靠主表显示,不能再用 is-hidden 藏起来
|
|
5118
|
+
if (this.table.dragEnabled) return false;
|
|
5093
5119
|
return index < this.leftFixedLeafCount || index >= this.columnsCount - this.rightFixedLeafCount;
|
|
5094
5120
|
}
|
|
5095
5121
|
},
|
|
@@ -6023,11 +6049,11 @@ var vue_popper_js_ = __webpack_require__(16);
|
|
|
6023
6049
|
var vue_popper_js_default = /*#__PURE__*/__webpack_require__.n(vue_popper_js_);
|
|
6024
6050
|
|
|
6025
6051
|
// EXTERNAL MODULE: external "eoss/lib/utils/popup/popup-manager.js"
|
|
6026
|
-
var popup_manager_js_ = __webpack_require__(
|
|
6052
|
+
var popup_manager_js_ = __webpack_require__(27);
|
|
6027
6053
|
var popup_manager_js_default = /*#__PURE__*/__webpack_require__.n(popup_manager_js_);
|
|
6028
6054
|
|
|
6029
6055
|
// EXTERNAL MODULE: external "eoss/lib/utils/clickoutside.js"
|
|
6030
|
-
var clickoutside_js_ = __webpack_require__(
|
|
6056
|
+
var clickoutside_js_ = __webpack_require__(28);
|
|
6031
6057
|
var clickoutside_js_default = /*#__PURE__*/__webpack_require__.n(clickoutside_js_);
|
|
6032
6058
|
|
|
6033
6059
|
// CONCATENATED MODULE: ./packages/table/src/dropdown.js
|
|
@@ -6639,7 +6665,7 @@ var convertToRows = function convertToRows(originColumns) {
|
|
|
6639
6665
|
{
|
|
6640
6666
|
'class': ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName]
|
|
6641
6667
|
},
|
|
6642
|
-
[_this.
|
|
6668
|
+
[_this._renderfilterColumn(h, column), _this._renderColumnLabel(h, cellIndex, column), _this._renderSortIcon(h, column), _this._renderFilterTrigger(h, column), _this._renderColumnIcon(h, column), _this._renderColumnButton(h, column)]
|
|
6643
6669
|
)]
|
|
6644
6670
|
);
|
|
6645
6671
|
}), _this.hasGutter && _this._renderGutterCell(columnRows, rowIndex)]
|
|
@@ -6790,6 +6816,8 @@ var convertToRows = function convertToRows(originColumns) {
|
|
|
6790
6816
|
} else if (this.fixed === 'right') {
|
|
6791
6817
|
return start < this.columnsCount - this.rightFixedLeafCount;
|
|
6792
6818
|
} else {
|
|
6819
|
+
// 开启拖拽排序时左右固定层不渲染,固定列表头只能靠主表显示
|
|
6820
|
+
if (this.table.dragEnabled) return false;
|
|
6793
6821
|
return after < this.leftFixedLeafCount || start >= this.columnsCount - this.rightFixedLeafCount;
|
|
6794
6822
|
}
|
|
6795
6823
|
},
|
|
@@ -6960,7 +6988,8 @@ var convertToRows = function convertToRows(originColumns) {
|
|
|
6960
6988
|
* @param {Event} event - 事件对象
|
|
6961
6989
|
* @param {Object} column - 列配置
|
|
6962
6990
|
*/
|
|
6963
|
-
|
|
6991
|
+
handlefilterColumnumn: function handlefilterColumnumn(event, column) {
|
|
6992
|
+
console.log('filter-column');
|
|
6964
6993
|
if (this.$parent) {
|
|
6965
6994
|
this.$parent.$emit('filter-column', column, event);
|
|
6966
6995
|
}
|
|
@@ -7095,10 +7124,10 @@ var convertToRows = function convertToRows(originColumns) {
|
|
|
7095
7124
|
* @param {Object} column - 列配置
|
|
7096
7125
|
* @returns {VNode|null} 渲染结果
|
|
7097
7126
|
*/
|
|
7098
|
-
|
|
7127
|
+
_renderfilterColumn: function _renderfilterColumn(h, column) {
|
|
7099
7128
|
var _this3 = this;
|
|
7100
7129
|
|
|
7101
|
-
if (!column.
|
|
7130
|
+
if (!column.filterColumn) return null;
|
|
7102
7131
|
|
|
7103
7132
|
return h(
|
|
7104
7133
|
'span',
|
|
@@ -7106,12 +7135,12 @@ var convertToRows = function convertToRows(originColumns) {
|
|
|
7106
7135
|
'class': 'filter-column',
|
|
7107
7136
|
on: {
|
|
7108
7137
|
'click': function click($event) {
|
|
7109
|
-
return _this3.
|
|
7138
|
+
return _this3.handlefilterColumnumn($event, column);
|
|
7110
7139
|
}
|
|
7111
7140
|
}
|
|
7112
7141
|
},
|
|
7113
7142
|
[h('i', {
|
|
7114
|
-
'class': [typeof column.
|
|
7143
|
+
'class': [typeof column.filterColumn === 'string' ? column.filterColumn : 'es-icon-yingyong', 'filter-icon']
|
|
7115
7144
|
})]
|
|
7116
7145
|
);
|
|
7117
7146
|
},
|
|
@@ -7918,9 +7947,11 @@ var table_footer_typeof = typeof Symbol === "function" && typeof Symbol.iterator
|
|
|
7918
7947
|
}
|
|
7919
7948
|
return before < this.columnsCount - this.rightFixedLeafCount;
|
|
7920
7949
|
} else if (!this.fixed && column && column.fixed) {
|
|
7921
|
-
//
|
|
7922
|
-
|
|
7950
|
+
// 当页脚实例不固定而列固定时隐藏单元格;
|
|
7951
|
+
// 开启拖拽排序时固定层不渲染,固定列要留在主表里显示
|
|
7952
|
+
return !this.table.dragEnabled;
|
|
7923
7953
|
} else {
|
|
7954
|
+
if (this.table.dragEnabled) return false;
|
|
7924
7955
|
return index < this.leftFixedCount || index >= this.columnsCount - this.rightFixedCount;
|
|
7925
7956
|
}
|
|
7926
7957
|
},
|
|
@@ -8628,17 +8659,6 @@ var tableIdSeed = 1;
|
|
|
8628
8659
|
* @default 'auto'
|
|
8629
8660
|
*/
|
|
8630
8661
|
tooltipWidth: { type: String, default: 'auto' },
|
|
8631
|
-
/**
|
|
8632
|
-
* 是否开启拖拽排序
|
|
8633
|
-
* @type {Boolean}
|
|
8634
|
-
* @default false
|
|
8635
|
-
*/
|
|
8636
|
-
dragSort: Boolean,
|
|
8637
|
-
/**
|
|
8638
|
-
* 拖拽排序的类名
|
|
8639
|
-
* @type {String}
|
|
8640
|
-
*/
|
|
8641
|
-
dragSortClass: String,
|
|
8642
8662
|
/**
|
|
8643
8663
|
* 无限滚动的回调方法
|
|
8644
8664
|
* @type {Function}
|
|
@@ -8736,13 +8756,10 @@ var tableIdSeed = 1;
|
|
|
8736
8756
|
},
|
|
8737
8757
|
scrollStyle: function scrollStyle() {
|
|
8738
8758
|
var _layout3 = this.layout,
|
|
8739
|
-
gutterWidth = _layout3.gutterWidth,
|
|
8740
8759
|
_layout3$headerHeight = _layout3.headerHeight,
|
|
8741
8760
|
headerHeight = _layout3$headerHeight === undefined ? 0 : _layout3$headerHeight,
|
|
8742
8761
|
_layout3$footerHeight = _layout3.footerHeight,
|
|
8743
|
-
footerHeight = _layout3$footerHeight === undefined ? 0 : _layout3$footerHeight
|
|
8744
|
-
scrollX = _layout3.scrollX,
|
|
8745
|
-
scrollY = _layout3.scrollY;
|
|
8762
|
+
footerHeight = _layout3$footerHeight === undefined ? 0 : _layout3$footerHeight;
|
|
8746
8763
|
|
|
8747
8764
|
var height = 0;
|
|
8748
8765
|
var maxHeight = 0;
|
|
@@ -8751,11 +8768,14 @@ var tableIdSeed = 1;
|
|
|
8751
8768
|
} else if (this.maxHeight) {
|
|
8752
8769
|
maxHeight = Object(util["l" /* parseHeight */])(this.maxHeight) - footerHeight - (this.showHeader ? headerHeight : 0);
|
|
8753
8770
|
}
|
|
8771
|
+
// 美化滚动条时原生条已由 CSS 隐藏(见 table.scss),不占位也就无需
|
|
8772
|
+
// 按条宽加宽/加高容器;此前的 calc(100% + gutterWidth) 在浏览器缩放时
|
|
8773
|
+
// 和实际条宽对不上,容器右、下两侧会露出一条灰边
|
|
8754
8774
|
return {
|
|
8755
|
-
width:
|
|
8756
|
-
height: height
|
|
8775
|
+
width: '100%',
|
|
8776
|
+
height: height ? height + 'px' : '100%',
|
|
8757
8777
|
maxHeight: maxHeight ? maxHeight + 'px' : '',
|
|
8758
|
-
'overflow-x': height
|
|
8778
|
+
'overflow-x': height ? '' : 'hidden'
|
|
8759
8779
|
};
|
|
8760
8780
|
},
|
|
8761
8781
|
fixedBodyHeight: function fixedBodyHeight() {
|
|
@@ -8813,6 +8833,28 @@ var tableIdSeed = 1;
|
|
|
8813
8833
|
rightFixedColumns: 'rightFixedColumns'
|
|
8814
8834
|
}), {
|
|
8815
8835
|
|
|
8836
|
+
/**
|
|
8837
|
+
* 是否开启行拖拽排序:有 type 为 drag 的列即开启,
|
|
8838
|
+
* 该列自己渲染拖拽手柄图标(见 config.js 的 cellForced.drag)
|
|
8839
|
+
* @returns {Boolean}
|
|
8840
|
+
*/
|
|
8841
|
+
dragEnabled: function dragEnabled() {
|
|
8842
|
+
return this.columns.some(function (column) {
|
|
8843
|
+
return column.type === 'drag';
|
|
8844
|
+
});
|
|
8845
|
+
},
|
|
8846
|
+
|
|
8847
|
+
|
|
8848
|
+
/**
|
|
8849
|
+
* 是否同时配了拖拽排序和固定列:两者互斥(开启拖拽后固定层不渲染),
|
|
8850
|
+
* 用于给一次显式告警,避免 fixed 静默失效
|
|
8851
|
+
* @returns {Boolean}
|
|
8852
|
+
*/
|
|
8853
|
+
dragFixedConflict: function dragFixedConflict() {
|
|
8854
|
+
return this.dragEnabled && (this.fixedColumns.length > 0 || this.rightFixedColumns.length > 0);
|
|
8855
|
+
},
|
|
8856
|
+
|
|
8857
|
+
|
|
8816
8858
|
// 优化类名绑定,提高模板可读性
|
|
8817
8859
|
getTableClasses: function getTableClasses() {
|
|
8818
8860
|
var _ref;
|
|
@@ -8840,6 +8882,18 @@ var tableIdSeed = 1;
|
|
|
8840
8882
|
}),
|
|
8841
8883
|
|
|
8842
8884
|
watch: {
|
|
8885
|
+
dragFixedConflict: {
|
|
8886
|
+
immediate: true,
|
|
8887
|
+
handler: function handler(val) {
|
|
8888
|
+
// 固定列靠另一张浮层表渲染,Sortable 只挪主表的行,两者没法共存;
|
|
8889
|
+
// 冲突时告警一次,避免消费方配了 fixed 却发现不生效又查不到原因
|
|
8890
|
+
if (val && "production" !== 'production' && !this._dragFixedWarned) {
|
|
8891
|
+
this._dragFixedWarned = true;
|
|
8892
|
+
console.warn('[Warn][Table]存在 type 为 drag 的列时开启行拖拽排序,左右固定列不会渲染,fixed 不生效');
|
|
8893
|
+
}
|
|
8894
|
+
}
|
|
8895
|
+
},
|
|
8896
|
+
|
|
8843
8897
|
// 优化高度变化监听,使用防抖减少频繁更新
|
|
8844
8898
|
height: {
|
|
8845
8899
|
immediate: true,
|
|
@@ -9752,7 +9806,7 @@ var tableIdSeed = 1;
|
|
|
9752
9806
|
|
|
9753
9807
|
var table_component = Object(componentNormalizer["a" /* default */])(
|
|
9754
9808
|
src_tablevue_type_script_lang_js_,
|
|
9755
|
-
|
|
9809
|
+
tablevue_type_template_id_4f193eb2_render,
|
|
9756
9810
|
staticRenderFns,
|
|
9757
9811
|
false,
|
|
9758
9812
|
null,
|
|
@@ -9812,35 +9866,35 @@ module.exports = require("eoss/lib/checkbox-group");
|
|
|
9812
9866
|
/***/ 27:
|
|
9813
9867
|
/***/ (function(module, exports) {
|
|
9814
9868
|
|
|
9815
|
-
module.exports = require("eoss/lib/utils/
|
|
9869
|
+
module.exports = require("eoss/lib/utils/popup/popup-manager.js");
|
|
9816
9870
|
|
|
9817
9871
|
/***/ }),
|
|
9818
9872
|
|
|
9819
9873
|
/***/ 28:
|
|
9820
9874
|
/***/ (function(module, exports) {
|
|
9821
9875
|
|
|
9822
|
-
module.exports = require("eoss/lib/utils/
|
|
9876
|
+
module.exports = require("eoss/lib/utils/clickoutside.js");
|
|
9823
9877
|
|
|
9824
9878
|
/***/ }),
|
|
9825
9879
|
|
|
9826
|
-
/***/
|
|
9880
|
+
/***/ 3:
|
|
9827
9881
|
/***/ (function(module, exports) {
|
|
9828
9882
|
|
|
9829
|
-
module.exports = require("eoss/lib/utils/
|
|
9883
|
+
module.exports = require("eoss/lib/utils/ajax.js");
|
|
9830
9884
|
|
|
9831
9885
|
/***/ }),
|
|
9832
9886
|
|
|
9833
|
-
/***/
|
|
9887
|
+
/***/ 30:
|
|
9834
9888
|
/***/ (function(module, exports) {
|
|
9835
9889
|
|
|
9836
|
-
module.exports = require("eoss/lib/
|
|
9890
|
+
module.exports = require("eoss/lib/mixins/migrating.js");
|
|
9837
9891
|
|
|
9838
9892
|
/***/ }),
|
|
9839
9893
|
|
|
9840
|
-
/***/
|
|
9894
|
+
/***/ 33:
|
|
9841
9895
|
/***/ (function(module, exports) {
|
|
9842
9896
|
|
|
9843
|
-
module.exports = require("eoss/lib/
|
|
9897
|
+
module.exports = require("eoss/lib/utils/scrollbar.js");
|
|
9844
9898
|
|
|
9845
9899
|
/***/ }),
|
|
9846
9900
|
|
|
@@ -9897,6 +9951,13 @@ var cellStarts = {
|
|
|
9897
9951
|
minWidth: 48,
|
|
9898
9952
|
realWidth: 48,
|
|
9899
9953
|
order: ''
|
|
9954
|
+
},
|
|
9955
|
+
drag: {
|
|
9956
|
+
width: 48,
|
|
9957
|
+
minWidth: 48,
|
|
9958
|
+
realWidth: 48,
|
|
9959
|
+
order: '',
|
|
9960
|
+
className: 'es-table__drag-column'
|
|
9900
9961
|
}
|
|
9901
9962
|
};
|
|
9902
9963
|
|
|
@@ -10061,6 +10122,51 @@ var cellForced = {
|
|
|
10061
10122
|
sortable: false,
|
|
10062
10123
|
resizable: false,
|
|
10063
10124
|
className: 'es-table__expand-column'
|
|
10125
|
+
},
|
|
10126
|
+
|
|
10127
|
+
drag: {
|
|
10128
|
+
/**
|
|
10129
|
+
* 拖拽列默认不渲染表头文案
|
|
10130
|
+
* @param {Function} h - createElement函数
|
|
10131
|
+
* @param {Object} options - 包含列配置的对象
|
|
10132
|
+
* @returns {VNode} Vue虚拟节点
|
|
10133
|
+
*/
|
|
10134
|
+
renderHeader: function renderHeader(h, _ref7) {
|
|
10135
|
+
var column = _ref7.column;
|
|
10136
|
+
|
|
10137
|
+
return column.label || '';
|
|
10138
|
+
},
|
|
10139
|
+
|
|
10140
|
+
/**
|
|
10141
|
+
* 渲染拖拽手柄图标:这一列存在即代表开启行拖拽排序(见 table.vue 的
|
|
10142
|
+
* dragEnabled),Sortable 的 handle 指向 es-table__drag-handle。
|
|
10143
|
+
* rules 为函数时按行判定(返回假值该行不可拖),rules 显式为 false 时
|
|
10144
|
+
* 整列不可拖;不可拖时不给手柄类,Sortable 自然拖不动该行
|
|
10145
|
+
* @param {Function} h - createElement函数
|
|
10146
|
+
* @param {Object} options - 包含行数据、列配置等的对象
|
|
10147
|
+
* @returns {VNode} Vue虚拟节点
|
|
10148
|
+
*/
|
|
10149
|
+
renderCell: function renderCell(h, _ref8) {
|
|
10150
|
+
var row = _ref8.row,
|
|
10151
|
+
column = _ref8.column,
|
|
10152
|
+
$index = _ref8.$index,
|
|
10153
|
+
store = _ref8.store;
|
|
10154
|
+
|
|
10155
|
+
var rules = column.rules;
|
|
10156
|
+
var byRules = typeof rules === 'function' ? rules(row, { row: row, column: column, $index: $index, store: store }) !== false : rules !== false;
|
|
10157
|
+
// 行数据 fixed 为 true 的行本来就不可拖(tr 上的 drag-sort-disabled
|
|
10158
|
+
// 会被 Sortable 的 filter 拦掉),图标同步置灰
|
|
10159
|
+
var enabled = byRules && !(row && row.fixed);
|
|
10160
|
+
var classes = ['es-icon-tuozhuai'];
|
|
10161
|
+
if (enabled) {
|
|
10162
|
+
classes.push('es-table__drag-handle');
|
|
10163
|
+
} else {
|
|
10164
|
+
classes.push('is-disabled');
|
|
10165
|
+
}
|
|
10166
|
+
return h('i', { 'class': classes });
|
|
10167
|
+
},
|
|
10168
|
+
sortable: false,
|
|
10169
|
+
resizable: false
|
|
10064
10170
|
}
|
|
10065
10171
|
};
|
|
10066
10172
|
|
package/lib/tabs.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 204);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -206,7 +206,7 @@ module.exports = require("babel-helper-vue-jsx-merge-props");
|
|
|
206
206
|
|
|
207
207
|
/***/ }),
|
|
208
208
|
|
|
209
|
-
/***/
|
|
209
|
+
/***/ 204:
|
|
210
210
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
211
211
|
|
|
212
212
|
"use strict";
|