@blueking/ediatable 0.0.1-beta.27 → 0.0.1-beta.29
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/package.json +1 -1
- package/typings/components/checkbox-column.vue.d.ts +25 -0
- package/typings/components/date-time-picker-column.vue.d.ts +24 -41
- package/typings/components/db-icon/index.d.ts +4 -4
- package/typings/components/fixed-column.vue.d.ts +18 -26
- package/typings/components/head-column.vue.d.ts +23 -42
- package/typings/components/input-column.vue.d.ts +32 -54
- package/typings/components/operation-column.vue.d.ts +8 -35
- package/typings/components/select-column.vue.d.ts +29 -55
- package/typings/components/tag-input-column.vue.d.ts +31 -42
- package/typings/components/text-plain-column.vue.d.ts +38 -0
- package/typings/ediatable.vue.d.ts +34 -0
- package/typings/hooks/useIsWidthOverflow.d.ts +1 -1
- package/typings/hooks/useValidtor.d.ts +3 -3
- package/typings/vue2.d.ts +2 -1
- package/typings/vue3.d.ts +2 -1
- package/vue2/index.es.min.js +85 -21
- package/vue2/index.iife.min.js +2809 -2185
- package/vue2/index.umd.min.js +86 -22
- package/vue2/vue2.css +20 -0
- package/vue3/index.es.min.js +87 -23
- package/vue3/index.iife.min.js +87 -23
- package/vue3/index.umd.min.js +106 -22
- package/vue3/vue3.css +20 -0
package/vue2/vue2.css
CHANGED
|
@@ -3325,3 +3325,23 @@ span.undefined-date-picker-cells-cell-disabled.undefined-date-picker-cells-cell-
|
|
|
3325
3325
|
align-items: center;
|
|
3326
3326
|
cursor: pointer;
|
|
3327
3327
|
}
|
|
3328
|
+
.bk-ediatable-checkbox {
|
|
3329
|
+
position: relative;
|
|
3330
|
+
min-height: 42px;
|
|
3331
|
+
cursor: pointer;
|
|
3332
|
+
background: #fff;
|
|
3333
|
+
padding-left: 16px;
|
|
3334
|
+
display: flex;
|
|
3335
|
+
align-items: center;
|
|
3336
|
+
}
|
|
3337
|
+
.bk-ediatable-checkbox.is-error {
|
|
3338
|
+
background-color: #fff0f1;
|
|
3339
|
+
}
|
|
3340
|
+
.bk-ediatable-checkbox .error-icon {
|
|
3341
|
+
position: absolute;
|
|
3342
|
+
top: 14px;
|
|
3343
|
+
right: 10px;
|
|
3344
|
+
display: flex;
|
|
3345
|
+
font-size: 14px;
|
|
3346
|
+
color: #ea3636;
|
|
3347
|
+
}
|
package/vue3/index.es.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, provide, onMounted, onBeforeUnmount, getCurrentScope, onScopeDispose, unref, computed, watch, getCurrentInstance, defineComponent, useSlots, inject, openBlock, createElementBlock, normalizeStyle, normalizeClass, createElementVNode, withDirectives, renderSlot, createCommentVNode, createBlock, Fragment, renderList, withCtx, createTextVNode, toDisplayString, reactive, toRefs, h, mergeModels, useModel, useAttrs, createVNode, mergeProps, createSlots, nextTick } from "vue";
|
|
2
|
-
import { bkTooltips, DatePicker, Input, Select, TagInput, Loading } from "bkui-vue";
|
|
2
|
+
import { bkTooltips, DatePicker, Input, Select, TagInput, Loading, Checkbox } from "bkui-vue";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -8353,7 +8353,7 @@ const random = () => `${_.random(0, 999999)}_${Date.now()}_${_.random(0, 999999)
|
|
|
8353
8353
|
const _hoisted_1$6 = ["data-fixed", "data-maxWidth", "data-minWidth", "data-width"];
|
|
8354
8354
|
const _hoisted_2$2 = { class: "th-cell" };
|
|
8355
8355
|
const _hoisted_3$1 = { style: { "display": "inline-block", "line-height": "40px", "vertical-align": "top" } };
|
|
8356
|
-
const _sfc_main$
|
|
8356
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
8357
8357
|
__name: "head-column",
|
|
8358
8358
|
props: {
|
|
8359
8359
|
fixed: { default: void 0 },
|
|
@@ -8489,7 +8489,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
8489
8489
|
]),
|
|
8490
8490
|
createElementVNode("div", _hoisted_3$1, [
|
|
8491
8491
|
slots.append && !_ctx.renderAppend ? renderSlot(_ctx.$slots, "append", { key: 0 }) : createCommentVNode("v-if", true),
|
|
8492
|
-
_ctx.renderAppend ? (openBlock(), createBlock(unref(RenderAppendElement), { key: 1 })) : createCommentVNode("v-if", true)
|
|
8492
|
+
_ctx.renderAppend !== void 0 ? (openBlock(), createBlock(unref(RenderAppendElement), { key: 1 })) : createCommentVNode("v-if", true)
|
|
8493
8493
|
])
|
|
8494
8494
|
],
|
|
8495
8495
|
2
|
|
@@ -8500,7 +8500,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
8500
8500
|
}
|
|
8501
8501
|
});
|
|
8502
8502
|
const renderTablekey = Symbol("renderTable");
|
|
8503
|
-
const _sfc_main$
|
|
8503
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
8504
8504
|
__name: "ediatable",
|
|
8505
8505
|
props: {
|
|
8506
8506
|
theadList: { default: () => [] }
|
|
@@ -8563,7 +8563,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
8563
8563
|
Fragment,
|
|
8564
8564
|
{ key: 1 },
|
|
8565
8565
|
renderList(_ctx.theadList, (head, index) => {
|
|
8566
|
-
return openBlock(), createBlock(_sfc_main$
|
|
8566
|
+
return openBlock(), createBlock(_sfc_main$9, {
|
|
8567
8567
|
key: index,
|
|
8568
8568
|
width: head.width,
|
|
8569
8569
|
"min-width": head.minWidth,
|
|
@@ -8709,7 +8709,7 @@ const _hoisted_1$5 = {
|
|
|
8709
8709
|
key: 0,
|
|
8710
8710
|
class: "input-error"
|
|
8711
8711
|
};
|
|
8712
|
-
const _sfc_main$
|
|
8712
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
8713
8713
|
__name: "date-time-picker-column",
|
|
8714
8714
|
props: /* @__PURE__ */ mergeModels({
|
|
8715
8715
|
placeholder: { default: "" },
|
|
@@ -8803,7 +8803,7 @@ const _hoisted_1$4 = {
|
|
|
8803
8803
|
key: 2,
|
|
8804
8804
|
class: "blur-dispaly-main"
|
|
8805
8805
|
};
|
|
8806
|
-
const _sfc_main$
|
|
8806
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
8807
8807
|
__name: "input-column",
|
|
8808
8808
|
props: /* @__PURE__ */ mergeModels({
|
|
8809
8809
|
placeholder: { default: "请输入" },
|
|
@@ -8969,7 +8969,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
8969
8969
|
};
|
|
8970
8970
|
}
|
|
8971
8971
|
});
|
|
8972
|
-
const _sfc_main$
|
|
8972
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
8973
8973
|
__name: "fixed-column",
|
|
8974
8974
|
props: {
|
|
8975
8975
|
fixed: { default: "right" }
|
|
@@ -8998,7 +8998,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8998
8998
|
}
|
|
8999
8999
|
});
|
|
9000
9000
|
const _hoisted_1$3 = { class: "bk-ediatable-operation" };
|
|
9001
|
-
const _sfc_main$
|
|
9001
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
9002
9002
|
__name: "operation-column",
|
|
9003
9003
|
props: {
|
|
9004
9004
|
removeable: { type: Boolean, default: true },
|
|
@@ -9023,7 +9023,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
9023
9023
|
emits("remove");
|
|
9024
9024
|
};
|
|
9025
9025
|
return (_ctx, _cache) => {
|
|
9026
|
-
return openBlock(), createBlock(_sfc_main$
|
|
9026
|
+
return openBlock(), createBlock(_sfc_main$5, null, {
|
|
9027
9027
|
default: withCtx(() => [
|
|
9028
9028
|
createElementVNode("div", _hoisted_1$3, [
|
|
9029
9029
|
_ctx.showCopy ? (openBlock(), createElementBlock("div", {
|
|
@@ -9067,7 +9067,7 @@ const _hoisted_1$2 = {
|
|
|
9067
9067
|
key: 0,
|
|
9068
9068
|
class: "select-error"
|
|
9069
9069
|
};
|
|
9070
|
-
const _sfc_main$
|
|
9070
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
9071
9071
|
__name: "select-column",
|
|
9072
9072
|
props: /* @__PURE__ */ mergeModels({
|
|
9073
9073
|
list: { default: () => [] },
|
|
@@ -9229,7 +9229,7 @@ const _hoisted_1$1 = {
|
|
|
9229
9229
|
class: "input-error"
|
|
9230
9230
|
};
|
|
9231
9231
|
const _hoisted_2$1 = { style: { "display": "none" } };
|
|
9232
|
-
const _sfc_main$
|
|
9232
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
9233
9233
|
__name: "tag-input-column",
|
|
9234
9234
|
props: /* @__PURE__ */ mergeModels({
|
|
9235
9235
|
placeholder: { default: "" },
|
|
@@ -9397,7 +9397,7 @@ const _hoisted_3 = {
|
|
|
9397
9397
|
key: 2,
|
|
9398
9398
|
class: "input-error"
|
|
9399
9399
|
};
|
|
9400
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9400
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
9401
9401
|
__name: "text-plain-column",
|
|
9402
9402
|
props: {
|
|
9403
9403
|
data: {},
|
|
@@ -9472,15 +9472,79 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9472
9472
|
};
|
|
9473
9473
|
}
|
|
9474
9474
|
});
|
|
9475
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9476
|
+
__name: "checkbox-column",
|
|
9477
|
+
props: /* @__PURE__ */ mergeModels({
|
|
9478
|
+
rules: { default: void 0 },
|
|
9479
|
+
disabled: { type: Boolean, default: false }
|
|
9480
|
+
}, {
|
|
9481
|
+
"modelValue": { type: Boolean, ...{
|
|
9482
|
+
default: false
|
|
9483
|
+
} },
|
|
9484
|
+
"modelModifiers": {}
|
|
9485
|
+
}),
|
|
9486
|
+
emits: /* @__PURE__ */ mergeModels(["submit", "error"], ["update:modelValue"]),
|
|
9487
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
9488
|
+
const props = __props;
|
|
9489
|
+
const emits = __emit;
|
|
9490
|
+
const modelValue = useModel(__props, "modelValue");
|
|
9491
|
+
const vBkTooltips = bkTooltips;
|
|
9492
|
+
const { message: errorMessage, validator } = useValidtor(props.rules);
|
|
9493
|
+
const handleChange = (value) => {
|
|
9494
|
+
modelValue.value = value;
|
|
9495
|
+
validator(modelValue.value).then(() => {
|
|
9496
|
+
emits("error", false);
|
|
9497
|
+
emits("submit", value);
|
|
9498
|
+
}).catch(() => emits("error", true));
|
|
9499
|
+
};
|
|
9500
|
+
__expose({
|
|
9501
|
+
getValue() {
|
|
9502
|
+
return validator(modelValue.value).then(() => modelValue.value);
|
|
9503
|
+
}
|
|
9504
|
+
});
|
|
9505
|
+
return (_ctx, _cache) => {
|
|
9506
|
+
return openBlock(), createElementBlock(
|
|
9507
|
+
"div",
|
|
9508
|
+
{
|
|
9509
|
+
class: normalizeClass(["bk-ediatable-checkbox", {
|
|
9510
|
+
"is-error": Boolean(unref(errorMessage))
|
|
9511
|
+
}])
|
|
9512
|
+
},
|
|
9513
|
+
[
|
|
9514
|
+
createVNode(unref(Checkbox), mergeProps({
|
|
9515
|
+
"model-value": modelValue.value,
|
|
9516
|
+
disabled: _ctx.disabled
|
|
9517
|
+
}, _ctx.$attrs, { onChange: handleChange }), null, 16, ["model-value", "disabled"]),
|
|
9518
|
+
unref(errorMessage) ? withDirectives((openBlock(), createBlock(
|
|
9519
|
+
unref(DbIcon),
|
|
9520
|
+
{
|
|
9521
|
+
key: 0,
|
|
9522
|
+
class: "error-icon",
|
|
9523
|
+
type: "exclamation-fill"
|
|
9524
|
+
},
|
|
9525
|
+
null,
|
|
9526
|
+
512
|
|
9527
|
+
/* NEED_PATCH */
|
|
9528
|
+
)), [
|
|
9529
|
+
[unref(vBkTooltips), unref(errorMessage)]
|
|
9530
|
+
]) : createCommentVNode("v-if", true)
|
|
9531
|
+
],
|
|
9532
|
+
2
|
|
9533
|
+
/* CLASS */
|
|
9534
|
+
);
|
|
9535
|
+
};
|
|
9536
|
+
}
|
|
9537
|
+
});
|
|
9475
9538
|
export {
|
|
9476
|
-
_sfc_main
|
|
9477
|
-
_sfc_main$7 as
|
|
9478
|
-
_sfc_main$
|
|
9479
|
-
_sfc_main$
|
|
9480
|
-
_sfc_main$
|
|
9481
|
-
_sfc_main$
|
|
9482
|
-
_sfc_main$
|
|
9483
|
-
_sfc_main$
|
|
9484
|
-
_sfc_main as
|
|
9485
|
-
_sfc_main$
|
|
9539
|
+
_sfc_main as CheckboxColumn,
|
|
9540
|
+
_sfc_main$7 as DateTimePickerColumn,
|
|
9541
|
+
_sfc_main$8 as Ediatable,
|
|
9542
|
+
_sfc_main$5 as FixedColumn,
|
|
9543
|
+
_sfc_main$9 as HeadColumn,
|
|
9544
|
+
_sfc_main$6 as InputColumn,
|
|
9545
|
+
_sfc_main$4 as OperationColumn,
|
|
9546
|
+
_sfc_main$3 as SelectColumn,
|
|
9547
|
+
_sfc_main$2 as TagInputColumn,
|
|
9548
|
+
_sfc_main$1 as TextPlainColumn,
|
|
9549
|
+
_sfc_main$8 as default
|
|
9486
9550
|
};
|