bkui-vue 1.0.3-beta.7 → 1.0.3-beta.70
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 +148 -150
- package/dist/index.esm.js +17965 -16537
- package/dist/index.umd.js +148 -150
- 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/affix.variable.css +3 -0
- package/lib/alert/alert.variable.css +3 -0
- package/lib/backtop/backtop.variable.css +3 -0
- package/lib/badge/badge.variable.css +3 -0
- package/lib/breadcrumb/breadcrumb.variable.css +3 -0
- package/lib/button/button.variable.css +3 -0
- package/lib/card/card.variable.css +3 -0
- package/lib/cascader/cascader.variable.css +3 -0
- package/lib/checkbox/checkbox.variable.css +3 -0
- package/lib/checkbox/index.js +4 -4
- package/lib/code-diff/code-diff.variable.css +3 -0
- package/lib/collapse/collapse.variable.css +3 -0
- package/lib/collapse-transition/collapse-transition.variable.css +3 -0
- package/lib/color-picker/color-picker.variable.css +3 -0
- package/lib/components.d.ts +1 -0
- package/lib/components.js +2 -5
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/config-provider.variable.css +3 -0
- package/lib/config-provider/index.d.ts +4 -0
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/container.variable.css +3 -0
- package/lib/date-picker/base/month-table.d.ts +2 -2
- package/lib/date-picker/date-picker.d.ts +1 -0
- package/lib/date-picker/date-picker.variable.css +3 -0
- package/lib/date-picker/index.d.ts +3 -0
- package/lib/date-picker/index.js +70 -32
- package/lib/date-picker/interface.d.ts +1 -1
- package/lib/date-picker/time-picker.d.ts +1 -0
- package/lib/date-picker/utils.d.ts +4 -0
- package/lib/dialog/dialog.css +93 -122
- package/lib/dialog/dialog.d.ts +39 -14
- package/lib/dialog/dialog.less +92 -98
- package/lib/dialog/dialog.variable.css +96 -122
- package/lib/dialog/index.d.ts +81 -30
- package/lib/dialog/index.js +146 -124
- package/lib/dialog/props.d.ts +18 -6
- package/lib/directives/index.js +0 -1
- package/lib/dist.index.js +0 -1
- package/lib/divider/divider.variable.css +3 -0
- package/lib/dropdown/dropdown.css +3 -1
- package/lib/dropdown/dropdown.variable.css +6 -1
- package/lib/exception/exception.variable.css +3 -0
- package/lib/fixed-navbar/fixed-navbar.variable.css +3 -0
- package/lib/form/form.variable.css +3 -0
- package/lib/form/index.js +3 -1
- package/lib/hooks.js +1 -8
- package/lib/icon/image-fill.js +82 -167
- package/lib/icon/img-error.js +82 -167
- package/lib/icon/img-placehoulder.js +82 -167
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +87 -2427
- package/lib/icon/info-line.js +82 -167
- package/lib/icon/info.js +82 -167
- package/lib/icon/left-shape.js +82 -167
- package/lib/icon/left-turn-line.js +82 -167
- package/lib/icon/loading.js +82 -167
- package/lib/icon/narrow-line.js +82 -167
- package/lib/icon/original.js +82 -167
- package/lib/icon/pdf-fill.js +82 -167
- package/lib/icon/play-shape.js +82 -167
- package/lib/icon/plus.js +82 -167
- package/lib/icon/ppt-fill.js +82 -167
- package/lib/icon/qq.js +82 -167
- package/lib/icon/right-shape.js +82 -167
- package/lib/icon/right-turn-line.js +82 -167
- package/lib/icon/search.js +82 -167
- package/lib/icon/share.js +82 -167
- package/lib/icon/spinner.js +82 -167
- package/lib/icon/success.js +82 -167
- package/lib/icon/switcher-loading.js +82 -167
- package/lib/icon/text-all.d.ts +4 -0
- package/lib/icon/text-all.js +191 -0
- package/lib/icon/text-file.js +82 -167
- package/lib/icon/text-fill.js +82 -167
- package/lib/icon/transfer.js +82 -167
- package/lib/icon/tree-application-shape.js +82 -167
- package/lib/icon/unfull-screen.js +82 -167
- package/lib/icon/unvisible.js +82 -167
- package/lib/icon/up-shape.js +82 -167
- package/lib/icon/upload.js +82 -167
- package/lib/icon/video-fill.js +82 -167
- package/lib/icon/warn.js +82 -167
- package/lib/icon/weixin-pro.js +82 -167
- package/lib/icon/weixin.js +82 -167
- package/lib/image/image-viewer.variable.css +3 -0
- package/lib/image/image.variable.css +3 -0
- package/lib/image/index.js +5 -2
- package/lib/index.js +0 -1
- package/lib/info-box/index.js +41 -455
- package/lib/info-box/info-box.css +6 -32
- package/lib/info-box/info-box.d.ts +1 -1
- package/lib/info-box/info-box.less +16 -47
- package/lib/info-box/info-box.variable.css +9 -32
- package/lib/input/index.js +5 -0
- package/lib/input/input.variable.css +3 -0
- package/lib/link/link.variable.css +3 -0
- package/lib/loading/loading.variable.css +3 -0
- package/lib/locale/index.js +4 -2
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/menu.variable.css +3 -0
- package/lib/menu/submenu.variable.css +3 -0
- package/lib/message/message.variable.css +3 -0
- package/lib/modal/hooks.d.ts +6 -0
- package/lib/modal/index.d.ts +100 -52
- package/lib/modal/index.js +173 -74
- package/lib/modal/modal.css +41 -65
- package/lib/modal/modal.d.ts +40 -17
- package/lib/modal/modal.less +50 -57
- package/lib/modal/modal.variable.css +44 -65
- package/lib/modal/props.mixin.d.ts +12 -0
- package/lib/navigation/navigation.variable.css +3 -0
- package/lib/notify/notify.variable.css +3 -0
- package/lib/pagination/index.js +2 -1
- package/lib/pagination/pagination.variable.css +3 -0
- package/lib/plugin-popover/index.d.ts +1 -1
- package/lib/plugin-popover/index.js +45 -26
- package/lib/pop-confirm/index.js +8 -5
- package/lib/pop-confirm/pop-confirm.variable.css +3 -0
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.js +45 -26
- package/lib/popover/plugin-popover.d.ts +4 -1
- package/lib/popover/popover.css +3 -1
- package/lib/popover/popover.less +4 -1
- package/lib/popover/popover.variable.css +6 -1
- package/lib/preset.d.ts +2 -0
- package/lib/preset.js +14 -20
- package/lib/process/process.variable.css +3 -0
- package/lib/progress/progress.variable.css +3 -0
- package/lib/radio/index.js +5 -5
- package/lib/radio/radio.variable.css +3 -0
- package/lib/rate/rate.variable.css +3 -0
- package/lib/rate/star.variable.css +3 -0
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.variable.css +3 -0
- package/lib/search-select/index.d.ts +375 -16
- package/lib/search-select/index.js +701 -366
- package/lib/search-select/input.d.ts +14 -5
- package/lib/search-select/search-select.css +20 -6
- package/lib/search-select/search-select.d.ts +129 -7
- package/lib/search-select/search-select.less +16 -12
- package/lib/search-select/search-select.variable.css +23 -6
- package/lib/search-select/selected.d.ts +116 -6
- package/lib/search-select/utils.d.ts +19 -6
- package/lib/select/index.d.ts +143 -6
- package/lib/select/index.js +1355 -78
- package/lib/select/option.d.ts +3 -1
- package/lib/select/pinyin/core.d.ts +14 -0
- package/lib/select/pinyin/dict.d.ts +34 -0
- package/lib/select/pinyin/index.d.ts +2 -0
- package/lib/select/select.css +55 -12
- package/lib/select/select.d.ts +59 -2
- package/lib/select/select.less +69 -19
- package/lib/select/select.variable.css +58 -12
- package/lib/select/selectTagInput.d.ts +7 -0
- package/lib/select/type.d.ts +2 -3
- package/lib/shared/index.js +67 -3
- package/lib/shared/utils.d.ts +12 -0
- package/lib/shared/vue-types.d.ts +5 -0
- package/lib/sideslider/index.d.ts +55 -9
- package/lib/sideslider/index.js +26 -25
- package/lib/sideslider/sideslider.css +51 -46
- package/lib/sideslider/sideslider.d.ts +25 -3
- package/lib/sideslider/sideslider.less +108 -104
- package/lib/sideslider/sideslider.variable.css +54 -46
- package/lib/slider/slider.variable.css +3 -0
- package/lib/steps/steps.variable.css +3 -0
- package/lib/styles/mixins/animate.variable.css +3 -0
- package/lib/styles/mixins/popper.variable.css +3 -0
- package/lib/styles/mixins/scroll.variable.css +3 -0
- package/lib/styles/reset.css +1 -3
- package/lib/styles/reset.less +3 -6
- package/lib/styles/reset.variable.css +4 -3
- package/lib/styles/themes/themes.less +5 -0
- package/lib/swiper/swiper.variable.css +3 -0
- package/lib/switcher/switcher.variable.css +3 -0
- package/lib/tab/tab.variable.css +3 -0
- package/lib/table/cache.d.ts +11 -3
- package/lib/table/components/table-column.d.ts +111 -5
- package/lib/table/index.d.ts +51 -5
- package/lib/table/index.js +504 -261
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/head-sort.variable.css +3 -0
- package/lib/table/plugins/settings.variable.css +3 -0
- package/lib/table/plugins/use-draggable.d.ts +2 -2
- package/lib/table/plugins/use-observer-resize.d.ts +5 -0
- package/lib/table/props.d.ts +6 -4
- package/lib/table/table.css +6 -12
- package/lib/table/table.less +12 -9
- package/lib/table/table.variable.css +9 -12
- package/lib/table/use-attributes.d.ts +4 -42
- package/lib/table/utils.d.ts +2 -2
- package/lib/table-column/index.d.ts +235 -119
- package/lib/table-column/index.js +217 -30
- package/lib/tag/tag.variable.css +3 -0
- package/lib/tag-input/index.d.ts +4 -4
- package/lib/tag-input/tag-input.d.ts +2 -2
- package/lib/tag-input/tag-input.variable.css +3 -0
- package/lib/tag-input/tag-props.d.ts +1 -1
- package/lib/tag-input/tag-render.d.ts +1 -1
- package/lib/time-picker/index.d.ts +38 -35
- package/lib/time-picker/time-picker.variable.css +3 -0
- package/lib/timeline/index.d.ts +80 -44
- package/lib/timeline/index.js +54 -65
- package/lib/timeline/timeline.d.ts +46 -29
- package/lib/timeline/timeline.variable.css +3 -0
- package/lib/transfer/transfer.variable.css +3 -0
- package/lib/tree/tree.variable.css +3 -0
- package/lib/upload/index.d.ts +12 -0
- package/lib/upload/index.js +21 -30
- package/lib/upload/props.d.ts +3 -0
- package/lib/upload/upload-trigger.d.ts +6 -0
- package/lib/upload/upload.d.ts +6 -0
- package/lib/upload/upload.variable.css +3 -0
- package/lib/virtual-render/index.d.ts +9 -9
- package/lib/virtual-render/virtual-render.d.ts +3 -3
- package/lib/virtual-render/virtual-render.variable.css +3 -0
- package/package.json +3 -2
@@ -83,7 +83,95 @@ function _defineProperty(obj, key, value) {
|
|
83
83
|
;// CONCATENATED MODULE: external "vue"
|
84
84
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
85
85
|
var external_vue_y = x => () => x
|
86
|
-
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref });
|
86
|
+
const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["unref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.unref });
|
87
|
+
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
|
88
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
89
|
+
/* harmony default export */ const esm_browser_native = ({
|
90
|
+
randomUUID
|
91
|
+
});
|
92
|
+
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
|
93
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
94
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
95
|
+
// generators (like Math.random()).
|
96
|
+
let getRandomValues;
|
97
|
+
const rnds8 = new Uint8Array(16);
|
98
|
+
function rng() {
|
99
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
100
|
+
if (!getRandomValues) {
|
101
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
102
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
103
|
+
|
104
|
+
if (!getRandomValues) {
|
105
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
return getRandomValues(rnds8);
|
110
|
+
}
|
111
|
+
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
|
112
|
+
|
113
|
+
/**
|
114
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
115
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
116
|
+
*/
|
117
|
+
|
118
|
+
const byteToHex = [];
|
119
|
+
|
120
|
+
for (let i = 0; i < 256; ++i) {
|
121
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
122
|
+
}
|
123
|
+
|
124
|
+
function unsafeStringify(arr, offset = 0) {
|
125
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
126
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
127
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
128
|
+
}
|
129
|
+
|
130
|
+
function stringify(arr, offset = 0) {
|
131
|
+
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
132
|
+
// of the following:
|
133
|
+
// - One or more input array values don't map to a hex octet (leading to
|
134
|
+
// "undefined" in the uuid)
|
135
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
136
|
+
|
137
|
+
if (!validate(uuid)) {
|
138
|
+
throw TypeError('Stringified UUID is invalid');
|
139
|
+
}
|
140
|
+
|
141
|
+
return uuid;
|
142
|
+
}
|
143
|
+
|
144
|
+
/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
|
145
|
+
;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
function v4(options, buf, offset) {
|
151
|
+
if (esm_browser_native.randomUUID && !buf && !options) {
|
152
|
+
return esm_browser_native.randomUUID();
|
153
|
+
}
|
154
|
+
|
155
|
+
options = options || {};
|
156
|
+
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
157
|
+
|
158
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
159
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
160
|
+
|
161
|
+
if (buf) {
|
162
|
+
offset = offset || 0;
|
163
|
+
|
164
|
+
for (let i = 0; i < 16; ++i) {
|
165
|
+
buf[offset + i] = rnds[i];
|
166
|
+
}
|
167
|
+
|
168
|
+
return buf;
|
169
|
+
}
|
170
|
+
|
171
|
+
return unsafeStringify(rnds);
|
172
|
+
}
|
173
|
+
|
174
|
+
/* harmony default export */ const esm_browser_v4 = (v4);
|
87
175
|
;// CONCATENATED MODULE: ../../packages/table/src/const.ts
|
88
176
|
|
89
177
|
/*
|
@@ -263,7 +351,7 @@ var ColumnTypeEnum;
|
|
263
351
|
ColumnTypeEnum["SELECTION"] = "selection";
|
264
352
|
ColumnTypeEnum["INDEX"] = "index";
|
265
353
|
ColumnTypeEnum["EXPAND"] = "expand";
|
266
|
-
ColumnTypeEnum["NONE"] = "
|
354
|
+
ColumnTypeEnum["NONE"] = "__COL_TYPE_NONE";
|
267
355
|
})(ColumnTypeEnum || (ColumnTypeEnum = {}));
|
268
356
|
var TableAlignEnum;
|
269
357
|
(function (TableAlignEnum) {
|
@@ -601,6 +689,7 @@ var tableProps = {
|
|
601
689
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
602
690
|
|
603
691
|
|
692
|
+
|
604
693
|
/*
|
605
694
|
* Tencent is pleased to support the open source community by making
|
606
695
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -630,6 +719,7 @@ var tableProps = {
|
|
630
719
|
|
631
720
|
|
632
721
|
|
722
|
+
|
633
723
|
var TableColumnProp = {
|
634
724
|
label: LabelFunctionStringType,
|
635
725
|
field: LabelFunctionStringType,
|
@@ -648,7 +738,10 @@ var TableColumnProp = {
|
|
648
738
|
align: TableAlign,
|
649
739
|
className: RowClassFunctionStringType,
|
650
740
|
prop: LabelFunctionStringType,
|
651
|
-
index: shared_namespaceObject.PropTypes.number.def(undefined)
|
741
|
+
index: shared_namespaceObject.PropTypes.number.def(undefined),
|
742
|
+
uniqueId: shared_namespaceObject.PropTypes.object.def({
|
743
|
+
val: ''
|
744
|
+
})
|
652
745
|
};
|
653
746
|
/* harmony default export */ const table_column = ((0,external_vue_namespaceObject.defineComponent)({
|
654
747
|
name: 'TableColumn',
|
@@ -665,18 +758,39 @@ var TableColumnProp = {
|
|
665
758
|
var column = (0,external_vue_namespaceObject.reactive)(Object.assign({}, props, {
|
666
759
|
field: props.prop || props.field
|
667
760
|
}));
|
761
|
+
var isIndexPropChanged = (0,external_vue_namespaceObject.ref)(false);
|
762
|
+
var setIsIndexChanged = function setIsIndexChanged(val) {
|
763
|
+
isIndexPropChanged.value = val;
|
764
|
+
};
|
668
765
|
return {
|
766
|
+
isIndexPropChanged: isIndexPropChanged,
|
767
|
+
setIsIndexChanged: setIsIndexChanged,
|
669
768
|
initColumns: initColumns,
|
670
769
|
bkTableCache: bkTableCache,
|
671
770
|
column: column
|
672
771
|
};
|
673
772
|
},
|
773
|
+
watch: {
|
774
|
+
index: {
|
775
|
+
handler: function handler() {
|
776
|
+
this.setIsIndexChanged(!this.isIndexPropChanged);
|
777
|
+
},
|
778
|
+
deep: true
|
779
|
+
}
|
780
|
+
},
|
674
781
|
unmounted: function unmounted() {
|
675
782
|
this.updateColumnDefine(true);
|
676
783
|
},
|
677
784
|
mounted: function mounted() {
|
785
|
+
this.setNodeUid();
|
678
786
|
this.updateColumnDefine();
|
679
787
|
},
|
788
|
+
updated: function updated() {
|
789
|
+
if (this.isIndexPropChanged) {
|
790
|
+
this.updateColumnDefineByParent();
|
791
|
+
this.setIsIndexChanged(!this.isIndexPropChanged);
|
792
|
+
}
|
793
|
+
},
|
680
794
|
methods: {
|
681
795
|
updateColumnDefine: function updateColumnDefine() {
|
682
796
|
var unmounted = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
@@ -694,43 +808,113 @@ var TableColumnProp = {
|
|
694
808
|
return Object.assign(result, _defineProperty({}, target, props[key]));
|
695
809
|
}, {});
|
696
810
|
},
|
811
|
+
rsolveIndexedColumn: function rsolveIndexedColumn() {
|
812
|
+
// 如果是设置了Index,则先添加Index列,不做自动递归读取Column
|
813
|
+
if (/\d+\.?\d*/.test("".concat(this.$props.index))) {
|
814
|
+
var _props$render;
|
815
|
+
var props = this.$.vnode.props;
|
816
|
+
var resolveProp = Object.assign({}, this.copyProps(props), {
|
817
|
+
field: props.prop || props.field,
|
818
|
+
render: (_props$render = props.render) !== null && _props$render !== void 0 ? _props$render : this.$slots["default"],
|
819
|
+
uniqueId: this.getNodeCtxUid(this.$.ctx)
|
820
|
+
});
|
821
|
+
this.initColumns(resolveProp);
|
822
|
+
return false;
|
823
|
+
}
|
824
|
+
return true;
|
825
|
+
},
|
826
|
+
setNodeUid: function setNodeUid() {
|
827
|
+
var ctx = this.$.ctx;
|
828
|
+
if (!ctx) {
|
829
|
+
return;
|
830
|
+
}
|
831
|
+
if (ctx.uniqueId && !ctx.uniqueId.val) {
|
832
|
+
ctx.uniqueId.val = esm_browser_v4();
|
833
|
+
}
|
834
|
+
if (!ctx.uniqueId) {
|
835
|
+
Object.assign(ctx, {
|
836
|
+
uniqueId: {
|
837
|
+
val: esm_browser_v4()
|
838
|
+
}
|
839
|
+
});
|
840
|
+
}
|
841
|
+
},
|
842
|
+
getNodeCtxUid: function getNodeCtxUid(ctx) {
|
843
|
+
var _ctx$uniqueId;
|
844
|
+
return ctx === null || ctx === void 0 || (_ctx$uniqueId = ctx.uniqueId) === null || _ctx$uniqueId === void 0 ? void 0 : _ctx$uniqueId.val;
|
845
|
+
},
|
697
846
|
updateColumnDefineByParent: function updateColumnDefineByParent() {
|
698
847
|
var _this = this;
|
848
|
+
if (!this.rsolveIndexedColumn()) {
|
849
|
+
return;
|
850
|
+
}
|
699
851
|
var fn = function fn() {
|
700
852
|
// @ts-ignore
|
701
|
-
var selfVnode = _this
|
702
|
-
var
|
853
|
+
var selfVnode = _this.$;
|
854
|
+
var getTableNode = function getTableNode(root) {
|
855
|
+
var _parentVnode$type;
|
856
|
+
if (root === document.body || !root) {
|
857
|
+
return null;
|
858
|
+
}
|
859
|
+
var parentVnode = root.parent;
|
860
|
+
if (((_parentVnode$type = parentVnode.type) === null || _parentVnode$type === void 0 ? void 0 : _parentVnode$type.name) === 'Table') {
|
861
|
+
return parentVnode.vnode;
|
862
|
+
}
|
863
|
+
return getTableNode(parentVnode);
|
864
|
+
};
|
865
|
+
var getNodeUid = function getNodeUid(node) {
|
866
|
+
return _this.getNodeCtxUid(node.ctx);
|
867
|
+
};
|
868
|
+
var tableNode = getTableNode(selfVnode);
|
869
|
+
if (!tableNode) {
|
870
|
+
return;
|
871
|
+
}
|
703
872
|
var sortColumns = [];
|
704
873
|
var index = 0;
|
874
|
+
var resolveChildNode = function resolveChildNode(node) {
|
875
|
+
var _node$type;
|
876
|
+
if (!node) {
|
877
|
+
return null;
|
878
|
+
}
|
879
|
+
if (((_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.name) === 'TableColumn') {
|
880
|
+
var _node$props$render, _node$children;
|
881
|
+
var resolveProp = Object.assign({
|
882
|
+
index: index
|
883
|
+
}, _this.copyProps(node.props), {
|
884
|
+
field: node.props.prop || node.props.field,
|
885
|
+
render: (_node$props$render = node.props.render) !== null && _node$props$render !== void 0 ? _node$props$render : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"],
|
886
|
+
uniqueId: getNodeUid(node)
|
887
|
+
});
|
888
|
+
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
889
|
+
index = index + 1;
|
890
|
+
return null;
|
891
|
+
}
|
892
|
+
if (Array.isArray(node === null || node === void 0 ? void 0 : node.children)) {
|
893
|
+
return node.children;
|
894
|
+
}
|
895
|
+
if ((0,external_vue_namespaceObject.isVNode)(node) && node !== null && node !== void 0 && node.children && _typeof(node === null || node === void 0 ? void 0 : node.children) === 'object') {
|
896
|
+
return Object.keys(node.children).map(function (key) {
|
897
|
+
return node.children[key];
|
898
|
+
});
|
899
|
+
}
|
900
|
+
if (typeof node === 'function') {
|
901
|
+
return node();
|
902
|
+
}
|
903
|
+
return null;
|
904
|
+
};
|
705
905
|
var reduceColumns = function reduceColumns(nodes) {
|
706
906
|
if (!Array.isArray(nodes)) {
|
907
|
+
var children = resolveChildNode(nodes);
|
908
|
+
if (children) {
|
909
|
+
reduceColumns(children);
|
910
|
+
}
|
707
911
|
return;
|
708
912
|
}
|
709
|
-
nodes.forEach(function (node) {
|
710
|
-
|
711
|
-
if (Array.isArray(node)) {
|
712
|
-
reduceColumns(node);
|
713
|
-
return;
|
714
|
-
}
|
715
|
-
var skipValidateKey0 = true;
|
716
|
-
if (((_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.name) === 'TableColumn') {
|
717
|
-
var _node$children;
|
718
|
-
skipValidateKey0 = Object.hasOwnProperty.call(node.props || {}, 'key');
|
719
|
-
var resolveProp = Object.assign({
|
720
|
-
index: index
|
721
|
-
}, _this.copyProps(node.props), {
|
722
|
-
field: node.props.prop || node.props.field,
|
723
|
-
render: (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"]
|
724
|
-
});
|
725
|
-
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
726
|
-
index = index + 1;
|
727
|
-
}
|
728
|
-
if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length && skipValidateKey0) {
|
729
|
-
reduceColumns(node.children);
|
730
|
-
}
|
913
|
+
nodes === null || nodes === void 0 || nodes.forEach(function (node) {
|
914
|
+
return reduceColumns(node);
|
731
915
|
});
|
732
916
|
};
|
733
|
-
reduceColumns(
|
917
|
+
reduceColumns(tableNode);
|
734
918
|
_this.initColumns(sortColumns);
|
735
919
|
};
|
736
920
|
if (typeof this.bkTableCache.queueStack === 'function') {
|
@@ -738,9 +922,12 @@ var TableColumnProp = {
|
|
738
922
|
}
|
739
923
|
},
|
740
924
|
unmountColumn: function unmountColumn() {
|
925
|
+
var _props$render2;
|
926
|
+
var props = this.$.vnode.props;
|
741
927
|
var resolveProp = Object.assign({}, this.copyProps(this.$props), {
|
742
|
-
field:
|
743
|
-
render: this.$slots["default"]
|
928
|
+
field: props.prop || props.field,
|
929
|
+
render: (_props$render2 = props.render) !== null && _props$render2 !== void 0 ? _props$render2 : this.$slots["default"],
|
930
|
+
uniqueId: this.getNodeCtxUid(this.$.ctx)
|
744
931
|
});
|
745
932
|
this.initColumns(resolveProp, true);
|
746
933
|
}
|
package/lib/tag/tag.variable.css
CHANGED
@@ -12,6 +12,7 @@
|
|
12
12
|
--whitesmoke-color: #fafbfd;
|
13
13
|
--disable-color: #dcdee5;
|
14
14
|
--disable-bg-color: #f9fafd;
|
15
|
+
--border-color: #dcdee5;
|
15
16
|
--font-size-base: 12px;
|
16
17
|
--font-size-medium: 14px;
|
17
18
|
--font-size-large: 16px;
|
@@ -123,6 +124,8 @@
|
|
123
124
|
--search-select-placeholder-color: var(--light-gray);
|
124
125
|
--search-select-message-color: var(--danger-color);
|
125
126
|
--search-select-menu-border-color: var(--disable-color);
|
127
|
+
--select-active-color: #e1ecff;
|
128
|
+
--select-hover-color: #f5f7fa;
|
126
129
|
}
|
127
130
|
.bk-tag {
|
128
131
|
display: inline-flex;
|
package/lib/tag-input/index.d.ts
CHANGED
@@ -274,7 +274,7 @@ declare const TagInput: {
|
|
274
274
|
default: boolean;
|
275
275
|
};
|
276
276
|
tagOverflowTips: {
|
277
|
-
type: import("vue").PropType<Partial<import("../directives/
|
277
|
+
type: import("vue").PropType<Partial<import("../directives/tooltips").IOptions>>;
|
278
278
|
default: () => {};
|
279
279
|
};
|
280
280
|
}>> & {
|
@@ -617,7 +617,7 @@ declare const TagInput: {
|
|
617
617
|
default: boolean;
|
618
618
|
};
|
619
619
|
tagOverflowTips: {
|
620
|
-
type: import("vue").PropType<Partial<import("../directives/
|
620
|
+
type: import("vue").PropType<Partial<import("../directives/tooltips").IOptions>>;
|
621
621
|
default: () => {};
|
622
622
|
};
|
623
623
|
}>> & {
|
@@ -941,7 +941,7 @@ declare const TagInput: {
|
|
941
941
|
default: boolean;
|
942
942
|
};
|
943
943
|
tagOverflowTips: {
|
944
|
-
type: import("vue").PropType<Partial<import("../directives/
|
944
|
+
type: import("vue").PropType<Partial<import("../directives/tooltips").IOptions>>;
|
945
945
|
default: () => {};
|
946
946
|
};
|
947
947
|
}>> & {
|
@@ -1318,7 +1318,7 @@ declare const TagInput: {
|
|
1318
1318
|
default: boolean;
|
1319
1319
|
};
|
1320
1320
|
tagOverflowTips: {
|
1321
|
-
type: import("vue").PropType<Partial<import("../directives/
|
1321
|
+
type: import("vue").PropType<Partial<import("../directives/tooltips").IOptions>>;
|
1322
1322
|
default: () => {};
|
1323
1323
|
};
|
1324
1324
|
}>> & {
|
@@ -274,7 +274,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
274
274
|
default: boolean;
|
275
275
|
};
|
276
276
|
tagOverflowTips: {
|
277
|
-
type: import("vue").PropType<Partial<import("../directives/
|
277
|
+
type: import("vue").PropType<Partial<import("../directives/tooltips").IOptions>>; /**
|
278
278
|
* 不显示条件:
|
279
279
|
* 1. 设置不可清除
|
280
280
|
* 2. 禁用时
|
@@ -614,7 +614,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
614
614
|
default: boolean;
|
615
615
|
};
|
616
616
|
tagOverflowTips: {
|
617
|
-
type: import("vue").PropType<Partial<import("../directives/
|
617
|
+
type: import("vue").PropType<Partial<import("../directives/tooltips").IOptions>>; /**
|
618
618
|
* 不显示条件:
|
619
619
|
* 1. 设置不可清除
|
620
620
|
* 2. 禁用时
|
@@ -12,6 +12,7 @@
|
|
12
12
|
--whitesmoke-color: #fafbfd;
|
13
13
|
--disable-color: #dcdee5;
|
14
14
|
--disable-bg-color: #f9fafd;
|
15
|
+
--border-color: #dcdee5;
|
15
16
|
--font-size-base: 12px;
|
16
17
|
--font-size-medium: 14px;
|
17
18
|
--font-size-large: 16px;
|
@@ -123,6 +124,8 @@
|
|
123
124
|
--search-select-placeholder-color: var(--light-gray);
|
124
125
|
--search-select-message-color: var(--danger-color);
|
125
126
|
--search-select-menu-border-color: var(--disable-color);
|
127
|
+
--select-active-color: #e1ecff;
|
128
|
+
--select-hover-color: #f5f7fa;
|
126
129
|
}
|
127
130
|
.bk-tag-input {
|
128
131
|
position: relative;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ExtractPropTypes, PropType, VNode } from 'vue';
|
2
|
-
import { IOptions } from '../directives/
|
2
|
+
import { IOptions } from '../directives/tooltips';
|
3
3
|
declare const tagProps: () => {
|
4
4
|
modelValue: import("vue-types").VueTypeDef<string[]> & {
|
5
5
|
default: () => string[];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PropType } from 'vue';
|
2
|
-
import { IOptions } from '../directives/
|
2
|
+
import { IOptions } from '../directives/tooltips';
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
4
4
|
node: import("vue-types").VueTypeValidableDef<{
|
5
5
|
[key: string]: any;
|