@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
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type Rules } from '../hooks/useValidtor';
|
|
2
|
+
export interface Props {
|
|
3
|
+
data?: string | number;
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
rules?: Rules;
|
|
7
|
+
}
|
|
8
|
+
export interface Exposes {
|
|
9
|
+
getValue: () => Promise<string | number>;
|
|
10
|
+
}
|
|
11
|
+
declare var __VLS_12: {};
|
|
12
|
+
declare var __VLS_inheritedAttrs: {};
|
|
13
|
+
declare const __VLS_refs: {
|
|
14
|
+
textRef: import("vue").HTMLAttributes & import("vue").ReservedProps;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_templateResult: {
|
|
17
|
+
slots: {
|
|
18
|
+
default?(_: typeof __VLS_12): any;
|
|
19
|
+
};
|
|
20
|
+
refs: __VLS_PickRefsExpose<typeof __VLS_refs>;
|
|
21
|
+
attrs: Partial<typeof __VLS_inheritedAttrs>;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_Slots = typeof __VLS_templateResult['slots'];
|
|
24
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
25
|
+
getValue: () => Promise<string | number>;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_Slots>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_PickRefsExpose<T> = T extends object ? {
|
|
30
|
+
[K in keyof T]: (T[K] extends any[] ? Parameters<T[K][0]['expose']>[0][] : T[K] extends {
|
|
31
|
+
expose?: (exposed: infer E) => void;
|
|
32
|
+
} ? E : T[K]) | null;
|
|
33
|
+
} : never;
|
|
34
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import './lib/bk-icon/iconcool.js';
|
|
2
|
+
import './lib/bk-icon/style.css';
|
|
3
|
+
import { type Props as HeadColumnProps } from './components/head-column.vue';
|
|
4
|
+
import 'tippy.js/dist/tippy.css';
|
|
5
|
+
import 'tippy.js/themes/light.css';
|
|
6
|
+
export interface Props {
|
|
7
|
+
theadList?: IHead[];
|
|
8
|
+
}
|
|
9
|
+
import type { InjectionKey, Ref } from 'vue';
|
|
10
|
+
export type IHead = HeadColumnProps & {
|
|
11
|
+
title?: string;
|
|
12
|
+
memo?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const renderTablekey: InjectionKey<{
|
|
15
|
+
isOverflow: Ref<boolean>;
|
|
16
|
+
rowWidth: Ref<number>;
|
|
17
|
+
isScrollToLeft: Ref<boolean>;
|
|
18
|
+
isScrollToRight: Ref<boolean>;
|
|
19
|
+
}>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
21
|
+
theadList: IHead[];
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
|
|
23
|
+
default: any;
|
|
24
|
+
data: any;
|
|
25
|
+
}> & {
|
|
26
|
+
default: any;
|
|
27
|
+
data: any;
|
|
28
|
+
}>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -4,7 +4,7 @@ export type Rules = Array<{
|
|
|
4
4
|
}>;
|
|
5
5
|
export default function (rules: Rules | undefined): {
|
|
6
6
|
validator: (targetValue: any) => Promise<boolean>;
|
|
7
|
-
loading: import("vue").Ref<boolean>;
|
|
8
|
-
error: import("vue").Ref<boolean>;
|
|
9
|
-
message: import("vue").Ref<string>;
|
|
7
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
8
|
+
error: import("vue").Ref<boolean, boolean>;
|
|
9
|
+
message: import("vue").Ref<string, string>;
|
|
10
10
|
};
|
package/typings/vue2.d.ts
CHANGED
|
@@ -6,9 +6,10 @@ import OperationColumn from './components/operation-column.vue';
|
|
|
6
6
|
import SelectColumn from './components/select-column.vue';
|
|
7
7
|
import TagInputColumn from './components/tag-input-column.vue';
|
|
8
8
|
import TextPlainColumn from './components/text-plain-column.vue';
|
|
9
|
+
import CheckboxColumn from './components/checkbox-column.vue';
|
|
9
10
|
export { type IHead } from './ediatable.vue';
|
|
10
11
|
export * from './hooks/useValidtor';
|
|
11
|
-
export { DateTimePickerColumn, InputColumn, FixedColumn, HeadColumn, OperationColumn, SelectColumn, TagInputColumn, TextPlainColumn, };
|
|
12
|
+
export { DateTimePickerColumn, InputColumn, FixedColumn, HeadColumn, OperationColumn, SelectColumn, TagInputColumn, TextPlainColumn, CheckboxColumn, };
|
|
12
13
|
declare const _default: {
|
|
13
14
|
name: string;
|
|
14
15
|
props: {
|
package/typings/vue3.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ import OperationColumn from './components/operation-column.vue';
|
|
|
7
7
|
import SelectColumn from './components/select-column.vue';
|
|
8
8
|
import TagInputColumn from './components/tag-input-column.vue';
|
|
9
9
|
import TextPlainColumn from './components/text-plain-column.vue';
|
|
10
|
+
import CheckboxColumn from './components/checkbox-column.vue';
|
|
10
11
|
export { type IHead } from './ediatable.vue';
|
|
11
12
|
export * from './hooks/useValidtor';
|
|
12
|
-
export { Ediatable, DateTimePickerColumn, InputColumn, FixedColumn, HeadColumn, OperationColumn, SelectColumn, TagInputColumn, TextPlainColumn, };
|
|
13
|
+
export { Ediatable, DateTimePickerColumn, InputColumn, FixedColumn, HeadColumn, OperationColumn, SelectColumn, TagInputColumn, TextPlainColumn, CheckboxColumn, };
|
|
13
14
|
export default Ediatable;
|
package/vue2/index.es.min.js
CHANGED
|
@@ -41711,7 +41711,7 @@ const random2 = () => `${_$1.random(0, 999999)}_${Date.now()}_${_$1.random(0, 99
|
|
|
41711
41711
|
const _hoisted_1$6 = ["data-fixed", "data-maxWidth", "data-minWidth", "data-width"];
|
|
41712
41712
|
const _hoisted_2$2 = { class: "th-cell" };
|
|
41713
41713
|
const _hoisted_3$1 = { style: { "display": "inline-block", "line-height": "40px", "vertical-align": "top" } };
|
|
41714
|
-
const _sfc_main$
|
|
41714
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
41715
41715
|
__name: "head-column",
|
|
41716
41716
|
props: {
|
|
41717
41717
|
fixed: { default: void 0 },
|
|
@@ -41847,7 +41847,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
41847
41847
|
]),
|
|
41848
41848
|
createElementVNode("div", _hoisted_3$1, [
|
|
41849
41849
|
slots.append && !_ctx.renderAppend ? renderSlot(_ctx.$slots, "append", { key: 0 }) : createCommentVNode("v-if", true),
|
|
41850
|
-
_ctx.renderAppend ? (openBlock(), createBlock(unref(RenderAppendElement), { key: 1 })) : createCommentVNode("v-if", true)
|
|
41850
|
+
_ctx.renderAppend !== void 0 ? (openBlock(), createBlock(unref(RenderAppendElement), { key: 1 })) : createCommentVNode("v-if", true)
|
|
41851
41851
|
])
|
|
41852
41852
|
],
|
|
41853
41853
|
2
|
|
@@ -41858,7 +41858,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
41858
41858
|
}
|
|
41859
41859
|
});
|
|
41860
41860
|
const renderTablekey = Symbol("renderTable");
|
|
41861
|
-
const _sfc_main$
|
|
41861
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
41862
41862
|
__name: "ediatable",
|
|
41863
41863
|
props: {
|
|
41864
41864
|
theadList: { default: () => [] }
|
|
@@ -41921,7 +41921,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
41921
41921
|
Fragment,
|
|
41922
41922
|
{ key: 1 },
|
|
41923
41923
|
renderList(_ctx.theadList, (head, index2) => {
|
|
41924
|
-
return openBlock(), createBlock(_sfc_main$
|
|
41924
|
+
return openBlock(), createBlock(_sfc_main$9, {
|
|
41925
41925
|
key: index2,
|
|
41926
41926
|
width: head.width,
|
|
41927
41927
|
"min-width": head.minWidth,
|
|
@@ -42067,7 +42067,7 @@ const _hoisted_1$5 = {
|
|
|
42067
42067
|
key: 0,
|
|
42068
42068
|
class: "input-error"
|
|
42069
42069
|
};
|
|
42070
|
-
const _sfc_main$
|
|
42070
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
42071
42071
|
__name: "date-time-picker-column",
|
|
42072
42072
|
props: /* @__PURE__ */ mergeModels({
|
|
42073
42073
|
placeholder: { default: "" },
|
|
@@ -42161,7 +42161,7 @@ const _hoisted_1$4 = {
|
|
|
42161
42161
|
key: 2,
|
|
42162
42162
|
class: "blur-dispaly-main"
|
|
42163
42163
|
};
|
|
42164
|
-
const _sfc_main$
|
|
42164
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
42165
42165
|
__name: "input-column",
|
|
42166
42166
|
props: /* @__PURE__ */ mergeModels({
|
|
42167
42167
|
placeholder: { default: "请输入" },
|
|
@@ -42327,7 +42327,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
42327
42327
|
};
|
|
42328
42328
|
}
|
|
42329
42329
|
});
|
|
42330
|
-
const _sfc_main$
|
|
42330
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
42331
42331
|
__name: "fixed-column",
|
|
42332
42332
|
props: {
|
|
42333
42333
|
fixed: { default: "right" }
|
|
@@ -42356,7 +42356,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
42356
42356
|
}
|
|
42357
42357
|
});
|
|
42358
42358
|
const _hoisted_1$3 = { class: "bk-ediatable-operation" };
|
|
42359
|
-
const _sfc_main$
|
|
42359
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
42360
42360
|
__name: "operation-column",
|
|
42361
42361
|
props: {
|
|
42362
42362
|
removeable: { type: Boolean, default: true },
|
|
@@ -42381,7 +42381,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
42381
42381
|
emits("remove");
|
|
42382
42382
|
};
|
|
42383
42383
|
return (_ctx, _cache) => {
|
|
42384
|
-
return openBlock(), createBlock(_sfc_main$
|
|
42384
|
+
return openBlock(), createBlock(_sfc_main$5, null, {
|
|
42385
42385
|
default: withCtx(() => [
|
|
42386
42386
|
createElementVNode("div", _hoisted_1$3, [
|
|
42387
42387
|
_ctx.showCopy ? (openBlock(), createElementBlock("div", {
|
|
@@ -42425,7 +42425,7 @@ const _hoisted_1$2 = {
|
|
|
42425
42425
|
key: 0,
|
|
42426
42426
|
class: "select-error"
|
|
42427
42427
|
};
|
|
42428
|
-
const _sfc_main$
|
|
42428
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
42429
42429
|
__name: "select-column",
|
|
42430
42430
|
props: /* @__PURE__ */ mergeModels({
|
|
42431
42431
|
list: { default: () => [] },
|
|
@@ -42587,7 +42587,7 @@ const _hoisted_1$1 = {
|
|
|
42587
42587
|
class: "input-error"
|
|
42588
42588
|
};
|
|
42589
42589
|
const _hoisted_2$1 = { style: { "display": "none" } };
|
|
42590
|
-
const _sfc_main$
|
|
42590
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
42591
42591
|
__name: "tag-input-column",
|
|
42592
42592
|
props: /* @__PURE__ */ mergeModels({
|
|
42593
42593
|
placeholder: { default: "" },
|
|
@@ -42755,7 +42755,7 @@ const _hoisted_3 = {
|
|
|
42755
42755
|
key: 2,
|
|
42756
42756
|
class: "input-error"
|
|
42757
42757
|
};
|
|
42758
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42758
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
42759
42759
|
__name: "text-plain-column",
|
|
42760
42760
|
props: {
|
|
42761
42761
|
data: {},
|
|
@@ -42830,6 +42830,69 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42830
42830
|
};
|
|
42831
42831
|
}
|
|
42832
42832
|
});
|
|
42833
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42834
|
+
__name: "checkbox-column",
|
|
42835
|
+
props: /* @__PURE__ */ mergeModels({
|
|
42836
|
+
rules: { default: void 0 },
|
|
42837
|
+
disabled: { type: Boolean, default: false }
|
|
42838
|
+
}, {
|
|
42839
|
+
"modelValue": { type: Boolean, ...{
|
|
42840
|
+
default: false
|
|
42841
|
+
} },
|
|
42842
|
+
"modelModifiers": {}
|
|
42843
|
+
}),
|
|
42844
|
+
emits: /* @__PURE__ */ mergeModels(["submit", "error"], ["update:modelValue"]),
|
|
42845
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
42846
|
+
const props2 = __props;
|
|
42847
|
+
const emits = __emit;
|
|
42848
|
+
const modelValue = useModel(__props, "modelValue");
|
|
42849
|
+
const vBkTooltips = __webpack_exports__bkTooltips;
|
|
42850
|
+
const { message: errorMessage, validator: validator11 } = useValidtor(props2.rules);
|
|
42851
|
+
const handleChange = (value) => {
|
|
42852
|
+
modelValue.value = value;
|
|
42853
|
+
validator11(modelValue.value).then(() => {
|
|
42854
|
+
emits("error", false);
|
|
42855
|
+
emits("submit", value);
|
|
42856
|
+
}).catch(() => emits("error", true));
|
|
42857
|
+
};
|
|
42858
|
+
__expose({
|
|
42859
|
+
getValue() {
|
|
42860
|
+
return validator11(modelValue.value).then(() => modelValue.value);
|
|
42861
|
+
}
|
|
42862
|
+
});
|
|
42863
|
+
return (_ctx, _cache) => {
|
|
42864
|
+
return openBlock(), createElementBlock(
|
|
42865
|
+
"div",
|
|
42866
|
+
{
|
|
42867
|
+
class: normalizeClass(["bk-ediatable-checkbox", {
|
|
42868
|
+
"is-error": Boolean(unref(errorMessage))
|
|
42869
|
+
}])
|
|
42870
|
+
},
|
|
42871
|
+
[
|
|
42872
|
+
createVNode(unref(__webpack_exports__default$5), mergeProps({
|
|
42873
|
+
"model-value": modelValue.value,
|
|
42874
|
+
disabled: _ctx.disabled
|
|
42875
|
+
}, _ctx.$attrs, { onChange: handleChange }), null, 16, ["model-value", "disabled"]),
|
|
42876
|
+
unref(errorMessage) ? withDirectives((openBlock(), createBlock(
|
|
42877
|
+
unref(DbIcon),
|
|
42878
|
+
{
|
|
42879
|
+
key: 0,
|
|
42880
|
+
class: "error-icon",
|
|
42881
|
+
type: "exclamation-fill"
|
|
42882
|
+
},
|
|
42883
|
+
null,
|
|
42884
|
+
512
|
|
42885
|
+
/* NEED_PATCH */
|
|
42886
|
+
)), [
|
|
42887
|
+
[unref(vBkTooltips), unref(errorMessage)]
|
|
42888
|
+
]) : createCommentVNode("v-if", true)
|
|
42889
|
+
],
|
|
42890
|
+
2
|
|
42891
|
+
/* CLASS */
|
|
42892
|
+
);
|
|
42893
|
+
};
|
|
42894
|
+
}
|
|
42895
|
+
});
|
|
42833
42896
|
const vue2 = {
|
|
42834
42897
|
name: "Ediatable",
|
|
42835
42898
|
props: {
|
|
@@ -42839,7 +42902,7 @@ const vue2 = {
|
|
|
42839
42902
|
}
|
|
42840
42903
|
},
|
|
42841
42904
|
created() {
|
|
42842
|
-
this.app = createApp(_sfc_main$
|
|
42905
|
+
this.app = createApp(_sfc_main$8, {
|
|
42843
42906
|
theadList: this.theadList
|
|
42844
42907
|
});
|
|
42845
42908
|
},
|
|
@@ -42862,13 +42925,14 @@ const vue2 = {
|
|
|
42862
42925
|
}
|
|
42863
42926
|
};
|
|
42864
42927
|
export {
|
|
42865
|
-
_sfc_main
|
|
42866
|
-
_sfc_main$
|
|
42867
|
-
_sfc_main$
|
|
42868
|
-
_sfc_main$
|
|
42869
|
-
_sfc_main$
|
|
42870
|
-
_sfc_main$
|
|
42871
|
-
_sfc_main$
|
|
42872
|
-
_sfc_main as
|
|
42928
|
+
_sfc_main as CheckboxColumn,
|
|
42929
|
+
_sfc_main$7 as DateTimePickerColumn,
|
|
42930
|
+
_sfc_main$5 as FixedColumn,
|
|
42931
|
+
_sfc_main$9 as HeadColumn,
|
|
42932
|
+
_sfc_main$6 as InputColumn,
|
|
42933
|
+
_sfc_main$4 as OperationColumn,
|
|
42934
|
+
_sfc_main$3 as SelectColumn,
|
|
42935
|
+
_sfc_main$2 as TagInputColumn,
|
|
42936
|
+
_sfc_main$1 as TextPlainColumn,
|
|
42873
42937
|
vue2 as default
|
|
42874
42938
|
};
|