bkui-vue 0.0.3-beta.1 → 0.0.3-beta.2-1
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/dist/index.cjs.js +48 -48
- package/dist/index.esm.js +11098 -10973
- package/dist/index.umd.js +48 -48
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/index.d.ts +57 -111
- package/lib/affix/index.js +19 -19
- package/lib/alert/alert.d.ts +1 -1
- package/lib/alert/index.d.ts +82 -132
- package/lib/alert/index.js +20 -20
- package/lib/animate-number/index.d.ts +33 -96
- package/lib/backtop/index.d.ts +69 -117
- package/lib/badge/badge.d.ts +1 -1
- package/lib/badge/index.d.ts +120 -153
- package/lib/badge/index.js +19 -19
- package/lib/breadcrumb/index.d.ts +67 -119
- package/lib/breadcrumb/index.js +17 -17
- package/lib/button/button.d.ts +2 -2
- package/lib/button/index.d.ts +119 -155
- package/lib/button/index.js +19 -20
- package/lib/card/card.d.ts +1 -1
- package/lib/card/index.d.ts +129 -158
- package/lib/card/index.js +20 -22
- package/lib/cascader/cascader.d.ts +3 -3
- package/lib/cascader/index.d.ts +393 -354
- package/lib/cascader/index.js +233 -234
- package/lib/checkbox/checkbox.d.ts +1 -1
- package/lib/checkbox/index.d.ts +119 -161
- package/lib/checkbox/index.js +39 -41
- package/lib/code-diff/index.d.ts +65 -82
- package/lib/code-diff/index.js +380 -437
- package/lib/collapse/index.d.ts +144 -168
- package/lib/collapse/index.js +21 -21
- package/lib/collapse-transition/index.d.ts +19 -94
- package/lib/color-picker/color-picker.d.ts +1 -1
- package/lib/color-picker/index.d.ts +128 -154
- package/lib/color-picker/index.js +25 -28
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/index.d.ts +159 -222
- package/lib/config-provider/index.js +19 -19
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/container.d.ts +1 -1
- package/lib/container/index.d.ts +74 -85
- package/lib/container/index.js +19 -19
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -1
- package/lib/date-picker/base/time-spinner.d.ts +3 -3
- package/lib/date-picker/date-picker.d.ts +3 -3
- package/lib/date-picker/index.d.ts +384 -351
- package/lib/date-picker/index.js +92 -104
- package/lib/date-picker/panel/date-range.d.ts +1 -1
- package/lib/date-picker/panel/date.d.ts +1 -1
- package/lib/date-picker/panel/time-range.d.ts +2 -2
- package/lib/date-picker/panel/time.d.ts +1 -1
- package/lib/date-picker/time-picker.d.ts +3 -3
- package/lib/dialog/index.d.ts +345 -302
- package/lib/dialog/index.js +227 -228
- package/lib/directives/index.js +27 -27
- package/lib/divider/index.d.ts +57 -111
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/index.d.ts +94 -136
- package/lib/dropdown/index.js +17 -17
- package/lib/exception/index.d.ts +41 -102
- package/lib/exception/index.js +18 -19
- package/lib/fixed-navbar/index.d.ts +59 -113
- package/lib/form/form.d.ts +1 -1
- package/lib/form/index.d.ts +80 -132
- package/lib/form/index.js +25 -26
- package/lib/icon/angle-double-down-line.js +21 -21
- package/lib/icon/angle-double-left-line.js +21 -21
- package/lib/icon/angle-double-left.js +21 -21
- package/lib/icon/angle-double-right-line.js +21 -21
- package/lib/icon/angle-double-right.js +21 -21
- package/lib/icon/angle-double-up-line.js +21 -21
- package/lib/icon/angle-down-fill.js +21 -21
- package/lib/icon/angle-down-line.js +21 -21
- package/lib/icon/angle-down.js +21 -21
- package/lib/icon/angle-left.js +21 -21
- package/lib/icon/angle-right.js +21 -21
- package/lib/icon/angle-up-fill.js +21 -21
- package/lib/icon/angle-up.js +21 -21
- package/lib/icon/archive-fill.js +21 -21
- package/lib/icon/arrows-left.js +21 -21
- package/lib/icon/arrows-right.js +21 -21
- package/lib/icon/assistant.js +21 -21
- package/lib/icon/audio-fill.js +21 -21
- package/lib/icon/bk.js +21 -21
- package/lib/icon/circle.js +21 -21
- package/lib/icon/close-line.js +21 -21
- package/lib/icon/close.js +21 -21
- package/lib/icon/code.js +21 -21
- package/lib/icon/cog-shape.js +21 -21
- package/lib/icon/collapse-left.js +21 -21
- package/lib/icon/copy-shape.js +21 -21
- package/lib/icon/copy.js +21 -21
- package/lib/icon/data-shape.js +21 -21
- package/lib/icon/del.js +21 -21
- package/lib/icon/doc-fill.js +21 -21
- package/lib/icon/done.js +21 -21
- package/lib/icon/down-shape.js +21 -21
- package/lib/icon/down-small.js +21 -21
- package/lib/icon/edit-line.js +21 -21
- package/lib/icon/ellipsis.js +21 -21
- package/lib/icon/enlarge-line.js +21 -21
- package/lib/icon/error.js +21 -21
- package/lib/icon/excel-fill.js +21 -21
- package/lib/icon/exclamation-circle-shape.js +21 -21
- package/lib/icon/eye.js +21 -21
- package/lib/icon/filliscreen-line.js +21 -21
- package/lib/icon/fix-line.js +21 -21
- package/lib/icon/fix-shape.js +21 -21
- package/lib/icon/folder-open.js +21 -21
- package/lib/icon/folder-shape-open.js +21 -21
- package/lib/icon/folder-shape.js +21 -21
- package/lib/icon/folder.js +21 -21
- package/lib/icon/funnel.js +21 -21
- package/lib/icon/grag-fill.d.ts +4 -0
- package/lib/icon/grag-fill.js +191 -0
- package/lib/icon/help-document-fill.js +21 -21
- package/lib/icon/help-fill.js +21 -21
- package/lib/icon/help.js +21 -21
- package/lib/icon/image-fill.js +22 -22
- package/lib/icon/img-error.js +22 -22
- package/lib/icon/img-placehoulder.js +22 -22
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +211 -191
- package/lib/icon/info-line.js +22 -22
- package/lib/icon/info.js +22 -22
- package/lib/icon/left-shape.js +22 -22
- package/lib/icon/left-turn-line.js +22 -22
- package/lib/icon/loading.js +22 -22
- package/lib/icon/narrow-line.js +22 -22
- package/lib/icon/original.js +22 -22
- package/lib/icon/pdf-fill.js +22 -22
- package/lib/icon/play-shape.js +22 -22
- package/lib/icon/plus.js +22 -22
- package/lib/icon/ppt-fill.js +22 -22
- package/lib/icon/qq.js +22 -22
- package/lib/icon/right-shape.js +22 -22
- package/lib/icon/right-turn-line.js +22 -22
- package/lib/icon/search.js +22 -22
- package/lib/icon/share.js +22 -22
- package/lib/icon/spinner.js +22 -22
- package/lib/icon/success.js +22 -22
- package/lib/icon/switcher-loading.js +22 -22
- package/lib/icon/text-file.js +22 -22
- package/lib/icon/text-fill.js +22 -22
- package/lib/icon/transfer.js +22 -22
- package/lib/icon/tree-application-shape.js +22 -22
- package/lib/icon/unfull-screen.js +22 -22
- package/lib/icon/unvisible.js +22 -22
- package/lib/icon/up-shape.js +22 -22
- package/lib/icon/upload.js +22 -22
- package/lib/icon/video-fill.js +22 -22
- package/lib/icon/warn.js +22 -22
- package/lib/icon/weixin-pro.js +22 -22
- package/lib/icon/weixin.js +22 -22
- package/lib/image/index.d.ts +113 -149
- package/lib/image/index.js +19 -19
- package/lib/info-box/index.js +229 -230
- package/lib/input/index.d.ts +326 -293
- package/lib/input/index.js +256 -258
- package/lib/link/index.d.ts +73 -122
- package/lib/loading/index.d.ts +130 -156
- package/lib/loading/index.js +23 -25
- package/lib/loading/loading.d.ts +1 -1
- package/lib/locale/index.js +2 -4
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.d.ts +51 -112
- package/lib/menu/index.js +25 -25
- package/lib/message/index.js +28 -30
- package/lib/message/messageConstructor.d.ts +5 -5
- package/lib/modal/index.d.ts +251 -246
- package/lib/modal/index.js +24 -24
- package/lib/navigation/index.d.ts +152 -188
- package/lib/notify/index.js +22 -24
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/overflow-title/index.d.ts +314 -242
- package/lib/overflow-title/index.js +1 -1
- package/lib/pagination/index.d.ts +194 -205
- package/lib/pagination/index.js +49 -56
- package/lib/plugin-popover/index.js +192 -98
- package/lib/pop-confirm/index.d.ts +126 -159
- package/lib/pop-confirm/index.js +0 -1
- package/lib/pop-confirm/pop-confirm.d.ts +1 -1
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.d.ts +374 -330
- package/lib/popover/index.js +192 -98
- package/lib/popover2/index.d.ts +8 -83
- package/lib/preset.d.ts +2 -0
- package/lib/process/index.d.ts +93 -137
- package/lib/process/index.js +225 -226
- package/lib/progress/index.d.ts +178 -187
- package/lib/progress/index.js +19 -19
- package/lib/progress/progress.d.ts +2 -2
- package/lib/radio/index.d.ts +83 -135
- package/lib/radio/index.js +41 -43
- package/lib/rate/index.d.ts +55 -112
- package/lib/rate/index.js +19 -20
- package/lib/resize-layout/index.d.ts +156 -185
- package/lib/resize-layout/index.js +20 -21
- package/lib/resize-layout/resize-layout.d.ts +2 -2
- package/lib/search-select/index.d.ts +292 -327
- package/lib/search-select/index.js +239 -240
- package/lib/search-select/input.d.ts +2 -2
- package/lib/search-select/search-select.d.ts +3 -3
- package/lib/search-select/selected.d.ts +2 -2
- package/lib/select/index.d.ts +1234 -1135
- package/lib/select/index.js +259 -262
- package/lib/select/select.d.ts +121 -161
- package/lib/select/selectTagInput.d.ts +2 -2
- package/lib/shared/index.js +62 -64
- package/lib/sideslider/index.d.ts +237 -226
- package/lib/sideslider/index.js +227 -227
- package/lib/slider/index.d.ts +204 -204
- package/lib/slider/index.js +208 -209
- package/lib/steps/index.d.ts +114 -150
- package/lib/steps/index.js +227 -228
- package/lib/swiper/index.d.ts +81 -127
- package/lib/swiper/index.js +18 -18
- package/lib/switcher/index.d.ts +152 -174
- package/lib/switcher/index.js +20 -22
- package/lib/tab/index.d.ts +199 -211
- package/lib/tab/index.js +23 -25
- package/lib/table/components/table-column.d.ts +2 -2
- package/lib/table/events.d.ts +10 -1
- package/lib/table/index.d.ts +624 -573
- package/lib/table/index.js +301 -142
- package/lib/table/plugins/use-draggable.d.ts +17 -0
- package/lib/table/plugins/use-pagination.d.ts +3 -2
- package/lib/table/props.d.ts +13 -0
- package/lib/table/table.css +25 -0
- package/lib/table/table.d.ts +16 -1
- package/lib/table/table.less +25 -0
- package/lib/table/table.variable.css +25 -0
- package/lib/table/use-attributes.d.ts +41 -1
- package/lib/table/use-common.d.ts +67 -34
- package/lib/table-column/index.d.ts +206 -242
- package/lib/table-column/index.js +23 -20
- package/lib/tag/index.d.ts +95 -142
- package/lib/tag/index.js +19 -19
- package/lib/tag-input/index.d.ts +690 -498
- package/lib/tag-input/index.js +54 -62
- package/lib/tag-input/tag-input.d.ts +5 -5
- package/lib/time-picker/index.d.ts +442 -385
- package/lib/timeline/index.d.ts +50 -109
- package/lib/timeline/index.js +6 -6
- package/lib/transfer/index.d.ts +191 -206
- package/lib/tree/index.d.ts +334 -293
- package/lib/tree/index.js +36 -39
- package/lib/tree/tree.d.ts +1 -1
- package/lib/tree/use-tree-init.d.ts +1 -1
- package/lib/upload/index.d.ts +281 -254
- package/lib/upload/index.js +254 -257
- package/lib/upload/upload.d.ts +2 -2
- package/lib/virtual-render/index.d.ts +337 -242
- package/lib/virtual-render/index.js +30 -30
- package/lib/virtual-render/virtual-render.d.ts +1 -1
- package/package.json +1 -1
package/lib/table/index.js
CHANGED
@@ -64,38 +64,38 @@ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
|
64
64
|
var y = x => () => x
|
65
65
|
const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["RenderType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.RenderType, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.classes, ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.debounce, ["hasOverflowEllipsis"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.hasOverflowEllipsis, ["isElement"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.isElement, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstallProps });
|
66
66
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
67
|
-
function typeof_typeof(
|
67
|
+
function typeof_typeof(o) {
|
68
68
|
"@babel/helpers - typeof";
|
69
69
|
|
70
|
-
return typeof_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
71
|
-
return typeof
|
72
|
-
} : function (
|
73
|
-
return
|
74
|
-
}, typeof_typeof(
|
70
|
+
return typeof_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
71
|
+
return typeof o;
|
72
|
+
} : function (o) {
|
73
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
74
|
+
}, typeof_typeof(o);
|
75
75
|
}
|
76
76
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
77
77
|
|
78
|
-
function
|
79
|
-
if (
|
80
|
-
var
|
81
|
-
if (
|
82
|
-
var
|
83
|
-
if (
|
78
|
+
function toPrimitive(t, r) {
|
79
|
+
if ("object" != typeof_typeof(t) || !t) return t;
|
80
|
+
var e = t[Symbol.toPrimitive];
|
81
|
+
if (void 0 !== e) {
|
82
|
+
var i = e.call(t, r || "default");
|
83
|
+
if ("object" != typeof_typeof(i)) return i;
|
84
84
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
85
85
|
}
|
86
|
-
return (
|
86
|
+
return ("string" === r ? String : Number)(t);
|
87
87
|
}
|
88
88
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
89
89
|
|
90
90
|
|
91
|
-
function
|
92
|
-
var
|
93
|
-
return typeof_typeof(
|
91
|
+
function toPropertyKey(t) {
|
92
|
+
var i = toPrimitive(t, "string");
|
93
|
+
return "symbol" == typeof_typeof(i) ? i : String(i);
|
94
94
|
}
|
95
95
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
96
96
|
|
97
97
|
function defineProperty_defineProperty(obj, key, value) {
|
98
|
-
key =
|
98
|
+
key = toPropertyKey(key);
|
99
99
|
if (key in obj) {
|
100
100
|
Object.defineProperty(obj, key, {
|
101
101
|
value: value,
|
@@ -114,7 +114,6 @@ var external_vue_y = x => () => x
|
|
114
114
|
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
115
115
|
;// CONCATENATED MODULE: ../../packages/table/src/const.ts
|
116
116
|
|
117
|
-
var _DEF_COLOR;
|
118
117
|
/*
|
119
118
|
* Tencent is pleased to support the open source community by making
|
120
119
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -210,7 +209,7 @@ var IHeadColor;
|
|
210
209
|
/**
|
211
210
|
* 根据表格的使用场景,表头支持颜色自定义,默认提供的选项:FAFBFD、F0F1F5,尽量一个项目选用同一种颜色。
|
212
211
|
*/
|
213
|
-
var DEF_COLOR = (
|
212
|
+
var DEF_COLOR = defineProperty_defineProperty(defineProperty_defineProperty({}, IHeadColor.DEF1, '#FAFBFD'), IHeadColor.DEF2, '#F0F1F5');
|
214
213
|
var SETTING_SIZE = {
|
215
214
|
large: 78,
|
216
215
|
medium: 60,
|
@@ -614,7 +613,11 @@ var tableProps = {
|
|
614
613
|
/**
|
615
614
|
* 是否采用flex布局表格
|
616
615
|
*/
|
617
|
-
isFlex: external_shared_namespaceObject.PropTypes.bool.def(true)
|
616
|
+
isFlex: external_shared_namespaceObject.PropTypes.bool.def(true),
|
617
|
+
/**
|
618
|
+
* 是否支持行拖拽排序
|
619
|
+
*/
|
620
|
+
rowDraggable: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.func, external_shared_namespaceObject.PropTypes.bool, external_shared_namespaceObject.PropTypes.object]).def(false)
|
618
621
|
};
|
619
622
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
620
623
|
|
@@ -792,7 +795,7 @@ function _defineProperties(target, props) {
|
|
792
795
|
descriptor.enumerable = descriptor.enumerable || false;
|
793
796
|
descriptor.configurable = true;
|
794
797
|
if ("value" in descriptor) descriptor.writable = true;
|
795
|
-
Object.defineProperty(target,
|
798
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
796
799
|
}
|
797
800
|
}
|
798
801
|
function _createClass(Constructor, protoProps, staticProps) {
|
@@ -858,7 +861,7 @@ var BkTableCache = /*#__PURE__*/function () {
|
|
858
861
|
|
859
862
|
;// CONCATENATED MODULE: ../../packages/table/src/events.ts
|
860
863
|
|
861
|
-
var _EMIT_EVENT_TYPES
|
864
|
+
var _EMIT_EVENT_TYPES;
|
862
865
|
/*
|
863
866
|
* Tencent is pleased to support the open source community by making
|
864
867
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -916,6 +919,7 @@ var EMIT_EVENTS;
|
|
916
919
|
EMIT_EVENTS["CELL_DBL_CLICK"] = "cellDblclick";
|
917
920
|
EMIT_EVENTS["NATIVE_CLICK"] = "click";
|
918
921
|
EMIT_EVENTS["NATIVE_DBL_CLICK"] = "dblclick";
|
922
|
+
EMIT_EVENTS["DRAG_END"] = "dragend";
|
919
923
|
})(EMIT_EVENTS || (EMIT_EVENTS = {}));
|
920
924
|
var EVENT_COL_PICK = function EVENT_COL_PICK(_cols) {
|
921
925
|
return true;
|
@@ -956,8 +960,11 @@ var EVENT_CELL_FN = function EVENT_CELL_FN(_args) {
|
|
956
960
|
var EVENT_SCROLL_FN = function EVENT_SCROLL_FN(_args) {
|
957
961
|
return true;
|
958
962
|
};
|
959
|
-
var
|
960
|
-
|
963
|
+
var EVENT_DRAGEND_FN = function EVENT_DRAGEND_FN(_args) {
|
964
|
+
return true;
|
965
|
+
};
|
966
|
+
var EMIT_EVENT_TYPES = (_EMIT_EVENT_TYPES = {}, defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.COLUMN_PICK, EVENT_COL_PICK), EMIT_EVENTS.COLUMN_FILTER, EVENT_COL_FILTER), EMIT_EVENTS.COLUMN_SORT, EVENT_COL_SORT), EMIT_EVENTS.COLUMN_FILTER_SAVE, EVENT_COL_FILTER_SAVE), EMIT_EVENTS.ROW_CLICK, EVENT_MOUSE_FN), EMIT_EVENTS.ROW_DBL_CLICK, EVENT_MOUSE_FN), EMIT_EVENTS.ROW_EXPAND_CLICK, EVENT_EXPAND_FN), EMIT_EVENTS.ROW_SELECT, EVENT_ROW_SELECT_FN), EMIT_EVENTS.ROW_SELECT_ALL, EVENT_ROW_SELECT_ALL_FN), EMIT_EVENTS.ROW_SELECT_CHANGE, EVENT_ROW_SELECT_CHANGE_FN), defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(_EMIT_EVENT_TYPES, EMIT_EVENTS.PAGE_LIMIT_CHANGE, EVENT_PAGE_FN), EMIT_EVENTS.PAGE_VALUE_CHANGE, EVENT_PAGE_FN), EMIT_EVENTS.SETTING_CHANGE, EVENT_SETTING_FN), EMIT_EVENTS.SCROLL_BOTTOM, EVENT_SCROLL_FN), EMIT_EVENTS.CELL_CLICK, EVENT_CELL_FN), EMIT_EVENTS.CELL_DBL_CLICK, EVENT_CELL_FN), EMIT_EVENTS.ROW_MOUSE_ENTER, EVENT_MOUSE_FN), EMIT_EVENTS.ROW_MOUSE_LEAVE, EVENT_MOUSE_FN), EMIT_EVENTS.DRAG_END, EVENT_DRAGEND_FN));
|
967
|
+
var CELL_EVENT_TYPES = defineProperty_defineProperty(defineProperty_defineProperty({}, EMIT_EVENTS.NATIVE_CLICK, EVENT_MOUSE_FN), EMIT_EVENTS.NATIVE_DBL_CLICK, EVENT_MOUSE_FN);
|
961
968
|
;// CONCATENATED MODULE: external "lodash/isElement"
|
962
969
|
var isElement_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
963
970
|
var isElement_y = x => () => x
|
@@ -968,8 +975,8 @@ var throttle_y = x => () => x
|
|
968
975
|
const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"] });
|
969
976
|
;// CONCATENATED MODULE: ../../packages/table/src/plugins/use-column-resize.tsx
|
970
977
|
|
971
|
-
function ownKeys(
|
972
|
-
function _objectSpread(
|
978
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
979
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
973
980
|
/*
|
974
981
|
* Tencent is pleased to support the open source community by making
|
975
982
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -1000,7 +1007,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
1000
1007
|
|
1001
1008
|
|
1002
1009
|
/* harmony default export */ const use_column_resize = (function (tableResp) {
|
1003
|
-
var _handler;
|
1004
1010
|
var immediate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
1005
1011
|
var head = arguments.length > 2 ? arguments[2] : undefined;
|
1006
1012
|
var formatData = tableResp.formatData,
|
@@ -1050,7 +1056,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
1050
1056
|
dragOffsetX.value = -1000;
|
1051
1057
|
dragColumn = null;
|
1052
1058
|
var targetTable = (_head$value = head.value) === null || _head$value === void 0 ? void 0 : _head$value.querySelector('table');
|
1053
|
-
targetTable === null || targetTable === void 0
|
1059
|
+
targetTable === null || targetTable === void 0 || targetTable.querySelectorAll('th').forEach(function (th) {
|
1054
1060
|
return th.style.setProperty('user-select', 'inherit');
|
1055
1061
|
});
|
1056
1062
|
};
|
@@ -1073,7 +1079,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
1073
1079
|
var setChildrenNodeCursor = function setChildrenNodeCursor(root, cursor) {
|
1074
1080
|
if ((0,isElement_namespaceObject["default"])(root)) {
|
1075
1081
|
var _root$style, _root$childNodes;
|
1076
|
-
(_root$style = root.style) === null || _root$style === void 0
|
1082
|
+
(_root$style = root.style) === null || _root$style === void 0 || _root$style.setProperty('cursor', cursor);
|
1077
1083
|
if (((_root$childNodes = root.childNodes) === null || _root$childNodes === void 0 ? void 0 : _root$childNodes.length) > 0) {
|
1078
1084
|
root.childNodes.forEach(function (node) {
|
1079
1085
|
return setChildrenNodeCursor(node, cursor);
|
@@ -1081,7 +1087,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
1081
1087
|
}
|
1082
1088
|
}
|
1083
1089
|
};
|
1084
|
-
var handler = (
|
1090
|
+
var handler = defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, EVENTS.MOUSE_DOWN, function (e, column) {
|
1085
1091
|
if (!isInDragSection) {
|
1086
1092
|
return;
|
1087
1093
|
}
|
@@ -1098,7 +1104,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
1098
1104
|
updateOffsetX(e)();
|
1099
1105
|
document.addEventListener('mouseup', handleMouseUp);
|
1100
1106
|
document.addEventListener('mousemove', handleMouseMove);
|
1101
|
-
}),
|
1107
|
+
}), EVENTS.MOUSE_MOVE, function (e, _column) {
|
1102
1108
|
if (isMouseDown && !isDraging) {
|
1103
1109
|
isDraging = true;
|
1104
1110
|
}
|
@@ -1123,13 +1129,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
1123
1129
|
isInDragSection = false;
|
1124
1130
|
}
|
1125
1131
|
}
|
1126
|
-
}),
|
1132
|
+
}), EVENTS.MOUSE_OUT, function (e, _column) {
|
1127
1133
|
var target = e.target.closest('th');
|
1128
1134
|
if (!isDraging) {
|
1129
1135
|
setChildrenNodeCursor(target, '');
|
1130
1136
|
target.classList.remove('col-resize-hover');
|
1131
1137
|
}
|
1132
|
-
})
|
1138
|
+
});
|
1133
1139
|
var getEventName = function getEventName(event) {
|
1134
1140
|
return "".concat(pluginName, "_").concat(event);
|
1135
1141
|
};
|
@@ -1579,8 +1585,8 @@ function v4(options, buf, offset) {
|
|
1579
1585
|
|
1580
1586
|
|
1581
1587
|
|
1582
|
-
function use_pagination_ownKeys(
|
1583
|
-
function use_pagination_objectSpread(
|
1588
|
+
function use_pagination_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
1589
|
+
function use_pagination_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? use_pagination_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : use_pagination_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
1584
1590
|
/*
|
1585
1591
|
* Tencent is pleased to support the open source community by making
|
1586
1592
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -1639,10 +1645,11 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
1639
1645
|
* pagination 为Prop传入配置
|
1640
1646
|
* 方便兼容内置分页功能,此处需要单独处理count
|
1641
1647
|
*/
|
1642
|
-
var
|
1643
|
-
var indexData = (0,external_vue_namespaceObject.computed)(function () {
|
1648
|
+
var propsData = (0,external_vue_namespaceObject.computed)(function () {
|
1644
1649
|
return props.data;
|
1645
1650
|
});
|
1651
|
+
var localPagination = (0,external_vue_namespaceObject.ref)(null);
|
1652
|
+
var indexData = (0,external_vue_namespaceObject.reactive)([]);
|
1646
1653
|
// 当前分页缓存,用于支持内置前端分页,用户无需接收change事件来自行处理数据分割
|
1647
1654
|
var pagination = (0,external_vue_namespaceObject.reactive)({
|
1648
1655
|
count: 0,
|
@@ -1656,7 +1663,7 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
1656
1663
|
return;
|
1657
1664
|
}
|
1658
1665
|
localPagination.value = props.remotePagination ? pagination : use_pagination_objectSpread(use_pagination_objectSpread({}, pagination), {}, {
|
1659
|
-
count: indexData.
|
1666
|
+
count: indexData.length
|
1660
1667
|
});
|
1661
1668
|
};
|
1662
1669
|
/**
|
@@ -1667,7 +1674,7 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
1667
1674
|
var resetStartEndIndex = function resetStartEndIndex() {
|
1668
1675
|
if (!props.pagination || props.remotePagination) {
|
1669
1676
|
startIndex.value = 0;
|
1670
|
-
endIndex.value = indexData.
|
1677
|
+
endIndex.value = indexData.length;
|
1671
1678
|
return;
|
1672
1679
|
}
|
1673
1680
|
// 如果是前端分页
|
@@ -1698,15 +1705,25 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
1698
1705
|
var filter = function filter(sourceData, filterFn) {
|
1699
1706
|
if (typeof filterFn === 'function') {
|
1700
1707
|
var filterVals = sourceData.filter(function (row, index) {
|
1701
|
-
return filterFn(row, index, indexData
|
1708
|
+
return filterFn(row, index, indexData);
|
1702
1709
|
});
|
1703
1710
|
sourceData.length = 0;
|
1704
1711
|
sourceData.push.apply(sourceData, _toConsumableArray(filterVals));
|
1705
1712
|
}
|
1706
1713
|
return sourceData;
|
1707
1714
|
};
|
1715
|
+
var resolveIndexData = function resolveIndexData() {
|
1716
|
+
return new Promise(function (resolve) {
|
1717
|
+
(0,external_vue_namespaceObject.nextTick)(function () {
|
1718
|
+
var target = propsData.value.slice();
|
1719
|
+
indexData.length = 0;
|
1720
|
+
indexData.push.apply(indexData, _toConsumableArray(target));
|
1721
|
+
resolve();
|
1722
|
+
});
|
1723
|
+
});
|
1724
|
+
};
|
1708
1725
|
var resolvePageData = function resolvePageData(filterFn, sortFn, column, type, sortScope, multiCol) {
|
1709
|
-
var sourceData = indexData.
|
1726
|
+
var sourceData = indexData.slice();
|
1710
1727
|
if (multiCol !== null && multiCol !== void 0 && multiCol.length) {
|
1711
1728
|
multiSort(sourceData, multiCol);
|
1712
1729
|
}
|
@@ -1720,7 +1737,7 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
1720
1737
|
resolvePageData(null, null, null, null, null, multiCol);
|
1721
1738
|
};
|
1722
1739
|
var multiFilter = function multiFilter(filterFnList) {
|
1723
|
-
var sourceData = indexData.
|
1740
|
+
var sourceData = indexData.slice();
|
1724
1741
|
var target = filterFnList.reduce(function (result, fn) {
|
1725
1742
|
return filter(result, fn);
|
1726
1743
|
}, sourceData);
|
@@ -1746,6 +1763,7 @@ var resolvePaginationOption = function resolvePaginationOption(propPagination, d
|
|
1746
1763
|
indexData: indexData,
|
1747
1764
|
localPagination: localPagination,
|
1748
1765
|
resolvePageData: resolvePageData,
|
1766
|
+
resolveIndexData: resolveIndexData,
|
1749
1767
|
resolvePageDataBySortList: resolvePageDataBySortList,
|
1750
1768
|
resetStartEndIndex: resetStartEndIndex,
|
1751
1769
|
multiFilter: multiFilter,
|
@@ -2695,8 +2713,8 @@ var index = (function () {
|
|
2695
2713
|
|
2696
2714
|
|
2697
2715
|
var _this = undefined;
|
2698
|
-
function utils_ownKeys(
|
2699
|
-
function utils_objectSpread(
|
2716
|
+
function utils_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
2717
|
+
function utils_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? utils_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : utils_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
2700
2718
|
/*
|
2701
2719
|
* Tencent is pleased to support the open source community by making
|
2702
2720
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -3090,8 +3108,7 @@ var getSortFn = function getSortFn(column, sortType) {
|
|
3090
3108
|
};
|
3091
3109
|
};
|
3092
3110
|
var getNextSortType = function getNextSortType(sortType) {
|
3093
|
-
var
|
3094
|
-
var steps = (_steps = {}, defineProperty_defineProperty(_steps, SORT_OPTION.NULL, 3), defineProperty_defineProperty(_steps, SORT_OPTION.ASC, 1), defineProperty_defineProperty(_steps, SORT_OPTION.DESC, 2), _steps);
|
3111
|
+
var steps = defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, SORT_OPTION.NULL, 3), SORT_OPTION.ASC, 1), SORT_OPTION.DESC, 2);
|
3095
3112
|
if (steps[sortType] === undefined) {
|
3096
3113
|
return SORT_OPTION.ASC;
|
3097
3114
|
}
|
@@ -3160,8 +3177,8 @@ var resolveColumnSortProp = function resolveColumnSortProp(col, props) {
|
|
3160
3177
|
;// CONCATENATED MODULE: ../../packages/table/src/use-attributes.ts
|
3161
3178
|
|
3162
3179
|
|
3163
|
-
function use_attributes_ownKeys(
|
3164
|
-
function use_attributes_objectSpread(
|
3180
|
+
function use_attributes_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3181
|
+
function use_attributes_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? use_attributes_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : use_attributes_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
3165
3182
|
/*
|
3166
3183
|
* Tencent is pleased to support the open source community by making
|
3167
3184
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -3193,7 +3210,9 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3193
3210
|
|
3194
3211
|
|
3195
3212
|
|
3213
|
+
|
3196
3214
|
/* harmony default export */ const use_attributes = (function (props) {
|
3215
|
+
var t = (0,external_config_provider_namespaceObject.useLocale)('table');
|
3197
3216
|
var getDefaultSettings = function getDefaultSettings() {
|
3198
3217
|
var _ref, _SETTING_SIZE$size;
|
3199
3218
|
var _props$settings = props.settings,
|
@@ -3225,12 +3244,14 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3225
3244
|
});
|
3226
3245
|
var _usePagination = use_pagination(props),
|
3227
3246
|
pageData = _usePagination.pageData,
|
3247
|
+
indexData = _usePagination.indexData,
|
3228
3248
|
localPagination = _usePagination.localPagination,
|
3229
3249
|
resolvePageData = _usePagination.resolvePageData,
|
3230
3250
|
resolvePageDataBySortList = _usePagination.resolvePageDataBySortList,
|
3231
3251
|
multiFilter = _usePagination.multiFilter,
|
3232
3252
|
sort = _usePagination.sort,
|
3233
|
-
resetStartEndIndex = _usePagination.resetStartEndIndex
|
3253
|
+
resetStartEndIndex = _usePagination.resetStartEndIndex,
|
3254
|
+
resolveIndexData = _usePagination.resolveIndexData;
|
3234
3255
|
var updateSettings = function updateSettings(settings, rowHeight) {
|
3235
3256
|
if (settings) {
|
3236
3257
|
var _ref2, _ref3;
|
@@ -3265,6 +3286,17 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3265
3286
|
}
|
3266
3287
|
return minWidth;
|
3267
3288
|
};
|
3289
|
+
var resolveDraggableColumn = function resolveDraggableColumn() {
|
3290
|
+
if (props.rowDraggable) {
|
3291
|
+
var _props$rowDraggable$w, _props$rowDraggable, _props$rowDraggable$l, _props$rowDraggable2;
|
3292
|
+
formatData.columns.unshift({
|
3293
|
+
minWidth: 50,
|
3294
|
+
width: (_props$rowDraggable$w = (_props$rowDraggable = props.rowDraggable) === null || _props$rowDraggable === void 0 ? void 0 : _props$rowDraggable.width) !== null && _props$rowDraggable$w !== void 0 ? _props$rowDraggable$w : 60,
|
3295
|
+
label: (_props$rowDraggable$l = (_props$rowDraggable2 = props.rowDraggable) === null || _props$rowDraggable2 === void 0 ? void 0 : _props$rowDraggable2.label) !== null && _props$rowDraggable$l !== void 0 ? _props$rowDraggable$l : t.value.sort,
|
3296
|
+
type: 'drag'
|
3297
|
+
});
|
3298
|
+
}
|
3299
|
+
};
|
3268
3300
|
/**
|
3269
3301
|
* Format columns
|
3270
3302
|
* @param columns
|
@@ -3273,10 +3305,10 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3273
3305
|
var _formatData$columns;
|
3274
3306
|
formatData.columns.length = 0;
|
3275
3307
|
(_formatData$columns = formatData.columns).push.apply(_formatData$columns, _toConsumableArray(columns));
|
3308
|
+
resolveDraggableColumn();
|
3276
3309
|
var skipColNum = 0;
|
3277
3310
|
var needColSpan = neepColspanOrRowspan(['colspan']);
|
3278
|
-
(columns || []).forEach(function (col, index) {
|
3279
|
-
var _Object$assign;
|
3311
|
+
(formatData.columns || []).forEach(function (col, index) {
|
3280
3312
|
var _ref4 = needColSpan ? getColumnSpanConfig(col, index, skipColNum) : {
|
3281
3313
|
skipCol: false,
|
3282
3314
|
skipColumnNum: 0,
|
@@ -3302,17 +3334,17 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3302
3334
|
}
|
3303
3335
|
return fn;
|
3304
3336
|
};
|
3305
|
-
formatData.columnSchema.set(col, (_formatData$columnSch = {}, defineProperty_defineProperty(_formatData$columnSch, COLUMN_ATTRIBUTE.CALC_WIDTH, undefined),
|
3337
|
+
formatData.columnSchema.set(col, (_formatData$columnSch = {}, defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(_formatData$columnSch, COLUMN_ATTRIBUTE.CALC_WIDTH, undefined), COLUMN_ATTRIBUTE.RESIZE_WIDTH, undefined), COLUMN_ATTRIBUTE.COL_MIN_WIDTH, resolveMinWidth(col)), COLUMN_ATTRIBUTE.LISTENERS, new Map()), COLUMN_ATTRIBUTE.WIDTH, col.width), COLUMN_ATTRIBUTE.IS_HIDDEN, isColumnHidden(formatData.settings.fields, col, formatData.settings.checked)), COLUMN_ATTRIBUTE.COL_SORT_TYPE, type), COLUMN_ATTRIBUTE.COL_SORT_FN, getSortFn(col)), COLUMN_ATTRIBUTE.COL_FILTER_FN, undefined), COLUMN_ATTRIBUTE.COL_FILTER_SCOPE, undefined), defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(_formatData$columnSch, COLUMN_ATTRIBUTE.COL_SORT_SCOPE, scope), COLUMN_ATTRIBUTE.COL_SORT_ACTIVE, active), COLUMN_ATTRIBUTE.COL_IS_DRAG, false), COLUMN_ATTRIBUTE.COL_SPAN, {
|
3306
3338
|
skipCol: skipCol,
|
3307
3339
|
skipColumnNum: skipColumnNum,
|
3308
3340
|
skipColLen: skipColLen
|
3309
|
-
}),
|
3341
|
+
}), COLUMN_ATTRIBUTE.COL_UID, esm_browser_v4())));
|
3310
3342
|
}
|
3311
|
-
Object.assign(formatData.columnSchema.get(col), (
|
3343
|
+
Object.assign(formatData.columnSchema.get(col), defineProperty_defineProperty(defineProperty_defineProperty({}, COLUMN_ATTRIBUTE.COL_SPAN, {
|
3312
3344
|
skipCol: skipCol,
|
3313
3345
|
skipColumnNum: skipColumnNum,
|
3314
3346
|
skipColLen: skipColLen
|
3315
|
-
}),
|
3347
|
+
}), COLUMN_ATTRIBUTE.COL_MIN_WIDTH, resolveMinWidth(col)));
|
3316
3348
|
});
|
3317
3349
|
};
|
3318
3350
|
var getColumnSpanConfig = function getColumnSpanConfig(col, index, skipColNum) {
|
@@ -3355,6 +3387,13 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3355
3387
|
var type = getColumnAttribute(column, COLUMN_ATTRIBUTE.COL_SORT_TYPE);
|
3356
3388
|
var scope = getColumnAttribute(column, COLUMN_ATTRIBUTE.COL_SORT_SCOPE);
|
3357
3389
|
if (type === SORT_OPTION.NULL) {
|
3390
|
+
resolveIndexData().then(function () {
|
3391
|
+
resolvePageData();
|
3392
|
+
});
|
3393
|
+
return;
|
3394
|
+
}
|
3395
|
+
if (scope === 'all') {
|
3396
|
+
sort(indexData, fn, column, type, scope);
|
3358
3397
|
resolvePageData();
|
3359
3398
|
return;
|
3360
3399
|
}
|
@@ -3543,7 +3582,7 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3543
3582
|
* @param data
|
3544
3583
|
*/
|
3545
3584
|
var formatDataSchema = function formatDataSchema(data) {
|
3546
|
-
var _formatData$data
|
3585
|
+
var _formatData$data;
|
3547
3586
|
formatData.data.length = 0;
|
3548
3587
|
(_formatData$data = formatData.data).push.apply(_formatData$data, _toConsumableArray(data));
|
3549
3588
|
var hasSelectedRow = false;
|
@@ -3557,8 +3596,7 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3557
3596
|
hasUnSelectedRow = true;
|
3558
3597
|
}
|
3559
3598
|
if (!formatData.dataSchema.has(row)) {
|
3560
|
-
|
3561
|
-
formatData.dataSchema.set(row, (_formatData$dataSchem3 = {}, defineProperty_defineProperty(_formatData$dataSchem3, TABLE_ROW_ATTRIBUTE.ROW_EXPAND, false), defineProperty_defineProperty(_formatData$dataSchem3, TABLE_ROW_ATTRIBUTE.ROW_SELECTION, isSelected), defineProperty_defineProperty(_formatData$dataSchem3, TABLE_ROW_ATTRIBUTE.ROW_UID, rowId), defineProperty_defineProperty(_formatData$dataSchem3, TABLE_ROW_ATTRIBUTE.ROW_INDEX, index + 1), defineProperty_defineProperty(_formatData$dataSchem3, TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE, false), _formatData$dataSchem3));
|
3599
|
+
formatData.dataSchema.set(row, defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, TABLE_ROW_ATTRIBUTE.ROW_EXPAND, false), TABLE_ROW_ATTRIBUTE.ROW_SELECTION, isSelected), TABLE_ROW_ATTRIBUTE.ROW_UID, rowId), TABLE_ROW_ATTRIBUTE.ROW_INDEX, index + 1), TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE, false));
|
3562
3600
|
}
|
3563
3601
|
// 当传入的data改变时,更新相关属性
|
3564
3602
|
// ROW_EXPAND & ROW_SELECTION & ROW_UID 不做更新
|
@@ -3566,7 +3604,7 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3566
3604
|
rowId = target[TABLE_ROW_ATTRIBUTE.ROW_UID];
|
3567
3605
|
target[TABLE_ROW_ATTRIBUTE.ROW_INDEX] = index + 1;
|
3568
3606
|
});
|
3569
|
-
formatData.dataSchema.set(CHECK_ALL_OBJ, (
|
3607
|
+
formatData.dataSchema.set(CHECK_ALL_OBJ, defineProperty_defineProperty(defineProperty_defineProperty({}, TABLE_ROW_ATTRIBUTE.ROW_SELECTION, hasSelectedRow), TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE, hasSelectedRow && hasUnSelectedRow));
|
3570
3608
|
formatData.dataSchema.set(NEED_COL_ROW_SPAN, defineProperty_defineProperty({}, TABLE_ROW_ATTRIBUTE.ROW_SPAN, neepColspanOrRowspan(['rowspan'])));
|
3571
3609
|
};
|
3572
3610
|
/**
|
@@ -3645,7 +3683,6 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3645
3683
|
setRowSelection(row, !getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_SELECTION));
|
3646
3684
|
};
|
3647
3685
|
var toggleAllSelection = function toggleAllSelection(value) {
|
3648
|
-
var _formatData$dataSchem7;
|
3649
3686
|
var val = value !== null && value !== void 0 ? value : !isCheckedAll();
|
3650
3687
|
if (props.acrossAll) {
|
3651
3688
|
formatData.data.forEach(function (row) {
|
@@ -3656,7 +3693,7 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3656
3693
|
pageData.forEach(function (row) {
|
3657
3694
|
return setRowSelection(row, val);
|
3658
3695
|
});
|
3659
|
-
formatData.dataSchema.set(CHECK_ALL_OBJ, (
|
3696
|
+
formatData.dataSchema.set(CHECK_ALL_OBJ, defineProperty_defineProperty(defineProperty_defineProperty({}, TABLE_ROW_ATTRIBUTE.ROW_SELECTION, val), TABLE_ROW_ATTRIBUTE.ROW_SELECTION_INDETERMINATE, false));
|
3660
3697
|
};
|
3661
3698
|
var clearSelection = function clearSelection() {
|
3662
3699
|
formatData.data.forEach(function (row) {
|
@@ -3788,6 +3825,15 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3788
3825
|
});
|
3789
3826
|
resolvePageDataBySortList(multiSortColumns);
|
3790
3827
|
};
|
3828
|
+
var changePageRowIndex = function changePageRowIndex(sourceIndex, targetIndex) {
|
3829
|
+
var copy = pageData[sourceIndex];
|
3830
|
+
pageData.splice(targetIndex, 0, copy);
|
3831
|
+
var resolvedIndex = sourceIndex < targetIndex ? sourceIndex : sourceIndex + 1;
|
3832
|
+
pageData.splice(resolvedIndex, 1);
|
3833
|
+
};
|
3834
|
+
var setIndexData = function setIndexData() {
|
3835
|
+
return resolveIndexData();
|
3836
|
+
};
|
3791
3837
|
return {
|
3792
3838
|
formatColumns: formatColumns,
|
3793
3839
|
formatDataSchema: formatDataSchema,
|
@@ -3821,9 +3867,11 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3821
3867
|
isCheckedAll: isCheckedAll,
|
3822
3868
|
hasCheckedRow: hasCheckedRow,
|
3823
3869
|
updateSettings: updateSettings,
|
3870
|
+
changePageRowIndex: changePageRowIndex,
|
3824
3871
|
pageData: pageData,
|
3825
3872
|
localPagination: localPagination,
|
3826
|
-
formatData: formatData
|
3873
|
+
formatData: formatData,
|
3874
|
+
setIndexData: setIndexData
|
3827
3875
|
};
|
3828
3876
|
});
|
3829
3877
|
;// CONCATENATED MODULE: ../../packages/table/src/use-column.ts
|
@@ -3929,8 +3977,8 @@ function use_attributes_objectSpread(target) { for (var i = 1; i < arguments.len
|
|
3929
3977
|
});
|
3930
3978
|
;// CONCATENATED MODULE: ../../packages/table/src/use-common.ts
|
3931
3979
|
|
3932
|
-
function use_common_ownKeys(
|
3933
|
-
function use_common_objectSpread(
|
3980
|
+
function use_common_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3981
|
+
function use_common_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? use_common_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : use_common_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
3934
3982
|
/*
|
3935
3983
|
* Tencent is pleased to support the open source community by making
|
3936
3984
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -3971,7 +4019,6 @@ function use_common_objectSpread(target) { for (var i = 1; i < arguments.length;
|
|
3971
4019
|
* @param pageData 当前页数据
|
3972
4020
|
*/
|
3973
4021
|
var useClass = function useClass(props, targetColumns, root, TableSchema, pageData) {
|
3974
|
-
var _classes2;
|
3975
4022
|
var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
|
3976
4023
|
resolveClassName = _usePrefix.resolveClassName;
|
3977
4024
|
var _useColumn = use_column(props, targetColumns),
|
@@ -3988,10 +4035,9 @@ var useClass = function useClass(props, targetColumns, root, TableSchema, pageDa
|
|
3988
4035
|
return hasScrollY.value;
|
3989
4036
|
});
|
3990
4037
|
var tableClass = (0,external_vue_namespaceObject.computed)(function () {
|
3991
|
-
|
3992
|
-
return (0,external_shared_namespaceObject.classes)((_classes = {}, defineProperty_defineProperty(_classes, resolveClassName('table'), true), defineProperty_defineProperty(_classes, 'has-footer', hasFooter.value), defineProperty_defineProperty(_classes, 'has-scroll-y', hasScrollY.value || props.virtualEnabled), defineProperty_defineProperty(_classes, resolveClassName('table-flex'), props.isFlex), _classes), resolvePropBorderToClassStr(props.border));
|
4038
|
+
return (0,external_shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table'), true), 'has-footer', hasFooter.value), 'has-scroll-y', hasScrollY.value || props.virtualEnabled), resolveClassName('table-flex'), props.isFlex), resolvePropBorderToClassStr(props.border));
|
3993
4039
|
});
|
3994
|
-
var headClass = (0,external_shared_namespaceObject.classes)((
|
4040
|
+
var headClass = (0,external_shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-head'), true), 'has-settings', !!props.settings));
|
3995
4041
|
var resolvedColumns = (0,external_vue_namespaceObject.computed)(function () {
|
3996
4042
|
return getColumns();
|
3997
4043
|
});
|
@@ -4005,8 +4051,7 @@ var useClass = function useClass(props, targetColumns, root, TableSchema, pageDa
|
|
4005
4051
|
});
|
4006
4052
|
var contentClass = defineProperty_defineProperty({}, resolveClassName('table-body'), true);
|
4007
4053
|
var footerClass = (0,external_vue_namespaceObject.computed)(function () {
|
4008
|
-
|
4009
|
-
return (0,external_shared_namespaceObject.classes)((_classes3 = {}, defineProperty_defineProperty(_classes3, resolveClassName('table-footer'), true), defineProperty_defineProperty(_classes3, 'is-hidden', !props.pagination || !props.data.length), _classes3));
|
4054
|
+
return (0,external_shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-footer'), true), 'is-hidden', !props.pagination || !props.data.length));
|
4010
4055
|
});
|
4011
4056
|
var getTableHeight = function getTableHeight() {
|
4012
4057
|
if (props.height === 'number') {
|
@@ -4039,7 +4084,6 @@ var useClass = function useClass(props, targetColumns, root, TableSchema, pageDa
|
|
4039
4084
|
// maxHeight: props.maxHeight,
|
4040
4085
|
};
|
4041
4086
|
});
|
4042
|
-
|
4043
4087
|
var resolvePropHeight = function resolvePropHeight(height, parentHeight) {
|
4044
4088
|
var strHeight = String(height);
|
4045
4089
|
if (/^\d+\.?\d*$/.test(strHeight)) {
|
@@ -4154,8 +4198,7 @@ var useClass = function useClass(props, targetColumns, root, TableSchema, pageDa
|
|
4154
4198
|
});
|
4155
4199
|
});
|
4156
4200
|
var tableBodyContentClass = (0,external_vue_namespaceObject.computed)(function () {
|
4157
|
-
|
4158
|
-
return _ref2 = {}, defineProperty_defineProperty(_ref2, resolveClassName('table-body-content'), true), defineProperty_defineProperty(_ref2, resolveClassName('stripe'), props.stripe), defineProperty_defineProperty(_ref2, 'with-virtual-render', props.virtualEnabled), _ref2;
|
4201
|
+
return defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-body-content'), true), resolveClassName('stripe'), props.stripe), 'with-virtual-render', props.virtualEnabled);
|
4159
4202
|
});
|
4160
4203
|
var resizeColumnClass = {
|
4161
4204
|
column_drag_line: true,
|
@@ -4166,8 +4209,7 @@ var useClass = function useClass(props, targetColumns, root, TableSchema, pageDa
|
|
4166
4209
|
_bottom: true
|
4167
4210
|
};
|
4168
4211
|
var fixedBottomBorder = (0,external_vue_namespaceObject.computed)(function () {
|
4169
|
-
|
4170
|
-
return _ref3 = {}, defineProperty_defineProperty(_ref3, resolveClassName('fixed-bottom-border'), true), defineProperty_defineProperty(_ref3, '_is-empty', !props.data.length), _ref3;
|
4212
|
+
return defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('fixed-bottom-border'), true), '_is-empty', !props.data.length);
|
4171
4213
|
});
|
4172
4214
|
var columnGhostStyle = {
|
4173
4215
|
zIndex: -1,
|
@@ -4235,7 +4277,7 @@ const external_checkbox_namespaceObject = external_checkbox_x({ ["BkCheckboxGrou
|
|
4235
4277
|
;// CONCATENATED MODULE: external "../icon"
|
4236
4278
|
var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
4237
4279
|
var external_icon_y = x => () => x
|
4238
|
-
const external_icon_namespaceObject = external_icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.DownShape, ["Funnel"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Funnel, ["RightShape"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.RightShape });
|
4280
|
+
const external_icon_namespaceObject = external_icon_x({ ["DownShape"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.DownShape, ["Funnel"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Funnel, ["GragFill"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.GragFill, ["RightShape"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.RightShape });
|
4239
4281
|
;// CONCATENATED MODULE: external "../pagination"
|
4240
4282
|
var external_pagination_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
4241
4283
|
var external_pagination_y = x => () => x
|
@@ -4433,7 +4475,7 @@ const external_directives_namespaceObject = external_directives_x({ ["bkEllipsis
|
|
4433
4475
|
}
|
4434
4476
|
} else {
|
4435
4477
|
var _bkEllipsisIns;
|
4436
|
-
(_bkEllipsisIns = bkEllipsisIns) === null || _bkEllipsisIns === void 0
|
4478
|
+
(_bkEllipsisIns = bkEllipsisIns) === null || _bkEllipsisIns === void 0 || _bkEllipsisIns.destroyInstance(target);
|
4437
4479
|
bkEllipsisIns = null;
|
4438
4480
|
}
|
4439
4481
|
};
|
@@ -4458,7 +4500,7 @@ const external_directives_namespaceObject = external_directives_x({ ["bkEllipsis
|
|
4458
4500
|
});
|
4459
4501
|
(0,external_vue_namespaceObject.onBeforeUnmount)(function () {
|
4460
4502
|
var _bkEllipsisIns2;
|
4461
|
-
(_bkEllipsisIns2 = bkEllipsisIns) === null || _bkEllipsisIns2 === void 0
|
4503
|
+
(_bkEllipsisIns2 = bkEllipsisIns) === null || _bkEllipsisIns2 === void 0 || _bkEllipsisIns2.destroyInstance(refRoot.value);
|
4462
4504
|
});
|
4463
4505
|
var hasExplain = props.headExplain || props.column.explain;
|
4464
4506
|
return function () {
|
@@ -4885,6 +4927,115 @@ function _isSlot(s) {
|
|
4885
4927
|
};
|
4886
4928
|
}
|
4887
4929
|
}));
|
4930
|
+
;// CONCATENATED MODULE: ../../packages/table/src/plugins/use-draggable.tsx
|
4931
|
+
/*
|
4932
|
+
* Tencent is pleased to support the open source community by making
|
4933
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
4934
|
+
*
|
4935
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
4936
|
+
*
|
4937
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
4938
|
+
*
|
4939
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
4940
|
+
*
|
4941
|
+
* ---------------------------------------------------
|
4942
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
4943
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
4944
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
4945
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4946
|
+
*
|
4947
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
4948
|
+
* the Software.
|
4949
|
+
*
|
4950
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
4951
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
4952
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
4953
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
4954
|
+
* IN THE SOFTWARE.
|
4955
|
+
*/
|
4956
|
+
|
4957
|
+
/* harmony default export */ const use_draggable = (function (props, resp, ctx) {
|
4958
|
+
if (!props.rowDraggable) {
|
4959
|
+
return {};
|
4960
|
+
}
|
4961
|
+
var beforeEventFire = function beforeEventFire(fn) {
|
4962
|
+
if (props.rowDraggable) {
|
4963
|
+
fn === null || fn === void 0 || fn();
|
4964
|
+
}
|
4965
|
+
};
|
4966
|
+
var getTargetRow = function getTargetRow(event) {
|
4967
|
+
return event.target.closest('tr');
|
4968
|
+
};
|
4969
|
+
var setTargetRowPlacement = function setTargetRowPlacement(target, event) {
|
4970
|
+
var y = event.y;
|
4971
|
+
var _target$getBoundingCl = target.getBoundingClientRect(),
|
4972
|
+
top = _target$getBoundingCl.top,
|
4973
|
+
bottom = _target$getBoundingCl.bottom;
|
4974
|
+
var position = y - top > bottom - y ? '--bottom' : '--top';
|
4975
|
+
removeDragClass(target);
|
4976
|
+
target.classList.add(position);
|
4977
|
+
};
|
4978
|
+
var removeDragClass = function removeDragClass(target) {
|
4979
|
+
var classList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['--bottom', '--top'];
|
4980
|
+
classList.forEach(function (pos) {
|
4981
|
+
return target.classList.remove(pos);
|
4982
|
+
});
|
4983
|
+
};
|
4984
|
+
var onDragstart = function onDragstart(event) {
|
4985
|
+
beforeEventFire(function () {
|
4986
|
+
var target = getTargetRow(event);
|
4987
|
+
target.classList.add('--drag-start');
|
4988
|
+
event.dataTransfer.setData('text/plain', null);
|
4989
|
+
event.dataTransfer.dropEffect = 'copy';
|
4990
|
+
var rowIndex = event.target.dataset.rowIndex;
|
4991
|
+
event.dataTransfer.setData('data-row-index', rowIndex);
|
4992
|
+
});
|
4993
|
+
};
|
4994
|
+
var onDragenter = function onDragenter(event) {
|
4995
|
+
beforeEventFire(function () {
|
4996
|
+
event.dataTransfer.dropEffect = 'move';
|
4997
|
+
var target = getTargetRow(event);
|
4998
|
+
target.classList.add('--drag-enter');
|
4999
|
+
setTargetRowPlacement(target, event);
|
5000
|
+
});
|
5001
|
+
};
|
5002
|
+
var onDragleave = function onDragleave(event) {
|
5003
|
+
beforeEventFire(function () {
|
5004
|
+
var target = getTargetRow(event);
|
5005
|
+
removeDragClass(target, ['--drag-enter', '--bottom', '--top']);
|
5006
|
+
});
|
5007
|
+
};
|
5008
|
+
var onDragover = function onDragover(event) {
|
5009
|
+
event.preventDefault();
|
5010
|
+
event.dataTransfer.dropEffect = 'move';
|
5011
|
+
var target = getTargetRow(event);
|
5012
|
+
setTargetRowPlacement(target, event);
|
5013
|
+
};
|
5014
|
+
var onDrop = function onDrop(event) {
|
5015
|
+
event.preventDefault();
|
5016
|
+
event.stopPropagation();
|
5017
|
+
var target = getTargetRow(event);
|
5018
|
+
var rowIndex = target.dataset.rowIndex;
|
5019
|
+
var targetIndex = Number(rowIndex);
|
5020
|
+
var sourceIndex = event.dataTransfer.getData('data-row-index');
|
5021
|
+
if (target.classList.contains('--bottom')) {
|
5022
|
+
targetIndex = targetIndex + 1;
|
5023
|
+
}
|
5024
|
+
resp.changePageRowIndex(Number(sourceIndex), targetIndex);
|
5025
|
+
removeDragClass(target, ['--drag-enter', '--bottom', '--top']);
|
5026
|
+
ctx.emit(EMIT_EVENTS.DRAG_END, {
|
5027
|
+
sourceEvent: event,
|
5028
|
+
data: resp.pageData
|
5029
|
+
});
|
5030
|
+
};
|
5031
|
+
return {
|
5032
|
+
onDragenter: onDragenter,
|
5033
|
+
onDragleave: onDragleave,
|
5034
|
+
onDragstart: onDragstart,
|
5035
|
+
onDragover: onDragover,
|
5036
|
+
onDrop: onDrop
|
5037
|
+
};
|
5038
|
+
});
|
4888
5039
|
;// CONCATENATED MODULE: ../../packages/table/src/plugins/head-filter.tsx
|
4889
5040
|
|
4890
5041
|
|
@@ -4968,8 +5119,7 @@ function head_filter_isSlot(s) {
|
|
4968
5119
|
deep: true
|
4969
5120
|
});
|
4970
5121
|
var headClass = (0,external_vue_namespaceObject.computed)(function () {
|
4971
|
-
|
4972
|
-
return (0,external_shared_namespaceObject.classes)((_classes = {}, defineProperty_defineProperty(_classes, resolveClassName('table-head-action'), true), defineProperty_defineProperty(_classes, 'column-filter', true), defineProperty_defineProperty(_classes, '--row-height', "".concat(props.height, "px")), defineProperty_defineProperty(_classes, "active", state.checked.length), defineProperty_defineProperty(_classes, "opened", state.isOpen), _classes));
|
5122
|
+
return (0,external_shared_namespaceObject.classes)(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, resolveClassName('table-head-action'), true), 'column-filter', true), '--row-height', "".concat(props.height, "px")), "active", state.checked.length), "opened", state.isOpen));
|
4973
5123
|
});
|
4974
5124
|
var headFilterContentClass = (0,external_shared_namespaceObject.classes)(defineProperty_defineProperty({}, resolveClassName('table-head-filter'), true));
|
4975
5125
|
var refVirtualRender = (0,external_vue_namespaceObject.ref)(null);
|
@@ -5186,31 +5336,31 @@ function _arrayWithHoles(arr) {
|
|
5186
5336
|
if (Array.isArray(arr)) return arr;
|
5187
5337
|
}
|
5188
5338
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
5189
|
-
function _iterableToArrayLimit(
|
5190
|
-
var
|
5191
|
-
if (null !=
|
5192
|
-
var
|
5193
|
-
|
5194
|
-
|
5195
|
-
|
5196
|
-
|
5197
|
-
|
5198
|
-
|
5339
|
+
function _iterableToArrayLimit(r, l) {
|
5340
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
5341
|
+
if (null != t) {
|
5342
|
+
var e,
|
5343
|
+
n,
|
5344
|
+
i,
|
5345
|
+
u,
|
5346
|
+
a = [],
|
5347
|
+
f = !0,
|
5348
|
+
o = !1;
|
5199
5349
|
try {
|
5200
|
-
if (
|
5201
|
-
if (Object(
|
5202
|
-
|
5203
|
-
} else for (; !(
|
5204
|
-
} catch (
|
5205
|
-
|
5350
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
5351
|
+
if (Object(t) !== t) return;
|
5352
|
+
f = !1;
|
5353
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
5354
|
+
} catch (r) {
|
5355
|
+
o = !0, n = r;
|
5206
5356
|
} finally {
|
5207
5357
|
try {
|
5208
|
-
if (!
|
5358
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
5209
5359
|
} finally {
|
5210
|
-
if (
|
5360
|
+
if (o) throw n;
|
5211
5361
|
}
|
5212
5362
|
}
|
5213
|
-
return
|
5363
|
+
return a;
|
5214
5364
|
}
|
5215
5365
|
}
|
5216
5366
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
@@ -5602,8 +5752,8 @@ function use_head_cell_isSlot(s) {
|
|
5602
5752
|
|
5603
5753
|
|
5604
5754
|
|
5605
|
-
function use_render_ownKeys(
|
5606
|
-
function use_render_objectSpread(
|
5755
|
+
function use_render_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5756
|
+
function use_render_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? use_render_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : use_render_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5607
5757
|
/*
|
5608
5758
|
* Tencent is pleased to support the open source community by making
|
5609
5759
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -5645,6 +5795,7 @@ function use_render_objectSpread(target) { for (var i = 1; i < arguments.length;
|
|
5645
5795
|
|
5646
5796
|
|
5647
5797
|
|
5798
|
+
|
5648
5799
|
function use_render_isSlot(s) {
|
5649
5800
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
|
5650
5801
|
}
|
@@ -5788,20 +5939,6 @@ function use_render_isSlot(s) {
|
|
5788
5939
|
};
|
5789
5940
|
var _useFixedColumn = use_fixed_column(props, tableResp, head),
|
5790
5941
|
resolveFixedColumnStyle = _useFixedColumn.resolveFixedColumnStyle;
|
5791
|
-
// const getScrollFix = () => {
|
5792
|
-
// if (styleRef.value.hasScrollY) {
|
5793
|
-
// const fixStyle = {
|
5794
|
-
// width: `${SCROLLY_WIDTH + 2}px`,
|
5795
|
-
// right: '-1px',
|
5796
|
-
// };
|
5797
|
-
// return (
|
5798
|
-
// <th
|
5799
|
-
// style={fixStyle}
|
5800
|
-
// class='column_fixed'
|
5801
|
-
// ></th>
|
5802
|
-
// );
|
5803
|
-
// }
|
5804
|
-
// };
|
5805
5942
|
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("thead", {
|
5806
5943
|
"style": rowStyle
|
5807
5944
|
}, [(0,external_vue_namespaceObject.createVNode)(table_row, null, {
|
@@ -5871,6 +6008,7 @@ function use_render_isSlot(s) {
|
|
5871
6008
|
skipRow: skipRow
|
5872
6009
|
};
|
5873
6010
|
};
|
6011
|
+
var dragEvents = use_draggable(props, tableResp, context);
|
5874
6012
|
/**
|
5875
6013
|
* 渲染Table Body
|
5876
6014
|
* @returns
|
@@ -5894,12 +6032,16 @@ function use_render_isSlot(s) {
|
|
5894
6032
|
'--row-height': "".concat(getRowHeight(row, rowIndex), "px")
|
5895
6033
|
}]);
|
5896
6034
|
var rowClass = [].concat(_toConsumableArray(formatPropAsArray(props.rowClass, [row, rowIndex])), ["hover-".concat(props.rowHover), rowIndex % 2 === 1 && props.stripe ? 'stripe-row' : '']);
|
5897
|
-
|
6035
|
+
var rowId = tableResp.getRowAttribute(row, TABLE_ROW_ATTRIBUTE.ROW_UID);
|
6036
|
+
return [(0,external_vue_namespaceObject.createVNode)(table_row, {
|
6037
|
+
"key": rowId
|
6038
|
+
}, {
|
5898
6039
|
"default": function _default() {
|
5899
|
-
return [(0,external_vue_namespaceObject.createVNode)("tr", {
|
6040
|
+
return [(0,external_vue_namespaceObject.createVNode)("tr", (0,external_vue_namespaceObject.mergeProps)({
|
5900
6041
|
"style": rowStyle,
|
5901
6042
|
"class": rowClass,
|
5902
6043
|
"key": getRowKeyNull(row, props, rowIndex),
|
6044
|
+
"data-row-index": rowIndex,
|
5903
6045
|
"onClick": function onClick(e) {
|
5904
6046
|
return handleRowClick(e, row, rowIndex, rows);
|
5905
6047
|
},
|
@@ -5911,8 +6053,9 @@ function use_render_isSlot(s) {
|
|
5911
6053
|
},
|
5912
6054
|
"onMouseleave": function onMouseleave(e) {
|
5913
6055
|
return handleRowLeave(e, row, rowIndex, rows);
|
5914
|
-
}
|
5915
|
-
|
6056
|
+
},
|
6057
|
+
"draggable": !!props.rowDraggable
|
6058
|
+
}, dragEvents), [filterColGroups.value.map(function (column, index) {
|
5916
6059
|
var cellStyle = [resolveFixedColumnStyle(column)].concat(_toConsumableArray(formatPropAsArray(props.cellStyle, [column, index, row, rowIndex])));
|
5917
6060
|
var _resolveCellSpan = resolveCellSpan(column, index, row, rowIndex),
|
5918
6061
|
colspan = _resolveCellSpan.colspan,
|
@@ -6006,8 +6149,7 @@ function use_render_isSlot(s) {
|
|
6006
6149
|
}
|
6007
6150
|
};
|
6008
6151
|
var getColumnClass = function getColumnClass(column, colIndex) {
|
6009
|
-
|
6010
|
-
return _ref3 = {}, defineProperty_defineProperty(_ref3, "".concat(uuid, "-column-").concat(colIndex), false), defineProperty_defineProperty(_ref3, "column_fixed", !!column.fixed), defineProperty_defineProperty(_ref3, "column_fixed_left", !!column.fixed), defineProperty_defineProperty(_ref3, "column_fixed_right", column.fixed === 'right'), _ref3;
|
6152
|
+
return defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty(defineProperty_defineProperty({}, "".concat(uuid, "-column-").concat(colIndex), false), "column_fixed", !!column.fixed), "column_fixed_left", !!column.fixed), "column_fixed_right", column.fixed === 'right');
|
6011
6153
|
};
|
6012
6154
|
var getHeadColumnClass = function getHeadColumnClass(column, colIndex) {
|
6013
6155
|
return use_render_objectSpread({}, getColumnClass(column, colIndex));
|
@@ -6125,6 +6267,19 @@ function use_render_isSlot(s) {
|
|
6125
6267
|
}
|
6126
6268
|
}, [renderExpandSlot()]);
|
6127
6269
|
};
|
6270
|
+
var renderDraggableCell = function renderDraggableCell(row, column, index, rows) {
|
6271
|
+
var _props$rowDraggable$r, _props$rowDraggable, _props$rowDraggable$f, _props$rowDraggable2, _props$rowDraggable$i, _props$rowDraggable3;
|
6272
|
+
var renderFn = (_props$rowDraggable$r = (_props$rowDraggable = props.rowDraggable) === null || _props$rowDraggable === void 0 ? void 0 : _props$rowDraggable.render) !== null && _props$rowDraggable$r !== void 0 ? _props$rowDraggable$r : props.rowDraggable;
|
6273
|
+
if (typeof renderFn === 'function') {
|
6274
|
+
return renderFn(row, column, index, rows);
|
6275
|
+
}
|
6276
|
+
var fontSize = (_props$rowDraggable$f = (_props$rowDraggable2 = props.rowDraggable) === null || _props$rowDraggable2 === void 0 ? void 0 : _props$rowDraggable2.fontSize) !== null && _props$rowDraggable$f !== void 0 ? _props$rowDraggable$f : '14px';
|
6277
|
+
var fontIcon = (_props$rowDraggable$i = (_props$rowDraggable3 = props.rowDraggable) === null || _props$rowDraggable3 === void 0 ? void 0 : _props$rowDraggable3.icon) !== null && _props$rowDraggable$i !== void 0 ? _props$rowDraggable$i : (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.GragFill, {
|
6278
|
+
"class": "drag-cell",
|
6279
|
+
"style": "'--font-size: ".concat(fontSize, ";'")
|
6280
|
+
}, null);
|
6281
|
+
return fontIcon;
|
6282
|
+
};
|
6128
6283
|
/**
|
6129
6284
|
* 渲染表格Cell内容
|
6130
6285
|
* @param row 当前行
|
@@ -6169,7 +6324,8 @@ function use_render_isSlot(s) {
|
|
6169
6324
|
},
|
6170
6325
|
selection: function selection(row, _column, index, _rows) {
|
6171
6326
|
return renderCheckboxColumn(row, index);
|
6172
|
-
}
|
6327
|
+
},
|
6328
|
+
drag: renderDraggableCell
|
6173
6329
|
};
|
6174
6330
|
return (_renderFn$column$type = (_renderFn$column$type2 = renderFn[column.type]) === null || _renderFn$column$type2 === void 0 ? void 0 : _renderFn$column$type2.call(renderFn, row, column, index, rows)) !== null && _renderFn$column$type !== void 0 ? _renderFn$column$type : defaultFn();
|
6175
6331
|
};
|
@@ -6213,8 +6369,8 @@ function use_render_isSlot(s) {
|
|
6213
6369
|
;// CONCATENATED MODULE: ../../packages/table/src/table.tsx
|
6214
6370
|
|
6215
6371
|
|
6216
|
-
function table_ownKeys(
|
6217
|
-
function table_objectSpread(
|
6372
|
+
function table_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
6373
|
+
function table_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? table_ownKeys(Object(t), !0).forEach(function (r) { defineProperty_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : table_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
6218
6374
|
/*
|
6219
6375
|
* Tencent is pleased to support the open source community by making
|
6220
6376
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -6329,27 +6485,30 @@ function table_objectSpread(target) { for (var i = 1; i < arguments.length; i++)
|
|
6329
6485
|
}
|
6330
6486
|
};
|
6331
6487
|
var isFirstLoad = (0,external_vue_namespaceObject.ref)(true);
|
6488
|
+
// const tableWidth = ref(null);
|
6332
6489
|
(0,external_vue_namespaceObject.watch)(function () {
|
6333
6490
|
return [props.data, columns];
|
6334
6491
|
}, function () {
|
6335
|
-
tableSchema.
|
6336
|
-
|
6337
|
-
|
6338
|
-
|
6339
|
-
|
6340
|
-
|
6341
|
-
|
6342
|
-
|
6343
|
-
|
6344
|
-
|
6345
|
-
|
6346
|
-
updateOffsetRight();
|
6347
|
-
resolveFixedColumns(tableOffsetRight.value);
|
6348
|
-
/**
|
6349
|
-
* 确保在所有数据渲染完毕再执行fix column计算
|
6350
|
-
*/
|
6492
|
+
tableSchema.setIndexData().then(function () {
|
6493
|
+
tableSchema.formatColumns(columns);
|
6494
|
+
tableSchema.formatDataSchema(props.data);
|
6495
|
+
tableSchema.resetStartEndIndex();
|
6496
|
+
if (isFirstLoad.value) {
|
6497
|
+
tableSchema.resolveByDefColumns();
|
6498
|
+
isFirstLoad.value = false;
|
6499
|
+
} else {
|
6500
|
+
tableSchema.resolvePageData();
|
6501
|
+
}
|
6502
|
+
registerResizeEvent();
|
6351
6503
|
(0,external_vue_namespaceObject.nextTick)(function () {
|
6352
|
-
|
6504
|
+
updateOffsetRight();
|
6505
|
+
resolveFixedColumns(tableOffsetRight.value);
|
6506
|
+
/**
|
6507
|
+
* 确保在所有数据渲染完毕再执行fix column计算
|
6508
|
+
*/
|
6509
|
+
(0,external_vue_namespaceObject.nextTick)(function () {
|
6510
|
+
resetTableHeight(root.value);
|
6511
|
+
});
|
6353
6512
|
});
|
6354
6513
|
});
|
6355
6514
|
}, {
|
@@ -6404,7 +6563,7 @@ function table_objectSpread(target) { for (var i = 1; i < arguments.length; i++)
|
|
6404
6563
|
left: 0,
|
6405
6564
|
top: 0
|
6406
6565
|
};
|
6407
|
-
(_refVirtualRender$val = refVirtualRender.value) === null || _refVirtualRender$val === void 0 || (_refVirtualRender$val2 = _refVirtualRender$val.scrollTo) === null || _refVirtualRender$val2 === void 0
|
6566
|
+
(_refVirtualRender$val = refVirtualRender.value) === null || _refVirtualRender$val === void 0 || (_refVirtualRender$val2 = _refVirtualRender$val.scrollTo) === null || _refVirtualRender$val2 === void 0 || _refVirtualRender$val2.call(_refVirtualRender$val, option);
|
6408
6567
|
};
|
6409
6568
|
var getRoot = function getRoot() {
|
6410
6569
|
return root.value;
|