@vrojs/element-plus 0.0.31 → 0.0.32

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.
Files changed (44) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +147 -139
  3. package/dist/style/deps.js +1 -0
  4. package/dist/vro-el-async-dialog/function-call.d.ts +3 -0
  5. package/dist/vro-el-async-dialog/function-call.js +20 -0
  6. package/dist/vro-el-async-dialog/index.d.ts +48 -0
  7. package/dist/vro-el-async-dialog/index.js +9 -0
  8. package/dist/vro-el-async-dialog/style/css.d.ts +0 -0
  9. package/dist/vro-el-async-dialog/style/css.js +2 -0
  10. package/dist/vro-el-async-dialog/style/deps.d.ts +0 -0
  11. package/dist/vro-el-async-dialog/style/deps.js +1 -0
  12. package/dist/vro-el-async-dialog/style/index.d.ts +0 -0
  13. package/dist/vro-el-async-dialog/style/index.js +2 -0
  14. package/dist/vro-el-async-dialog/types.d.ts +12 -0
  15. package/dist/vro-el-async-dialog/types.js +1 -0
  16. package/dist/vro-el-async-dialog/vro-el-async-dialog.vue.d.ts +28 -0
  17. package/dist/vro-el-async-dialog/vro-el-async-dialog.vue.js +58 -0
  18. package/dist/vro-el-async-dialog/vro-el-async-dialog.vue2.js +4 -0
  19. package/dist/vro-el-image/index.d.ts +3 -3
  20. package/dist/vro-el-image/utils.d.ts +1 -1
  21. package/dist/vro-el-image/vro-el-image.vue.d.ts +1 -1
  22. package/dist/vro-el-schema-form/defineVroElSchemaForm.d.ts +2 -3
  23. package/dist/vro-el-schema-form/types.d.ts +3 -0
  24. package/dist/vro-el-schema-form/useVroElSchemaForm.d.ts +2 -5
  25. package/dist/vro-el-schema-form-dialog/function-call.js +2 -2
  26. package/dist/vro-el-schema-form-dialog/index.d.ts +2 -1
  27. package/dist/vro-el-schema-form-dialog/index.js +13 -9
  28. package/dist/vro-el-schema-form-dialog/useVroElSchemaFormDialog.d.ts +12 -13
  29. package/dist/vro-el-schema-form-dialog/useVroElSchemaFormDialog.js +27 -15
  30. package/dist/vro-el-schema-form-dialog/utils.d.ts +2 -0
  31. package/dist/vro-el-schema-form-dialog/utils.js +6 -0
  32. package/dist/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue.d.ts +2 -2
  33. package/dist/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue.js +25 -24
  34. package/dist/vro-el-schema-form-drawer/function-call.js +2 -2
  35. package/dist/vro-el-schema-form-drawer/index.d.ts +1 -1
  36. package/dist/vro-el-schema-form-drawer/vro-el-schema-form-drawer.vue.d.ts +2 -2
  37. package/dist/vro-el-select/index.d.ts +1 -1
  38. package/dist/vro-el-select/vro-el-select.vue.d.ts +1 -1
  39. package/dist/vro-el-with-config/index.d.ts +58 -11
  40. package/dist/vro-el-with-config/types.d.ts +7 -0
  41. package/dist/vro-el-with-config/types.js +8 -1
  42. package/dist/vro-el-with-config/vro-el-with-config.vue.d.ts +28 -2
  43. package/dist/vro-el-with-config/vro-el-with-config.vue.js +40 -19
  44. package/package.json +1 -1
@@ -121,6 +121,9 @@ export type VroElSchemaFormCustomSchemaField = VroElSchemaFormSchemaFieldBase &
121
121
  export type VroElSchemaFormSchemaField = VroElSchemaFormMappedSchemaField | VroElSchemaFormCustomSchemaField;
122
122
  export type VroElSchemaFormSchemaBase = Record<string, VroElSchemaFormSchemaFieldBase>;
123
123
  export type VroElSchemaFormSchema = Record<string, VroElSchemaFormSchemaField>;
124
+ export type VroElSchemaFormNormalizedSchema<TSchema extends VroElSchemaFormSchema> = {
125
+ [K in keyof TSchema]: VroElSchemaFormSchemaFieldBase;
126
+ };
124
127
  export type VroElSchemaFormFormProps = Partial<Omit<FormProps, 'model' | 'rules'>>;
125
128
  export interface VroElSchemaFormFieldEvent {
126
129
  key: string;
@@ -1,18 +1,15 @@
1
1
  import { UseAsyncTaskOptions } from '@vrojs/use';
2
2
  import { Ref } from 'vue';
3
3
  import { VroElSchemaFormInstance } from '.';
4
- import { VroElSchemaFormSchema, VroElSchemaFormSchemaFieldBase } from './types';
4
+ import { VroElSchemaFormNormalizedSchema, VroElSchemaFormSchema } from './types';
5
5
  export interface UseVroElSchemaFormOptions extends Omit<UseAsyncTaskOptions<any>, 'initialValue' | 'initialParams'> {
6
6
  source?: Record<string, any>;
7
7
  instanceRef?: Ref<VroElSchemaFormInstance | undefined> | string;
8
8
  }
9
- export type UseVroElSchemaFormSchema<TSchema extends VroElSchemaFormSchema> = {
10
- [K in keyof TSchema]: VroElSchemaFormSchemaFieldBase;
11
- };
12
9
  export declare function useVroElSchemaForm<D extends Record<string, any> = any, T extends VroElSchemaFormSchema = VroElSchemaFormSchema>(rawSchema: (() => T) | T, task?: (data: D) => Promise<void>, options?: UseVroElSchemaFormOptions): {
13
10
  data: Ref<Awaited<D> | undefined, Awaited<D> | undefined>;
14
11
  error: Ref<unknown, unknown>;
15
- schema: import('vue').Reactive<UseVroElSchemaFormSchema<T>>;
12
+ schema: import('vue').Reactive<VroElSchemaFormNormalizedSchema<T>>;
16
13
  schemaFormRef: Ref<({
17
14
  $: import('vue').ComponentInternalInstance;
18
15
  $data: {};
@@ -6,8 +6,8 @@ function a(o, r = null) {
6
6
  return m(
7
7
  n,
8
8
  {
9
- ...o,
10
- is: i(t)
9
+ is: i(t),
10
+ props: o
11
11
  },
12
12
  {
13
13
  appContext: r,
@@ -2,6 +2,7 @@ export * from './function-call';
2
2
  export * from './injection';
3
3
  export * from './types';
4
4
  export * from './useVroElSchemaFormDialog';
5
+ export * from './utils';
5
6
  export declare const VroElSchemaFormDialog: import('@vrojs/base').WithInstall<{
6
7
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
7
8
  title: StringConstructor;
@@ -659,7 +660,7 @@ export declare const VroElSchemaFormDialog: import('@vrojs/base').WithInstall<{
659
660
  onClosed?: (() => any) | undefined;
660
661
  onOpenAutoFocus?: (() => any) | undefined;
661
662
  onCloseAutoFocus?: (() => any) | undefined;
662
- }>, "title" | "ariaLevel" | "visible" | "appendTo" | "transition" | "closeOnPressEscape" | "draggable" | "handleClose" | "closeOnClickModal" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "overflow" | "showClose" | "dialogContentRef" | "resetPosition"> & import('vue').ShallowUnwrapRef<{
663
+ }>, "title" | "ariaLevel" | "visible" | "appendTo" | "transition" | "closeOnClickModal" | "closeOnPressEscape" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "draggable" | "overflow" | "showClose" | "dialogContentRef" | "resetPosition" | "handleClose"> & import('vue').ShallowUnwrapRef<{
663
664
  visible: import('vue').Ref<boolean, boolean>;
664
665
  dialogContentRef: import('vue').Ref<any, any>;
665
666
  resetPosition: () => void;
@@ -1,18 +1,22 @@
1
1
  import { withInstall as m } from "@vrojs/base";
2
2
  import o from "./vro-el-schema-form-dialog.vue.js";
3
- import { showVroElSchemaFormDialog as n } from "./function-call.js";
4
- import { useVroElSchemaFormDialogInstance as s, vroElSchemaFormDialogInjectionKey as f } from "./injection.js";
3
+ import { showVroElSchemaFormDialog as i } from "./function-call.js";
4
+ import { useVroElSchemaFormDialogInstance as s, vroElSchemaFormDialogInjectionKey as h } from "./injection.js";
5
5
  import { vroElSchemaFormDialogProps as p } from "./types.js";
6
- import { useVroElSchemaFormDialog as g } from "./useVroElSchemaFormDialog.js";
7
- const a = m(o, (r) => {
6
+ import { createVroElSchemaFormDialog‌ as D, useVroElSchemaFormDialog as E } from "./useVroElSchemaFormDialog.js";
7
+ import { getVroElSchemaFormDialogOptions as S, setVroElSchemaFormDialogOptions as x } from "./utils.js";
8
+ const t = m(o, (r) => {
8
9
  r.component(o.name, o), o._context = r._context;
9
10
  });
10
11
  export {
11
- a as VroElSchemaFormDialog,
12
- a as default,
13
- n as showVroElSchemaFormDialog,
14
- g as useVroElSchemaFormDialog,
12
+ t as VroElSchemaFormDialog,
13
+ D as createVroElSchemaFormDialog‌,
14
+ t as default,
15
+ S as getVroElSchemaFormDialogOptions,
16
+ x as setVroElSchemaFormDialogOptions,
17
+ i as showVroElSchemaFormDialog,
18
+ E as useVroElSchemaFormDialog,
15
19
  s as useVroElSchemaFormDialogInstance,
16
- f as vroElSchemaFormDialogInjectionKey,
20
+ h as vroElSchemaFormDialogInjectionKey,
17
21
  p as vroElSchemaFormDialogProps
18
22
  };
@@ -1,14 +1,13 @@
1
- import { Ref } from 'vue';
2
- import { VroElSchemaFormSchema, VroElSchemaFormSchemaField } from '../vro-el-schema-form';
3
- import { showVroElSchemaFormDialog } from './function-call';
4
- export interface UseVroElSchemaFormDialogOptions<S extends VroElSchemaFormSchema> {
5
- instanceRef?: Ref<any>;
6
- onGenerate?: (schema: S, ...args: any[]) => void;
7
- onSuccess?: (schema: S, ...args: any[]) => void;
1
+ import { VroElSchemaFormNormalizedSchema, VroElSchemaFormSchema } from '../vro-el-schema-form/types';
2
+ import { VroElSchemaFormDialogProps } from './types';
3
+ export interface UseVroElSchemaFormDialogOptions {
4
+ trigger?: () => void;
8
5
  }
9
- export interface UseVroElSchemaFormDialogInstance {
10
- show: typeof showVroElSchemaFormDialog;
11
- }
12
- export declare function useVroElSchemaFormDialog<T extends VroElSchemaFormSchema, S extends VroElSchemaFormSchema = {
13
- [P in keyof T]: VroElSchemaFormSchemaField;
14
- }>(generator: () => T | Promise<T>, task: (schema: S, instance: UseVroElSchemaFormDialogInstance, ...args: any[]) => Promise<any>, options?: UseVroElSchemaFormDialogOptions<S>): readonly [Ref<S | undefined, S | undefined>, (...args: any[]) => Promise<void>];
6
+ export declare function useVroElSchemaFormDialog<R extends Record<string, any>, T extends VroElSchemaFormSchema = VroElSchemaFormSchema>(createSchema: (item?: R) => T | Promise<T>, request: (params: any, item?: R) => Promise<any>, options?: UseVroElSchemaFormDialogOptions): {
7
+ schema: import('vue').Ref<VroElSchemaFormNormalizedSchema<T> | undefined, VroElSchemaFormNormalizedSchema<T> | undefined>;
8
+ trigger: (item?: R, customProps?: Partial<VroElSchemaFormDialogProps>) => Promise<void>;
9
+ };
10
+ export declare function createVroElSchemaFormDialog‌<R extends Record<string, any>>(): <T extends VroElSchemaFormSchema = VroElSchemaFormSchema>(createSchema: (item?: R) => T | Promise<T>, request: (params: any, item?: R) => Promise<any>, options?: UseVroElSchemaFormDialogOptions) => {
11
+ schema: import('vue').Ref<VroElSchemaFormNormalizedSchema<T> | undefined, VroElSchemaFormNormalizedSchema<T> | undefined>;
12
+ trigger: (item?: R, customProps?: Partial<VroElSchemaFormDialogProps>) => Promise<void>;
13
+ };
@@ -1,18 +1,30 @@
1
- import m from "../node_modules/.pnpm/@ajuanjs_banana@0.0.3/node_modules/@ajuanjs/banana/dist/index.js";
2
- import { ref as f, getCurrentInstance as p } from "vue";
3
- import { showVroElSchemaFormDialog as v } from "./function-call.js";
4
- function S(o, a, n = {}) {
5
- const { onGenerate: r, onSuccess: i, instanceRef: c } = n, e = f(), s = p();
6
- return [e, async (...t) => {
7
- e.value = await o(), t[0] && await m.assign(t[0], e.value), r?.(e.value, ...t), await a(
8
- e.value,
9
- c?.value ?? {
10
- show: (u, l) => v(u, l ?? s?.appContext)
11
- },
12
- ...t
13
- ), i?.(e.value, ...t);
14
- }];
1
+ import g from "../node_modules/.pnpm/@ajuanjs_banana@0.0.3/node_modules/@ajuanjs/banana/dist/index.js";
2
+ import { ref as u } from "vue";
3
+ function w(e, c, s = {}) {
4
+ const a = u(), { trigger: t } = s;
5
+ return { schema: a, trigger: async (r, n) => {
6
+ const o = await e(r);
7
+ r && await g.assign(r, o), a.value = o, await showVroElSchemaFormDialog({
8
+ ...n,
9
+ schema: a.value,
10
+ request: (i) => c(i, r)
11
+ }), t?.();
12
+ } };
13
+ }
14
+ function f() {
15
+ return function(e, c, s = {}) {
16
+ const a = u(), { trigger: t } = s;
17
+ return { schema: a, trigger: async (r, n) => {
18
+ const o = await e(r);
19
+ r && await g.assign(r, o), a.value = o, await showVroElSchemaFormDialog({
20
+ ...n,
21
+ schema: a.value,
22
+ request: (i) => c(i, r)
23
+ }), t?.();
24
+ } };
25
+ };
15
26
  }
16
27
  export {
17
- S as useVroElSchemaFormDialog
28
+ f as createVroElSchemaFormDialog‌,
29
+ w as useVroElSchemaFormDialog
18
30
  };
@@ -0,0 +1,2 @@
1
+ import { VroElSchemaFormDialogProps } from './types';
2
+ export declare const setVroElSchemaFormDialogOptions: (value: Partial<Omit<VroElSchemaFormDialogProps, "request" | "schema">>) => Partial<Omit<VroElSchemaFormDialogProps, "request" | "schema">>, getVroElSchemaFormDialogOptions: () => Partial<Omit<VroElSchemaFormDialogProps, "request" | "schema">>;
@@ -0,0 +1,6 @@
1
+ import { createFactory as o } from "@daysnap/utils";
2
+ const [t, e] = o({});
3
+ export {
4
+ e as getVroElSchemaFormDialogOptions,
5
+ t as setVroElSchemaFormDialogOptions
6
+ };
@@ -142,7 +142,7 @@ declare function __VLS_template(): {
142
142
  onClosed?: (() => any) | undefined;
143
143
  onOpenAutoFocus?: (() => any) | undefined;
144
144
  onCloseAutoFocus?: (() => any) | undefined;
145
- }>, "title" | "ariaLevel" | "visible" | "appendTo" | "transition" | "closeOnPressEscape" | "draggable" | "handleClose" | "closeOnClickModal" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "overflow" | "showClose" | "dialogContentRef" | "resetPosition"> & import('vue').ShallowUnwrapRef<{
145
+ }>, "title" | "ariaLevel" | "visible" | "appendTo" | "transition" | "closeOnClickModal" | "closeOnPressEscape" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "draggable" | "overflow" | "showClose" | "dialogContentRef" | "resetPosition" | "handleClose"> & import('vue').ShallowUnwrapRef<{
146
146
  visible: import('vue').Ref<boolean, boolean>;
147
147
  dialogContentRef: import('vue').Ref<any, any>;
148
148
  resetPosition: () => void;
@@ -1312,7 +1312,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
1312
1312
  onClosed?: (() => any) | undefined;
1313
1313
  onOpenAutoFocus?: (() => any) | undefined;
1314
1314
  onCloseAutoFocus?: (() => any) | undefined;
1315
- }>, "title" | "ariaLevel" | "visible" | "appendTo" | "transition" | "closeOnPressEscape" | "draggable" | "handleClose" | "closeOnClickModal" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "overflow" | "showClose" | "dialogContentRef" | "resetPosition"> & import('vue').ShallowUnwrapRef<{
1315
+ }>, "title" | "ariaLevel" | "visible" | "appendTo" | "transition" | "closeOnClickModal" | "closeOnPressEscape" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "draggable" | "overflow" | "showClose" | "dialogContentRef" | "resetPosition" | "handleClose"> & import('vue').ShallowUnwrapRef<{
1316
1316
  visible: import('vue').Ref<boolean, boolean>;
1317
1317
  dialogContentRef: import('vue').Ref<any, any>;
1318
1318
  resetPosition: () => void;
@@ -1,4 +1,4 @@
1
- import { defineComponent as q, useSlots as z, ref as I, computed as d, useTemplateRef as k, provide as K, createBlock as f, openBlock as p, unref as r, normalizeStyle as L, isRef as A, createSlots as w, withCtx as n, createVNode as M, mergeProps as v, withModifiers as U, renderSlot as S, renderList as G, normalizeProps as H, guardReactiveProps as J, createElementVNode as Q, createCommentVNode as C, createTextVNode as F, toDisplayString as b } from "vue";
1
+ import { defineComponent as q, useSlots as z, ref as I, computed as d, useTemplateRef as k, provide as K, createBlock as f, openBlock as p, unref as r, normalizeStyle as L, isRef as A, createSlots as S, withCtx as n, createVNode as M, mergeProps as v, withModifiers as U, renderSlot as w, renderList as G, normalizeProps as H, guardReactiveProps as J, createElementVNode as Q, createCommentVNode as C, createTextVNode as F, toDisplayString as b } from "vue";
2
2
  import { pick as W, typedKeys as X } from "@daysnap/utils";
3
3
  import { useVisible as Y, useAsyncTask as Z } from "@vrojs/use";
4
4
  import { ElDialog as _, ElButton as E } from "element-plus";
@@ -6,23 +6,24 @@ import { useLocale as ee } from "../locale/useLocale.js";
6
6
  import { VroElSchemaForm as oe } from "../vro-el-schema-form/index.js";
7
7
  import { vroElSchemaFormDialogInjectionKey as te } from "./injection.js";
8
8
  import { vroElSchemaFormDialogProps as le } from "./types.js";
9
- import { vroElSchemaFormProps as re } from "../vro-el-schema-form/types.js";
10
- const ae = { class: "dialog-footer" }, ve = /* @__PURE__ */ q({
9
+ import { getVroElSchemaFormDialogOptions as re } from "./utils.js";
10
+ import { vroElSchemaFormProps as ae } from "../vro-el-schema-form/types.js";
11
+ const ne = { class: "dialog-footer" }, ye = /* @__PURE__ */ q({
11
12
  name: "VroElSchemaFormDialog",
12
13
  __name: "vro-el-schema-form-dialog",
13
14
  props: le,
14
15
  emits: ["change-field", "input-field", "cancel", "confirm", "closed"],
15
- setup(B, { expose: V, emit: P }) {
16
- const s = P, R = z(), T = B, { t: g } = ee(), y = I(), x = d(() => Object.keys(R).filter((o) => o !== "default")), l = d(() => Object.assign({}, T, y.value)), D = d(() => W(l.value, X(re))), { show: $, hide: i, confirm: u, visible: m } = Y({
16
+ setup(V, { expose: B, emit: P }) {
17
+ const s = P, D = z(), R = V, { t: g } = ee(), y = I(), T = d(() => Object.keys(D).filter((o) => o !== "default")), l = d(() => Object.assign({}, R, re(), y.value)), x = d(() => W(l.value, X(ae))), { show: $, hide: i, confirm: c, visible: m } = Y({
17
18
  showCallback: (o) => {
18
19
  y.value = o;
19
20
  },
20
21
  hideCallback: (o) => s("cancel", o),
21
22
  confirmCallback: (o) => s("confirm", o)
22
- }), c = k("dialogRef"), N = () => {
23
- const o = c.value?.$el;
23
+ }), u = k("dialogRef"), N = () => {
24
+ const o = u.value?.$el;
24
25
  (o instanceof Element ? o : void 0)?.querySelector(".el-dialog__body")?.scrollTo({ top: 0 });
25
- }, a = k("schemaFormRef"), { loading: j, trigger: h } = Z(
26
+ }, a = k("schemaFormRef"), { loading: O, trigger: h } = Z(
26
27
  async () => {
27
28
  if (!a.value)
28
29
  throw new Error("not found VroElSchemaForm");
@@ -31,14 +32,14 @@ const ae = { class: "dialog-footer" }, ve = /* @__PURE__ */ q({
31
32
  });
32
33
  let o = !1;
33
34
  if (await a.value.trigger({
34
- confirm: u,
35
+ confirm: c,
35
36
  hide: i,
36
37
  block: () => {
37
38
  o = !0;
38
39
  }
39
40
  }), m.value && !o) {
40
41
  const e = await a.value.extractValues(), t = await l.value.request?.(e, l.value.schema) ?? e;
41
- u(t);
42
+ c(t);
42
43
  }
43
44
  },
44
45
  {
@@ -46,11 +47,11 @@ const ae = { class: "dialog-footer" }, ve = /* @__PURE__ */ q({
46
47
  }
47
48
  );
48
49
  return K(te, {
49
- confirm: u,
50
+ confirm: c,
50
51
  hide: i
51
- }), V({
52
+ }), B({
52
53
  get elDialog() {
53
- return c.value;
54
+ return u.value;
54
55
  },
55
56
  get vroElSchemaForm() {
56
57
  return a.value;
@@ -61,7 +62,7 @@ const ae = { class: "dialog-footer" }, ve = /* @__PURE__ */ q({
61
62
  modelValue: r(m),
62
63
  "onUpdate:modelValue": e[4] || (e[4] = (t) => A(m) ? m.value = t : null),
63
64
  ref_key: "dialogRef",
64
- ref: c,
65
+ ref: u,
65
66
  class: "vro-el-schema-form-dialog",
66
67
  title: l.value.title,
67
68
  "destroy-on-close": "",
@@ -71,24 +72,24 @@ const ae = { class: "dialog-footer" }, ve = /* @__PURE__ */ q({
71
72
  onClose: e[5] || (e[5] = (t) => r(i)()),
72
73
  onClosed: e[6] || (e[6] = (t) => s("closed")),
73
74
  onOpened: N
74
- }, w({
75
+ }, S({
75
76
  default: n(() => [
76
- M(r(oe), v(D.value, {
77
+ M(r(oe), v(x.value, {
77
78
  ref_key: "schemaFormRef",
78
79
  ref: a,
79
80
  onChangeField: e[0] || (e[0] = (t) => s("change-field", t)),
80
81
  onInputField: e[1] || (e[1] = (t) => s("input-field", t)),
81
82
  onSubmit: e[2] || (e[2] = U((t) => r(h)(), ["prevent"]))
82
- }), w({
83
+ }), S({
83
84
  default: n(() => [
84
- S(o.$slots, "default")
85
+ w(o.$slots, "default")
85
86
  ]),
86
87
  _: 2
87
88
  }, [
88
- G(x.value, (t) => ({
89
+ G(T.value, (t) => ({
89
90
  name: t,
90
- fn: n((O) => [
91
- S(o.$slots, t, H(J(O ?? {})))
91
+ fn: n((j) => [
92
+ w(o.$slots, t, H(J(j ?? {})))
92
93
  ])
93
94
  }))
94
95
  ]), 1040)
@@ -98,7 +99,7 @@ const ae = { class: "dialog-footer" }, ve = /* @__PURE__ */ q({
98
99
  l.value.showCancelButton || l.value.showConfirmButton ? {
99
100
  name: "footer",
100
101
  fn: n(() => [
101
- Q("div", ae, [
102
+ Q("div", ne, [
102
103
  l.value.showCancelButton ? (p(), f(r(E), v({ key: 0 }, l.value.cancelButtonProps, {
103
104
  onClick: e[3] || (e[3] = (t) => r(i)("cancel"))
104
105
  }), {
@@ -111,7 +112,7 @@ const ae = { class: "dialog-footer" }, ve = /* @__PURE__ */ q({
111
112
  key: 1,
112
113
  type: "primary"
113
114
  }, l.value.confirmButtonProps, {
114
- loading: r(j),
115
+ loading: r(O),
115
116
  onClick: r(h)
116
117
  }), {
117
118
  default: n(() => [
@@ -127,5 +128,5 @@ const ae = { class: "dialog-footer" }, ve = /* @__PURE__ */ q({
127
128
  }
128
129
  });
129
130
  export {
130
- ve as default
131
+ ye as default
131
132
  };
@@ -6,8 +6,8 @@ function l(o, r = null) {
6
6
  return m(
7
7
  t,
8
8
  {
9
- ...o,
10
- is: n(i)
9
+ is: n(i),
10
+ props: o
11
11
  },
12
12
  {
13
13
  appContext: r,
@@ -696,7 +696,7 @@ export declare const VroElSchemaFormDrawer: import('@vrojs/base').WithInstall<{
696
696
  onCloseAutoFocus?: (() => any) | undefined;
697
697
  "onResize-start"?: ((evt: MouseEvent, size: number) => any) | undefined;
698
698
  "onResize-end"?: ((evt: MouseEvent, size: number) => any) | undefined;
699
- }>, "title" | "size" | "ariaLevel" | "appendTo" | "transition" | "direction" | "closeOnPressEscape" | "draggable" | "handleClose" | "closeOnClickModal" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "overflow" | "showClose" | "withHeader" | "modalFade"> & import('vue').ShallowUnwrapRef<{
699
+ }>, "title" | "size" | "ariaLevel" | "appendTo" | "transition" | "closeOnClickModal" | "closeOnPressEscape" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "draggable" | "overflow" | "showClose" | "handleClose" | "direction" | "withHeader" | "modalFade"> & import('vue').ShallowUnwrapRef<{
700
700
  handleClose: () => void;
701
701
  }> & {} & import('vue').ComponentCustomProperties & {} & {
702
702
  $slots: {
@@ -164,7 +164,7 @@ declare function __VLS_template(): {
164
164
  onCloseAutoFocus?: (() => any) | undefined;
165
165
  "onResize-start"?: ((evt: MouseEvent, size: number) => any) | undefined;
166
166
  "onResize-end"?: ((evt: MouseEvent, size: number) => any) | undefined;
167
- }>, "title" | "size" | "ariaLevel" | "appendTo" | "transition" | "direction" | "closeOnPressEscape" | "draggable" | "handleClose" | "closeOnClickModal" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "overflow" | "showClose" | "withHeader" | "modalFade"> & import('vue').ShallowUnwrapRef<{
167
+ }>, "title" | "size" | "ariaLevel" | "appendTo" | "transition" | "closeOnClickModal" | "closeOnPressEscape" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "draggable" | "overflow" | "showClose" | "handleClose" | "direction" | "withHeader" | "modalFade"> & import('vue').ShallowUnwrapRef<{
168
168
  handleClose: () => void;
169
169
  }> & {} & import('vue').ComponentCustomProperties & {} & {
170
170
  $slots: {
@@ -1380,7 +1380,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
1380
1380
  onCloseAutoFocus?: (() => any) | undefined;
1381
1381
  "onResize-start"?: ((evt: MouseEvent, size: number) => any) | undefined;
1382
1382
  "onResize-end"?: ((evt: MouseEvent, size: number) => any) | undefined;
1383
- }>, "title" | "size" | "ariaLevel" | "appendTo" | "transition" | "direction" | "closeOnPressEscape" | "draggable" | "handleClose" | "closeOnClickModal" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "overflow" | "showClose" | "withHeader" | "modalFade"> & import('vue').ShallowUnwrapRef<{
1383
+ }>, "title" | "size" | "ariaLevel" | "appendTo" | "transition" | "closeOnClickModal" | "closeOnPressEscape" | "lockScroll" | "modal" | "openDelay" | "closeDelay" | "headerAriaLevel" | "alignCenter" | "draggable" | "overflow" | "showClose" | "handleClose" | "direction" | "withHeader" | "modalFade"> & import('vue').ShallowUnwrapRef<{
1384
1384
  handleClose: () => void;
1385
1385
  }> & {} & import('vue').ComponentCustomProperties & {} & {
1386
1386
  $slots: {
@@ -223,12 +223,12 @@ export declare const VroElSelect: import('@vrojs/base').WithInstall<import('vue'
223
223
  popperOptions: Partial<import('element-plus').Options>;
224
224
  showArrow: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
225
225
  teleported: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
226
+ valueOnClear: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | ((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | null)[], unknown, unknown>;
226
227
  labelKey: string;
227
228
  valueKey: string;
228
229
  validateEvent: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
229
230
  tabindex: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>;
230
231
  multiple: boolean;
231
- valueOnClear: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | ((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | null)[], unknown, unknown>;
232
232
  autocomplete: string;
233
233
  automaticDropdown: boolean;
234
234
  clearable: boolean;
@@ -222,12 +222,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
222
222
  popperOptions: Partial<import('element-plus').Options>;
223
223
  showArrow: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
224
224
  teleported: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
225
+ valueOnClear: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | ((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | null)[], unknown, unknown>;
225
226
  labelKey: string;
226
227
  valueKey: string;
227
228
  validateEvent: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
228
229
  tabindex: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>;
229
230
  multiple: boolean;
230
- valueOnClear: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | ((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | null)[], unknown, unknown>;
231
231
  autocomplete: string;
232
232
  automaticDropdown: boolean;
233
233
  clearable: boolean;
@@ -1,5 +1,55 @@
1
1
  export * from './types';
2
- export declare const VroElWithConfig: import('@vrojs/base').WithInstall<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ export declare const VroElWithConfig: import('@vrojs/base').WithInstall<{
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
4
+ elConfigProps: {
5
+ type: import('vue').PropType<Partial<import('element-plus').ConfigProviderProps>>;
6
+ default: () => {};
7
+ };
8
+ vroConfigProps: {
9
+ type: import('vue').PropType<Partial<import('..').VroElConfigProviderProps>>;
10
+ default: () => {};
11
+ };
12
+ is: import('vue').PropType<string | import('vue').Component>;
13
+ props: {
14
+ type: import('vue').PropType<Record<string, any>>;
15
+ default: () => {};
16
+ };
17
+ }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
18
+ props: Record<string, any>;
19
+ elConfigProps: Partial<import('element-plus').ConfigProviderProps>;
20
+ vroConfigProps: Partial<import('..').VroElConfigProviderProps>;
21
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
22
+ refComponent: unknown;
23
+ }, any, import('vue').ComponentProvideOptions, {
24
+ P: {};
25
+ B: {};
26
+ D: {};
27
+ C: {};
28
+ M: {};
29
+ Defaults: {};
30
+ }, Readonly<import('vue').ExtractPropTypes<{
31
+ elConfigProps: {
32
+ type: import('vue').PropType<Partial<import('element-plus').ConfigProviderProps>>;
33
+ default: () => {};
34
+ };
35
+ vroConfigProps: {
36
+ type: import('vue').PropType<Partial<import('..').VroElConfigProviderProps>>;
37
+ default: () => {};
38
+ };
39
+ is: import('vue').PropType<string | import('vue').Component>;
40
+ props: {
41
+ type: import('vue').PropType<Record<string, any>>;
42
+ default: () => {};
43
+ };
44
+ }>> & Readonly<{}>, {}, {}, {}, {}, {
45
+ props: Record<string, any>;
46
+ elConfigProps: Partial<import('element-plus').ConfigProviderProps>;
47
+ vroConfigProps: Partial<import('..').VroElConfigProviderProps>;
48
+ }>;
49
+ __isFragment?: never;
50
+ __isTeleport?: never;
51
+ __isSuspense?: never;
52
+ } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
3
53
  elConfigProps: {
4
54
  type: import('vue').PropType<Partial<import('element-plus').ConfigProviderProps>>;
5
55
  default: () => {};
@@ -9,20 +59,17 @@ export declare const VroElWithConfig: import('@vrojs/base').WithInstall<import('
9
59
  default: () => {};
10
60
  };
11
61
  is: import('vue').PropType<string | import('vue').Component>;
12
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
13
- elConfigProps: {
14
- type: import('vue').PropType<Partial<import('element-plus').ConfigProviderProps>>;
62
+ props: {
63
+ type: import('vue').PropType<Record<string, any>>;
15
64
  default: () => {};
16
65
  };
17
- vroConfigProps: {
18
- type: import('vue').PropType<Partial<import('..').VroElConfigProviderProps>>;
19
- default: () => {};
20
- };
21
- is: import('vue').PropType<string | import('vue').Component>;
22
- }>> & Readonly<{}>, {
66
+ }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
67
+ props: Record<string, any>;
23
68
  elConfigProps: Partial<import('element-plus').ConfigProviderProps>;
24
69
  vroConfigProps: Partial<import('..').VroElConfigProviderProps>;
25
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
70
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
71
+ $slots: any;
72
+ })>;
26
73
  export default VroElWithConfig;
27
74
  export type VroElWithConfigInstance = InstanceType<typeof VroElWithConfig>;
28
75
  declare module 'vue' {
@@ -11,5 +11,12 @@ export declare const vroElWithConfigProps: {
11
11
  default: () => {};
12
12
  };
13
13
  is: PropType<string | Component>;
14
+ /**
15
+ * 透传给 is 对应组件的 props。顶层 attrs 仍会透传,用于兼容旧写法和事件监听。
16
+ */
17
+ props: {
18
+ type: PropType<Record<string, any>>;
19
+ default: () => {};
20
+ };
14
21
  };
15
22
  export type VroElWithConfigProps = ExtractPropTypes<typeof vroElWithConfigProps>;
@@ -7,7 +7,14 @@ const t = {
7
7
  type: Object,
8
8
  default: () => ({})
9
9
  },
10
- is: [String, Object]
10
+ is: [String, Object],
11
+ /**
12
+ * 透传给 is 对应组件的 props。顶层 attrs 仍会透传,用于兼容旧写法和事件监听。
13
+ */
14
+ props: {
15
+ type: Object,
16
+ default: () => ({})
17
+ }
11
18
  };
12
19
  export {
13
20
  t as vroElWithConfigProps
@@ -1,4 +1,13 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: any;
4
+ refs: {
5
+ refComponent: unknown;
6
+ };
7
+ rootEl: any;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
11
  elConfigProps: {
3
12
  type: import('vue').PropType<Partial<import('element-plus').ConfigProviderProps>>;
4
13
  default: () => {};
@@ -8,6 +17,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
8
17
  default: () => {};
9
18
  };
10
19
  is: import('vue').PropType<string | import('vue').Component>;
20
+ props: {
21
+ type: import('vue').PropType<Record<string, any>>;
22
+ default: () => {};
23
+ };
11
24
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
12
25
  elConfigProps: {
13
26
  type: import('vue').PropType<Partial<import('element-plus').ConfigProviderProps>>;
@@ -18,8 +31,21 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
18
31
  default: () => {};
19
32
  };
20
33
  is: import('vue').PropType<string | import('vue').Component>;
34
+ props: {
35
+ type: import('vue').PropType<Record<string, any>>;
36
+ default: () => {};
37
+ };
21
38
  }>> & Readonly<{}>, {
39
+ props: Record<string, any>;
22
40
  elConfigProps: Partial<import('element-plus').ConfigProviderProps>;
23
41
  vroConfigProps: Partial<import('..').VroElConfigProviderProps>;
24
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
42
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
43
+ refComponent: unknown;
44
+ }, any>;
45
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
46
  export default _default;
47
+ type __VLS_WithTemplateSlots<T, S> = T & {
48
+ new (): {
49
+ $slots: S;
50
+ };
51
+ };