bkui-vue 1.0.3-beta.4 → 1.0.3-beta.40
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 +71 -71
- package/dist/index.esm.js +15481 -14247
- package/dist/index.umd.js +70 -70
- 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/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.js +0 -4
- 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 +69 -31
- 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 +28 -31
- package/lib/dialog/dialog.d.ts +11 -0
- package/lib/dialog/dialog.less +18 -17
- package/lib/dialog/dialog.variable.css +31 -31
- package/lib/dialog/index.d.ts +23 -0
- package/lib/dialog/index.js +15 -9
- package/lib/dialog/props.d.ts +5 -0
- 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/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 +40 -455
- package/lib/info-box/info-box.css +6 -11
- package/lib/info-box/info-box.d.ts +1 -1
- package/lib/info-box/info-box.less +6 -10
- package/lib/info-box/info-box.variable.css +9 -11
- 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/index.d.ts +34 -6
- package/lib/modal/index.js +15 -15
- package/lib/modal/modal.css +10 -15
- package/lib/modal/modal.d.ts +13 -2
- package/lib/modal/modal.less +5 -5
- package/lib/modal/modal.variable.css +13 -15
- package/lib/modal/props.mixin.d.ts +5 -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 +55 -31
- package/lib/pop-confirm/pop-confirm.variable.css +3 -0
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.js +55 -31
- 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/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/resize-layout.variable.css +3 -0
- package/lib/search-select/search-select.variable.css +3 -0
- package/lib/select/index.d.ts +68 -6
- package/lib/select/index.js +1326 -68
- 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 +36 -7
- package/lib/select/select.d.ts +28 -2
- package/lib/select/select.less +43 -13
- package/lib/select/select.variable.css +39 -7
- package/lib/select/type.d.ts +2 -3
- package/lib/shared/index.js +44 -3
- package/lib/shared/utils.d.ts +12 -0
- package/lib/sideslider/index.d.ts +29 -6
- package/lib/sideslider/index.js +5 -2
- package/lib/sideslider/sideslider.d.ts +13 -2
- package/lib/sideslider/sideslider.variable.css +3 -0
- 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 +66 -5
- package/lib/table/index.js +857 -561
- package/lib/table/plugins/head-filter.variable.css +3 -0
- package/lib/table/plugins/head-sort.d.ts +7 -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 +15 -4
- package/lib/table/table.css +6 -12
- package/lib/table/table.d.ts +7 -0
- package/lib/table/table.less +12 -9
- package/lib/table/table.variable.css +9 -12
- package/lib/table/use-attributes.d.ts +5 -43
- package/lib/table/utils.d.ts +5 -4
- package/lib/table-column/index.d.ts +235 -119
- package/lib/table-column/index.js +221 -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 +73 -44
- package/lib/timeline/index.js +45 -63
- package/lib/timeline/timeline.d.ts +42 -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/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) {
|
@@ -415,6 +503,13 @@ var tableProps = {
|
|
415
503
|
* 是否显示Head
|
416
504
|
*/
|
417
505
|
showHead: shared_namespaceObject.PropTypes.bool.def(true),
|
506
|
+
/**
|
507
|
+
* 排序时对需要排序的字符串数值进行格式化
|
508
|
+
* 这里需要配置为正则或者回调函数,(str) => string | number | boolean
|
509
|
+
* 如果配置为正则,程序会提取匹配到的第一个结果尝试转换为数值
|
510
|
+
* 如果为多个,程序会顺序执行所有正则表达式,直到转换成功
|
511
|
+
*/
|
512
|
+
sortValFormat: shared_namespaceObject.PropTypes.arrayOf(shared_namespaceObject.PropTypes.any).def(['']),
|
418
513
|
/**
|
419
514
|
* table header config
|
420
515
|
*/
|
@@ -594,6 +689,7 @@ var tableProps = {
|
|
594
689
|
;// CONCATENATED MODULE: ../../packages/table/src/components/table-column.tsx
|
595
690
|
|
596
691
|
|
692
|
+
|
597
693
|
/*
|
598
694
|
* Tencent is pleased to support the open source community by making
|
599
695
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -623,6 +719,7 @@ var tableProps = {
|
|
623
719
|
|
624
720
|
|
625
721
|
|
722
|
+
|
626
723
|
var TableColumnProp = {
|
627
724
|
label: LabelFunctionStringType,
|
628
725
|
field: LabelFunctionStringType,
|
@@ -641,7 +738,10 @@ var TableColumnProp = {
|
|
641
738
|
align: TableAlign,
|
642
739
|
className: RowClassFunctionStringType,
|
643
740
|
prop: LabelFunctionStringType,
|
644
|
-
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
|
+
})
|
645
745
|
};
|
646
746
|
/* harmony default export */ const table_column = ((0,external_vue_namespaceObject.defineComponent)({
|
647
747
|
name: 'TableColumn',
|
@@ -658,18 +758,39 @@ var TableColumnProp = {
|
|
658
758
|
var column = (0,external_vue_namespaceObject.reactive)(Object.assign({}, props, {
|
659
759
|
field: props.prop || props.field
|
660
760
|
}));
|
761
|
+
var isIndexPropChanged = (0,external_vue_namespaceObject.ref)(false);
|
762
|
+
var setIsIndexChanged = function setIsIndexChanged(val) {
|
763
|
+
isIndexPropChanged.value = val;
|
764
|
+
};
|
661
765
|
return {
|
766
|
+
isIndexPropChanged: isIndexPropChanged,
|
767
|
+
setIsIndexChanged: setIsIndexChanged,
|
662
768
|
initColumns: initColumns,
|
663
769
|
bkTableCache: bkTableCache,
|
664
770
|
column: column
|
665
771
|
};
|
666
772
|
},
|
773
|
+
watch: {
|
774
|
+
index: {
|
775
|
+
handler: function handler() {
|
776
|
+
this.setIsIndexChanged(!this.isIndexPropChanged);
|
777
|
+
},
|
778
|
+
deep: true
|
779
|
+
}
|
780
|
+
},
|
667
781
|
unmounted: function unmounted() {
|
668
782
|
this.updateColumnDefine(true);
|
669
783
|
},
|
670
784
|
mounted: function mounted() {
|
785
|
+
this.setNodeUid();
|
671
786
|
this.updateColumnDefine();
|
672
787
|
},
|
788
|
+
updated: function updated() {
|
789
|
+
if (this.isIndexPropChanged) {
|
790
|
+
this.updateColumnDefineByParent();
|
791
|
+
this.setIsIndexChanged(!this.isIndexPropChanged);
|
792
|
+
}
|
793
|
+
},
|
673
794
|
methods: {
|
674
795
|
updateColumnDefine: function updateColumnDefine() {
|
675
796
|
var unmounted = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
@@ -687,43 +808,110 @@ var TableColumnProp = {
|
|
687
808
|
return Object.assign(result, _defineProperty({}, target, props[key]));
|
688
809
|
}, {});
|
689
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.getNodeUid(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.uniqueId && !ctx.uniqueId.val) {
|
829
|
+
ctx.uniqueId.val = esm_browser_v4();
|
830
|
+
}
|
831
|
+
if (!ctx.uniqueId) {
|
832
|
+
Object.assign(ctx, {
|
833
|
+
uniqueId: {
|
834
|
+
val: esm_browser_v4()
|
835
|
+
}
|
836
|
+
});
|
837
|
+
}
|
838
|
+
},
|
839
|
+
getNodeUid: function getNodeUid(ctx) {
|
840
|
+
var _ctx$uniqueId;
|
841
|
+
return (_ctx$uniqueId = ctx.uniqueId) === null || _ctx$uniqueId === void 0 ? void 0 : _ctx$uniqueId.val;
|
842
|
+
},
|
690
843
|
updateColumnDefineByParent: function updateColumnDefineByParent() {
|
691
844
|
var _this = this;
|
845
|
+
if (!this.rsolveIndexedColumn()) {
|
846
|
+
return;
|
847
|
+
}
|
692
848
|
var fn = function fn() {
|
693
849
|
// @ts-ignore
|
694
|
-
var selfVnode = _this
|
695
|
-
var
|
850
|
+
var selfVnode = _this.$;
|
851
|
+
var getTableNode = function getTableNode(root) {
|
852
|
+
var _parentVnode$type;
|
853
|
+
if (root === document.body || !root) {
|
854
|
+
return null;
|
855
|
+
}
|
856
|
+
var parentVnode = root.parent;
|
857
|
+
if (((_parentVnode$type = parentVnode.type) === null || _parentVnode$type === void 0 ? void 0 : _parentVnode$type.name) === 'Table') {
|
858
|
+
return parentVnode.vnode;
|
859
|
+
}
|
860
|
+
return getTableNode(parentVnode);
|
861
|
+
};
|
862
|
+
var getNodeUid = function getNodeUid(node) {
|
863
|
+
return _this.getNodeUid(node.ctx);
|
864
|
+
};
|
865
|
+
var tableNode = getTableNode(selfVnode);
|
866
|
+
if (!tableNode) {
|
867
|
+
return;
|
868
|
+
}
|
696
869
|
var sortColumns = [];
|
697
870
|
var index = 0;
|
871
|
+
var resolveChildNode = function resolveChildNode(node) {
|
872
|
+
var _node$type;
|
873
|
+
if (!node) {
|
874
|
+
return null;
|
875
|
+
}
|
876
|
+
if (((_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.name) === 'TableColumn') {
|
877
|
+
var _node$props$render, _node$children;
|
878
|
+
var resolveProp = Object.assign({
|
879
|
+
index: index
|
880
|
+
}, _this.copyProps(node.props), {
|
881
|
+
field: node.props.prop || node.props.field,
|
882
|
+
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"],
|
883
|
+
uniqueId: getNodeUid(node.ctx)
|
884
|
+
});
|
885
|
+
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
886
|
+
index = index + 1;
|
887
|
+
return null;
|
888
|
+
}
|
889
|
+
if (Array.isArray(node === null || node === void 0 ? void 0 : node.children)) {
|
890
|
+
return node.children;
|
891
|
+
}
|
892
|
+
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') {
|
893
|
+
return Object.keys(node.children).map(function (key) {
|
894
|
+
return node.children[key];
|
895
|
+
});
|
896
|
+
}
|
897
|
+
if (typeof node === 'function') {
|
898
|
+
return node();
|
899
|
+
}
|
900
|
+
return null;
|
901
|
+
};
|
698
902
|
var reduceColumns = function reduceColumns(nodes) {
|
699
903
|
if (!Array.isArray(nodes)) {
|
904
|
+
var children = resolveChildNode(nodes);
|
905
|
+
if (children) {
|
906
|
+
reduceColumns(children);
|
907
|
+
}
|
700
908
|
return;
|
701
909
|
}
|
702
|
-
nodes.forEach(function (node) {
|
703
|
-
|
704
|
-
if (Array.isArray(node)) {
|
705
|
-
reduceColumns(node);
|
706
|
-
return;
|
707
|
-
}
|
708
|
-
var skipValidateKey0 = true;
|
709
|
-
if (((_node$type = node.type) === null || _node$type === void 0 ? void 0 : _node$type.name) === 'TableColumn') {
|
710
|
-
var _node$children;
|
711
|
-
skipValidateKey0 = Object.hasOwnProperty.call(node.props || {}, 'key');
|
712
|
-
var resolveProp = Object.assign({
|
713
|
-
index: index
|
714
|
-
}, _this.copyProps(node.props), {
|
715
|
-
field: node.props.prop || node.props.field,
|
716
|
-
render: (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children["default"]
|
717
|
-
});
|
718
|
-
sortColumns.push((0,external_vue_namespaceObject.unref)(resolveProp));
|
719
|
-
index = index + 1;
|
720
|
-
}
|
721
|
-
if ((_node$children2 = node.children) !== null && _node$children2 !== void 0 && _node$children2.length && skipValidateKey0) {
|
722
|
-
reduceColumns(node.children);
|
723
|
-
}
|
910
|
+
nodes === null || nodes === void 0 || nodes.forEach(function (node) {
|
911
|
+
return reduceColumns(node);
|
724
912
|
});
|
725
913
|
};
|
726
|
-
reduceColumns(
|
914
|
+
reduceColumns(tableNode);
|
727
915
|
_this.initColumns(sortColumns);
|
728
916
|
};
|
729
917
|
if (typeof this.bkTableCache.queueStack === 'function') {
|
@@ -731,9 +919,12 @@ var TableColumnProp = {
|
|
731
919
|
}
|
732
920
|
},
|
733
921
|
unmountColumn: function unmountColumn() {
|
922
|
+
var _props$render2;
|
923
|
+
var props = this.$.vnode.props;
|
734
924
|
var resolveProp = Object.assign({}, this.copyProps(this.$props), {
|
735
|
-
field:
|
736
|
-
render: this.$slots["default"]
|
925
|
+
field: props.prop || props.field,
|
926
|
+
render: (_props$render2 = props.render) !== null && _props$render2 !== void 0 ? _props$render2 : this.$slots["default"],
|
927
|
+
uniqueId: this.getNodeUid(this.$.ctx)
|
737
928
|
});
|
738
929
|
this.initColumns(resolveProp, true);
|
739
930
|
}
|
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;
|