@vrojs/element-plus 0.0.23 → 0.0.24

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.
@@ -1,15 +1,10 @@
1
- import { DescriptionProps } from 'element-plus';
2
1
  import { VroElSchemaFormDialogProps } from '../vro-el-schema-form-dialog';
3
- import { VroElSchemaDescsSchema } from './types';
4
- export interface VroElSchemaDescsDialogOptions {
2
+ import { VroElSchemaDescsProps, VroElSchemaDescsSchema } from './types';
3
+ export interface VroElSchemaDescsDialogOptions extends Partial<Omit<VroElSchemaDescsProps, 'schema' | 'data'>> {
5
4
  /**
6
5
  * 透传给 VroElSchemaFormDialog 的属性,不包含 schema。
7
6
  */
8
7
  dialogProps?: Partial<Omit<VroElSchemaFormDialogProps, 'schema'>>;
9
- /**
10
- * 透传给 VroElSchemaDescs 的属性。
11
- */
12
- descProps?: Partial<DescriptionProps>;
13
8
  }
14
9
  export type VroElSchemaDescsDialog<T = any> = (data: T, options?: VroElSchemaDescsDialogOptions) => Promise<any>;
15
10
  export declare function createVroElSchemaDescsDialog<T = any>(schema: VroElSchemaDescsSchema<T> | ((data: T) => VroElSchemaDescsSchema<T>), options?: VroElSchemaDescsDialogOptions): VroElSchemaDescsDialog<T>;
@@ -1,29 +1,35 @@
1
- import { markRaw as a } from "vue";
1
+ import { markRaw as i } from "vue";
2
2
  import "../vro-el-config-provider/index.js";
3
3
  import "../vro-el-schema-form-dialog/index.js";
4
4
  import l from "./vro-el-schema-descs.vue.js";
5
- import { showVroElSchemaFormDialog as m } from "../vro-el-schema-form-dialog/function-call.js";
6
- import { useVroElGlobalConfig as i } from "../vro-el-config-provider/config.js";
7
- const n = a(l), p = () => {
8
- const { el: r } = i().value.locale, o = r.schemaDescs?.closeText;
5
+ import { showVroElSchemaFormDialog as p } from "../vro-el-schema-form-dialog/function-call.js";
6
+ import { useVroElGlobalConfig as n } from "../vro-el-config-provider/config.js";
7
+ const P = i(l), d = () => {
8
+ const { el: e } = n().value.locale, o = e.schemaDescs?.closeText;
9
9
  return typeof o == "string" ? o : void 0;
10
10
  };
11
- function x(r, o = {}) {
12
- return (s, e = {}) => {
13
- const t = { ...o.dialogProps, ...e.dialogProps }, c = { ...o.descProps, ...e.descProps };
14
- return m({
11
+ function w(e, o = {}) {
12
+ return (s, r = {}) => {
13
+ const { dialogProps: t, descProps: c, itemProps: a, ...m } = Object.assign({}, o, r, {
14
+ dialogProps: { ...o.dialogProps, ...r.dialogProps },
15
+ descProps: { ...o.descProps, ...r.descProps },
16
+ itemProps: { ...o.itemProps, ...r.itemProps }
17
+ });
18
+ return p({
15
19
  // 详情场景默认只读,需要确认按钮时通过 dialogProps 打开
16
20
  showConfirmButton: !1,
17
- cancelButtonText: p(),
21
+ cancelButtonText: d(),
18
22
  ...t,
19
23
  // 内部 schema 放在最后,避免被 dialogProps 覆盖
20
24
  schema: {
21
25
  details: {
22
- is: n,
26
+ is: P,
23
27
  props: {
28
+ ...m,
24
29
  data: s,
25
- schema: r,
26
- descProps: c
30
+ schema: e,
31
+ descProps: c,
32
+ itemProps: a
27
33
  }
28
34
  }
29
35
  }
@@ -31,5 +37,5 @@ function x(r, o = {}) {
31
37
  };
32
38
  }
33
39
  export {
34
- x as createVroElSchemaDescsDialog
40
+ w as createVroElSchemaDescsDialog
35
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vrojs/element-plus",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "vrojs ui",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",