@oneflowui/ui 0.2.3 → 0.4.0
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/{FieldCheckbox-DPylU5RA.js → FieldCheckbox-DdNQUeAv.js} +1 -1
- package/dist/{FieldDate-BWtlvi5Y.js → FieldDate-DYVy9HXM.js} +1 -1
- package/dist/{FieldDatetime-BXghiCm8.js → FieldDatetime-CxcGkDo4.js} +1 -1
- package/dist/{FieldEmail-D-hUADX4.js → FieldEmail-6t5822TS.js} +1 -1
- package/dist/{FieldMultiSelect-Di0wE1Ns.js → FieldMultiSelect-P1pJRMmz.js} +2 -2
- package/dist/{FieldNumber-BbcbizO4.js → FieldNumber-Bt22YSiY.js} +1 -1
- package/dist/{FieldRating-KKEc2khS.js → FieldRating-CsdZksdO.js} +1 -1
- package/dist/{FieldSelect-D2qtt-0u.js → FieldSelect-CQysnh7a.js} +2 -2
- package/dist/{FieldText-DYbDp4aP.js → FieldText-AcMBY3EY.js} +1 -1
- package/dist/{FieldUrl-BoOM8A5O.js → FieldUrl-CzpC7swD.js} +1 -1
- package/dist/components/base/ButtonGroup.vue.d.ts +1 -1
- package/dist/components/base/SectionBlock.vue.d.ts +4 -2
- package/dist/components/base/StatusIndicator.vue.d.ts +3 -0
- package/dist/components/editor/RichTextEditor.vue.d.ts +6 -6
- package/dist/components/field/FieldCheckbox.vue.d.ts +2 -2
- package/dist/components/field/FieldDate.vue.d.ts +2 -2
- package/dist/components/field/FieldDatetime.vue.d.ts +2 -2
- package/dist/components/field/FieldEmail.vue.d.ts +2 -2
- package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
- package/dist/components/field/FieldNumber.vue.d.ts +2 -2
- package/dist/components/field/FieldRating.vue.d.ts +2 -2
- package/dist/components/field/FieldSelect.vue.d.ts +2 -2
- package/dist/components/field/FieldText.vue.d.ts +2 -2
- package/dist/components/field/FieldUrl.vue.d.ts +2 -2
- package/dist/components/layout/AppLayout.vue.d.ts +9 -1
- package/dist/components/overlay/Drawer.vue.d.ts +9 -1
- package/dist/components/overlay/Modal.vue.d.ts +6 -2
- package/dist/components/table/DataTable.vue.d.ts +60 -43
- package/dist/components/table/FieldCell.vue.d.ts +2 -2
- package/dist/components/table/TableColumnManager.vue.d.ts +3 -1
- package/dist/components/table/TableDataRow.vue.d.ts +3 -1
- package/dist/components/table/TableFilterPanel.vue.d.ts +3 -1
- package/dist/components/table/TableHeaderRow.vue.d.ts +1 -1
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/useBreakpoint.d.ts +5 -0
- package/dist/composables/useTableColumns.d.ts +18 -0
- package/dist/composables/useTableData.d.ts +17 -0
- package/dist/composables/useTableGroup.d.ts +20 -0
- package/dist/constants/table.d.ts +2 -0
- package/dist/{index-CTlM81Ib.js → index-Hqg3-HB7.js} +3845 -3645
- package/dist/oneflow-ui.js +105 -104
- package/dist/oneflow-ui.umd.cjs +10 -10
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +26 -0
- package/package.json +24 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as s, computed as f, openBlock as p, createElementBlock as r, withModifiers as d, createElementVNode as m, toDisplayString as _ } from "vue";
|
|
2
|
-
import { _ as u } from "./index-
|
|
2
|
+
import { _ as u } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const k = { class: "of-field-checkbox__icon" }, x = /* @__PURE__ */ s({
|
|
4
4
|
__name: "FieldCheckbox",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as u, onMounted as m, nextTick as s, withDirectives as d, openBlock as v, createElementBlock as y, vModelText as _ } from "vue";
|
|
2
|
-
import { _ as k } from "./index-
|
|
2
|
+
import { _ as k } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const x = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldDate",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as i, onMounted as p, nextTick as s, withDirectives as d, openBlock as v, createElementBlock as y, vModelText as _ } from "vue";
|
|
2
|
-
import { _ as k } from "./index-
|
|
2
|
+
import { _ as k } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const x = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldDatetime",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as a, onMounted as p, nextTick as s, withDirectives as d, openBlock as v, createElementBlock as y, vModelText as _ } from "vue";
|
|
2
|
-
import { _ as k } from "./index-
|
|
2
|
+
import { _ as k } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const x = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldEmail",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as $, ref as a, computed as M, onMounted as z, nextTick as F, onBeforeUnmount as O, watch as T, openBlock as l, createElementBlock as i, Fragment as A, renderList as L, normalizeStyle as w, toDisplayString as k, createBlock as I, Teleport as P, withModifiers as m, normalizeClass as U, createElementVNode as p, createCommentVNode as V } from "vue";
|
|
2
|
-
import { _ as K } from "./index-
|
|
2
|
+
import { _ as K } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const W = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "of-field-multiselect__chips"
|
|
@@ -139,7 +139,7 @@ const W = {
|
|
|
139
139
|
]))
|
|
140
140
|
], 544));
|
|
141
141
|
}
|
|
142
|
-
}), Z = /* @__PURE__ */ K(Q, [["__scopeId", "data-v-
|
|
142
|
+
}), Z = /* @__PURE__ */ K(Q, [["__scopeId", "data-v-21240742"]]);
|
|
143
143
|
export {
|
|
144
144
|
Z as default
|
|
145
145
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, ref as m, onMounted as v, nextTick as d, withDirectives as N, openBlock as b, createElementBlock as y, vModelText as k } from "vue";
|
|
2
|
-
import { _ } from "./index-
|
|
2
|
+
import { _ } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const x = /* @__PURE__ */ p({
|
|
4
4
|
__name: "FieldNumber",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as v, ref as _, openBlock as o, createElementBlock as r, withKeys as x, Fragment as g, renderList as k, unref as c, withModifiers as y, normalizeClass as b } from "vue";
|
|
2
|
-
import { _ as C } from "./index-
|
|
2
|
+
import { _ as C } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const M = ["onMouseenter", "onClick"], $ = /* @__PURE__ */ v({
|
|
4
4
|
__name: "FieldRating",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as N, ref as f, computed as x, onMounted as R, nextTick as V, onBeforeUnmount as z, watch as A, openBlock as l, createElementBlock as a, normalizeStyle as b, toDisplayString as w, createBlock as I, Teleport as F, createElementVNode as T, withModifiers as C, normalizeClass as L, Fragment as O, renderList as P, createCommentVNode as U } from "vue";
|
|
2
|
-
import { _ as K } from "./index-
|
|
2
|
+
import { _ as K } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const W = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "of-field-select__display"
|
|
@@ -116,7 +116,7 @@ const W = {
|
|
|
116
116
|
], 544);
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
}), Q = /* @__PURE__ */ K(G, [["__scopeId", "data-v-
|
|
119
|
+
}), Q = /* @__PURE__ */ K(G, [["__scopeId", "data-v-736a9686"]]);
|
|
120
120
|
export {
|
|
121
121
|
Q as default
|
|
122
122
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as a, onMounted as m, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as x, vModelText as y } from "vue";
|
|
2
|
-
import { _ } from "./index-
|
|
2
|
+
import { _ } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const k = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldText",
|
|
5
5
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as a, onMounted as m, nextTick as s, withDirectives as v, openBlock as d, createElementBlock as y, vModelText as _ } from "vue";
|
|
2
|
-
import { _ as k } from "./index-
|
|
2
|
+
import { _ as k } from "./index-Hqg3-HB7.js";
|
|
3
3
|
const x = /* @__PURE__ */ f({
|
|
4
4
|
__name: "FieldUrl",
|
|
5
5
|
props: {
|
|
@@ -26,5 +26,5 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
26
26
|
"update:modelValue": (value: string | number) => any;
|
|
27
27
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
28
|
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
29
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
29
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
1
2
|
export interface SectionBlockProps {
|
|
2
3
|
title: string;
|
|
3
|
-
icon
|
|
4
|
+
/** 图标:lucide icon name(kebab-case,如 "file-text")或 Vue 组件对象。传入无法解析的字符串时不渲染。 */
|
|
5
|
+
icon?: string | Component;
|
|
4
6
|
status?: "pending" | "updating" | "done" | "editing";
|
|
5
7
|
collapsed?: boolean;
|
|
6
8
|
editable?: boolean;
|
|
@@ -31,7 +33,7 @@ declare const __VLS_component: import('vue').DefineComponent<SectionBlockProps,
|
|
|
31
33
|
onSave?: (() => any) | undefined;
|
|
32
34
|
}>, {
|
|
33
35
|
status: "pending" | "updating" | "done" | "editing";
|
|
34
|
-
icon: string;
|
|
36
|
+
icon: string | Component;
|
|
35
37
|
collapsed: boolean;
|
|
36
38
|
editable: boolean;
|
|
37
39
|
statusLabels: Record<string, string>;
|
|
@@ -2,6 +2,8 @@ export interface StatusIndicatorProps {
|
|
|
2
2
|
status: string;
|
|
3
3
|
label?: string;
|
|
4
4
|
size?: "sm" | "md";
|
|
5
|
+
/** 可选的圆点颜色覆盖 */
|
|
6
|
+
color?: string;
|
|
5
7
|
}
|
|
6
8
|
declare function __VLS_template(): {
|
|
7
9
|
attrs: Partial<{}>;
|
|
@@ -18,6 +20,7 @@ declare function __VLS_template(): {
|
|
|
18
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
21
|
declare const __VLS_component: import('vue').DefineComponent<StatusIndicatorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StatusIndicatorProps> & Readonly<{}>, {
|
|
20
22
|
size: "sm" | "md";
|
|
23
|
+
color: string;
|
|
21
24
|
label: string;
|
|
22
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
23
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -20,7 +20,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
21
|
editorRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
22
22
|
content: {
|
|
23
|
-
type: import('vue').PropType<string | import(
|
|
23
|
+
type: import('vue').PropType<string | import('@vueup/vue-quill').Delta | null | undefined>;
|
|
24
24
|
};
|
|
25
25
|
contentType: {
|
|
26
26
|
type: import('vue').PropType<"delta" | "html" | "text">;
|
|
@@ -82,8 +82,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
82
82
|
getEditor: () => Element;
|
|
83
83
|
getToolbar: () => Element;
|
|
84
84
|
getQuill: () => import('quill').default;
|
|
85
|
-
getContents: (index?: number, length?: number) => string | import(
|
|
86
|
-
setContents: (content: string | import(
|
|
85
|
+
getContents: (index?: number, length?: number) => string | import('@vueup/vue-quill').Delta | undefined;
|
|
86
|
+
setContents: (content: string | import('@vueup/vue-quill').Delta | null | undefined, source?: Sources) => void;
|
|
87
87
|
getHTML: () => string;
|
|
88
88
|
setHTML: (html: string) => void;
|
|
89
89
|
pasteHTML: (html: string, source?: Sources) => void;
|
|
@@ -105,7 +105,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
105
105
|
Defaults: {};
|
|
106
106
|
}, Readonly<import('vue').ExtractPropTypes<{
|
|
107
107
|
content: {
|
|
108
|
-
type: import('vue').PropType<string | import(
|
|
108
|
+
type: import('vue').PropType<string | import('@vueup/vue-quill').Delta | null | undefined>;
|
|
109
109
|
};
|
|
110
110
|
contentType: {
|
|
111
111
|
type: import('vue').PropType<"delta" | "html" | "text">;
|
|
@@ -167,8 +167,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
167
167
|
getEditor: () => Element;
|
|
168
168
|
getToolbar: () => Element;
|
|
169
169
|
getQuill: () => import('quill').default;
|
|
170
|
-
getContents: (index?: number, length?: number) => string | import(
|
|
171
|
-
setContents: (content: string | import(
|
|
170
|
+
getContents: (index?: number, length?: number) => string | import('@vueup/vue-quill').Delta | undefined;
|
|
171
|
+
setContents: (content: string | import('@vueup/vue-quill').Delta | null | undefined, source?: Sources) => void;
|
|
172
172
|
getHTML: () => string;
|
|
173
173
|
setHTML: (html: string) => void;
|
|
174
174
|
pasteHTML: (html: string, source?: Sources) => void;
|
|
@@ -3,12 +3,12 @@ type __VLS_Props = {
|
|
|
3
3
|
field: import('../table/FieldCell.vue').FieldDef;
|
|
4
4
|
};
|
|
5
5
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
-
commit: (value: boolean) => any;
|
|
7
6
|
cancel: () => any;
|
|
7
|
+
commit: (value: boolean) => any;
|
|
8
8
|
tabNext: () => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onCommit?: ((value: boolean) => any) | undefined;
|
|
11
10
|
onCancel?: (() => any) | undefined;
|
|
11
|
+
onCommit?: ((value: boolean) => any) | undefined;
|
|
12
12
|
onTabNext?: (() => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
14
|
export default _default;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
triggerRef: HTMLDivElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
15
|
export default _default;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
triggerRef: HTMLDivElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -4,12 +4,12 @@ type __VLS_Props = {
|
|
|
4
4
|
field: FieldDef;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
-
commit: (value: CellValue) => any;
|
|
8
7
|
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
9
|
tabNext: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onCommit?: ((value: CellValue) => any) | undefined;
|
|
12
11
|
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
13
|
onTabNext?: (() => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
15
|
inputRef: HTMLInputElement;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { Density } from '../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 布局密度:comfortable(默认)| compact(紧凑) */
|
|
4
|
+
density?: Density;
|
|
5
|
+
};
|
|
1
6
|
declare function __VLS_template(): {
|
|
2
7
|
attrs: Partial<{}>;
|
|
3
8
|
slots: {
|
|
4
9
|
navbar?(_: {}): any;
|
|
5
10
|
sidebar?(_: {}): any;
|
|
11
|
+
sidebar?(_: {}): any;
|
|
6
12
|
default?(_: {}): any;
|
|
7
13
|
statusbar?(_: {}): any;
|
|
8
14
|
};
|
|
@@ -10,7 +16,9 @@ declare function __VLS_template(): {
|
|
|
10
16
|
rootEl: HTMLDivElement;
|
|
11
17
|
};
|
|
12
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
+
density: Density;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
23
|
export default _default;
|
|
16
24
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -6,7 +6,15 @@ type __VLS_Props = {
|
|
|
6
6
|
maskClosable?: boolean;
|
|
7
7
|
zIndex?: number;
|
|
8
8
|
};
|
|
9
|
-
declare function __VLS_template():
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: {
|
|
12
|
+
title?(_: {}): any;
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
10
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
19
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
20
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -35,7 +35,9 @@ declare function __VLS_template(): {
|
|
|
35
35
|
default?(_: {}): any;
|
|
36
36
|
footer?(_: {}): any;
|
|
37
37
|
};
|
|
38
|
-
refs: {
|
|
38
|
+
refs: {
|
|
39
|
+
modalRef: HTMLDivElement;
|
|
40
|
+
};
|
|
39
41
|
rootEl: any;
|
|
40
42
|
};
|
|
41
43
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -49,7 +51,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
49
51
|
maskClosable: boolean;
|
|
50
52
|
centered: boolean;
|
|
51
53
|
zIndex: number;
|
|
52
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
54
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
55
|
+
modalRef: HTMLDivElement;
|
|
56
|
+
}, any>;
|
|
53
57
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
54
58
|
export default _default;
|
|
55
59
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,49 +1,66 @@
|
|
|
1
1
|
import { FieldDef as CellFieldDef } from './FieldCell.vue';
|
|
2
2
|
import { Task, TableColumn, ColorMap, DataRecord, TableSchema, ViewConfig } from '../../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
3
|
+
declare const _default: <T extends {
|
|
4
|
+
id: string;
|
|
5
|
+
} & Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
7
|
+
readonly "onRow-click"?: ((row: any) => any) | undefined;
|
|
8
|
+
readonly "onRow-click-record"?: ((record: DataRecord) => any) | undefined;
|
|
9
|
+
readonly "onAdd-row"?: (() => any) | undefined;
|
|
10
|
+
readonly "onSelection-change"?: ((ids: (string | number)[]) => any) | undefined;
|
|
11
|
+
readonly "onCell-edit"?: ((payload: {
|
|
12
|
+
rowId: string;
|
|
13
|
+
fieldId: string;
|
|
14
|
+
value: unknown;
|
|
15
|
+
}) => any) | undefined;
|
|
16
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onRow-click" | "onRow-click-record" | "onAdd-row" | "onSelection-change" | "onCell-edit"> & {
|
|
17
|
+
tasks?: Task[];
|
|
18
|
+
records?: DataRecord[];
|
|
19
|
+
schema?: TableSchema;
|
|
20
|
+
view?: ViewConfig;
|
|
21
|
+
columns?: TableColumn[];
|
|
22
|
+
fieldDefs?: CellFieldDef[];
|
|
23
|
+
rowKey?: string;
|
|
24
|
+
selectable?: boolean;
|
|
25
|
+
addable?: boolean;
|
|
26
|
+
/** 优先级颜色映射 */
|
|
27
|
+
priorityColorMap?: ColorMap;
|
|
28
|
+
/** 状态颜色映射 */
|
|
29
|
+
statusColorMap?: ColorMap;
|
|
30
|
+
/** 分组字段名,如 "status" */
|
|
31
|
+
groupBy?: string;
|
|
32
|
+
/** 分组标题的 Badge 颜色映射 */
|
|
33
|
+
groupColorMap?: ColorMap;
|
|
34
|
+
/**
|
|
35
|
+
* 手动控制虚拟滚动开关。
|
|
36
|
+
* - `true`:强制启用虚拟滚动
|
|
37
|
+
* - `false`:强制关闭虚拟滚动
|
|
38
|
+
* - `undefined`(默认):自动判断,行数 >= virtualThreshold 时启用
|
|
39
|
+
*/
|
|
40
|
+
virtual?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 自动启用虚拟滚动的行数阈值(默认 100)。
|
|
43
|
+
* 仅在 `virtual` prop 未传时生效。
|
|
44
|
+
*/
|
|
45
|
+
virtualThreshold?: number;
|
|
46
|
+
/**
|
|
47
|
+
* 只读模式。为 true 时,selectable 和 addable 自动降为 false,
|
|
48
|
+
* 即使调用方显式传了 true 也会被覆盖。
|
|
49
|
+
*/
|
|
50
|
+
readonly?: boolean;
|
|
51
|
+
} & Partial<{}>> & import('vue').PublicProps;
|
|
52
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
53
|
+
attrs: any;
|
|
54
|
+
slots: {};
|
|
55
|
+
emit: ((evt: "row-click", row: any) => void) & ((evt: "row-click-record", record: DataRecord) => void) & ((evt: "add-row") => void) & ((evt: "selection-change", ids: (string | number)[]) => void) & ((evt: "cell-edit", payload: {
|
|
28
56
|
rowId: string;
|
|
29
57
|
fieldId: string;
|
|
30
58
|
value: unknown;
|
|
31
|
-
}) =>
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"onAdd-row"?: (() => any) | undefined;
|
|
36
|
-
"onSelection-change"?: ((ids: string[]) => any) | undefined;
|
|
37
|
-
"onCell-edit"?: ((payload: {
|
|
38
|
-
rowId: string;
|
|
39
|
-
fieldId: string;
|
|
40
|
-
value: unknown;
|
|
41
|
-
}) => any) | undefined;
|
|
42
|
-
}>, {
|
|
43
|
-
selectable: boolean;
|
|
44
|
-
rowKey: string;
|
|
45
|
-
addable: boolean;
|
|
46
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
47
|
-
scrollContainerRef: HTMLDivElement;
|
|
48
|
-
}, HTMLDivElement>;
|
|
59
|
+
}) => void);
|
|
60
|
+
}>) => import('vue').VNode & {
|
|
61
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
62
|
+
};
|
|
49
63
|
export default _default;
|
|
64
|
+
type __VLS_PrettifyLocal<T> = {
|
|
65
|
+
[K in keyof T]: T[K];
|
|
66
|
+
} & {};
|
|
@@ -20,12 +20,12 @@ type __VLS_Props = {
|
|
|
20
20
|
readonly?: boolean;
|
|
21
21
|
};
|
|
22
22
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
|
-
commit: (rowId: string, fieldId: string, value: CellValue) => any;
|
|
24
23
|
cancel: () => any;
|
|
24
|
+
commit: (rowId: string, fieldId: string, value: CellValue) => any;
|
|
25
25
|
tabNext: () => any;
|
|
26
26
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
-
onCommit?: ((rowId: string, fieldId: string, value: CellValue) => any) | undefined;
|
|
28
27
|
onCancel?: (() => any) | undefined;
|
|
28
|
+
onCommit?: ((rowId: string, fieldId: string, value: CellValue) => any) | undefined;
|
|
29
29
|
onTabNext?: (() => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
readonly: boolean;
|
|
@@ -9,5 +9,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
10
|
onClose?: (() => any) | undefined;
|
|
11
11
|
"onUpdate:columns"?: ((columns: TableColumn[]) => any) | undefined;
|
|
12
|
-
}>, {
|
|
12
|
+
}>, {
|
|
13
|
+
visible: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
15
|
export default _default;
|
|
@@ -6,7 +6,8 @@ type __VLS_Props = {
|
|
|
6
6
|
row: TableRow;
|
|
7
7
|
rowKey?: string;
|
|
8
8
|
selected?: boolean;
|
|
9
|
-
|
|
9
|
+
selectable?: boolean;
|
|
10
|
+
columns: TableColumn[];
|
|
10
11
|
/**
|
|
11
12
|
* 优先级颜色映射,与内置默认映射合并(传入优先)
|
|
12
13
|
*/
|
|
@@ -35,6 +36,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
35
36
|
onSelect?: ((id: string) => any) | undefined;
|
|
36
37
|
onClick?: ((row: TableRow) => any) | undefined;
|
|
37
38
|
}>, {
|
|
39
|
+
selectable: boolean;
|
|
38
40
|
rowKey: string;
|
|
39
41
|
selected: boolean;
|
|
40
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -20,5 +20,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
20
20
|
"onRemove-condition"?: ((id: string) => any) | undefined;
|
|
21
21
|
"onUpdate-condition"?: ((id: string, update: Partial<FilterCondition>) => any) | undefined;
|
|
22
22
|
"onUpdate:logic"?: ((logic: FilterLogic) => any) | undefined;
|
|
23
|
-
}>, {
|
|
23
|
+
}>, {
|
|
24
|
+
visible: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
26
|
export default _default;
|
|
@@ -18,3 +18,8 @@ export { useVirtualList } from './useVirtualList';
|
|
|
18
18
|
export type { UseVirtualListOptions, VirtualItem } from './useVirtualList';
|
|
19
19
|
export { useToast } from './useToast';
|
|
20
20
|
export type { UseToastOptions, ToastType, ToastItem } from './useToast';
|
|
21
|
+
export { useTableData } from './useTableData';
|
|
22
|
+
export type { UseTableDataOptions } from './useTableData';
|
|
23
|
+
export { useTableColumns } from './useTableColumns';
|
|
24
|
+
export type { UseTableColumnsOptions } from './useTableColumns';
|
|
25
|
+
export { useBreakpoint } from './useBreakpoint';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { TableColumn, TableSchema, ViewConfig } from '../types';
|
|
3
|
+
export interface UseTableColumnsOptions {
|
|
4
|
+
columns?: Ref<TableColumn[] | undefined>;
|
|
5
|
+
schema?: Ref<TableSchema | undefined>;
|
|
6
|
+
view?: Ref<ViewConfig | undefined>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 将 TableSchema 或 TableColumn[] 解析为渲染用的列配置。
|
|
10
|
+
*
|
|
11
|
+
* 优先级:
|
|
12
|
+
* 1. props.columns 直接使用(已经是最终列定义)
|
|
13
|
+
* 2. props.schema + props.view 过滤可见字段并转换
|
|
14
|
+
* 3. 降级到 DEFAULT_TABLE_COLUMNS
|
|
15
|
+
*/
|
|
16
|
+
export declare function useTableColumns(options: UseTableColumnsOptions): {
|
|
17
|
+
columns: import('vue').ComputedRef<TableColumn[]>;
|
|
18
|
+
};
|