@blueking/ediatable 0.0.1-beta.6 → 0.0.1-beta.7
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/README.md +0 -563
- package/package.json +1 -5
- package/typings/components/head-column.vue.d.ts +13 -17
- package/typings/vue2.d.ts +6 -13
- package/typings/vue3.d.ts +6 -7
- package/vue2/index.es.min.js +236 -268
- package/vue2/index.iife.min.js +276 -305
- package/vue2/index.umd.min.js +276 -305
- package/vue2/vue2.css +41 -38
- package/vue3/index.es.min.js +235 -252
- package/vue3/index.iife.min.js +277 -291
- package/vue3/index.umd.min.js +275 -289
- package/vue3/vue3.css +41 -38
- package/typings/components/date-time-picker-column.vue.d.ts +0 -63
- package/typings/components/input-column.vue.d.ts +0 -77
- package/typings/components/operation-column.vue.d.ts +0 -48
- package/typings/components/select-column.vue.d.ts +0 -65
- package/typings/components/tag-input-column.vue.d.ts +0 -60
package/vue3/index.umd.min.js
CHANGED
|
@@ -40,44 +40,6 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
40
40
|
.icon-plus-fill:before {
|
|
41
41
|
content: "\\e102";
|
|
42
42
|
}
|
|
43
|
-
.bk-ediatable-head-column.is-required {
|
|
44
|
-
position: relative;
|
|
45
|
-
}
|
|
46
|
-
.bk-ediatable-head-column.is-required::after {
|
|
47
|
-
position: absolute;
|
|
48
|
-
top: 0;
|
|
49
|
-
margin-left: 4px;
|
|
50
|
-
font-size: 12px;
|
|
51
|
-
line-height: 40px;
|
|
52
|
-
color: #ea3636;
|
|
53
|
-
content: '*';
|
|
54
|
-
}
|
|
55
|
-
.bk-ediatable-head-column.is-right-fixed {
|
|
56
|
-
position: sticky;
|
|
57
|
-
right: 1px;
|
|
58
|
-
}
|
|
59
|
-
.bk-ediatable-head-column.is-right-fixed::before {
|
|
60
|
-
position: absolute;
|
|
61
|
-
top: 0;
|
|
62
|
-
left: -10px;
|
|
63
|
-
width: 10px;
|
|
64
|
-
height: 100%;
|
|
65
|
-
background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
|
|
66
|
-
content: '';
|
|
67
|
-
}
|
|
68
|
-
.bk-ediatable-head-column.is-left-fixed {
|
|
69
|
-
position: sticky;
|
|
70
|
-
left: 1px;
|
|
71
|
-
}
|
|
72
|
-
.bk-ediatable-head-column.is-left-fixed::before {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 0;
|
|
75
|
-
right: -10px;
|
|
76
|
-
width: 10px;
|
|
77
|
-
height: 100%;
|
|
78
|
-
background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
|
|
79
|
-
content: '';
|
|
80
|
-
}
|
|
81
43
|
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px rgba(154,161,177,.15),0 4px 80px -8px rgba(36,40,47,.25),0 4px 4px -2px rgba(91,94,105,.15);background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.bk-ediatable {
|
|
82
44
|
position: relative;
|
|
83
45
|
width: 100%;
|
|
@@ -291,6 +253,47 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
291
253
|
background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
|
|
292
254
|
content: '';
|
|
293
255
|
}
|
|
256
|
+
.bk-ediatable-head-column .title-memo {
|
|
257
|
+
border-bottom: 1px dashed #979ba5;
|
|
258
|
+
}
|
|
259
|
+
.bk-ediatable-head-column.is-required {
|
|
260
|
+
position: relative;
|
|
261
|
+
}
|
|
262
|
+
.bk-ediatable-head-column.is-required::after {
|
|
263
|
+
position: absolute;
|
|
264
|
+
top: 0;
|
|
265
|
+
margin-left: 4px;
|
|
266
|
+
font-size: 12px;
|
|
267
|
+
line-height: 40px;
|
|
268
|
+
color: #ea3636;
|
|
269
|
+
content: '*';
|
|
270
|
+
}
|
|
271
|
+
.bk-ediatable-head-column.is-right-fixed {
|
|
272
|
+
position: sticky;
|
|
273
|
+
right: 1px;
|
|
274
|
+
}
|
|
275
|
+
.bk-ediatable-head-column.is-right-fixed::before {
|
|
276
|
+
position: absolute;
|
|
277
|
+
top: 0;
|
|
278
|
+
left: -10px;
|
|
279
|
+
width: 10px;
|
|
280
|
+
height: 100%;
|
|
281
|
+
background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
|
|
282
|
+
content: '';
|
|
283
|
+
}
|
|
284
|
+
.bk-ediatable-head-column.is-left-fixed {
|
|
285
|
+
position: sticky;
|
|
286
|
+
left: 1px;
|
|
287
|
+
}
|
|
288
|
+
.bk-ediatable-head-column.is-left-fixed::before {
|
|
289
|
+
position: absolute;
|
|
290
|
+
top: 0;
|
|
291
|
+
right: -10px;
|
|
292
|
+
width: 10px;
|
|
293
|
+
height: 100%;
|
|
294
|
+
background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
|
|
295
|
+
content: '';
|
|
296
|
+
}
|
|
294
297
|
.bk-ediatable-operation {
|
|
295
298
|
display: flex;
|
|
296
299
|
height: 42px;
|
|
@@ -6090,208 +6093,11 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6090
6093
|
handleMouseMove
|
|
6091
6094
|
};
|
|
6092
6095
|
}
|
|
6093
|
-
const
|
|
6094
|
-
const encodeMult = (text) => {
|
|
6095
|
-
const temp = document.createElement("textarea");
|
|
6096
|
-
temp.value = text;
|
|
6097
|
-
return temp.value;
|
|
6098
|
-
};
|
|
6099
|
-
function tryOnScopeDispose(fn) {
|
|
6100
|
-
if (vue.getCurrentScope()) {
|
|
6101
|
-
vue.onScopeDispose(fn);
|
|
6102
|
-
return true;
|
|
6103
|
-
}
|
|
6104
|
-
return false;
|
|
6105
|
-
}
|
|
6106
|
-
function toValue(r) {
|
|
6107
|
-
return typeof r === "function" ? r() : vue.unref(r);
|
|
6108
|
-
}
|
|
6109
|
-
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
6110
|
-
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
6111
|
-
function unrefElement(elRef) {
|
|
6112
|
-
var _a;
|
|
6113
|
-
const plain = toValue(elRef);
|
|
6114
|
-
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
6115
|
-
}
|
|
6116
|
-
const defaultWindow = isClient ? window : void 0;
|
|
6117
|
-
function useMounted() {
|
|
6118
|
-
const isMounted = vue.ref(false);
|
|
6119
|
-
const instance = vue.getCurrentInstance();
|
|
6120
|
-
if (instance) {
|
|
6121
|
-
vue.onMounted(() => {
|
|
6122
|
-
isMounted.value = true;
|
|
6123
|
-
}, instance);
|
|
6124
|
-
}
|
|
6125
|
-
return isMounted;
|
|
6126
|
-
}
|
|
6127
|
-
function useSupported(callback) {
|
|
6128
|
-
const isMounted = useMounted();
|
|
6129
|
-
return vue.computed(() => {
|
|
6130
|
-
isMounted.value;
|
|
6131
|
-
return Boolean(callback());
|
|
6132
|
-
});
|
|
6133
|
-
}
|
|
6134
|
-
function useResizeObserver(target, callback, options = {}) {
|
|
6135
|
-
const { window: window2 = defaultWindow, ...observerOptions } = options;
|
|
6136
|
-
let observer;
|
|
6137
|
-
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
|
6138
|
-
const cleanup = () => {
|
|
6139
|
-
if (observer) {
|
|
6140
|
-
observer.disconnect();
|
|
6141
|
-
observer = void 0;
|
|
6142
|
-
}
|
|
6143
|
-
};
|
|
6144
|
-
const targets = vue.computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);
|
|
6145
|
-
const stopWatch = vue.watch(
|
|
6146
|
-
targets,
|
|
6147
|
-
(els) => {
|
|
6148
|
-
cleanup();
|
|
6149
|
-
if (isSupported.value && window2) {
|
|
6150
|
-
observer = new ResizeObserver(callback);
|
|
6151
|
-
for (const _el of els)
|
|
6152
|
-
_el && observer.observe(_el, observerOptions);
|
|
6153
|
-
}
|
|
6154
|
-
},
|
|
6155
|
-
{ immediate: true, flush: "post" }
|
|
6156
|
-
);
|
|
6157
|
-
const stop = () => {
|
|
6158
|
-
cleanup();
|
|
6159
|
-
stopWatch();
|
|
6160
|
-
};
|
|
6161
|
-
tryOnScopeDispose(stop);
|
|
6162
|
-
return {
|
|
6163
|
-
isSupported,
|
|
6164
|
-
stop
|
|
6165
|
-
};
|
|
6166
|
-
}
|
|
6167
|
-
const _hoisted_1$6 = ["data-fixed", "data-maxWidth", "data-minWidth", "data-width"];
|
|
6168
|
-
const _hoisted_2$2 = { class: "th-cell" };
|
|
6169
|
-
const _hoisted_3$1 = { style: { "display": "inline-block", "line-height": "40px", "vertical-align": "top" } };
|
|
6170
|
-
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
6171
|
-
__name: "head-column",
|
|
6172
|
-
props: {
|
|
6173
|
-
fixed: { default: void 0 },
|
|
6174
|
-
maxWidth: { default: void 0 },
|
|
6175
|
-
minWidth: { default: void 0 },
|
|
6176
|
-
required: { type: Boolean, default: true },
|
|
6177
|
-
width: { default: void 0 },
|
|
6178
|
-
renderAppend: { type: Function, default: void 0 }
|
|
6179
|
-
},
|
|
6180
|
-
setup(__props) {
|
|
6181
|
-
const props = __props;
|
|
6182
|
-
const slots = vue.useSlots();
|
|
6183
|
-
const { rowWidth, isOverflow: isMinimize } = vue.inject(renderTablekey);
|
|
6184
|
-
const parentTable = vue.inject(tableColumnResizekey);
|
|
6185
|
-
const columnRef = vue.ref();
|
|
6186
|
-
const currentWidth = vue.ref(0);
|
|
6187
|
-
const columnKey = random();
|
|
6188
|
-
let initWidthRate = 0;
|
|
6189
|
-
let isDragedSelf = false;
|
|
6190
|
-
const finalMinWidth = vue.computed(() => props.minWidth ? props.minWidth : props.width ?? 100);
|
|
6191
|
-
const isFixedRight = vue.computed(() => props.fixed === "right");
|
|
6192
|
-
const isFixedLeft = vue.computed(() => props.fixed === "left");
|
|
6193
|
-
const styles = vue.computed(() => {
|
|
6194
|
-
if (props.width && (rowWidth == null ? void 0 : rowWidth.value) && finalMinWidth.value) {
|
|
6195
|
-
const newWidth = rowWidth.value * initWidthRate;
|
|
6196
|
-
if (newWidth !== props.width) {
|
|
6197
|
-
let width = 0;
|
|
6198
|
-
if (isMinimize == null ? void 0 : isMinimize.value) {
|
|
6199
|
-
if (currentWidth.value !== 0 && (currentWidth.value !== finalMinWidth.value || currentWidth.value !== props.width)) {
|
|
6200
|
-
width = currentWidth.value;
|
|
6201
|
-
} else {
|
|
6202
|
-
width = finalMinWidth.value;
|
|
6203
|
-
}
|
|
6204
|
-
} else if (newWidth > finalMinWidth.value) {
|
|
6205
|
-
width = newWidth;
|
|
6206
|
-
} else {
|
|
6207
|
-
width = finalMinWidth.value;
|
|
6208
|
-
}
|
|
6209
|
-
return {
|
|
6210
|
-
minWidth: `${width}px`
|
|
6211
|
-
};
|
|
6212
|
-
}
|
|
6213
|
-
}
|
|
6214
|
-
return {
|
|
6215
|
-
minWidth: props.width ? `${props.width}px` : "120px"
|
|
6216
|
-
};
|
|
6217
|
-
});
|
|
6218
|
-
const RenderAppendElement = vue.computed(() => props.renderAppend && props.renderAppend());
|
|
6219
|
-
vue.watch(
|
|
6220
|
-
() => [props.width, rowWidth == null ? void 0 : rowWidth.value, currentWidth.value],
|
|
6221
|
-
([width, rowWidth2, currentWidth2]) => {
|
|
6222
|
-
if (!isDragedSelf) {
|
|
6223
|
-
return;
|
|
6224
|
-
}
|
|
6225
|
-
if (width && rowWidth2 && currentWidth2 && finalMinWidth.value) {
|
|
6226
|
-
isDragedSelf = false;
|
|
6227
|
-
if (currentWidth2 !== 0 && (currentWidth2 !== finalMinWidth.value || currentWidth2 !== width)) {
|
|
6228
|
-
initWidthRate = currentWidth2 / rowWidth2;
|
|
6229
|
-
} else {
|
|
6230
|
-
initWidthRate = (isMinimize == null ? void 0 : isMinimize.value) ? finalMinWidth.value / rowWidth2 : width / rowWidth2;
|
|
6231
|
-
}
|
|
6232
|
-
}
|
|
6233
|
-
},
|
|
6234
|
-
{
|
|
6235
|
-
immediate: true
|
|
6236
|
-
}
|
|
6237
|
-
);
|
|
6238
|
-
useResizeObserver(columnRef, () => {
|
|
6239
|
-
if (!isDragedSelf) {
|
|
6240
|
-
return;
|
|
6241
|
-
}
|
|
6242
|
-
const width = parseFloat(columnRef.value.style.width);
|
|
6243
|
-
currentWidth.value = width;
|
|
6244
|
-
});
|
|
6245
|
-
const handleMouseDown = (event) => {
|
|
6246
|
-
isDragedSelf = true;
|
|
6247
|
-
parentTable == null ? void 0 : parentTable.columnMousedown(event, {
|
|
6248
|
-
columnKey,
|
|
6249
|
-
minWidth: finalMinWidth.value
|
|
6250
|
-
});
|
|
6251
|
-
};
|
|
6252
|
-
const handleMouseMove = (event) => {
|
|
6253
|
-
parentTable == null ? void 0 : parentTable.columnMouseMove(event);
|
|
6254
|
-
};
|
|
6255
|
-
return (_ctx, _cache) => {
|
|
6256
|
-
const _directive_overflow_tips = vue.resolveDirective("overflow-tips");
|
|
6257
|
-
return vue.openBlock(), vue.createElementBlock("th", {
|
|
6258
|
-
ref_key: "columnRef",
|
|
6259
|
-
ref: columnRef,
|
|
6260
|
-
class: vue.normalizeClass(["bk-ediatable-head-column", {
|
|
6261
|
-
"is-required": _ctx.required,
|
|
6262
|
-
[`column-${vue.unref(columnKey)}`]: true,
|
|
6263
|
-
"is-right-fixed": vue.unref(isMinimize) && isFixedRight.value,
|
|
6264
|
-
"is-left-fixed": vue.unref(isMinimize) && isFixedLeft.value
|
|
6265
|
-
}]),
|
|
6266
|
-
"data-fixed": _ctx.fixed,
|
|
6267
|
-
"data-maxWidth": _ctx.maxWidth,
|
|
6268
|
-
"data-minWidth": finalMinWidth.value,
|
|
6269
|
-
"data-width": _ctx.width,
|
|
6270
|
-
style: vue.normalizeStyle(styles.value),
|
|
6271
|
-
onMousedown: handleMouseDown,
|
|
6272
|
-
onMousemove: handleMouseMove
|
|
6273
|
-
}, [
|
|
6274
|
-
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [
|
|
6275
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
6276
|
-
])), [
|
|
6277
|
-
[_directive_overflow_tips]
|
|
6278
|
-
]),
|
|
6279
|
-
vue.createElementVNode("div", _hoisted_3$1, [
|
|
6280
|
-
vue.unref(slots).append && !_ctx.renderAppend ? vue.renderSlot(_ctx.$slots, "append", { key: 0 }) : vue.createCommentVNode("v-if", true),
|
|
6281
|
-
_ctx.renderAppend ? (vue.openBlock(), vue.createBlock(vue.unref(RenderAppendElement), { key: 1 })) : vue.createCommentVNode("v-if", true)
|
|
6282
|
-
])
|
|
6283
|
-
], 46, _hoisted_1$6);
|
|
6284
|
-
};
|
|
6285
|
-
}
|
|
6286
|
-
});
|
|
6096
|
+
const _hoisted_1$7 = { style: { "position": "relative" } };
|
|
6287
6097
|
const renderTablekey = Symbol("renderTable");
|
|
6288
|
-
const _sfc_main$
|
|
6098
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
6289
6099
|
__name: "ediatable",
|
|
6290
|
-
props: {
|
|
6291
|
-
theadList: { default: () => [] }
|
|
6292
|
-
},
|
|
6293
6100
|
setup(__props) {
|
|
6294
|
-
const slots = vue.useSlots();
|
|
6295
6101
|
const checkTableScroll = () => {
|
|
6296
6102
|
rowWidth.value = tableRef.value.clientWidth;
|
|
6297
6103
|
isOverflow.value = tableOuterRef.value.clientWidth < tableRef.value.clientWidth;
|
|
@@ -6331,34 +6137,8 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6331
6137
|
},
|
|
6332
6138
|
[
|
|
6333
6139
|
vue.createElementVNode("thead", null, [
|
|
6334
|
-
vue.createElementVNode("tr",
|
|
6335
|
-
vue.
|
|
6336
|
-
vue.Fragment,
|
|
6337
|
-
{ key: 1 },
|
|
6338
|
-
vue.renderList(_ctx.theadList, (head, index) => {
|
|
6339
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$8, {
|
|
6340
|
-
key: index,
|
|
6341
|
-
width: head.width,
|
|
6342
|
-
"min-width": head.minWidth,
|
|
6343
|
-
"max-width": head.maxWidth,
|
|
6344
|
-
fixed: head.fixed,
|
|
6345
|
-
required: head.required,
|
|
6346
|
-
"render-append": head.renderAppend
|
|
6347
|
-
}, {
|
|
6348
|
-
default: vue.withCtx(() => [
|
|
6349
|
-
vue.createTextVNode(
|
|
6350
|
-
vue.toDisplayString(head.title),
|
|
6351
|
-
1
|
|
6352
|
-
/* TEXT */
|
|
6353
|
-
)
|
|
6354
|
-
]),
|
|
6355
|
-
_: 2
|
|
6356
|
-
/* DYNAMIC */
|
|
6357
|
-
}, 1032, ["width", "min-width", "max-width", "fixed", "required", "render-append"]);
|
|
6358
|
-
}),
|
|
6359
|
-
128
|
|
6360
|
-
/* KEYED_FRAGMENT */
|
|
6361
|
-
))
|
|
6140
|
+
vue.createElementVNode("tr", _hoisted_1$7, [
|
|
6141
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
6362
6142
|
])
|
|
6363
6143
|
]),
|
|
6364
6144
|
vue.createElementVNode("tbody", null, [
|
|
@@ -6479,12 +6259,12 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6479
6259
|
});
|
|
6480
6260
|
}
|
|
6481
6261
|
});
|
|
6482
|
-
const _hoisted_1$
|
|
6262
|
+
const _hoisted_1$6 = {
|
|
6483
6263
|
key: 0,
|
|
6484
6264
|
class: "input-error"
|
|
6485
6265
|
};
|
|
6486
|
-
const _sfc_main$
|
|
6487
|
-
__name: "date-time-picker
|
|
6266
|
+
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
6267
|
+
__name: "date-time-picker",
|
|
6488
6268
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
6489
6269
|
placeholder: { default: "" },
|
|
6490
6270
|
rules: { default: void 0 },
|
|
@@ -6551,7 +6331,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6551
6331
|
key: "0"
|
|
6552
6332
|
} : void 0
|
|
6553
6333
|
]), 1040, ["model-value", "placeholder", "type"]),
|
|
6554
|
-
vue.unref(errorMessage) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6334
|
+
vue.unref(errorMessage) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
|
|
6555
6335
|
vue.withDirectives(vue.createVNode(
|
|
6556
6336
|
vue.unref(DbIcon),
|
|
6557
6337
|
{ type: "exclamation-fill" },
|
|
@@ -6569,12 +6349,18 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6569
6349
|
};
|
|
6570
6350
|
}
|
|
6571
6351
|
});
|
|
6572
|
-
const
|
|
6352
|
+
const random = () => `${_.random(0, 999999)}_${Date.now()}_${_.random(0, 999999)}`;
|
|
6353
|
+
const encodeMult = (text) => {
|
|
6354
|
+
const temp = document.createElement("textarea");
|
|
6355
|
+
temp.value = text;
|
|
6356
|
+
return temp.value;
|
|
6357
|
+
};
|
|
6358
|
+
const _hoisted_1$5 = {
|
|
6573
6359
|
key: 1,
|
|
6574
6360
|
class: "blur-dispaly-main"
|
|
6575
6361
|
};
|
|
6576
|
-
const _sfc_main$
|
|
6577
|
-
__name: "input
|
|
6362
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
6363
|
+
__name: "input",
|
|
6578
6364
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
6579
6365
|
placeholder: { default: "请输入" },
|
|
6580
6366
|
rules: { default: void 0 },
|
|
@@ -6650,7 +6436,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6650
6436
|
event.preventDefault();
|
|
6651
6437
|
let paste = (event.clipboardData || window.clipboardData).getData("text");
|
|
6652
6438
|
paste = encodeMult(paste);
|
|
6653
|
-
modelValue.value
|
|
6439
|
+
modelValue.value += paste.replace(/^\s+|\s+$/g, "");
|
|
6654
6440
|
};
|
|
6655
6441
|
__expose({
|
|
6656
6442
|
getValue() {
|
|
@@ -6709,7 +6495,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6709
6495
|
)), [
|
|
6710
6496
|
[_directive_bk_tooltips, vue.unref(errorMessage)]
|
|
6711
6497
|
]) : vue.createCommentVNode("v-if", true),
|
|
6712
|
-
_ctx.isShowBlur && isBlur.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6498
|
+
_ctx.isShowBlur && isBlur.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
|
|
6713
6499
|
vue.renderSlot(_ctx.$slots, "blur")
|
|
6714
6500
|
])) : vue.createCommentVNode("v-if", true)
|
|
6715
6501
|
],
|
|
@@ -6719,7 +6505,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6719
6505
|
};
|
|
6720
6506
|
}
|
|
6721
6507
|
});
|
|
6722
|
-
const _sfc_main$
|
|
6508
|
+
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
6723
6509
|
__name: "fixed-column",
|
|
6724
6510
|
props: {
|
|
6725
6511
|
fixed: { default: "right" }
|
|
@@ -6747,16 +6533,216 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6747
6533
|
};
|
|
6748
6534
|
}
|
|
6749
6535
|
});
|
|
6536
|
+
function tryOnScopeDispose(fn) {
|
|
6537
|
+
if (vue.getCurrentScope()) {
|
|
6538
|
+
vue.onScopeDispose(fn);
|
|
6539
|
+
return true;
|
|
6540
|
+
}
|
|
6541
|
+
return false;
|
|
6542
|
+
}
|
|
6543
|
+
function toValue(r) {
|
|
6544
|
+
return typeof r === "function" ? r() : vue.unref(r);
|
|
6545
|
+
}
|
|
6546
|
+
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
6547
|
+
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
6548
|
+
function unrefElement(elRef) {
|
|
6549
|
+
var _a;
|
|
6550
|
+
const plain = toValue(elRef);
|
|
6551
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
6552
|
+
}
|
|
6553
|
+
const defaultWindow = isClient ? window : void 0;
|
|
6554
|
+
function useMounted() {
|
|
6555
|
+
const isMounted = vue.ref(false);
|
|
6556
|
+
const instance = vue.getCurrentInstance();
|
|
6557
|
+
if (instance) {
|
|
6558
|
+
vue.onMounted(() => {
|
|
6559
|
+
isMounted.value = true;
|
|
6560
|
+
}, instance);
|
|
6561
|
+
}
|
|
6562
|
+
return isMounted;
|
|
6563
|
+
}
|
|
6564
|
+
function useSupported(callback) {
|
|
6565
|
+
const isMounted = useMounted();
|
|
6566
|
+
return vue.computed(() => {
|
|
6567
|
+
isMounted.value;
|
|
6568
|
+
return Boolean(callback());
|
|
6569
|
+
});
|
|
6570
|
+
}
|
|
6571
|
+
function useResizeObserver(target, callback, options = {}) {
|
|
6572
|
+
const { window: window2 = defaultWindow, ...observerOptions } = options;
|
|
6573
|
+
let observer;
|
|
6574
|
+
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
|
6575
|
+
const cleanup = () => {
|
|
6576
|
+
if (observer) {
|
|
6577
|
+
observer.disconnect();
|
|
6578
|
+
observer = void 0;
|
|
6579
|
+
}
|
|
6580
|
+
};
|
|
6581
|
+
const targets = vue.computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);
|
|
6582
|
+
const stopWatch = vue.watch(
|
|
6583
|
+
targets,
|
|
6584
|
+
(els) => {
|
|
6585
|
+
cleanup();
|
|
6586
|
+
if (isSupported.value && window2) {
|
|
6587
|
+
observer = new ResizeObserver(callback);
|
|
6588
|
+
for (const _el of els)
|
|
6589
|
+
_el && observer.observe(_el, observerOptions);
|
|
6590
|
+
}
|
|
6591
|
+
},
|
|
6592
|
+
{ immediate: true, flush: "post" }
|
|
6593
|
+
);
|
|
6594
|
+
const stop = () => {
|
|
6595
|
+
cleanup();
|
|
6596
|
+
stopWatch();
|
|
6597
|
+
};
|
|
6598
|
+
tryOnScopeDispose(stop);
|
|
6599
|
+
return {
|
|
6600
|
+
isSupported,
|
|
6601
|
+
stop
|
|
6602
|
+
};
|
|
6603
|
+
}
|
|
6604
|
+
const _hoisted_1$4 = ["data-fixed", "data-maxWidth", "data-minWidth", "data-width"];
|
|
6605
|
+
const _hoisted_2$2 = { class: "th-cell" };
|
|
6606
|
+
const _hoisted_3$1 = {
|
|
6607
|
+
key: 0,
|
|
6608
|
+
style: { "display": "inline-block", "line-height": "40px", "vertical-align": "top" }
|
|
6609
|
+
};
|
|
6610
|
+
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
6611
|
+
__name: "head-column",
|
|
6612
|
+
props: {
|
|
6613
|
+
width: { default: void 0 },
|
|
6614
|
+
required: { type: Boolean, default: true },
|
|
6615
|
+
minWidth: { default: void 0 },
|
|
6616
|
+
maxWidth: { default: void 0 },
|
|
6617
|
+
fixed: { default: void 0 },
|
|
6618
|
+
memo: { default: void 0 }
|
|
6619
|
+
},
|
|
6620
|
+
setup(__props) {
|
|
6621
|
+
const props = __props;
|
|
6622
|
+
const { rowWidth, isOverflow: isMinimize } = vue.inject(renderTablekey);
|
|
6623
|
+
const parentTable = vue.inject(tableColumnResizekey);
|
|
6624
|
+
const slots = vue.useSlots();
|
|
6625
|
+
const columnRef = vue.ref();
|
|
6626
|
+
const currentWidth = vue.ref(0);
|
|
6627
|
+
const columnKey = random();
|
|
6628
|
+
let initWidthRate = 0;
|
|
6629
|
+
let isDragedSelf = false;
|
|
6630
|
+
const finalMinWidth = vue.computed(() => props.minWidth ? props.minWidth : props.width ?? 100);
|
|
6631
|
+
const isFixedRight = vue.computed(() => props.fixed === "right");
|
|
6632
|
+
const isFixedLeft = vue.computed(() => props.fixed === "left");
|
|
6633
|
+
const styles = vue.computed(() => {
|
|
6634
|
+
if (props.width && (rowWidth == null ? void 0 : rowWidth.value) && finalMinWidth.value) {
|
|
6635
|
+
const newWidth = rowWidth.value * initWidthRate;
|
|
6636
|
+
if (newWidth !== props.width) {
|
|
6637
|
+
let width = 0;
|
|
6638
|
+
if (isMinimize == null ? void 0 : isMinimize.value) {
|
|
6639
|
+
if (currentWidth.value !== 0 && (currentWidth.value !== finalMinWidth.value || currentWidth.value !== props.width)) {
|
|
6640
|
+
width = currentWidth.value;
|
|
6641
|
+
} else {
|
|
6642
|
+
width = finalMinWidth.value;
|
|
6643
|
+
}
|
|
6644
|
+
} else if (newWidth > finalMinWidth.value) {
|
|
6645
|
+
width = newWidth;
|
|
6646
|
+
} else {
|
|
6647
|
+
width = finalMinWidth.value;
|
|
6648
|
+
}
|
|
6649
|
+
return {
|
|
6650
|
+
minWidth: `${width}px`
|
|
6651
|
+
};
|
|
6652
|
+
}
|
|
6653
|
+
}
|
|
6654
|
+
return {
|
|
6655
|
+
minWidth: props.width ? `${props.width}px` : "120px"
|
|
6656
|
+
};
|
|
6657
|
+
});
|
|
6658
|
+
vue.watch(() => [props.width, rowWidth == null ? void 0 : rowWidth.value, currentWidth.value], ([width, rowWidth2, currentWidth2]) => {
|
|
6659
|
+
if (!isDragedSelf) {
|
|
6660
|
+
return;
|
|
6661
|
+
}
|
|
6662
|
+
if (width && rowWidth2 && currentWidth2 && finalMinWidth.value) {
|
|
6663
|
+
isDragedSelf = false;
|
|
6664
|
+
if (currentWidth2 !== 0 && (currentWidth2 !== finalMinWidth.value || currentWidth2 !== width)) {
|
|
6665
|
+
initWidthRate = currentWidth2 / rowWidth2;
|
|
6666
|
+
} else {
|
|
6667
|
+
initWidthRate = (isMinimize == null ? void 0 : isMinimize.value) ? finalMinWidth.value / rowWidth2 : width / rowWidth2;
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
}, {
|
|
6671
|
+
immediate: true
|
|
6672
|
+
});
|
|
6673
|
+
useResizeObserver(columnRef, () => {
|
|
6674
|
+
if (!isDragedSelf) {
|
|
6675
|
+
return;
|
|
6676
|
+
}
|
|
6677
|
+
const width = parseFloat(columnRef.value.style.width);
|
|
6678
|
+
currentWidth.value = width;
|
|
6679
|
+
});
|
|
6680
|
+
const handleMouseDown = (event) => {
|
|
6681
|
+
isDragedSelf = true;
|
|
6682
|
+
parentTable == null ? void 0 : parentTable.columnMousedown(event, {
|
|
6683
|
+
columnKey,
|
|
6684
|
+
minWidth: finalMinWidth.value
|
|
6685
|
+
});
|
|
6686
|
+
};
|
|
6687
|
+
const handleMouseMove = (event) => {
|
|
6688
|
+
parentTable == null ? void 0 : parentTable.columnMouseMove(event);
|
|
6689
|
+
};
|
|
6690
|
+
return (_ctx, _cache) => {
|
|
6691
|
+
const _directive_overflow_tips = vue.resolveDirective("overflow-tips");
|
|
6692
|
+
const _directive_bk_tooltips = vue.resolveDirective("bk-tooltips");
|
|
6693
|
+
return vue.openBlock(), vue.createElementBlock("th", {
|
|
6694
|
+
ref_key: "columnRef",
|
|
6695
|
+
ref: columnRef,
|
|
6696
|
+
class: vue.normalizeClass(["bk-ediatable-head-column", {
|
|
6697
|
+
"is-required": _ctx.required,
|
|
6698
|
+
[`column-${vue.unref(columnKey)}`]: true,
|
|
6699
|
+
"is-right-fixed": vue.unref(isMinimize) && isFixedRight.value,
|
|
6700
|
+
"is-left-fixed": vue.unref(isMinimize) && isFixedLeft.value
|
|
6701
|
+
}]),
|
|
6702
|
+
"data-fixed": _ctx.fixed,
|
|
6703
|
+
"data-maxWidth": _ctx.maxWidth,
|
|
6704
|
+
"data-minWidth": finalMinWidth.value,
|
|
6705
|
+
"data-width": _ctx.width,
|
|
6706
|
+
style: vue.normalizeStyle(styles.value),
|
|
6707
|
+
onMousedown: handleMouseDown,
|
|
6708
|
+
onMousemove: handleMouseMove
|
|
6709
|
+
}, [
|
|
6710
|
+
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [
|
|
6711
|
+
vue.createElementVNode(
|
|
6712
|
+
"span",
|
|
6713
|
+
{
|
|
6714
|
+
class: vue.normalizeClass({ "title-memo": _ctx.memo })
|
|
6715
|
+
},
|
|
6716
|
+
[
|
|
6717
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
6718
|
+
],
|
|
6719
|
+
2
|
|
6720
|
+
/* CLASS */
|
|
6721
|
+
)
|
|
6722
|
+
])), [
|
|
6723
|
+
[_directive_overflow_tips],
|
|
6724
|
+
[_directive_bk_tooltips, {
|
|
6725
|
+
content: _ctx.memo,
|
|
6726
|
+
disabled: !_ctx.memo
|
|
6727
|
+
}]
|
|
6728
|
+
]),
|
|
6729
|
+
vue.unref(slots).append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1, [
|
|
6730
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
6731
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
6732
|
+
], 46, _hoisted_1$4);
|
|
6733
|
+
};
|
|
6734
|
+
}
|
|
6735
|
+
});
|
|
6750
6736
|
const _hoisted_1$3 = { class: "bk-ediatable-operation" };
|
|
6751
6737
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
6752
|
-
__name: "operation
|
|
6738
|
+
__name: "operation",
|
|
6753
6739
|
props: {
|
|
6754
|
-
removeable: { type: Boolean, default: true },
|
|
6755
6740
|
showCopy: { type: Boolean, default: false },
|
|
6756
6741
|
showAdd: { type: Boolean, default: true },
|
|
6757
|
-
showRemove: { type: Boolean, default: true }
|
|
6742
|
+
showRemove: { type: Boolean, default: true },
|
|
6743
|
+
removeable: { type: Boolean, default: true }
|
|
6758
6744
|
},
|
|
6759
|
-
emits: ["
|
|
6745
|
+
emits: ["copy", "add", "remove"],
|
|
6760
6746
|
setup(__props, { emit: __emit }) {
|
|
6761
6747
|
const props = __props;
|
|
6762
6748
|
const emits = __emit;
|
|
@@ -6773,7 +6759,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6773
6759
|
emits("remove");
|
|
6774
6760
|
};
|
|
6775
6761
|
return (_ctx, _cache) => {
|
|
6776
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6762
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$5, null, {
|
|
6777
6763
|
default: vue.withCtx(() => [
|
|
6778
6764
|
vue.createElementVNode("div", _hoisted_1$3, [
|
|
6779
6765
|
_ctx.showCopy ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -6818,7 +6804,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
6818
6804
|
class: "select-error"
|
|
6819
6805
|
};
|
|
6820
6806
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
6821
|
-
__name: "select
|
|
6807
|
+
__name: "select",
|
|
6822
6808
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
6823
6809
|
list: {},
|
|
6824
6810
|
placeholder: { default: "请选择" },
|
|
@@ -9468,7 +9454,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
9468
9454
|
style: { "display": "none" }
|
|
9469
9455
|
};
|
|
9470
9456
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
9471
|
-
__name: "tag-input
|
|
9457
|
+
__name: "tag-input",
|
|
9472
9458
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
9473
9459
|
placeholder: { default: "" },
|
|
9474
9460
|
single: { type: Boolean, default: false },
|
|
@@ -9635,7 +9621,7 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
9635
9621
|
class: "input-error"
|
|
9636
9622
|
};
|
|
9637
9623
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9638
|
-
__name: "text-plain
|
|
9624
|
+
__name: "text-plain",
|
|
9639
9625
|
props: {
|
|
9640
9626
|
data: {},
|
|
9641
9627
|
isLoading: { type: Boolean },
|
|
@@ -9709,15 +9695,15 @@ url("data:application/vnd.ms-fontobject;base64,9AgAAEwIAAABAAIAAAAAAAIABQMAAAAAA
|
|
|
9709
9695
|
};
|
|
9710
9696
|
}
|
|
9711
9697
|
});
|
|
9712
|
-
exports2.DateTimePickerColumn = _sfc_main$
|
|
9713
|
-
exports2.Ediatable = _sfc_main$
|
|
9714
|
-
exports2.FixedColumn = _sfc_main$
|
|
9715
|
-
exports2.HeadColumn = _sfc_main$
|
|
9716
|
-
exports2.InputColumn = _sfc_main$
|
|
9698
|
+
exports2.DateTimePickerColumn = _sfc_main$7;
|
|
9699
|
+
exports2.Ediatable = _sfc_main$8;
|
|
9700
|
+
exports2.FixedColumn = _sfc_main$5;
|
|
9701
|
+
exports2.HeadColumn = _sfc_main$4;
|
|
9702
|
+
exports2.InputColumn = _sfc_main$6;
|
|
9717
9703
|
exports2.OperationColumn = _sfc_main$3;
|
|
9718
9704
|
exports2.SelectColumn = _sfc_main$2;
|
|
9719
9705
|
exports2.TagInputColumn = _sfc_main$1;
|
|
9720
9706
|
exports2.TextPlainColumn = _sfc_main;
|
|
9721
|
-
exports2.default = _sfc_main$
|
|
9707
|
+
exports2.default = _sfc_main$8;
|
|
9722
9708
|
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
9723
9709
|
});
|