@das-fed/upf-ui 6.4.0-dev.163 → 6.4.0-dev.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-ui",
3
- "version": "6.4.0-dev.163",
3
+ "version": "6.4.0-dev.164",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -26,7 +26,7 @@
26
26
  "@antv/x6-plugin-snapline": "^2.1.7",
27
27
  "@antv/x6-plugin-transform": "^2.1.8",
28
28
  "@antv/x6-vue-shape": "^2.1.2",
29
- "@das-fed/upf-ui": "6.4.0-dev.163",
29
+ "@das-fed/upf-ui": "6.4.0-dev.164",
30
30
  "@element-plus/icons-vue": "^2.3.1",
31
31
  "@types/lodash": "^4.14.194",
32
32
  "@types/lodash-es": "^4.17.9",
@@ -56,9 +56,9 @@
56
56
  "vue-tsc": "^2.0.29"
57
57
  },
58
58
  "dependencies": {
59
- "@das-fed/upf-cli": "6.4.0-dev.163",
60
- "@das-fed/upf-utils": "6.4.0-dev.163",
61
- "@das-fed/upf-web": "6.4.0-dev.163",
59
+ "@das-fed/upf-cli": "6.4.0-dev.164",
60
+ "@das-fed/upf-utils": "6.4.0-dev.164",
61
+ "@das-fed/upf-web": "6.4.0-dev.164",
62
62
  "@types/markdown-it": "^14.1.2",
63
63
  "@wangeditor-next/editor": "5.6.31",
64
64
  "@wangeditor-next/editor-for-vue": "5.1.14",
@@ -7,6 +7,7 @@ export declare const useChangePwd: (props: Props, emit: Emits) => {
7
7
  $data: {};
8
8
  $props: {
9
9
  readonly labelLength?: number | string | undefined;
10
+ readonly labelWidth?: number | string | undefined;
10
11
  readonly contentWidth?: number | string | undefined;
11
12
  readonly labelPosition?: "left" | "right" | "top" | undefined;
12
13
  readonly alignType?: "vertical" | "horizontal" | undefined;
@@ -100,6 +101,7 @@ export declare const useChangePwd: (props: Props, emit: Emits) => {
100
101
  $data: {};
101
102
  $props: {
102
103
  readonly labelLength?: number | string | undefined;
104
+ readonly labelWidth?: number | string | undefined;
103
105
  readonly contentWidth?: number | string | undefined;
104
106
  readonly labelPosition?: "left" | "right" | "top" | undefined;
105
107
  readonly alignType?: "vertical" | "horizontal" | undefined;
@@ -8,6 +8,7 @@ export declare const useForm: (props: any, emits: any, store: any) => {
8
8
  $data: {};
9
9
  $props: {
10
10
  readonly labelLength?: number | string | undefined;
11
+ readonly labelWidth?: number | string | undefined;
11
12
  readonly contentWidth?: number | string | undefined;
12
13
  readonly labelPosition?: "left" | "right" | "top" | undefined;
13
14
  readonly alignType?: "vertical" | "horizontal" | undefined;
@@ -101,6 +102,7 @@ export declare const useForm: (props: any, emits: any, store: any) => {
101
102
  $data: {};
102
103
  $props: {
103
104
  readonly labelLength?: number | string | undefined;
105
+ readonly labelWidth?: number | string | undefined;
104
106
  readonly contentWidth?: number | string | undefined;
105
107
  readonly labelPosition?: "left" | "right" | "top" | undefined;
106
108
  readonly alignType?: "vertical" | "horizontal" | undefined;
@@ -75,6 +75,7 @@ declare const DasFormRef: () => import("vue").Ref<({
75
75
  $data: {};
76
76
  $props: {
77
77
  readonly labelLength?: number | string | undefined;
78
+ readonly labelWidth?: number | string | undefined;
78
79
  readonly contentWidth?: number | string | undefined;
79
80
  readonly labelPosition?: "left" | "right" | "top" | undefined;
80
81
  readonly alignType?: "vertical" | "horizontal" | undefined;
@@ -168,6 +169,7 @@ declare const DasFormRef: () => import("vue").Ref<({
168
169
  $data: {};
169
170
  $props: {
170
171
  readonly labelLength?: number | string | undefined;
172
+ readonly labelWidth?: number | string | undefined;
171
173
  readonly contentWidth?: number | string | undefined;
172
174
  readonly labelPosition?: "left" | "right" | "top" | undefined;
173
175
  readonly alignType?: "vertical" | "horizontal" | undefined;
@@ -2,10 +2,11 @@ import '@das-fed/upf-ui/packages/components/form/style.css';
2
2
  import { defineComponent as I, ref as f, reactive as d, computed as r, provide as R, createElementBlock as x, openBlock as S, normalizeStyle as M, normalizeClass as z, renderSlot as B } from "vue";
3
3
  import { withInstall as $ } from "@das-fed/upf-utils/with-install/index";
4
4
  import "@das-fed/upf-ui/packages/global/theme";
5
- const k = /* @__PURE__ */ I({
5
+ const b = /* @__PURE__ */ I({
6
6
  __name: "Index",
7
7
  props: {
8
8
  labelLength: { default: 4 },
9
+ labelWidth: {},
9
10
  contentWidth: { default: 230 },
10
11
  labelPosition: { default: "top" },
11
12
  alignType: { default: "vertical" },
@@ -21,42 +22,42 @@ const k = /* @__PURE__ */ I({
21
22
  size: { default: "default" }
22
23
  },
23
24
  setup(o, { expose: s }) {
24
- const a = o, n = f();
25
- let l = d([]);
26
- const c = r(() => l.filter((e) => {
25
+ const l = o, n = f();
26
+ let a = d([]);
27
+ const c = r(() => a.filter((e) => {
27
28
  var t;
28
29
  return (t = e.formItemProps) == null ? void 0 : t.required;
29
- }).length > 0), m = r(() => l.filter((e) => {
30
+ }).length > 0), m = r(() => a.filter((e) => {
30
31
  var t;
31
32
  return (t = e.formItemProps) == null ? void 0 : t.helpMessage;
32
33
  }).length > 0);
33
- R("DasForm", d({ props: a, addField: (e) => {
34
- l.push(e);
34
+ R("DasForm", d({ props: l, addField: (e) => {
35
+ a.push(e);
35
36
  }, removeField: (e) => {
36
- l = l.filter((t) => t.timeStamp !== e.timeStamp);
37
+ a = a.filter((t) => t.timeStamp !== e.timeStamp);
37
38
  }, hasRequiredFormItem: c, hasHelpMessageFormItem: m }));
38
39
  const u = async (e) => {
39
40
  const t = await g();
40
41
  e(t);
41
42
  }, p = async (e, t) => {
42
- const _ = await l.find((i) => i.propName === e && i.rules.length > 0).validate();
43
+ const _ = await a.find((i) => i.propName === e && i.rules.length > 0).validate();
43
44
  t(_);
44
45
  }, g = async () => {
45
46
  let e = !0;
46
- for (const t of l)
47
+ for (const t of a)
47
48
  t.propName && t.rules.length > 0 && (await t.validate() || (e = !1));
48
49
  return e;
49
50
  }, h = () => {
50
- l.forEach((e) => {
51
+ a.forEach((e) => {
51
52
  e.resetError();
52
53
  });
53
54
  }, v = r(() => ({
54
55
  display: "grid",
55
- gridTemplateColumns: `repeat(${a.cols}, ${a.contentWidth && a.contentWidth !== "auto" ? "min-content" : "1fr"})`,
56
- gridColumnGap: a.cols && a.autoMarginRight ? a.marginRight : void 0
56
+ gridTemplateColumns: `repeat(${l.cols}, ${l.contentWidth && l.contentWidth !== "auto" ? "min-content" : "1fr"})`,
57
+ gridColumnGap: l.cols && l.autoMarginRight ? l.marginRight : void 0
57
58
  })), y = r(() => ({
58
- alignItems: a.alignItems,
59
- ...a.cols && a.alignType === "vertical" ? v.value : {}
59
+ alignItems: l.alignItems,
60
+ ...l.cols && l.alignType === "vertical" ? v.value : {}
60
61
  }));
61
62
  return s({
62
63
  validate: u,
@@ -71,14 +72,14 @@ const k = /* @__PURE__ */ I({
71
72
  B(e.$slots, "default", {}, void 0, !0)
72
73
  ], 6));
73
74
  }
74
- }), w = (o, s) => {
75
- const a = o.__vccOpts || o;
76
- for (const [n, l] of s)
77
- a[n] = l;
78
- return a;
79
- }, C = /* @__PURE__ */ w(k, [["__scopeId", "data-v-e455d465"]]), W = $(C), q = () => f(null);
75
+ }), k = (o, s) => {
76
+ const l = o.__vccOpts || o;
77
+ for (const [n, a] of s)
78
+ l[n] = a;
79
+ return l;
80
+ }, w = /* @__PURE__ */ k(b, [["__scopeId", "data-v-e455d465"]]), P = $(w), q = () => f(null);
80
81
  export {
81
- W as DasForm,
82
+ P as DasForm,
82
83
  q as DasFormRef,
83
- W as default
84
+ P as default
84
85
  };
@@ -1,6 +1,8 @@
1
1
  export interface Props {
2
2
 
3
3
  labelLength?: number | string
4
+
5
+ labelWidth?: number | string
4
6
 
5
7
 
6
8
  contentWidth?: number | string