@web-utils/component 2.7.20 → 2.7.22
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/chunks/{config.46422d7f.js → config.7dec2bf2.js} +2 -2
- package/dist/chunks/confirmable-mixin.35bd1934.js +104 -0
- package/dist/chunks/dataformat.9cc4428a.js +158 -0
- package/dist/chunks/dayjs.ed2e1b73.js +247 -0
- package/dist/chunks/detail.d47a021c.js +29 -0
- package/dist/chunks/dic.9de2fe5a.js +135 -0
- package/dist/chunks/{event.dd6f522d.js → event.fc358074.js} +31 -31
- package/dist/chunks/{form-input-mixin.ff5b58f7.js → form-input-mixin.760cd65d.js} +6 -6
- package/dist/chunks/form-item-mixin.fa314b67.js +139 -0
- package/dist/chunks/{form-pick-mixin.61ad06b2.js → form-pick-mixin.c4e0391b.js} +2 -2
- package/dist/chunks/init.e0133910.js +122 -0
- package/dist/chunks/{input-number-mixin.41a066be.js → input-number-mixin.6849fa63.js} +4 -4
- package/dist/chunks/{mixins.5a78e0db.js → mixins.6a394a6c.js} +4 -4
- package/dist/chunks/{packages.1fc9ccba.js → packages.419bde01.js} +7 -7
- package/dist/chunks/permission.07c49abf.js +16 -0
- package/dist/chunks/slot.a7387ecc.js +27 -0
- package/dist/chunks/tab-mixin.9d568df9.js +81 -0
- package/dist/chunks/util.89913643.js +261 -0
- package/dist/chunks/utils.d7f73f8d.js +185 -0
- package/dist/chunks/utils.f44207f4.js +26 -0
- package/dist/chunks/vueComponentNormalizer.77ec6792.js +32 -0
- package/dist/components/address-input/index.js +36 -36
- package/dist/components/affix/index.js +39 -39
- package/dist/components/aside-menu/index.js +29 -29
- package/dist/components/avatar/index.js +43 -43
- package/dist/components/awesome-button/index.js +64 -34
- package/dist/components/base.css +1 -1
- package/dist/components/capsule-tab/index.js +26 -26
- package/dist/components/card/index.js +49 -49
- package/dist/components/carousel/index.js +35 -35
- package/dist/components/chat/index.js +203 -203
- package/dist/components/chunk-file-uploader/index.js +46 -46
- package/dist/components/chunk-file-uploader-button/index.js +22 -22
- package/dist/components/chunk-file-uploader-drop/index.js +47 -29
- package/dist/components/chunk-file-uploader-file/index.js +119 -119
- package/dist/components/chunk-file-uploader-files/index.js +27 -27
- package/dist/components/chunk-file-uploader-list/index.js +27 -27
- package/dist/components/chunk-file-uploader-un-support/index.js +27 -27
- package/dist/components/code-mirror-editor/index.js +136 -136
- package/dist/components/color-picker/index.js +57 -39
- package/dist/components/column/index.js +66 -66
- package/dist/components/column-default/index.js +54 -54
- package/dist/components/column-dynamic/index.js +54 -54
- package/dist/components/column-menu/index.js +128 -128
- package/dist/components/column-slot/index.js +168 -168
- package/dist/components/comment/index.js +33 -33
- package/dist/components/confirm-button/index.js +18 -18
- package/dist/components/confirmable/index.js +17 -17
- package/dist/components/context-menu/index.js +89 -89
- package/dist/components/count-up/index.js +50 -39
- package/dist/components/custom-scrollbar/index.js +62 -49
- package/dist/components/data-box/index.js +41 -41
- package/dist/components/data-card/index.js +38 -38
- package/dist/components/data-cardtext/index.js +33 -33
- package/dist/components/data-display/index.js +37 -37
- package/dist/components/data-icons/index.js +40 -40
- package/dist/components/data-imgtext/index.js +44 -44
- package/dist/components/data-operatext/index.js +44 -44
- package/dist/components/data-panel/index.js +38 -38
- package/dist/components/data-pay/index.js +60 -60
- package/dist/components/data-price/index.js +38 -38
- package/dist/components/data-progress/index.js +39 -39
- package/dist/components/data-rotate/index.js +39 -39
- package/dist/components/data-table-picker/index.js +151 -53
- package/dist/components/data-tabs/index.js +39 -39
- package/dist/components/data-tabs/style.css +1 -1
- package/dist/components/dialog-column/index.js +50 -50
- package/dist/components/dialog-excel/index.js +68 -68
- package/dist/components/dialog-filter/index.js +84 -84
- package/dist/components/dialog-form/index.js +89 -89
- package/dist/components/dynamic-table/index.js +71 -71
- package/dist/components/e-charts/index.js +95 -94
- package/dist/components/easy-popup/index.js +87 -0
- package/dist/components/easy-popup/style.css +1 -0
- package/dist/components/editable-progress/index.js +48 -48
- package/dist/components/editable-tree/index.js +701 -348
- package/dist/components/egd-collapse/index.js +29 -29
- package/dist/components/egd-collapse-item/index.js +51 -51
- package/dist/components/element-dialog/index.js +74 -65
- package/dist/components/empty-view/index.js +26 -26
- package/dist/components/error-view/index.js +25 -25
- package/dist/components/flex-column/index.js +31 -19
- package/dist/components/flex-item/index.js +32 -20
- package/dist/components/flex-row/index.js +31 -19
- package/dist/components/flex-scroller/index.js +24 -24
- package/dist/components/flex-scroller/style.css +1 -1
- package/dist/components/flow/index.js +100 -100
- package/dist/components/flow-node/index.js +37 -37
- package/dist/components/flow-viewer/index.js +162 -0
- package/dist/components/flow-viewer/style.css +1 -0
- package/dist/components/form-button/index.js +32 -32
- package/dist/components/form-cascader/index.js +73 -61
- package/dist/components/form-checkbox-group/index.js +72 -61
- package/dist/components/form-date-picker/index.js +71 -62
- package/dist/components/form-group/index.js +38 -38
- package/dist/components/form-holder/index.js +50 -32
- package/dist/components/form-input/index.js +61 -50
- package/dist/components/form-input-email/index.js +55 -44
- package/dist/components/form-input-id-card/index.js +60 -49
- package/dist/components/form-input-number/index.js +60 -49
- package/dist/components/form-input-phone-number/index.js +56 -45
- package/dist/components/form-input-time/index.js +59 -48
- package/dist/components/form-item/index.js +107 -79
- package/dist/components/form-item-config-provider/index.js +19 -19
- package/dist/components/form-item-group/index.js +65 -65
- package/dist/components/form-radio-group/index.js +72 -61
- package/dist/components/form-select/index.js +63 -52
- package/dist/components/form-switch/index.js +56 -45
- package/dist/components/form-temp/index.js +50 -50
- package/dist/components/form-textarea/index.js +55 -44
- package/dist/components/form-view/index.js +172 -149
- package/dist/components/fy-array/index.js +64 -64
- package/dist/components/fy-article/index.js +34 -34
- package/dist/components/fy-cascader/index.js +52 -52
- package/dist/components/fy-checkbox/index.js +52 -52
- package/dist/components/fy-code/index.js +30 -30
- package/dist/components/fy-curd/index.js +317 -317
- package/dist/components/fy-date/index.js +45 -45
- package/dist/components/fy-dialog-form/index.js +115 -115
- package/dist/components/fy-draggable/index.js +120 -120
- package/dist/components/fy-draggable/style.css +1 -1
- package/dist/components/fy-dynamic/index.js +126 -126
- package/dist/components/fy-empty/index.js +26 -26
- package/dist/components/fy-form/index.js +384 -366
- package/dist/components/fy-form-design/index.js +6956 -459
- package/dist/components/fy-form-design/style.css +1 -1
- package/dist/components/fy-form-menu/index.js +45 -45
- package/dist/components/fy-input/index.js +61 -61
- package/dist/components/fy-input-color/index.js +41 -41
- package/dist/components/fy-input-icon/index.js +70 -70
- package/dist/components/fy-input-map/index.js +102 -102
- package/dist/components/fy-input-number/index.js +39 -39
- package/dist/components/fy-input-table/index.js +70 -70
- package/dist/components/fy-input-tree/index.js +105 -105
- package/dist/components/fy-progress/index.js +25 -25
- package/dist/components/fy-radio/index.js +36 -36
- package/dist/components/fy-rate/index.js +40 -40
- package/dist/components/fy-select/index.js +101 -101
- package/dist/components/fy-slider/index.js +42 -42
- package/dist/components/fy-switch/index.js +37 -37
- package/dist/components/fy-tabs/index.js +35 -35
- package/dist/components/fy-time/index.js +47 -47
- package/dist/components/fy-title/index.js +23 -23
- package/dist/components/fy-tree/index.js +157 -157
- package/dist/components/fy-u-editor/index.js +138 -105
- package/dist/components/fy-upload/index.js +270 -270
- package/dist/components/guide-steps/index.js +41 -41
- package/dist/components/header-menu/index.js +94 -94
- package/dist/components/header-search/index.js +121 -121
- package/dist/components/highlight-j-s/index.js +76 -0
- package/dist/components/highlight-j-s/style.css +1 -0
- package/dist/components/icon-card/index.js +28 -28
- package/dist/components/icon-temp/index.js +24 -24
- package/dist/components/iframe-window/index.js +24 -24
- package/dist/components/iframe-window/style.css +1 -1
- package/dist/components/image-cropper/index.js +128 -119
- package/dist/components/image-preview/index.js +140 -130
- package/dist/components/image-viewer/index.js +35 -35
- package/dist/components/input-number/index.js +116 -116
- package/dist/components/input-number-range/index.js +37 -37
- package/dist/components/j-s-x-component/index.js +4 -4
- package/dist/components/keep-view-alive/index.js +71 -71
- package/dist/components/keyboard/index.js +182 -182
- package/dist/components/keyboard/style.css +1 -1
- package/dist/components/license/index.js +54 -54
- package/dist/components/loading-view/index.js +25 -25
- package/dist/components/login/index.js +94 -94
- package/dist/components/name-avatar/index.js +26 -26
- package/dist/components/nav-bar/index.js +22 -22
- package/dist/components/not-implement/index.js +22 -22
- package/dist/components/notice/index.js +55 -55
- package/dist/components/page/index.js +20 -20
- package/dist/components/page-header/index.js +28 -28
- package/dist/components/page-index/index.js +86 -62
- package/dist/components/page-index-top/index.js +73 -51
- package/dist/components/page-skeleton/index.js +28 -28
- package/dist/components/page-skeleton-new/index.js +38 -38
- package/dist/components/pageable-table/index.js +206 -161
- package/dist/components/pageable-table/style.css +1 -1
- package/dist/components/pageable-view/index.js +169 -124
- package/dist/components/pageable-view/style.css +1 -1
- package/dist/components/photo-swipe/index.js +88 -66
- package/dist/components/process-designer/index.js +4668 -0
- package/dist/components/process-designer/style.css +1 -0
- package/dist/components/properties-panel/index.js +4791 -0
- package/dist/components/properties-panel/style.css +1 -0
- package/dist/components/queue/index.js +24 -24
- package/dist/components/record-video/index.js +55 -55
- package/dist/components/resize-observer/index.js +26 -26
- package/dist/components/search/index.js +64 -64
- package/dist/components/search-popover/index.js +119 -99
- package/dist/components/sign/index.js +66 -66
- package/dist/components/sign-panel/index.js +78 -78
- package/dist/components/sign-panel/style.css +1 -1
- package/dist/components/skeleton/index.js +35 -35
- package/dist/components/split-pane/index.js +108 -90
- package/dist/components/stateful/index.js +29 -29
- package/dist/components/static-pageable-table/index.js +30 -30
- package/dist/components/swiper/index.js +93 -73
- package/dist/components/tab/index.js +47 -47
- package/dist/components/tab-item/index.js +29 -29
- package/dist/components/table-column/index.js +37 -27
- package/dist/components/table-page/index.js +51 -51
- package/dist/components/table-view/index.js +175 -148
- package/dist/components/tag-render/index.js +50 -39
- package/dist/components/text-ellipsis/index.js +40 -40
- package/dist/components/tinymce-editor/index.js +85 -67
- package/dist/components/tinymce-wrapper/index.js +88 -78
- package/dist/components/toolbar/index.js +52 -52
- package/dist/components/toolbar-button/index.js +56 -38
- package/dist/components/trigger/index.js +27 -27
- package/dist/components/verify/index.js +33 -33
- package/dist/components/vue-tags-input/index.js +137 -137
- package/dist/components/watermark/index.js +37 -27
- package/dist/components/watermark/style.css +1 -1
- package/dist/index.css +1983 -228
- package/dist/index.es.js +23132 -12684
- package/package.json +18 -6
- package/web-types.json +307 -1
- package/dist/chunks/AfdColumn.vue_vue_type_template_lang.768f2ed2.js +0 -302
- package/dist/chunks/ConfigArray.vue_vue_type_template_lang.66483daa.js +0 -51
- package/dist/chunks/ConfigColor.vue_vue_type_template_lang.cd880091.js +0 -24
- package/dist/chunks/ConfigCustom.vue_vue_type_template_lang.6e03d7fd.js +0 -52
- package/dist/chunks/ConfigDate.vue_vue_type_template_lang.116fbad4.js +0 -104
- package/dist/chunks/ConfigDynamic.vue_vue_type_template_lang.99082e47.js +0 -133
- package/dist/chunks/ConfigEvent.vue_vue_type_template_lang.5e8ed6cc.js +0 -96
- package/dist/chunks/ConfigGroup.vue_vue_type_template_lang.44117322.js +0 -48
- package/dist/chunks/ConfigInput.vue_vue_type_template_lang.cc1eb052.js +0 -96
- package/dist/chunks/ConfigMap.vue_vue_type_template_lang.daee4d38.js +0 -31
- package/dist/chunks/ConfigNumber.vue_vue_type_template_lang.d60231d7.js +0 -130
- package/dist/chunks/ConfigRate.vue_vue_type_style_index_0_scoped_true_lang.cf5d437d.js +0 -125
- package/dist/chunks/ConfigSelect.vue_vue_type_template_lang.dfc91f07.js +0 -488
- package/dist/chunks/ConfigSlider.vue_vue_type_template_lang.27b8cc7b.js +0 -99
- package/dist/chunks/ConfigSwitch.vue_vue_type_style_index_0_scoped_true_lang.4caf1bd0.js +0 -54
- package/dist/chunks/ConfigTable.vue_vue_type_template_lang.b27540fd.js +0 -344
- package/dist/chunks/ConfigTextarea.vue_vue_type_template_lang.5cddf41c.js +0 -88
- package/dist/chunks/ConfigTitle.vue_vue_type_template_lang.57d9deb5.js +0 -87
- package/dist/chunks/ConfigTree.vue_vue_type_style_index_0_scoped_true_lang.89ec5376.js +0 -465
- package/dist/chunks/ConfigUEditor.vue_vue_type_template_lang.9726b4f5.js +0 -240
- package/dist/chunks/ConfigUpload.vue_vue_type_template_lang.129c0ced.js +0 -476
- package/dist/chunks/FormConfig.vue_vue_type_template_lang.82463ce5.js +0 -220
- package/dist/chunks/WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js +0 -1821
- package/dist/chunks/WidgetForm.vue_vue_type_template_lang.d4b05679.js +0 -247
- package/dist/chunks/WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js +0 -271
- package/dist/chunks/WidgetFormItem.vue_vue_type_template_lang.48d55a5c.js +0 -24
- package/dist/chunks/WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js +0 -229
- package/dist/chunks/confirmable-mixin.3a79781b.js +0 -75
- package/dist/chunks/dataformat.65b92bfe.js +0 -158
- package/dist/chunks/detail.d67573b1.js +0 -28
- package/dist/chunks/dic.70feb9b4.js +0 -135
- package/dist/chunks/form-item-mixin.79f6eaff.js +0 -128
- package/dist/chunks/init.7c58eb34.js +0 -122
- package/dist/chunks/monaco.cefcb9f5.js +0 -290
- package/dist/chunks/permission.ce5d2121.js +0 -16
- package/dist/chunks/slot.4b391395.js +0 -27
- package/dist/chunks/tab-mixin.8c0142e0.js +0 -81
- package/dist/chunks/util.23fe58fb.js +0 -261
- package/dist/chunks/utils.97652d86.js +0 -26
- package/dist/chunks/utils.fa73de78.js +0 -185
- package/dist/chunks/vueComponentNormalizer.71e2aa87.js +0 -32
- package/dist/components/afd-column/index.js +0 -57
- package/dist/components/config-array/index.js +0 -28
- package/dist/components/config-color/index.js +0 -28
- package/dist/components/config-custom/index.js +0 -62
- package/dist/components/config-date/index.js +0 -28
- package/dist/components/config-dynamic/index.js +0 -28
- package/dist/components/config-event/index.js +0 -74
- package/dist/components/config-group/index.js +0 -36
- package/dist/components/config-input/index.js +0 -29
- package/dist/components/config-map/index.js +0 -28
- package/dist/components/config-number/index.js +0 -28
- package/dist/components/config-rate/index.js +0 -71
- package/dist/components/config-rate/style.css +0 -1
- package/dist/components/config-select/index.js +0 -90
- package/dist/components/config-slider/index.js +0 -28
- package/dist/components/config-switch/index.js +0 -33
- package/dist/components/config-switch/style.css +0 -1
- package/dist/components/config-table/index.js +0 -122
- package/dist/components/config-textarea/index.js +0 -28
- package/dist/components/config-title/index.js +0 -33
- package/dist/components/config-tree/index.js +0 -122
- package/dist/components/config-tree/style.css +0 -1
- package/dist/components/config-u-editor/index.js +0 -34
- package/dist/components/config-upload/index.js +0 -58
- package/dist/components/form-config/index.js +0 -28
- package/dist/components/widget-config/index.js +0 -110
- package/dist/components/widget-form/index.js +0 -71
- package/dist/components/widget-form-group/index.js +0 -96
- package/dist/components/widget-form-item/index.js +0 -71
- package/dist/components/widget-form-table/index.js +0 -95
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { p as
|
|
3
|
-
import { i as
|
|
4
|
-
import { c as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { isBlank
|
|
8
|
-
import { n as
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
return
|
|
1
|
+
import { p as packages } from "../../chunks/packages.419bde01.js";
|
|
2
|
+
import { p as permission } from "../../chunks/permission.07c49abf.js";
|
|
3
|
+
import { i as init } from "../../chunks/init.e0133910.js";
|
|
4
|
+
import { c as config } from "../../chunks/config.7dec2bf2.js";
|
|
5
|
+
import { c as calcCascader, t as translate, f as formInitVal } from "../../chunks/dataformat.9cc4428a.js";
|
|
6
|
+
import { D as DIC_PROPS, s as setPx, o as optVal, d as deepClone } from "../../chunks/util.89913643.js";
|
|
7
|
+
import { isBlank } from "@web-utils/core";
|
|
8
|
+
import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.77ec6792.js";
|
|
9
|
+
var render = function() {
|
|
10
|
+
var _vm = this, _h = _vm.$createElement, _c = _vm._self._c || _h;
|
|
11
|
+
return _c("div", {
|
|
12
12
|
staticClass: "avue-crud avue-crud--card"
|
|
13
|
-
}, [
|
|
13
|
+
}, [_vm.tableOption.title ? _c(_vm.tableOption.titleSize || "h2", {
|
|
14
14
|
tag: "Component",
|
|
15
|
-
style:
|
|
16
|
-
}, [
|
|
15
|
+
style: _vm.tableOption.titleStyle
|
|
16
|
+
}, [_vm._v(" " + _vm._s(_vm.tableOption.title) + " ")]) : _vm._e(), _c("HeaderSearch", {
|
|
17
17
|
ref: "headerSearch",
|
|
18
|
-
scopedSlots:
|
|
18
|
+
scopedSlots: _vm._u([{
|
|
19
19
|
key: "search",
|
|
20
|
-
fn: function(
|
|
21
|
-
return [
|
|
20
|
+
fn: function(scope) {
|
|
21
|
+
return [_vm._t("search", null, null, scope)];
|
|
22
22
|
}
|
|
23
23
|
}, {
|
|
24
24
|
key: "searchMenu",
|
|
25
|
-
fn: function(
|
|
26
|
-
return [
|
|
25
|
+
fn: function(scope) {
|
|
26
|
+
return [_vm._t("searchMenu", null, null, scope)];
|
|
27
27
|
}
|
|
28
|
-
},
|
|
28
|
+
}, _vm._l(_vm.searchSlot, function(item) {
|
|
29
29
|
return {
|
|
30
|
-
key:
|
|
31
|
-
fn: function(
|
|
32
|
-
return [
|
|
30
|
+
key: item,
|
|
31
|
+
fn: function(scope) {
|
|
32
|
+
return [_vm._t(item, null, null, scope)];
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
})], null, !0)
|
|
36
|
-
}),
|
|
36
|
+
}), _vm.optVal(_vm.tableOption.header, !0) ? _c("HeaderMenu", {
|
|
37
37
|
ref: "headerMenu",
|
|
38
|
-
scopedSlots:
|
|
38
|
+
scopedSlots: _vm._u([{
|
|
39
39
|
key: "menuLeft",
|
|
40
|
-
fn: function(
|
|
41
|
-
return [
|
|
40
|
+
fn: function(scope) {
|
|
41
|
+
return [_vm._t("menuLeft", null, null, scope)];
|
|
42
42
|
}
|
|
43
43
|
}, {
|
|
44
44
|
key: "menuRight",
|
|
45
|
-
fn: function(
|
|
46
|
-
return [
|
|
45
|
+
fn: function(scope) {
|
|
46
|
+
return [_vm._t("menuRight", null, null, scope)];
|
|
47
47
|
}
|
|
48
48
|
}], null, !0)
|
|
49
|
-
}) :
|
|
49
|
+
}) : _vm._e(), _vm.optVal(_vm.tableOption.tip, _vm.config.tip) && _vm.tableOption.selection ? _c("ElTag", {
|
|
50
50
|
staticClass: "avue-crud__tip"
|
|
51
|
-
}, [
|
|
51
|
+
}, [_c("span", {
|
|
52
52
|
staticClass: "avue-crud__tip-name"
|
|
53
|
-
}, [
|
|
53
|
+
}, [_vm._v(" 当前表格已选择 "), _c("span", {
|
|
54
54
|
staticClass: "avue-crud__tip-count"
|
|
55
|
-
}, [
|
|
55
|
+
}, [_vm._v(_vm._s(_vm.selectLen))]), _vm._v(" 项 ")]), _vm.optVal(_vm.tableOption.selectClearBtn, _vm.config.selectClearBtn) && _vm.tableOption.selection ? _c("ElButton", {
|
|
56
56
|
directives: [{
|
|
57
57
|
name: "permission",
|
|
58
58
|
rawName: "v-permission",
|
|
59
|
-
value:
|
|
59
|
+
value: _vm.getPermission("selectClearBtn"),
|
|
60
60
|
expression: "getPermission('selectClearBtn')"
|
|
61
61
|
}],
|
|
62
62
|
attrs: {
|
|
@@ -64,167 +64,167 @@ var x = function() {
|
|
|
64
64
|
size: "small"
|
|
65
65
|
},
|
|
66
66
|
on: {
|
|
67
|
-
click:
|
|
67
|
+
click: _vm.selectClear
|
|
68
68
|
}
|
|
69
|
-
}, [
|
|
69
|
+
}, [_vm._v(" 清 空 ")]) : _vm._e(), _vm._t("tip")], 2) : _vm._e(), _vm._t("header"), _c("ElForm", {
|
|
70
70
|
ref: "cellForm",
|
|
71
71
|
attrs: {
|
|
72
|
-
model:
|
|
72
|
+
model: _vm.cellForm,
|
|
73
73
|
"show-message": !1
|
|
74
74
|
},
|
|
75
75
|
on: {
|
|
76
|
-
validate:
|
|
76
|
+
validate: _vm.handleValidate
|
|
77
77
|
}
|
|
78
|
-
}, [
|
|
78
|
+
}, [_c("ElTable", {
|
|
79
79
|
directives: [{
|
|
80
80
|
name: "loading",
|
|
81
81
|
rawName: "v-loading",
|
|
82
|
-
value:
|
|
82
|
+
value: _vm.tableLoading,
|
|
83
83
|
expression: "tableLoading"
|
|
84
84
|
}],
|
|
85
|
-
key:
|
|
85
|
+
key: _vm.reload,
|
|
86
86
|
ref: "table",
|
|
87
87
|
class: {
|
|
88
|
-
"avue-crud--indeterminate":
|
|
88
|
+
"avue-crud--indeterminate": _vm.optVal(_vm.tableOption.indeterminate, !1)
|
|
89
89
|
},
|
|
90
90
|
attrs: {
|
|
91
|
-
data:
|
|
92
|
-
"row-key":
|
|
93
|
-
size:
|
|
94
|
-
lazy:
|
|
95
|
-
load:
|
|
96
|
-
"tree-props":
|
|
97
|
-
"expand-row-keys":
|
|
98
|
-
"default-expand-all":
|
|
99
|
-
"highlight-current-row":
|
|
100
|
-
"show-summary":
|
|
101
|
-
"summary-method":
|
|
102
|
-
"span-method":
|
|
103
|
-
stripe:
|
|
104
|
-
"show-header":
|
|
105
|
-
"default-sort":
|
|
106
|
-
"row-class-name":
|
|
107
|
-
"cell-class-name":
|
|
108
|
-
"row-style":
|
|
109
|
-
"cell-style":
|
|
110
|
-
fit:
|
|
111
|
-
"header-cell-class-name":
|
|
112
|
-
"max-height":
|
|
113
|
-
height:
|
|
114
|
-
width:
|
|
115
|
-
border:
|
|
91
|
+
data: _vm.cellForm.list,
|
|
92
|
+
"row-key": _vm.rowKey,
|
|
93
|
+
size: _vm.$AVUE.tableSize || _vm.controlSize,
|
|
94
|
+
lazy: _vm.optVal(_vm.tableOption.lazy, !1),
|
|
95
|
+
load: _vm.treeLoad,
|
|
96
|
+
"tree-props": _vm.treeProps,
|
|
97
|
+
"expand-row-keys": _vm.tableOption.expandRowKeys,
|
|
98
|
+
"default-expand-all": _vm.tableOption.defaultExpandAll,
|
|
99
|
+
"highlight-current-row": _vm.tableOption.highlightCurrentRow,
|
|
100
|
+
"show-summary": _vm.tableOption.showSummary,
|
|
101
|
+
"summary-method": _vm.tableSummaryMethod,
|
|
102
|
+
"span-method": _vm.tableSpanMethod,
|
|
103
|
+
stripe: _vm.tableOption.stripe,
|
|
104
|
+
"show-header": _vm.tableOption.showHeader,
|
|
105
|
+
"default-sort": _vm.tableOption.defaultSort,
|
|
106
|
+
"row-class-name": _vm.rowClassName,
|
|
107
|
+
"cell-class-name": _vm.cellClassName,
|
|
108
|
+
"row-style": _vm.rowStyle,
|
|
109
|
+
"cell-style": _vm.cellStyle,
|
|
110
|
+
fit: _vm.tableOption.fit,
|
|
111
|
+
"header-cell-class-name": _vm.headerCellClassName,
|
|
112
|
+
"max-height": _vm.isAutoHeight ? _vm.tableHeight : _vm.tableOption.maxHeight,
|
|
113
|
+
height: _vm.tableHeight,
|
|
114
|
+
width: _vm.setPx(_vm.tableOption.width, _vm.config.width),
|
|
115
|
+
border: _vm.tableOption.border
|
|
116
116
|
},
|
|
117
117
|
on: {
|
|
118
|
-
"current-change":
|
|
119
|
-
"expand-change":
|
|
120
|
-
"header-dragend":
|
|
121
|
-
"row-click":
|
|
122
|
-
"row-dblclick":
|
|
123
|
-
"cell-mouse-enter":
|
|
124
|
-
"cell-mouse-leave":
|
|
125
|
-
"cell-click":
|
|
126
|
-
"header-click":
|
|
127
|
-
"row-contextmenu":
|
|
128
|
-
"header-contextmenu":
|
|
129
|
-
"cell-dblclick":
|
|
130
|
-
"filter-change":
|
|
131
|
-
"selection-change":
|
|
132
|
-
select:
|
|
133
|
-
"select-all":
|
|
134
|
-
"sort-change":
|
|
135
|
-
},
|
|
136
|
-
scopedSlots:
|
|
118
|
+
"current-change": _vm.currentRowChange,
|
|
119
|
+
"expand-change": _vm.expandChange,
|
|
120
|
+
"header-dragend": _vm.headerDragend,
|
|
121
|
+
"row-click": _vm.rowClick,
|
|
122
|
+
"row-dblclick": _vm.rowDblclick,
|
|
123
|
+
"cell-mouse-enter": _vm.cellMouseEnter,
|
|
124
|
+
"cell-mouse-leave": _vm.cellMouseLeave,
|
|
125
|
+
"cell-click": _vm.cellClick,
|
|
126
|
+
"header-click": _vm.headerClick,
|
|
127
|
+
"row-contextmenu": _vm.rowContextmenu,
|
|
128
|
+
"header-contextmenu": _vm.headerContextmenu,
|
|
129
|
+
"cell-dblclick": _vm.cellDblclick,
|
|
130
|
+
"filter-change": _vm.filterChange,
|
|
131
|
+
"selection-change": _vm.selectionChange,
|
|
132
|
+
select: _vm.select,
|
|
133
|
+
"select-all": _vm.selectAll,
|
|
134
|
+
"sort-change": _vm.sortChange
|
|
135
|
+
},
|
|
136
|
+
scopedSlots: _vm._u([{
|
|
137
137
|
key: "empty",
|
|
138
138
|
fn: function() {
|
|
139
|
-
return [
|
|
139
|
+
return [_vm.$slots.empty ? _vm._t("empty") : _c("ElEmpty", {
|
|
140
140
|
staticClass: "avue-crud__empty",
|
|
141
141
|
attrs: {
|
|
142
142
|
"image-size": 100,
|
|
143
|
-
description:
|
|
143
|
+
description: _vm.tableOption.emptyText
|
|
144
144
|
}
|
|
145
145
|
})];
|
|
146
146
|
},
|
|
147
147
|
proxy: !0
|
|
148
148
|
}], null, !0)
|
|
149
|
-
}, [
|
|
149
|
+
}, [_c("Column", {
|
|
150
150
|
attrs: {
|
|
151
|
-
"column-option":
|
|
151
|
+
"column-option": _vm.columnOption
|
|
152
152
|
},
|
|
153
|
-
scopedSlots:
|
|
153
|
+
scopedSlots: _vm._u([{
|
|
154
154
|
key: "header",
|
|
155
155
|
fn: function() {
|
|
156
|
-
return [
|
|
156
|
+
return [_c("ColumnDefault", {
|
|
157
157
|
ref: "columnDefault",
|
|
158
|
-
scopedSlots:
|
|
158
|
+
scopedSlots: _vm._u([{
|
|
159
159
|
key: "expand",
|
|
160
|
-
fn: function(
|
|
161
|
-
var
|
|
162
|
-
return [
|
|
163
|
-
row
|
|
164
|
-
index
|
|
160
|
+
fn: function(_ref) {
|
|
161
|
+
var row = _ref.row, index = _ref.index;
|
|
162
|
+
return [_vm._t("expand", null, {
|
|
163
|
+
row,
|
|
164
|
+
index
|
|
165
165
|
})];
|
|
166
166
|
}
|
|
167
167
|
}], null, !0)
|
|
168
168
|
})];
|
|
169
169
|
},
|
|
170
170
|
proxy: !0
|
|
171
|
-
},
|
|
171
|
+
}, _vm._l(_vm.mainSlot, function(item) {
|
|
172
172
|
return {
|
|
173
|
-
key:
|
|
174
|
-
fn: function(
|
|
175
|
-
return [
|
|
173
|
+
key: item,
|
|
174
|
+
fn: function(scope) {
|
|
175
|
+
return [_vm._t(item, null, null, scope)];
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
}), {
|
|
179
179
|
key: "footer",
|
|
180
180
|
fn: function() {
|
|
181
|
-
return [
|
|
182
|
-
scopedSlots:
|
|
181
|
+
return [_c("ColumnMenu", {
|
|
182
|
+
scopedSlots: _vm._u([{
|
|
183
183
|
key: "menu",
|
|
184
|
-
fn: function(
|
|
185
|
-
return [
|
|
184
|
+
fn: function(scope) {
|
|
185
|
+
return [_vm._t("menu", null, null, scope)];
|
|
186
186
|
}
|
|
187
187
|
}, {
|
|
188
188
|
key: "menuBtn",
|
|
189
|
-
fn: function(
|
|
190
|
-
return [
|
|
189
|
+
fn: function(scope) {
|
|
190
|
+
return [_vm._t("menuBtn", null, null, scope)];
|
|
191
191
|
}
|
|
192
192
|
}], null, !0)
|
|
193
193
|
})];
|
|
194
194
|
},
|
|
195
195
|
proxy: !0
|
|
196
196
|
}], null, !0)
|
|
197
|
-
})], 1)], 1),
|
|
197
|
+
})], 1)], 1), _vm._t("footer"), _c("TablePage", {
|
|
198
198
|
ref: "tablePage"
|
|
199
|
-
}),
|
|
199
|
+
}), _c("FyDialogForm", {
|
|
200
200
|
ref: "dialogForm",
|
|
201
|
-
scopedSlots:
|
|
201
|
+
scopedSlots: _vm._u([_vm._l(_vm.formSlot, function(item) {
|
|
202
202
|
return {
|
|
203
|
-
key:
|
|
204
|
-
fn: function(
|
|
205
|
-
return [
|
|
203
|
+
key: item,
|
|
204
|
+
fn: function(scope) {
|
|
205
|
+
return [_vm._t(item, null, null, scope)];
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
}), {
|
|
209
209
|
key: "menuForm",
|
|
210
|
-
fn: function(
|
|
211
|
-
return [
|
|
210
|
+
fn: function(scope) {
|
|
211
|
+
return [_vm._t("menuForm", null, null, scope)];
|
|
212
212
|
}
|
|
213
213
|
}], null, !0)
|
|
214
|
-
}),
|
|
214
|
+
}), _c("DialogColumn", {
|
|
215
215
|
ref: "dialogColumn"
|
|
216
|
-
}),
|
|
216
|
+
}), _c("DialogExcel", {
|
|
217
217
|
ref: "dialogExcel"
|
|
218
|
-
}),
|
|
218
|
+
}), _c("DialogFilter", {
|
|
219
219
|
ref: "dialogFilter"
|
|
220
220
|
})], 2);
|
|
221
|
-
},
|
|
222
|
-
const
|
|
221
|
+
}, staticRenderFns = [];
|
|
222
|
+
const __vue2_script = {
|
|
223
223
|
name: "FyCurd",
|
|
224
224
|
directives: {
|
|
225
|
-
permission
|
|
225
|
+
permission
|
|
226
226
|
},
|
|
227
|
-
mixins: [
|
|
227
|
+
mixins: [init],
|
|
228
228
|
provide() {
|
|
229
229
|
return {
|
|
230
230
|
crud: this
|
|
@@ -286,7 +286,7 @@ const P = {
|
|
|
286
286
|
cellForm: {
|
|
287
287
|
list: []
|
|
288
288
|
},
|
|
289
|
-
config
|
|
289
|
+
config,
|
|
290
290
|
list: [],
|
|
291
291
|
listError: {},
|
|
292
292
|
tableForm: {},
|
|
@@ -316,13 +316,13 @@ const P = {
|
|
|
316
316
|
return this.tableOption.columnSort;
|
|
317
317
|
},
|
|
318
318
|
rowParentKey() {
|
|
319
|
-
return this.option.rowParentKey ||
|
|
319
|
+
return this.option.rowParentKey || DIC_PROPS.rowParentKey;
|
|
320
320
|
},
|
|
321
321
|
childrenKey() {
|
|
322
|
-
return this.treeProps.children ||
|
|
322
|
+
return this.treeProps.children || DIC_PROPS.children;
|
|
323
323
|
},
|
|
324
324
|
hasChildrenKey() {
|
|
325
|
-
return this.treeProps.hasChildren ||
|
|
325
|
+
return this.treeProps.hasChildren || DIC_PROPS.hasChildren;
|
|
326
326
|
},
|
|
327
327
|
treeProps() {
|
|
328
328
|
return this.tableOption.treeProps || {};
|
|
@@ -337,37 +337,37 @@ const P = {
|
|
|
337
337
|
return this.getSlotList(["Search"], this.$scopedSlots, this.propOption);
|
|
338
338
|
},
|
|
339
339
|
mainSlot() {
|
|
340
|
-
const
|
|
341
|
-
return this.propOption.forEach((
|
|
342
|
-
this.$scopedSlots[
|
|
343
|
-
}), this.getSlotList(["Header", "Form"], this.$scopedSlots, this.propOption).concat(
|
|
340
|
+
const result = [];
|
|
341
|
+
return this.propOption.forEach((item) => {
|
|
342
|
+
this.$scopedSlots[item.prop] && result.push(item.prop);
|
|
343
|
+
}), this.getSlotList(["Header", "Form"], this.$scopedSlots, this.propOption).concat(result);
|
|
344
344
|
},
|
|
345
345
|
calcHeight() {
|
|
346
346
|
return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight;
|
|
347
347
|
},
|
|
348
348
|
propOption() {
|
|
349
|
-
let
|
|
350
|
-
function
|
|
351
|
-
Array.isArray(
|
|
352
|
-
Array.isArray(
|
|
349
|
+
let result = [];
|
|
350
|
+
function findProp(list = []) {
|
|
351
|
+
Array.isArray(list) && list.forEach((ele) => {
|
|
352
|
+
Array.isArray(ele.children) ? findProp(ele.children) : result.push(ele);
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
|
-
return
|
|
355
|
+
return findProp(this.columnOption), result = calcCascader(result), result;
|
|
356
356
|
},
|
|
357
357
|
isShowSummary() {
|
|
358
358
|
return this.option.showSummary;
|
|
359
359
|
},
|
|
360
360
|
isHeader() {
|
|
361
|
-
let
|
|
362
|
-
return this.columnOption.forEach((
|
|
363
|
-
|
|
364
|
-
}),
|
|
361
|
+
let flag = !1;
|
|
362
|
+
return this.columnOption.forEach((ele) => {
|
|
363
|
+
ele.children && (flag = !0);
|
|
364
|
+
}), flag;
|
|
365
365
|
},
|
|
366
366
|
isTree() {
|
|
367
|
-
let
|
|
368
|
-
return this.data.forEach((
|
|
369
|
-
|
|
370
|
-
}),
|
|
367
|
+
let flag = !1;
|
|
368
|
+
return this.data.forEach((ele) => {
|
|
369
|
+
ele.children && (flag = !0);
|
|
370
|
+
}), flag;
|
|
371
371
|
},
|
|
372
372
|
isCard() {
|
|
373
373
|
return this.option.card ? "always" : "never";
|
|
@@ -416,206 +416,206 @@ const P = {
|
|
|
416
416
|
this.dataInit(), this.getTableHeight(), this.refreshTable();
|
|
417
417
|
},
|
|
418
418
|
methods: {
|
|
419
|
-
setPx
|
|
420
|
-
optVal
|
|
421
|
-
handleValidate(
|
|
422
|
-
this.listError[
|
|
419
|
+
setPx,
|
|
420
|
+
optVal,
|
|
421
|
+
handleValidate(prop, valid, msg) {
|
|
422
|
+
this.listError[prop] || this.$set(this.listError, prop, { valid: !1, msg: "" }), this.listError[prop].valid = !valid, this.listError[prop].msg = msg;
|
|
423
423
|
},
|
|
424
|
-
getPermission(
|
|
425
|
-
return typeof this.permission == "function" ? this.permission(
|
|
424
|
+
getPermission(key, row, index) {
|
|
425
|
+
return typeof this.permission == "function" ? this.permission(key, row, index) : isBlank(this.permission[key]) ? !0 : this.permission[key];
|
|
426
426
|
},
|
|
427
427
|
getTableHeight() {
|
|
428
428
|
this.isAutoHeight ? this.$nextTick(() => {
|
|
429
|
-
const
|
|
430
|
-
if (!
|
|
429
|
+
const tableRef = this.$refs.table, tablePageRef = this.$refs.tablePage;
|
|
430
|
+
if (!tableRef)
|
|
431
431
|
return;
|
|
432
|
-
const
|
|
433
|
-
this.tableHeight = document.documentElement.clientHeight -
|
|
432
|
+
const tableStyle = tableRef.$el, pageStyle = tablePageRef.$el.offsetHeight || 20;
|
|
433
|
+
this.tableHeight = document.documentElement.clientHeight - tableStyle.offsetTop - pageStyle - this.calcHeight;
|
|
434
434
|
}) : this.tableHeight = this.tableOption.height;
|
|
435
435
|
},
|
|
436
436
|
doLayout() {
|
|
437
437
|
this.$refs.table.doLayout();
|
|
438
438
|
},
|
|
439
|
-
refreshTable(
|
|
439
|
+
refreshTable(callback) {
|
|
440
440
|
this.reload = Math.random(), this.$nextTick(() => {
|
|
441
|
-
|
|
441
|
+
callback && callback();
|
|
442
442
|
});
|
|
443
443
|
},
|
|
444
444
|
// 树懒加载
|
|
445
|
-
treeLoad(
|
|
446
|
-
this.$emit("tree-load",
|
|
447
|
-
|
|
445
|
+
treeLoad(tree, treeNode, resolve) {
|
|
446
|
+
this.$emit("tree-load", tree, treeNode, (data) => {
|
|
447
|
+
tree.children = data, resolve(data);
|
|
448
448
|
});
|
|
449
449
|
},
|
|
450
|
-
menuIcon(
|
|
451
|
-
return
|
|
450
|
+
menuIcon(value) {
|
|
451
|
+
return optVal(this.tableOption[`${value}Text`], translate(`crud.${value}`));
|
|
452
452
|
},
|
|
453
|
-
getBtnIcon(
|
|
454
|
-
const
|
|
455
|
-
return this.tableOption[
|
|
453
|
+
getBtnIcon(value) {
|
|
454
|
+
const name = `${value}Icon`;
|
|
455
|
+
return this.tableOption[name] || config[name];
|
|
456
456
|
},
|
|
457
457
|
// 对部分表单字段进行校验的方法
|
|
458
|
-
validateField(
|
|
459
|
-
return this.$refs.dialogForm.$refs.tableForm.validateField(
|
|
458
|
+
validateField(val) {
|
|
459
|
+
return this.$refs.dialogForm.$refs.tableForm.validateField(val);
|
|
460
460
|
},
|
|
461
461
|
selectClear() {
|
|
462
|
-
this.$emit("selection-clear",
|
|
462
|
+
this.$emit("selection-clear", deepClone(this.tableSelect)), this.$refs.table.clearSelection();
|
|
463
463
|
},
|
|
464
|
-
toggleRowSelection(
|
|
465
|
-
this.$refs.table.toggleRowSelection(
|
|
464
|
+
toggleRowSelection(row, selected) {
|
|
465
|
+
this.$refs.table.toggleRowSelection(row, selected);
|
|
466
466
|
},
|
|
467
|
-
toggleRowExpansion(
|
|
468
|
-
this.$refs.table.toggleRowExpansion(
|
|
467
|
+
toggleRowExpansion(row, expanded) {
|
|
468
|
+
this.$refs.table.toggleRowExpansion(row, expanded);
|
|
469
469
|
},
|
|
470
|
-
setCurrentRow(
|
|
471
|
-
this.$refs.table.setCurrentRow(
|
|
470
|
+
setCurrentRow(row) {
|
|
471
|
+
this.$refs.table.setCurrentRow(row);
|
|
472
472
|
},
|
|
473
473
|
dataInit() {
|
|
474
|
-
this.list = this.data, this.list.forEach((
|
|
475
|
-
|
|
474
|
+
this.list = this.data, this.list.forEach((ele, index) => {
|
|
475
|
+
ele.$cellEdit && !this.cascaderFormList[index] && (this.cascaderFormList[index] = deepClone(ele)), this.$set(ele, "$cellEdit", ele.$cellEdit || !1), this.$set(ele, "$index", index);
|
|
476
476
|
});
|
|
477
477
|
},
|
|
478
478
|
// 拖动表头事件
|
|
479
|
-
headerDragend(
|
|
480
|
-
this.objectOption[
|
|
479
|
+
headerDragend(newWidth, oldWidth, column, event) {
|
|
480
|
+
this.objectOption[column.property] && this.$set(this.objectOption[column.property], "width", newWidth), this.$emit("header-dragend", newWidth, oldWidth, column, event);
|
|
481
481
|
},
|
|
482
|
-
headerSort(
|
|
483
|
-
const
|
|
484
|
-
|
|
482
|
+
headerSort(oldIndex, newIndex) {
|
|
483
|
+
const column = this.columnOption, targetRow = column.splice(oldIndex, 1)[0];
|
|
484
|
+
column.splice(newIndex, 0, targetRow), this.refreshTable();
|
|
485
485
|
},
|
|
486
486
|
// 清除过滤器执行函数
|
|
487
|
-
clearFilter(
|
|
488
|
-
this.$refs.table.clearFilter(
|
|
487
|
+
clearFilter(name) {
|
|
488
|
+
this.$refs.table.clearFilter(name);
|
|
489
489
|
},
|
|
490
490
|
// 展开或则关闭
|
|
491
|
-
expandChange(
|
|
492
|
-
this.$emit("expand-change",
|
|
491
|
+
expandChange(row, expand) {
|
|
492
|
+
this.$emit("expand-change", row, expand);
|
|
493
493
|
},
|
|
494
494
|
// 设置单选
|
|
495
|
-
currentRowChange(
|
|
496
|
-
this.$emit("current-row-change",
|
|
495
|
+
currentRowChange(currentRow, oldCurrentRow) {
|
|
496
|
+
this.$emit("current-row-change", currentRow, oldCurrentRow);
|
|
497
497
|
},
|
|
498
498
|
// 刷新事件
|
|
499
499
|
refreshChange() {
|
|
500
500
|
this.$emit("refresh-change");
|
|
501
501
|
},
|
|
502
502
|
// 选中实例
|
|
503
|
-
toggleSelection(
|
|
504
|
-
|
|
505
|
-
this.$refs.table.toggleRowSelection(
|
|
503
|
+
toggleSelection(rows) {
|
|
504
|
+
rows ? rows.forEach((row) => {
|
|
505
|
+
this.$refs.table.toggleRowSelection(row);
|
|
506
506
|
}) : this.$refs.table.clearSelection();
|
|
507
507
|
},
|
|
508
508
|
// 选择回调
|
|
509
|
-
selectionChange(
|
|
510
|
-
this.tableSelect =
|
|
509
|
+
selectionChange(val) {
|
|
510
|
+
this.tableSelect = val, this.$emit("selection-change", this.tableSelect);
|
|
511
511
|
},
|
|
512
512
|
// 单个选择回调
|
|
513
|
-
select(
|
|
514
|
-
this.$emit("select",
|
|
513
|
+
select(selection, row) {
|
|
514
|
+
this.$emit("select", selection, row);
|
|
515
515
|
},
|
|
516
516
|
// 点击勾选全选 Checkbox
|
|
517
|
-
selectAll(
|
|
518
|
-
this.$emit("select-all",
|
|
517
|
+
selectAll(selection) {
|
|
518
|
+
this.$emit("select-all", selection);
|
|
519
519
|
},
|
|
520
520
|
// 筛选回调用
|
|
521
|
-
filterChange(
|
|
522
|
-
this.$emit("filter-change",
|
|
521
|
+
filterChange(filters) {
|
|
522
|
+
this.$emit("filter-change", filters);
|
|
523
523
|
},
|
|
524
524
|
// 排序回调
|
|
525
|
-
sortChange(
|
|
526
|
-
this.$emit("sort-change",
|
|
525
|
+
sortChange(val) {
|
|
526
|
+
this.$emit("sort-change", val);
|
|
527
527
|
},
|
|
528
528
|
// 行双击
|
|
529
|
-
rowDblclick(
|
|
530
|
-
this.$emit("row-dblclick",
|
|
529
|
+
rowDblclick(row, event) {
|
|
530
|
+
this.$emit("row-dblclick", row, event);
|
|
531
531
|
},
|
|
532
532
|
// 行单机
|
|
533
|
-
rowClick(
|
|
534
|
-
this.$emit("row-click",
|
|
533
|
+
rowClick(row, event, column) {
|
|
534
|
+
this.$emit("row-click", row, event, column);
|
|
535
535
|
},
|
|
536
536
|
// 清空排序
|
|
537
537
|
clearSort() {
|
|
538
538
|
this.$refs.table.clearSort();
|
|
539
539
|
},
|
|
540
540
|
// 当单元格 hover 进入时会触发该事件
|
|
541
|
-
cellMouseEnter(
|
|
542
|
-
this.$emit("cell-mouse-enter",
|
|
541
|
+
cellMouseEnter(row, column, cell, event) {
|
|
542
|
+
this.$emit("cell-mouse-enter", row, column, cell, event);
|
|
543
543
|
},
|
|
544
544
|
// 当单元格 hover 退出时会触发该事件
|
|
545
|
-
cellMouseLeave(
|
|
546
|
-
this.$emit("cell-mouse-leave",
|
|
545
|
+
cellMouseLeave(row, column, cell, event) {
|
|
546
|
+
this.$emit("cell-mouse-leave", row, column, cell, event);
|
|
547
547
|
},
|
|
548
548
|
// 当某个单元格被点击时会触发该事件
|
|
549
|
-
cellClick(
|
|
550
|
-
this.$emit("cell-click",
|
|
549
|
+
cellClick(row, column, cell, event) {
|
|
550
|
+
this.$emit("cell-click", row, column, cell, event);
|
|
551
551
|
},
|
|
552
552
|
// 当某一列的表头被点击时会触发该事件
|
|
553
|
-
headerClick(
|
|
554
|
-
this.$emit("header-click",
|
|
553
|
+
headerClick(column, event) {
|
|
554
|
+
this.$emit("header-click", column, event);
|
|
555
555
|
},
|
|
556
556
|
// 当某一行被鼠标右键点击时会触发该事件
|
|
557
|
-
rowContextmenu(
|
|
558
|
-
this.$emit("row-contextmenu",
|
|
557
|
+
rowContextmenu(row, column, event) {
|
|
558
|
+
this.$emit("row-contextmenu", row, column, event);
|
|
559
559
|
},
|
|
560
560
|
// 当某一列的表头被鼠标右键点击时触发该事件
|
|
561
|
-
headerContextmenu(
|
|
562
|
-
this.$emit("header-contextmenu",
|
|
561
|
+
headerContextmenu(column, event) {
|
|
562
|
+
this.$emit("header-contextmenu", column, event);
|
|
563
563
|
},
|
|
564
564
|
// 当某个单元格被双击击时会触发该事件
|
|
565
|
-
cellDblclick(
|
|
566
|
-
this.$emit("cell-dblclick",
|
|
565
|
+
cellDblclick(row, column, cell, event) {
|
|
566
|
+
this.$emit("cell-dblclick", row, column, cell, event);
|
|
567
567
|
},
|
|
568
568
|
// 单元格新增
|
|
569
|
-
rowCellAdd(
|
|
570
|
-
const
|
|
571
|
-
|
|
569
|
+
rowCellAdd(row = {}) {
|
|
570
|
+
const len = this.list.length, formDefault = formInitVal(this.propOption).tableForm;
|
|
571
|
+
row = deepClone(
|
|
572
572
|
Object.assign(
|
|
573
573
|
{
|
|
574
574
|
$cellEdit: !0,
|
|
575
|
-
$index:
|
|
575
|
+
$index: len
|
|
576
576
|
},
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
formDefault,
|
|
578
|
+
row
|
|
579
579
|
)
|
|
580
|
-
), this.list.push(
|
|
580
|
+
), this.list.push(row);
|
|
581
581
|
},
|
|
582
582
|
// 行取消
|
|
583
|
-
rowCancel(
|
|
584
|
-
|
|
583
|
+
rowCancel(row, index) {
|
|
584
|
+
isBlank(row[this.rowKey]) ? (this.list.splice(index, 1), delete this.cascaderDIC[index]) : (this.cascaderFormList[index].$cellEdit = !1, this.$set(this.cascaderDIC, index, this.cascaderDicList[index]), this.$set(this.list, index, this.cascaderFormList[index])), delete this.cascaderDicList[index], delete this.cascaderFormList[index], this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(index), 1);
|
|
585
585
|
},
|
|
586
586
|
// 行编辑点击
|
|
587
|
-
rowCell(
|
|
588
|
-
|
|
589
|
-
},
|
|
590
|
-
rowCellUpdate(
|
|
591
|
-
|
|
592
|
-
const
|
|
593
|
-
this.btnDisabledList[
|
|
594
|
-
},
|
|
595
|
-
this.btnDisabledList[
|
|
587
|
+
rowCell(row, index) {
|
|
588
|
+
row.$cellEdit ? this.rowCellUpdate(row, index) : this.rowCellEdit(row, index);
|
|
589
|
+
},
|
|
590
|
+
rowCellUpdate(row, index) {
|
|
591
|
+
row = deepClone(row);
|
|
592
|
+
const result = this.validateCellField(index), done = () => {
|
|
593
|
+
this.btnDisabledList[index] = !1, this.btnDisabled = !1, this.list[index].$cellEdit = !1, this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(index), 1), delete this.cascaderFormList[index];
|
|
594
|
+
}, loading = () => {
|
|
595
|
+
this.btnDisabledList[index] = !1, this.btnDisabled = !1;
|
|
596
596
|
};
|
|
597
|
-
|
|
597
|
+
result && (this.btnDisabledList[index] = !0, this.btnDisabled = !0, isBlank(row[this.rowKey]) ? this.$emit("row-save", row, done, loading) : this.$emit("row-update", row, index, done, loading));
|
|
598
598
|
},
|
|
599
599
|
// 单元格编辑
|
|
600
|
-
rowCellEdit(
|
|
601
|
-
|
|
600
|
+
rowCellEdit(row, index) {
|
|
601
|
+
row.$cellEdit = !0, this.cascaderFormList[index] = deepClone(row), this.cascaderDicList[index] = deepClone(this.cascaderDIC[index]);
|
|
602
602
|
},
|
|
603
603
|
// 对部分表单字段进行校验
|
|
604
604
|
validateCellForm() {
|
|
605
|
-
return new Promise((
|
|
606
|
-
this.$refs.cellForm.validate((
|
|
607
|
-
|
|
605
|
+
return new Promise((resolve) => {
|
|
606
|
+
this.$refs.cellForm.validate((valid, msg) => {
|
|
607
|
+
resolve(msg);
|
|
608
608
|
});
|
|
609
609
|
});
|
|
610
610
|
},
|
|
611
|
-
validateCellField(
|
|
612
|
-
let
|
|
613
|
-
for (const
|
|
614
|
-
if (
|
|
615
|
-
|
|
616
|
-
}), !
|
|
611
|
+
validateCellField(index) {
|
|
612
|
+
let result = !0;
|
|
613
|
+
for (const item of this.$refs.cellForm.fields)
|
|
614
|
+
if (item.prop.split(".")[1] == index && this.$refs.cellForm.validateField(item.prop, (error) => {
|
|
615
|
+
error && (result = !1);
|
|
616
|
+
}), !result)
|
|
617
617
|
break;
|
|
618
|
-
return
|
|
618
|
+
return result;
|
|
619
619
|
},
|
|
620
620
|
rowAdd() {
|
|
621
621
|
this.$refs.dialogForm.show("add");
|
|
@@ -629,123 +629,123 @@ const P = {
|
|
|
629
629
|
closeDialog() {
|
|
630
630
|
return this.$refs.dialogForm.closeDialog();
|
|
631
631
|
},
|
|
632
|
-
getPropRef(
|
|
633
|
-
return this.$refs.dialogForm.$refs.tableForm.getPropRef(
|
|
632
|
+
getPropRef(prop) {
|
|
633
|
+
return this.$refs.dialogForm.$refs.tableForm.getPropRef(prop);
|
|
634
634
|
},
|
|
635
635
|
setVal() {
|
|
636
636
|
this.$emit("input", this.tableForm), this.$emit("change", this.tableForm);
|
|
637
637
|
},
|
|
638
638
|
// 编辑
|
|
639
|
-
rowEdit(
|
|
640
|
-
this.tableForm =
|
|
639
|
+
rowEdit(row, index) {
|
|
640
|
+
this.tableForm = deepClone(row), this.tableIndex = index, this.setVal(), this.$refs.dialogForm.show("edit");
|
|
641
641
|
},
|
|
642
642
|
// 复制
|
|
643
|
-
rowCopy(
|
|
644
|
-
this.tableForm =
|
|
643
|
+
rowCopy(row) {
|
|
644
|
+
this.tableForm = deepClone(row), delete this.tableForm[this.rowKey], this.tableIndex = -1, this.setVal(), this.$refs.dialogForm.show("add");
|
|
645
645
|
},
|
|
646
646
|
// 查看
|
|
647
|
-
rowView(
|
|
648
|
-
this.tableForm =
|
|
647
|
+
rowView(row, index) {
|
|
648
|
+
this.tableForm = deepClone(row), this.tableIndex = index, this.setVal(), this.$refs.dialogForm.show("view");
|
|
649
649
|
},
|
|
650
650
|
// 删除
|
|
651
|
-
rowDel(
|
|
652
|
-
this.$emit("row-del",
|
|
653
|
-
const { parentList
|
|
654
|
-
|
|
651
|
+
rowDel(row, index) {
|
|
652
|
+
this.$emit("row-del", row, index, () => {
|
|
653
|
+
const { parentList, index: index2 } = this.findData(row[this.rowKey]);
|
|
654
|
+
parentList && parentList.splice(index2, 1);
|
|
655
655
|
});
|
|
656
656
|
},
|
|
657
657
|
// 合并行
|
|
658
|
-
tableSpanMethod(
|
|
658
|
+
tableSpanMethod(param) {
|
|
659
659
|
if (typeof this.spanMethod == "function")
|
|
660
|
-
return this.spanMethod(
|
|
660
|
+
return this.spanMethod(param);
|
|
661
661
|
},
|
|
662
662
|
// 合集统计逻辑
|
|
663
|
-
tableSummaryMethod(
|
|
664
|
-
const
|
|
663
|
+
tableSummaryMethod(param) {
|
|
664
|
+
const sumsList = {};
|
|
665
665
|
if (typeof this.summaryMethod == "function")
|
|
666
|
-
return this.summaryMethod(
|
|
667
|
-
const { columns
|
|
668
|
-
return
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
671
|
-
const
|
|
672
|
-
switch (
|
|
666
|
+
return this.summaryMethod(param);
|
|
667
|
+
const { columns, data } = param, sums = [];
|
|
668
|
+
return columns.length > 0 && columns.forEach((column, index) => {
|
|
669
|
+
const currItem = this.sumColumnList.find((item) => item.name === column.property);
|
|
670
|
+
if (currItem) {
|
|
671
|
+
const decimals = currItem.decimals || 2, label = currItem.label || "";
|
|
672
|
+
switch (currItem.type) {
|
|
673
673
|
case "count":
|
|
674
|
-
|
|
674
|
+
sums[index] = label + data.length;
|
|
675
675
|
break;
|
|
676
676
|
case "avg":
|
|
677
|
-
const
|
|
678
|
-
let
|
|
679
|
-
|
|
680
|
-
const
|
|
681
|
-
return isNaN(
|
|
682
|
-
}, 0),
|
|
677
|
+
const avgValues = data.map((item) => Number(item[column.property]));
|
|
678
|
+
let nowindex = 1;
|
|
679
|
+
sums[index] = avgValues.reduce((perv, curr) => {
|
|
680
|
+
const value = Number(curr);
|
|
681
|
+
return isNaN(value) ? perv : (perv * (nowindex - 1) + curr) / nowindex++;
|
|
682
|
+
}, 0), sums[index] = label + sums[index].toFixed(decimals);
|
|
683
683
|
break;
|
|
684
684
|
case "sum":
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
const
|
|
688
|
-
return isNaN(
|
|
689
|
-
}, 0),
|
|
685
|
+
const values = data.map((item) => Number(item[column.property]));
|
|
686
|
+
sums[index] = values.reduce((perv, curr) => {
|
|
687
|
+
const value = Number(curr);
|
|
688
|
+
return isNaN(value) ? perv : perv + curr;
|
|
689
|
+
}, 0), sums[index] = label + sums[index].toFixed(decimals);
|
|
690
690
|
break;
|
|
691
691
|
}
|
|
692
|
-
|
|
692
|
+
sumsList[column.property] = sums[index];
|
|
693
693
|
} else
|
|
694
|
-
|
|
695
|
-
}), this.sumsList =
|
|
694
|
+
sums[index] = "";
|
|
695
|
+
}), this.sumsList = sumsList, sums;
|
|
696
696
|
},
|
|
697
|
-
tableDrop(
|
|
697
|
+
tableDrop(type, el, callback) {
|
|
698
698
|
if (this.isSortable !== !0) {
|
|
699
|
-
if (
|
|
699
|
+
if (type === "row" && !this.isRowSort)
|
|
700
700
|
return;
|
|
701
|
-
if (
|
|
701
|
+
if (type === "column" && !this.isColumnSort)
|
|
702
702
|
return;
|
|
703
703
|
}
|
|
704
704
|
if (!window.Sortable) {
|
|
705
|
-
|
|
705
|
+
packages.logs("Sortable");
|
|
706
706
|
return;
|
|
707
707
|
}
|
|
708
|
-
window.Sortable.create(
|
|
709
|
-
ghostClass:
|
|
710
|
-
chosenClass:
|
|
708
|
+
window.Sortable.create(el, {
|
|
709
|
+
ghostClass: config.ghostClass,
|
|
710
|
+
chosenClass: config.ghostClass,
|
|
711
711
|
animation: 500,
|
|
712
712
|
delay: 0,
|
|
713
|
-
onEnd: (
|
|
713
|
+
onEnd: (evt) => callback(evt)
|
|
714
714
|
});
|
|
715
715
|
},
|
|
716
|
-
findData(
|
|
717
|
-
let
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
item:
|
|
722
|
-
index
|
|
723
|
-
parentList
|
|
724
|
-
parent
|
|
725
|
-
}),
|
|
716
|
+
findData(id) {
|
|
717
|
+
let result = {};
|
|
718
|
+
const callback = (parentList, parent) => {
|
|
719
|
+
parentList.forEach((ele, index) => {
|
|
720
|
+
ele[this.rowKey] === id && (result = {
|
|
721
|
+
item: ele,
|
|
722
|
+
index,
|
|
723
|
+
parentList,
|
|
724
|
+
parent
|
|
725
|
+
}), ele[this.childrenKey] && callback(ele[this.childrenKey], ele);
|
|
726
726
|
});
|
|
727
727
|
};
|
|
728
|
-
return
|
|
728
|
+
return callback(this.list), result;
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
|
-
},
|
|
732
|
-
var
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
731
|
+
}, __cssModules = {};
|
|
732
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
733
|
+
__vue2_script,
|
|
734
|
+
render,
|
|
735
|
+
staticRenderFns,
|
|
736
736
|
!1,
|
|
737
|
-
|
|
737
|
+
__vue2_injectStyles,
|
|
738
738
|
null,
|
|
739
739
|
null,
|
|
740
740
|
null
|
|
741
741
|
);
|
|
742
|
-
function
|
|
743
|
-
for (let
|
|
744
|
-
this[
|
|
742
|
+
function __vue2_injectStyles(context) {
|
|
743
|
+
for (let o in __cssModules)
|
|
744
|
+
this[o] = __cssModules[o];
|
|
745
745
|
}
|
|
746
|
-
const
|
|
747
|
-
return
|
|
746
|
+
const FyCurd = /* @__PURE__ */ function() {
|
|
747
|
+
return __component__.exports;
|
|
748
748
|
}();
|
|
749
749
|
export {
|
|
750
|
-
|
|
750
|
+
FyCurd as default
|
|
751
751
|
};
|