@vunk/form 2.19.20 → 2.19.22
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/components/ai-provider/index.cjs +1 -0
- package/components/ai-provider/index.d.ts +7 -0
- package/components/ai-provider/index.mjs +61 -0
- package/components/ai-provider/src/ctx.d.ts +8 -0
- package/components/ai-provider/src/index.vue.d.ts +23 -0
- package/components/ai-provider/src/types.d.ts +56 -0
- package/components/ai-provider/src/use.d.ts +3 -0
- package/components/api-tables-select/index.cjs +1 -1
- package/components/api-tables-select/index.mjs +1 -1
- package/components/api-tables-select/src/ctx.d.ts +57 -57
- package/components/api-tables-select/src/index.vue.d.ts +46 -419
- package/components/button/index.cjs +1 -1
- package/components/button/index.mjs +12 -12
- package/components/button/src/ctx.d.ts +7 -2
- package/components/button/src/index.vue.d.ts +36 -14
- package/components/card-input-collection/index.cjs +1 -1
- package/components/card-input-collection/index.mjs +136 -141
- package/components/card-input-collection/src/core.vue.d.ts +18 -7
- package/components/card-input-collection/src/ctx.d.ts +7 -2
- package/components/card-input-collection/src/index.vue.d.ts +18 -7
- package/components/cascader/index.cjs +1 -1
- package/components/cascader/index.mjs +38 -39
- package/components/cascader/src/ctx.d.ts +8 -3
- package/components/cascader/src/index.vue.d.ts +19 -8
- package/components/checkbox/src/ctx.d.ts +8 -3
- package/components/checkbox/src/index.vue.d.ts +43 -21
- package/components/{cloneDeep-DE0l40hv.mjs → cloneDeep-2YeQ7w2t.mjs} +10 -10
- package/components/cloneDeep-Btpy0oPF.js +1 -0
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.mjs +19 -22
- package/components/collapse-item/index.cjs +1 -1
- package/components/collapse-item/index.mjs +21 -21
- package/components/collapse-item/src/index.vue.d.ts +2 -2
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.mjs +26 -27
- package/components/color-picker/src/ctx.d.ts +7 -2
- package/components/color-picker/src/index.vue.d.ts +17 -6
- package/components/{style.css → components.css} +1 -1
- package/components/date-picker/index.cjs +1 -1
- package/components/date-picker/index.mjs +40 -41
- package/components/date-picker/src/ctx.d.ts +8 -3
- package/components/date-picker/src/index.vue.d.ts +17 -6
- package/components/date-picker-range/index.cjs +1 -1
- package/components/date-picker-range/index.mjs +17 -17
- package/components/date-picker-range/src/ctx.d.ts +14 -9
- package/components/date-picker-range/src/index.vue.d.ts +48 -26
- package/components/dialog/index.cjs +1 -1
- package/components/dialog/index.mjs +41 -52
- package/components/dialog/src/ctx.d.ts +1 -1
- package/components/dialog/src/index.vue.d.ts +1 -1
- package/components/dialog-input-collection/index.cjs +1 -1
- package/components/dialog-input-collection/index.mjs +124 -122
- package/components/dialog-input-collection/src/ctx.d.ts +7 -2
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +1 -1
- package/components/dialog-input-collection/src/index.vue.d.ts +17 -6
- package/components/download-plus/index.cjs +1 -1
- package/components/download-plus/index.mjs +193 -202
- package/components/download-plus/src/ctx.d.ts +7 -2
- package/components/download-plus/src/index.vue.d.ts +32 -10
- package/components/editable-text/index.cjs +1 -1
- package/components/editable-text/index.mjs +72 -75
- package/components/editable-text/src/ctx.d.ts +7 -2
- package/components/editable-text/src/index.vue.d.ts +18 -7
- package/components/el-slider/index.cjs +1 -1
- package/components/el-slider/index.mjs +230 -233
- package/components/el-slider/src/composables/index.cjs +1 -1
- package/components/el-slider/src/composables/index.mjs +1 -1
- package/components/el-slider/src/slider-core.vue.d.ts +3 -3
- package/components/esri-input-geojson/index.cjs +1 -5
- package/components/esri-input-geojson/index.mjs +59 -68
- package/components/esri-input-geojson/src/append.vue.d.ts +2 -2
- package/components/esri-input-geojson/src/ctx.d.ts +9 -4
- package/components/esri-input-geojson/src/index.vue.d.ts +65 -30
- package/components/fieldset/src/index.vue.d.ts +1 -1
- package/components/form/index.cjs +1 -1
- package/components/form/index.mjs +96 -101
- package/components/form/src/ctx.d.ts +2 -2
- package/components/form/src/index.vue.d.ts +4 -4
- package/components/form/src/use.d.ts +2 -2
- package/components/form-item/index.cjs +1 -1
- package/components/form-item/index.mjs +179 -107
- package/components/form-item/src/core.vue.d.ts +7 -3
- package/components/form-item/src/ctx.d.ts +7 -1
- package/components/form-item/src/index.vue.d.ts +13 -2
- package/components/form-item/src/use.d.ts +11 -0
- package/components/form-item-renderer/index.cjs +1 -1
- package/components/form-item-renderer/index.d.ts +1 -0
- package/components/form-item-renderer/index.mjs +85 -78
- package/components/form-item-renderer/src/use.d.ts +3 -0
- package/components/forms-provider/index.cjs +1 -1
- package/components/forms-provider/index.mjs +18 -21
- package/components/index-BIo_4rr_.mjs +18620 -0
- package/components/index-Bc7UifHG.js +1 -0
- package/components/index-D0D9ABpH.js +108 -0
- package/components/{index-CeHbpfCD.mjs → index-DCNYT7Wv.mjs} +0 -1
- package/components/information-collection/index.cjs +1 -1
- package/components/information-collection/index.mjs +32 -38
- package/components/information-collection/src/ctx.d.ts +7 -2
- package/components/information-collection/src/index.vue.d.ts +17 -6
- package/components/information-tag/index.cjs +1 -1
- package/components/information-tag/index.mjs +9 -12
- package/components/information-tag/src/index.vue.d.ts +1 -1
- package/components/input/index.cjs +1 -1
- package/components/input/index.mjs +27 -27
- package/components/input/src/ctx.d.ts +9 -4
- package/components/input/src/index.vue.d.ts +35 -13
- package/components/input-array/index.cjs +1 -1
- package/components/input-array/index.mjs +71 -74
- package/components/input-array/src/ctx.d.ts +7 -2
- package/components/input-array/src/index.vue.d.ts +18 -7
- package/components/input-collection/index.cjs +1 -1
- package/components/input-collection/index.mjs +121 -126
- package/components/input-collection/src/core.vue.d.ts +17 -6
- package/components/input-collection/src/ctx.d.ts +7 -2
- package/components/input-collection/src/index.vue.d.ts +17 -6
- package/components/input-file/src/index.vue.d.ts +19 -8
- package/components/input-link/index.cjs +1 -1
- package/components/input-link/index.mjs +1 -1
- package/components/input-link/src/ctx.d.ts +7 -2
- package/components/input-link/src/index.vue.d.ts +54 -21
- package/components/input-number/index.cjs +1 -1
- package/components/input-number/index.mjs +30 -33
- package/components/input-number/src/ctx.d.ts +8 -3
- package/components/input-number/src/index.vue.d.ts +33 -11
- package/components/input-tag/index.cjs +1 -1
- package/components/input-tag/index.mjs +24 -24
- package/components/input-tag/src/ctx.d.ts +9 -4
- package/components/input-tag/src/index.vue.d.ts +33 -11
- package/components/monaco-editor/src/ctx.d.ts +8 -3
- package/components/monaco-editor/src/index.vue.d.ts +38 -16
- package/components/radio/src/ctx.d.ts +7 -2
- package/components/radio/src/index.vue.d.ts +40 -18
- package/components/radio/src/wraper.vue.d.ts +22 -11
- package/components/renderer-data/index.cjs +1 -1
- package/components/renderer-data/index.mjs +14 -17
- package/components/select/index.cjs +1 -1
- package/components/select/index.mjs +167 -131
- package/components/select/src/core.vue.d.ts +96 -69
- package/components/select/src/ctx.d.ts +9 -4
- package/components/select/src/index.vue.d.ts +53 -42
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.mjs +30 -31
- package/components/slider/src/ctx.d.ts +7 -2
- package/components/slider/src/index.vue.d.ts +18 -7
- package/components/switch/src/ctx.d.ts +7 -2
- package/components/switch/src/index.vue.d.ts +18 -7
- package/components/tables-select/index.cjs +1 -1
- package/components/tables-select/index.mjs +4 -4
- package/components/tables-select/src/ctx.d.ts +68 -68
- package/components/tables-select/src/index.vue.d.ts +52 -420
- package/components/template-instances-provider/index.cjs +1 -1
- package/components/template-instances-provider/index.mjs +11 -17
- package/components/templates-default/src/index.vue.d.ts +404 -185
- package/components/templates-esri/src/index.vue.d.ts +65 -30
- package/components/templates-variant/src/index.vue.d.ts +48 -26
- package/components/time-picker/index.cjs +1 -1
- package/components/time-picker/index.mjs +38 -39
- package/components/time-picker/src/ctx.d.ts +8 -3
- package/components/time-picker/src/index.vue.d.ts +17 -6
- package/components/upload/index.cjs +1 -1
- package/components/upload/index.mjs +244 -253
- package/components/upload/src/ctx.d.ts +8 -3
- package/components/upload/src/file.vue.d.ts +3 -3
- package/components/upload/src/index.vue.d.ts +37 -15
- package/components/upload/src/wraper.vue.d.ts +19 -8
- package/components/upload-plus/index.cjs +7 -15
- package/components/upload-plus/index.mjs +1879 -1897
- package/components/upload-plus/src/ctx.d.ts +7 -2
- package/components/upload-plus/src/index.vue.d.ts +18 -7
- package/components/use-watch-C3iIa2DX.js +1 -0
- package/components/use-watch-Dp64x0si.mjs +411 -0
- package/components/van-cascader/src/ctx.d.ts +7 -2
- package/components/van-cascader/src/index.vue.d.ts +19 -8
- package/components/var-datetime-picker/src/ctx.d.ts +7 -2
- package/components/var-datetime-picker/src/index.vue.d.ts +30 -8
- package/components/vditor/src/ctx.d.ts +7 -2
- package/components/vditor/src/index.vue.d.ts +41 -19
- package/composables/element-plus/index.cjs +1 -1
- package/composables/element-plus/index.mjs +10 -10
- package/composables/form-mitt/index.mjs +1 -1
- package/composables/index.cjs +1 -1
- package/composables/index.mjs +53 -53
- package/index.css +1 -1
- package/locale/index.cjs +1 -1
- package/locale/index.mjs +8 -5
- package/locale/lang/ar.d.ts +1 -0
- package/locale/lang/en.d.ts +1 -0
- package/locale/lang/zh-cn.d.ts +1 -0
- package/package.json +9 -1
- package/shared/element-plus/ctx.d.ts +16 -16
- package/shared/types/source/index.d.ts +5 -0
- package/shared/upload/index.cjs +1 -1
- package/shared/upload/index.mjs +166 -165
- package/components/cloneDeep-DaYwfXwD.js +0 -1
- package/components/index-BBriTmQP.js +0 -1
- package/components/use-watch-Bfrz9pv_.js +0 -1
- package/components/use-watch-t49wP7jy.mjs +0 -414
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),i=require("../index-D0D9ABpH.js"),p={model:{type:Object,required:!0}},f=Object.freeze(Object.defineProperty({__proto__:null,props:p},Symbol.toStringTag,{value:"Module"})),s=Symbol("vkfAiContextKey");function a(n){return r.provide(s,n),n}function _(){return r.inject(s,null)}const l=r.defineComponent({name:"VkfAiProvider",__name:"index",props:p,setup(n){const u=n,c=r.computed(()=>({async generate(e){const t={model:u.model,prompt:e.ai.prompt,output:e.ai.output},o=await i.generateText(t);return e.ai.output?o.output:{[e.formItem?.prop]:o.text}},async generateStream(e,t){try{const o={model:u.model,prompt:e.ai.prompt,output:e.ai.output},d=i.streamText(o);for await(const m of d.textStream)t.onChunk(m);t.onDone?.()}catch(o){t.onError?.(o)}}}));return a(c.value),(e,t)=>r.renderSlot(e.$slots,"default")}}),v=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfAiProvider=l;exports._VkfAiProviderCtx=f;exports.__VkfAiProvider=v;exports.default=l;exports.initAiContext=a;exports.useAi=_;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import VkfAiProvider from './src/index.vue';
|
|
2
|
+
export * as __VkfAiProvider from './src/types';
|
|
3
|
+
export * as _VkfAiProviderCtx from './src/ctx';
|
|
4
|
+
export { useAi, initAiContext } from './src/use';
|
|
5
|
+
export type { AiFormClient, AiStreamCallbacks, AiGenerateContext, AiConfig, } from './src/types';
|
|
6
|
+
export { VkfAiProvider };
|
|
7
|
+
export default VkfAiProvider;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { provide as m, inject as f, defineComponent as c, computed as d, renderSlot as l } from "vue";
|
|
2
|
+
import { s as _, g as y } from "../index-BIo_4rr_.mjs";
|
|
3
|
+
const i = {
|
|
4
|
+
model: {
|
|
5
|
+
type: Object,
|
|
6
|
+
required: !0
|
|
7
|
+
}
|
|
8
|
+
}, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9
|
+
__proto__: null,
|
|
10
|
+
props: i
|
|
11
|
+
}, Symbol.toStringTag, { value: "Module" })), u = /* @__PURE__ */ Symbol("vkfAiContextKey");
|
|
12
|
+
function v(r) {
|
|
13
|
+
return m(u, r), r;
|
|
14
|
+
}
|
|
15
|
+
function S() {
|
|
16
|
+
return f(u, null);
|
|
17
|
+
}
|
|
18
|
+
const b = /* @__PURE__ */ c({
|
|
19
|
+
name: "VkfAiProvider",
|
|
20
|
+
__name: "index",
|
|
21
|
+
props: i,
|
|
22
|
+
setup(r) {
|
|
23
|
+
const n = r, p = d(() => ({
|
|
24
|
+
async generate(t) {
|
|
25
|
+
const e = {
|
|
26
|
+
model: n.model,
|
|
27
|
+
prompt: t.ai.prompt,
|
|
28
|
+
output: t.ai.output
|
|
29
|
+
}, o = await y(e);
|
|
30
|
+
return t.ai.output ? o.output : {
|
|
31
|
+
[t.formItem?.prop]: o.text
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
async generateStream(t, e) {
|
|
35
|
+
try {
|
|
36
|
+
const o = {
|
|
37
|
+
model: n.model,
|
|
38
|
+
prompt: t.ai.prompt,
|
|
39
|
+
output: t.ai.output
|
|
40
|
+
}, s = _(o);
|
|
41
|
+
for await (const a of s.textStream)
|
|
42
|
+
e.onChunk(a);
|
|
43
|
+
e.onDone?.();
|
|
44
|
+
} catch (o) {
|
|
45
|
+
e.onError?.(o);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
return v(p.value), (t, e) => l(t.$slots, "default");
|
|
50
|
+
}
|
|
51
|
+
}), j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
52
|
+
__proto__: null
|
|
53
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
54
|
+
export {
|
|
55
|
+
b as VkfAiProvider,
|
|
56
|
+
A as _VkfAiProviderCtx,
|
|
57
|
+
j as __VkfAiProvider,
|
|
58
|
+
b as default,
|
|
59
|
+
v as initAiContext,
|
|
60
|
+
S as useAi
|
|
61
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
model: {
|
|
7
|
+
type: import("vue").PropType<import("ai").LanguageModel>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
model: {
|
|
12
|
+
type: import("vue").PropType<import("ai").LanguageModel>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { SetDataEvent } from '@vunk/core';
|
|
2
|
+
import type { NormalObject } from '@vunk/shared';
|
|
3
|
+
export interface AiFormClient {
|
|
4
|
+
generate: (ctx: AiGenerateContext) => Promise<Record<string, any>>;
|
|
5
|
+
generateStream?: (ctx: AiGenerateContext, callbacks: AiStreamCallbacks) => Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export interface AiStreamCallbacks {
|
|
8
|
+
onChunk: (chunk: string) => void;
|
|
9
|
+
onDone?: (result?: Record<string, any>) => void;
|
|
10
|
+
onError?: (error: Error) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface AiGenerateContext {
|
|
13
|
+
/**
|
|
14
|
+
* 当前表单项的原始配置
|
|
15
|
+
*/
|
|
16
|
+
formItem?: Record<string, any>;
|
|
17
|
+
/**
|
|
18
|
+
* 当前字段的 AI 配置
|
|
19
|
+
*/
|
|
20
|
+
ai: AiConfig;
|
|
21
|
+
/**
|
|
22
|
+
* 整个表单当前数据
|
|
23
|
+
*/
|
|
24
|
+
data?: NormalObject;
|
|
25
|
+
/**
|
|
26
|
+
* 读取任意字段数据
|
|
27
|
+
*/
|
|
28
|
+
getDataValue?: (k: any) => any;
|
|
29
|
+
/**
|
|
30
|
+
* 写入表单数据
|
|
31
|
+
*/
|
|
32
|
+
emitSetData?: (e: SetDataEvent) => void;
|
|
33
|
+
/**
|
|
34
|
+
* 当前 AI 客户端
|
|
35
|
+
*/
|
|
36
|
+
client: AiFormClient;
|
|
37
|
+
}
|
|
38
|
+
export interface AiConfig {
|
|
39
|
+
/**
|
|
40
|
+
* 是否启用 AI 生成
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
enable?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 是否使用流式生成
|
|
46
|
+
*/
|
|
47
|
+
stream?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 生成提示词
|
|
50
|
+
*/
|
|
51
|
+
prompt?: string;
|
|
52
|
+
/**
|
|
53
|
+
* 结构化输出约束
|
|
54
|
+
*/
|
|
55
|
+
output?: any;
|
|
56
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@vunk/form/components/tables-select"),v=require("@vunk/shared/object"),w=require("@vunk/form"),k=require("@vunk/core/composables"),q=require("../debounce-CliSPkvP.js"),_=v.pickObject(r._VkfTablesSelectCtx.props,{excludes:["currentPage","pageSize","total","data","start"]}),T={..._,readApi:{type:Function,default:()=>({rows:[],total:0})},getRows:{type:Function,default:void 0},queryItems:{type:Array,default:()=>[]},query:{type:Object,default:void 0}},V={...r._VkfTablesSelectCtx.emits,"setData:query":null},d=e.defineComponent({name:"VkfApiTablesSelect",__name:"index",props:T,emits:V,setup(p,{emit:f}){const s=p,i=f,c=q.debounce(g,300),m=r._VkfTablesSelectCtx.createBindProps(s,["getRows"]),S=r._VkfTablesSelectCtx.createOnEmits(i),[l,b]=k.useDataComputed({default:{},key:"query"},s,i),n=e.reactive({data:[],total:0}),t=e.ref({pageSize:10,start:0});e.watch(t,c,{deep:!0,immediate:!0}),e.watch(l,c,{deep:!0});async function g(){const a=await s.readApi(l.value,{...t.value,currentPage:t.value.start/t.value.pageSize+1});n.data=a.rows,n.total=a.total}const y=async a=>{const{rows:o}=await s.readApi({ids:a.join(",")});return o};return(a,o)=>(e.openBlock(),e.createBlock(e.unref(r.VkfTablesSelect),e.mergeProps({start:t.value.start,"onUpdate:start":o[0]||(o[0]=u=>t.value.start=u),"page-size":t.value.pageSize,"onUpdate:pageSize":o[1]||(o[1]=u=>t.value.pageSize=u),data:n.data,total:n.total,"get-rows":a.getRows||y},e.unref(m),e.toHandlers(e.unref(S))),{dialog:e.withCtx(()=>[e.createVNode(e.unref(w.VkfForm),{"form-items":a.queryItems,inline:!0,data:e.unref(l),onSetData:e.unref(b)},null,8,["form-items","data","onSetData"]),e.renderSlot(a.$slots,"dialog")]),_:3},16,["start","page-size","data","total","get-rows"]))}}),z=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfApiTablesSelect=d;exports.__VkfApiTablesSelect=z;exports.default=d;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("@vunk/form/components/tables-select"),v=require("@vunk/shared/object"),w=require("@vunk/form"),k=require("@vunk/core/composables"),q=require("../debounce-CliSPkvP.js"),_=v.pickObject(r._VkfTablesSelectCtx.props,{excludes:["currentPage","pageSize","total","data","start"]}),T={..._,readApi:{type:Function,default:(()=>({rows:[],total:0}))},getRows:{type:Function,default:void 0},queryItems:{type:Array,default:()=>[]},query:{type:Object,default:void 0}},V={...r._VkfTablesSelectCtx.emits,"setData:query":null},d=e.defineComponent({name:"VkfApiTablesSelect",__name:"index",props:T,emits:V,setup(p,{emit:f}){const s=p,i=f,c=q.debounce(g,300),m=r._VkfTablesSelectCtx.createBindProps(s,["getRows"]),S=r._VkfTablesSelectCtx.createOnEmits(i),[l,b]=k.useDataComputed({default:{},key:"query"},s,i),n=e.reactive({data:[],total:0}),t=e.ref({pageSize:10,start:0});e.watch(t,c,{deep:!0,immediate:!0}),e.watch(l,c,{deep:!0});async function g(){const a=await s.readApi(l.value,{...t.value,currentPage:t.value.start/t.value.pageSize+1});n.data=a.rows,n.total=a.total}const y=async a=>{const{rows:o}=await s.readApi({ids:a.join(",")});return o};return(a,o)=>(e.openBlock(),e.createBlock(e.unref(r.VkfTablesSelect),e.mergeProps({start:t.value.start,"onUpdate:start":o[0]||(o[0]=u=>t.value.start=u),"page-size":t.value.pageSize,"onUpdate:pageSize":o[1]||(o[1]=u=>t.value.pageSize=u),data:n.data,total:n.total,"get-rows":a.getRows||y},e.unref(m),e.toHandlers(e.unref(S))),{dialog:e.withCtx(()=>[e.createVNode(e.unref(w.VkfForm),{"form-items":a.queryItems,inline:!0,data:e.unref(l),onSetData:e.unref(b)},null,8,["form-items","data","onSetData"]),e.renderSlot(a.$slots,"dialog")]),_:3},16,["start","page-size","data","total","get-rows"]))}}),z=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfApiTablesSelect=d;exports.__VkfApiTablesSelect=z;exports.default=d;
|
|
@@ -35,18 +35,16 @@ export declare const props: {
|
|
|
35
35
|
type: StringConstructor;
|
|
36
36
|
default: string;
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
fixed: (BooleanConstructor | StringConstructor)[];
|
|
39
39
|
small: BooleanConstructor;
|
|
40
|
+
required: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
41
|
+
error: StringConstructor;
|
|
42
|
+
prop: null;
|
|
40
43
|
className: StringConstructor;
|
|
41
|
-
popperClass: import("element-plus/es/utils/index.mjs").EpPropFinalized<
|
|
42
|
-
popperStyle:
|
|
43
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown>>;
|
|
44
|
-
readonly required: false;
|
|
45
|
-
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
46
|
-
__epPropKey: true;
|
|
47
|
-
};
|
|
44
|
+
popperClass: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | false | Record<string, any> | import("element-plus/es/utils/typescript.mjs").ClassValue[]) | (() => import("element-plus/es/utils/typescript.mjs").ClassValue) | ((new (...args: any[]) => string | false | Record<string, any> | import("element-plus/es/utils/typescript.mjs").ClassValue[]) | (() => import("element-plus/es/utils/typescript.mjs").ClassValue) | null)[], unknown, unknown, "", boolean>;
|
|
45
|
+
popperStyle: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | ((new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | null)[], unknown, unknown, undefined, boolean>;
|
|
48
46
|
size: {
|
|
49
|
-
readonly type:
|
|
47
|
+
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
50
48
|
readonly required: false;
|
|
51
49
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
52
50
|
__epPropKey: true;
|
|
@@ -65,7 +63,7 @@ export declare const props: {
|
|
|
65
63
|
};
|
|
66
64
|
elRef: {
|
|
67
65
|
type: PropType<import("@vunk/core").AnyFunc>;
|
|
68
|
-
default:
|
|
66
|
+
default: any;
|
|
69
67
|
};
|
|
70
68
|
inline: {
|
|
71
69
|
type: BooleanConstructor;
|
|
@@ -88,12 +86,16 @@ export declare const props: {
|
|
|
88
86
|
type: BooleanConstructor;
|
|
89
87
|
default: boolean;
|
|
90
88
|
};
|
|
91
|
-
prop: null;
|
|
92
89
|
defaultModelValue: null;
|
|
93
90
|
labelTipProps: {
|
|
94
91
|
type: PropType<import("element-plus").UseTooltipProps>;
|
|
95
92
|
default: () => {};
|
|
96
93
|
};
|
|
94
|
+
ai: {
|
|
95
|
+
type: PropType<import("../../ai-provider").AiConfig>;
|
|
96
|
+
default: undefined;
|
|
97
|
+
};
|
|
98
|
+
aiOutput: null;
|
|
97
99
|
label: StringConstructor;
|
|
98
100
|
labelWidth: {
|
|
99
101
|
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
@@ -107,7 +109,6 @@ export declare const props: {
|
|
|
107
109
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
108
110
|
__epPropKey: true;
|
|
109
111
|
};
|
|
110
|
-
error: StringConstructor;
|
|
111
112
|
validateStatus: {
|
|
112
113
|
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
113
114
|
readonly required: false;
|
|
@@ -119,7 +120,7 @@ export declare const props: {
|
|
|
119
120
|
showMessage: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
120
121
|
disabled: {
|
|
121
122
|
type: BooleanConstructor;
|
|
122
|
-
default:
|
|
123
|
+
default: any;
|
|
123
124
|
};
|
|
124
125
|
modelValue: {
|
|
125
126
|
type: PropType<NormalObject[] | string>;
|
|
@@ -134,9 +135,8 @@ export declare const props: {
|
|
|
134
135
|
type: BooleanConstructor;
|
|
135
136
|
default: boolean;
|
|
136
137
|
};
|
|
137
|
-
load: PropType<(
|
|
138
|
+
load: PropType<(row: any, treeNode: import("element-plus").TreeNode, resolve: (data: any[]) => void) => void>;
|
|
138
139
|
filters: PropType<import("element-plus/es/components/table/src/table-column/defaults.mjs").Filters>;
|
|
139
|
-
fixed: (StringConstructor | BooleanConstructor)[];
|
|
140
140
|
width: (StringConstructor | NumberConstructor)[];
|
|
141
141
|
stringify: {
|
|
142
142
|
type: BooleanConstructor;
|
|
@@ -149,7 +149,7 @@ export declare const props: {
|
|
|
149
149
|
};
|
|
150
150
|
teleported: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
151
151
|
emptyText: StringConstructor;
|
|
152
|
-
cellClassName: PropType<import("element-plus").CellCls<any
|
|
152
|
+
cellClassName: PropType<import("element-plus").CellCls<any>>;
|
|
153
153
|
align: {
|
|
154
154
|
type: StringConstructor;
|
|
155
155
|
default: string;
|
|
@@ -163,7 +163,7 @@ export declare const props: {
|
|
|
163
163
|
sumText: StringConstructor;
|
|
164
164
|
layout: {
|
|
165
165
|
type: StringConstructor;
|
|
166
|
-
default:
|
|
166
|
+
default: any;
|
|
167
167
|
};
|
|
168
168
|
columns: {
|
|
169
169
|
type: PropType<any[]>;
|
|
@@ -175,28 +175,28 @@ export declare const props: {
|
|
|
175
175
|
default: boolean;
|
|
176
176
|
};
|
|
177
177
|
stripe: BooleanConstructor;
|
|
178
|
-
rowKey: PropType<string | ((row: any) => string)
|
|
178
|
+
rowKey: PropType<string | ((row: any) => string)>;
|
|
179
179
|
showHeader: {
|
|
180
180
|
type: BooleanConstructor;
|
|
181
181
|
default: boolean;
|
|
182
182
|
};
|
|
183
183
|
showSummary: BooleanConstructor;
|
|
184
|
-
summaryMethod: PropType<import("element-plus").SummaryMethod<any
|
|
185
|
-
rowClassName: PropType<import("element-plus").ColumnCls<any
|
|
186
|
-
rowStyle: PropType<import("element-plus").ColumnStyle<any
|
|
187
|
-
cellStyle: PropType<import("element-plus").CellStyle<any
|
|
188
|
-
headerRowClassName: PropType<import("element-plus").ColumnCls<any
|
|
189
|
-
headerRowStyle: PropType<import("element-plus").ColumnStyle<any
|
|
190
|
-
headerCellClassName: PropType<import("element-plus").CellCls<any
|
|
191
|
-
headerCellStyle: PropType<import("element-plus").CellStyle<any
|
|
184
|
+
summaryMethod: PropType<import("element-plus").SummaryMethod<any>>;
|
|
185
|
+
rowClassName: PropType<import("element-plus").ColumnCls<any>>;
|
|
186
|
+
rowStyle: PropType<import("element-plus").ColumnStyle<any>>;
|
|
187
|
+
cellStyle: PropType<import("element-plus").CellStyle<any>>;
|
|
188
|
+
headerRowClassName: PropType<import("element-plus").ColumnCls<any>>;
|
|
189
|
+
headerRowStyle: PropType<import("element-plus").ColumnStyle<any>>;
|
|
190
|
+
headerCellClassName: PropType<import("element-plus").CellCls<any>>;
|
|
191
|
+
headerCellStyle: PropType<import("element-plus").CellStyle<any>>;
|
|
192
192
|
highlightCurrentRow: BooleanConstructor;
|
|
193
193
|
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
194
|
-
expandRowKeys: PropType<string[]
|
|
194
|
+
expandRowKeys: PropType<string[]>;
|
|
195
195
|
defaultExpandAll: BooleanConstructor;
|
|
196
|
-
defaultSort: PropType<import("element-plus").Sort
|
|
196
|
+
defaultSort: PropType<import("element-plus").Sort>;
|
|
197
197
|
tooltipEffect: StringConstructor;
|
|
198
|
-
tooltipOptions: PropType<Partial<
|
|
199
|
-
spanMethod: PropType<(
|
|
198
|
+
tooltipOptions: PropType<Partial<Omit<import("element-plus").UseTooltipProps, "content" | "visible" | "referenceEl" | "triggerTargetEl" | "virtualTriggering" | "persistent" | "rawContent" | "autoClose" | "virtualRef">>>;
|
|
199
|
+
spanMethod: PropType<(data: {
|
|
200
200
|
row: any;
|
|
201
201
|
rowIndex: number;
|
|
202
202
|
column: import("element-plus").TableColumnCtx<any>;
|
|
@@ -204,7 +204,7 @@ export declare const props: {
|
|
|
204
204
|
}) => number[] | {
|
|
205
205
|
rowspan: number;
|
|
206
206
|
colspan: number;
|
|
207
|
-
} | undefined
|
|
207
|
+
} | undefined>;
|
|
208
208
|
selectOnIndeterminate: {
|
|
209
209
|
type: BooleanConstructor;
|
|
210
210
|
default: boolean;
|
|
@@ -228,11 +228,11 @@ export declare const props: {
|
|
|
228
228
|
};
|
|
229
229
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
230
230
|
flexible: BooleanConstructor;
|
|
231
|
-
showOverflowTooltip: PropType<boolean | Partial<
|
|
231
|
+
showOverflowTooltip: PropType<boolean | Partial<Omit<import("element-plus").UseTooltipProps, "content" | "visible" | "referenceEl" | "triggerTargetEl" | "virtualTriggering" | "persistent" | "rawContent" | "autoClose" | "virtualRef">>>;
|
|
232
232
|
appendFilterPanelTo: StringConstructor;
|
|
233
233
|
scrollbarTabindex: {
|
|
234
234
|
type: (StringConstructor | NumberConstructor)[];
|
|
235
|
-
default:
|
|
235
|
+
default: any;
|
|
236
236
|
};
|
|
237
237
|
labelClassName: StringConstructor;
|
|
238
238
|
property: StringConstructor;
|
|
@@ -271,7 +271,7 @@ export declare const props: {
|
|
|
271
271
|
};
|
|
272
272
|
sortOrders: {
|
|
273
273
|
type: PropType<import("element-plus").TableColumnCtx<import("element-plus/es/components/table/src/table/defaults.mjs").DefaultRow>["sortOrders"]>;
|
|
274
|
-
default: () =>
|
|
274
|
+
default: () => string[];
|
|
275
275
|
validator: (val: import("element-plus").TableColumnCtx<any>["sortOrders"]) => boolean;
|
|
276
276
|
};
|
|
277
277
|
showTooltipWhenOverflow: BooleanConstructor;
|
|
@@ -306,7 +306,7 @@ export declare const props: {
|
|
|
306
306
|
};
|
|
307
307
|
tableStyle: {
|
|
308
308
|
type: PropType<import("vue").CSSProperties>;
|
|
309
|
-
default:
|
|
309
|
+
default: any;
|
|
310
310
|
};
|
|
311
311
|
modules: {
|
|
312
312
|
type: PropType<("pagination")[]>;
|
|
@@ -320,11 +320,11 @@ export declare const props: {
|
|
|
320
320
|
pageCount: NumberConstructor;
|
|
321
321
|
pagerCount: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
|
322
322
|
defaultCurrentPage: NumberConstructor;
|
|
323
|
-
pageSizes: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | ((new (...args: any[]) => number[]) | (() => number[]))[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
323
|
+
pageSizes: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | ((new (...args: any[]) => number[]) | (() => number[]) | null)[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
|
324
324
|
prevText: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
325
|
-
prevIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown, () =>
|
|
325
|
+
prevIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
326
326
|
nextText: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
327
|
-
nextIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown, () =>
|
|
327
|
+
nextIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | null)[], unknown, unknown, () => import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
328
328
|
background: BooleanConstructor;
|
|
329
329
|
hideOnSinglePage: BooleanConstructor;
|
|
330
330
|
appendSizeTo: StringConstructor;
|
|
@@ -333,25 +333,25 @@ export declare const emits: {
|
|
|
333
333
|
'setData:query': null;
|
|
334
334
|
'update:modelValue': null;
|
|
335
335
|
'update:start': (val: number) => boolean;
|
|
336
|
-
select:
|
|
337
|
-
'select-all':
|
|
338
|
-
'selection-change':
|
|
339
|
-
'cell-mouse-enter':
|
|
340
|
-
'cell-mouse-leave':
|
|
341
|
-
'cell-contextmenu':
|
|
342
|
-
'cell-click':
|
|
343
|
-
'cell-dblclick':
|
|
344
|
-
'row-click':
|
|
345
|
-
'row-contextmenu':
|
|
346
|
-
'row-dblclick':
|
|
347
|
-
'header-click':
|
|
348
|
-
'header-contextmenu':
|
|
349
|
-
'sort-change':
|
|
350
|
-
'filter-change':
|
|
351
|
-
'current-change':
|
|
352
|
-
'header-dragend':
|
|
353
|
-
'expand-change':
|
|
354
|
-
scroll:
|
|
336
|
+
select: any;
|
|
337
|
+
'select-all': any;
|
|
338
|
+
'selection-change': any;
|
|
339
|
+
'cell-mouse-enter': any;
|
|
340
|
+
'cell-mouse-leave': any;
|
|
341
|
+
'cell-contextmenu': any;
|
|
342
|
+
'cell-click': any;
|
|
343
|
+
'cell-dblclick': any;
|
|
344
|
+
'row-click': any;
|
|
345
|
+
'row-contextmenu': any;
|
|
346
|
+
'row-dblclick': any;
|
|
347
|
+
'header-click': any;
|
|
348
|
+
'header-contextmenu': any;
|
|
349
|
+
'sort-change': any;
|
|
350
|
+
'filter-change': any;
|
|
351
|
+
'current-change': any;
|
|
352
|
+
'header-dragend': any;
|
|
353
|
+
'expand-change': any;
|
|
354
|
+
scroll: any;
|
|
355
355
|
'update:current-page': (val: number) => boolean;
|
|
356
356
|
'update:page-size': (val: number) => boolean;
|
|
357
357
|
'size-change': (val: number) => boolean;
|