@wfrog/vc-ui 1.9.6 → 1.9.7

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.
@@ -140,15 +140,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
140
140
  }
141
141
  });
142
142
 
143
- /* unplugin-vue-components disabled */const header = "_header_1gcms_8";
144
- const icon = "_icon_1gcms_25";
145
- const actions = "_actions_1gcms_31";
146
- const form = "_form_1gcms_40";
147
- const scrollbar = "_scrollbar_1gcms_49";
143
+ /* unplugin-vue-components disabled */const header = "_header_sydsj_8";
144
+ const icon = "_icon_sydsj_25";
145
+ const actions = "_actions_sydsj_31";
146
+ const form = "_form_sydsj_40";
147
+ const scrollbar = "_scrollbar_sydsj_50";
148
148
  const style0 = {
149
- "explorer-form": "_explorer-form_1gcms_1",
149
+ "explorer-form": "_explorer-form_sydsj_1",
150
150
  header: header,
151
- "header-container": "_header-container_1gcms_21",
151
+ "header-container": "_header-container_sydsj_21",
152
152
  icon: icon,
153
153
  actions: actions,
154
154
  form: form,
@@ -1,11 +1,11 @@
1
1
  /* source: src/components/explorer-form/explorer-form.vue */
2
- ._explorer-form_1gcms_1 {
2
+ ._explorer-form_sydsj_1 {
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  flex-grow: 1;
6
6
  height: 100px;
7
7
  }
8
- ._header_1gcms_8 {
8
+ ._header_sydsj_8 {
9
9
  display: flex;
10
10
  align-items: center;
11
11
  justify-content: space-between;
@@ -17,30 +17,31 @@
17
17
  flex-wrap: wrap;
18
18
  row-gap: 8px;
19
19
  }
20
- ._header-container_1gcms_21 {
20
+ ._header-container_sydsj_21 {
21
21
  font-size: var(--el-font-size-medium);
22
22
  }
23
- ._icon_1gcms_25 {
23
+ ._icon_sydsj_25 {
24
24
  margin-right: 4px;
25
25
  font-size: var(--el-font-size-extra-large);
26
26
  transform: translateY(1px);
27
27
  }
28
- ._actions_1gcms_31 {
28
+ ._actions_sydsj_31 {
29
29
  display: flex;
30
30
  align-items: center;
31
31
  gap: 8px;
32
32
  }
33
- ._actions_1gcms_31 .el-button {
33
+ ._actions_sydsj_31 .el-button {
34
34
  margin-left: 0 !important;
35
35
  }
36
- ._form_1gcms_40 {
36
+ ._form_sydsj_40 {
37
37
  display: flex;
38
38
  flex-grow: 1;
39
39
  align-items: flex-start;
40
40
  }
41
- ._form_1gcms_40 > .el-row {
41
+ ._form_sydsj_40 > .el-row {
42
42
  flex-grow: 1;
43
+ margin: 0 !important;
43
44
  }
44
- ._scrollbar_1gcms_49 {
45
+ ._scrollbar_sydsj_50 {
45
46
  margin: 0 -8px;
46
47
  }
@@ -1,8 +1,8 @@
1
1
  import './index.css'
2
2
  import '../../chunk/Gk1J52Yw.mjs';
3
3
  import { v as vLoading } from '../../chunk/D-1mFPUH.mjs';
4
- import { E as ElForm } from '../../chunk/78BvQgmt.mjs';
5
- import { defineComponent, useTemplateRef, ref, computed, watch, nextTick, onUnmounted, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, isRef, withCtx, withDirectives, renderSlot, createCommentVNode, createTextVNode, createElementVNode, normalizeClass, toDisplayString } from 'vue';
4
+ import { defineComponent, useTemplateRef, shallowRef, ref, computed, watch, onUnmounted, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, isRef, withCtx, withDirectives, renderSlot, createCommentVNode, createTextVNode, createElementVNode, normalizeClass, toDisplayString } from 'vue';
5
+ import { ElForm } from 'element-plus';
6
6
  import { C as Component$3 } from '../button/button.mjs';
7
7
  import { C as Component$1 } from '../dialog/dialog.mjs';
8
8
  import { C as Component$2 } from '../drawer/drawer.mjs';
@@ -31,6 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
31
  const emits = __emit;
32
32
  const modalVisible = useVModel(props, "modelValue", emits);
33
33
  const formRef = useTemplateRef("formRef");
34
+ const formComponent = shallowRef(ElForm);
34
35
  const isEditing = ref(false);
35
36
  const component = computed(() => props.type === "dialog" ? Component$1 : Component$2);
36
37
  const modalTitle = computed(() => props.title || (props.form.fields.id ? "编辑" : "新增"));
@@ -49,31 +50,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
50
  isEditing.value = true;
50
51
  emits("edit");
51
52
  }
52
- function fixLabelPosition() {
53
- const formItems = formRef.value?.$el.querySelectorAll(".el-form-item");
54
- if (!formItems) {
55
- return;
56
- }
57
- if (props.labelPosition === "top") {
58
- formItems.forEach((formItem) => formItem.classList.add("el-form-item--label-top"));
59
- }
60
- if (props.labelPosition === "right") {
61
- formItems.forEach((formItem) => formItem.classList.add("el-form-item--label-right"));
62
- }
63
- }
64
53
  const visibleWatch = watch(modalVisible, (val) => {
65
54
  if (!val) {
66
55
  return;
67
56
  }
68
57
  isEditing.value = props.editing ?? true;
69
- nextTick(() => fixLabelPosition());
70
58
  }, { immediate: true });
71
- __expose({ formRef, fixLabelPosition });
59
+ __expose({ formRef });
72
60
  onUnmounted(() => {
73
61
  visibleWatch.stop();
74
62
  });
75
63
  return (_ctx, _cache) => {
76
- const _component_ElForm = ElForm;
77
64
  const _directive_loading = vLoading;
78
65
  return openBlock(), createBlock(resolveDynamicComponent(unref(component)), mergeProps({
79
66
  modelValue: unref(modalVisible),
@@ -132,7 +119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
132
119
  }, 8, ["loading"])) : createCommentVNode("", true)
133
120
  ]),
134
121
  default: withCtx(() => [
135
- withDirectives((openBlock(), createBlock(_component_ElForm, mergeProps({
122
+ withDirectives((openBlock(), createBlock(resolveDynamicComponent(unref(formComponent)), mergeProps({
136
123
  ref_key: "formRef",
137
124
  ref: formRef,
138
125
  "require-asterisk-position": "right",
@@ -157,8 +144,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
157
144
  }
158
145
  });
159
146
 
160
- /* unplugin-vue-components disabled */const icon = "_icon_1g5hj_1";
161
- const form = "_form_1g5hj_6";
147
+ /* unplugin-vue-components disabled */const icon = "_icon_1nnr8_1";
148
+ const form = "_form_1nnr8_6";
162
149
  const style0 = {
163
150
  icon: icon,
164
151
  form: form
@@ -1,5 +1,4 @@
1
1
  import { IExplorerModalFormProps } from './explorer-modal-form';
2
- declare function fixLabelPosition(): void;
3
2
  declare function __VLS_template(): {
4
3
  attrs: Partial<{}>;
5
4
  slots: {
@@ -377,7 +376,6 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerModalFormP
377
376
  default?: (props: {}) => any;
378
377
  };
379
378
  }) | null>>;
380
- fixLabelPosition: typeof fixLabelPosition;
381
379
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
382
380
  cancel: () => any;
383
381
  "update:modelValue": (value: boolean) => any;
@@ -1,13 +1,14 @@
1
1
  /* source: src/components/explorer-modal-form/explorer-modal-form.vue */
2
- ._icon_1g5hj_1 {
2
+ ._icon_1nnr8_1 {
3
3
  margin-right: 4px;
4
4
  font-size: var(--el-font-size-extra-large);
5
5
  }
6
- ._form_1g5hj_6 {
6
+ ._form_1nnr8_6 {
7
7
  display: flex;
8
8
  flex-grow: 1;
9
9
  align-items: flex-start;
10
10
  }
11
- ._form_1g5hj_6 > .el-row {
11
+ ._form_1nnr8_6 > .el-row {
12
12
  flex-grow: 1;
13
+ margin: 0 !important;
13
14
  }