hy-dispatch-ui-v3 0.2.33 → 0.2.34

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 (75) hide show
  1. package/dist/tailwind.css +20 -8
  2. package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +1 -1
  3. package/es/components/hyAudioPlayer/js/index.mjs +1 -1
  4. package/es/components/hyButton/button.vue.mjs +49 -34
  5. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -1
  6. package/es/components/hyConfirmDialog/confirmMethod.mjs +1 -1
  7. package/es/components/hyConfirmDialog/index.mjs +1 -1
  8. package/es/components/hyCutter/cutter.vue.mjs +1 -1
  9. package/es/components/hyDatePicker/datePicker.vue.mjs +1 -1
  10. package/es/components/hyDialog/dialog.vue.mjs +178 -137
  11. package/es/components/hyDialog/style/dialog.scss +13 -0
  12. package/es/components/hyForm/cpns/formItem.vue.mjs +3 -4
  13. package/es/components/hyForm/js/useAppForm.mjs +1 -1
  14. package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
  15. package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
  16. package/es/components/hyOrgCascader/orgCascader.vue.mjs +1 -1
  17. package/es/components/hySearch/cpns/searchItem.vue.mjs +3 -9
  18. package/es/components/hySearch/js/index.mjs +4 -4
  19. package/es/components/hySearch/style/search.scss +1 -0
  20. package/es/components/hyTable/cpns/columnSelect.vue.mjs +39 -42
  21. package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +5 -8
  22. package/es/components/hyTable/cpns/headerItem.vue.mjs +1 -1
  23. package/es/components/hyTable/cpns/virtualTable.vue.mjs +6 -10
  24. package/es/components/hyTable/js/index.mjs +1 -1
  25. package/es/components/hyTable/js/useAppTable.mjs +1 -1
  26. package/es/components/hyTable/style/table.scss +13 -0
  27. package/es/components/hyTable/table.vue.mjs +22 -18
  28. package/es/components/hyTableForm/js/useAppTableForm.mjs +1 -1
  29. package/es/components/hyTableForm/tableForm.vue.mjs +3 -3
  30. package/es/components/hyTooltip/tooltip.vue.mjs +4 -4
  31. package/es/components/hyTree/style/index.css +1 -0
  32. package/es/components/hyTree/tree.vue.mjs +2 -0
  33. package/es/components/hyUserAvatar/userAvatar.vue.mjs +2 -2
  34. package/es/components/hyVideoPlayer/js/index.mjs +1 -1
  35. package/es/locale/en.mjs +1 -1
  36. package/es/locale/zh_CN.mjs +1 -1
  37. package/es/style/element/hy-element.scss +3 -2
  38. package/es/version.mjs +1 -1
  39. package/lib/components/hyAudioPlayer/js/index.js +1 -1
  40. package/lib/components/hyButton/button.vue.js +49 -34
  41. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +1 -1
  42. package/lib/components/hyConfirmDialog/confirmMethod.js +1 -1
  43. package/lib/components/hyConfirmDialog/index.js +1 -1
  44. package/lib/components/hyCutter/cutter.vue.js +1 -1
  45. package/lib/components/hyDatePicker/datePicker.vue.js +1 -1
  46. package/lib/components/hyDialog/dialog.vue.js +177 -136
  47. package/lib/components/hyDialog/style/dialog.scss +13 -0
  48. package/lib/components/hyForm/cpns/formItem.vue.js +3 -4
  49. package/lib/components/hyForm/js/useAppForm.js +1 -1
  50. package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
  51. package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
  52. package/lib/components/hyOrgCascader/orgCascader.vue.js +1 -1
  53. package/lib/components/hySearch/cpns/searchItem.vue.js +3 -9
  54. package/lib/components/hySearch/js/index.js +4 -4
  55. package/lib/components/hySearch/style/search.scss +1 -0
  56. package/lib/components/hyTable/cpns/columnSelect.vue.js +43 -46
  57. package/lib/components/hyTable/cpns/columnSelectItem.vue.js +4 -7
  58. package/lib/components/hyTable/cpns/headerItem.vue.js +1 -1
  59. package/lib/components/hyTable/cpns/virtualTable.vue.js +6 -10
  60. package/lib/components/hyTable/js/index.js +1 -1
  61. package/lib/components/hyTable/js/useAppTable.js +1 -1
  62. package/lib/components/hyTable/style/table.scss +13 -0
  63. package/lib/components/hyTable/table.vue.js +21 -17
  64. package/lib/components/hyTableForm/js/useAppTableForm.js +1 -1
  65. package/lib/components/hyTableForm/tableForm.vue.js +3 -3
  66. package/lib/components/hyTooltip/tooltip.vue.js +4 -4
  67. package/lib/components/hyTree/style/index.css +1 -0
  68. package/lib/components/hyTree/tree.vue.js +2 -0
  69. package/lib/components/hyUserAvatar/userAvatar.vue.js +2 -2
  70. package/lib/components/hyVideoPlayer/js/index.js +1 -1
  71. package/lib/locale/en.js +1 -1
  72. package/lib/locale/zh_CN.js +1 -1
  73. package/lib/style/element/hy-element.scss +3 -2
  74. package/lib/version.js +1 -1
  75. package/package.json +1 -1
package/dist/tailwind.css CHANGED
@@ -224,10 +224,6 @@
224
224
  right: 0.75rem;
225
225
  }
226
226
 
227
- .right-4 {
228
- right: 1rem;
229
- }
230
-
231
227
  .top-0 {
232
228
  top: 0px;
233
229
  }
@@ -484,6 +480,10 @@
484
480
  height: 0.375rem;
485
481
  }
486
482
 
483
+ .h-2\.5 {
484
+ height: 0.625rem;
485
+ }
486
+
487
487
  .h-3 {
488
488
  height: 0.75rem;
489
489
  }
@@ -959,10 +959,6 @@
959
959
  background-color: rgb(61 98 134 / var(--tw-bg-opacity, 1));
960
960
  }
961
961
 
962
- .bg-\[rgba\(var\(--hy-background-2\)\2c 0\.5\)\] {
963
- background-color: rgba(var(--hy-background-2),0.5);
964
- }
965
-
966
962
  .bg-\[rgba\(var\(--hy-background-4\)\2c 0\.9\)\] {
967
963
  background-color: rgba(var(--hy-background-4),0.9);
968
964
  }
@@ -1330,6 +1326,18 @@
1330
1326
  outline-style: solid;
1331
1327
  }
1332
1328
 
1329
+ .outline-1 {
1330
+ outline-width: 1px;
1331
+ }
1332
+
1333
+ .outline-offset-0 {
1334
+ outline-offset: 0px;
1335
+ }
1336
+
1337
+ .outline-transparent {
1338
+ outline-color: transparent;
1339
+ }
1340
+
1333
1341
  .blur {
1334
1342
  --tw-blur: blur(8px);
1335
1343
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
@@ -1425,3 +1433,7 @@ menu {
1425
1433
  --tw-shadow-colored: 0px 0px 5px 0px var(--tw-shadow-color);
1426
1434
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1427
1435
  }
1436
+
1437
+ .hover\:outline-theme:hover {
1438
+ outline-color: rgb(var(--hy-theme), 1);
1439
+ }
@@ -1,4 +1,4 @@
1
- import { defineComponent, useTemplateRef, computed, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, unref, createVNode, createElementVNode, toDisplayString, withDirectives, vShow, createCommentVNode, createTextVNode, normalizeStyle, isRef, vModelText, withCtx, Fragment, renderList, createBlock } from 'vue';
1
+ import { useTemplateRef, computed, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, unref, createVNode, createElementVNode, toDisplayString, withDirectives, vShow, createCommentVNode, createTextVNode, normalizeStyle, isRef, vModelText, withCtx, Fragment, renderList, createBlock, defineComponent } from 'vue';
2
2
  import { ElPopover, ElSlider } from 'element-plus';
3
3
  import _sfc_main$1 from '../hyVideoPlayer/cpns/mediaLoading.vue.mjs';
4
4
  import { useAudioPlayer } from './js/index.mjs';
@@ -1,7 +1,7 @@
1
1
  import { ref, computed, nextTick } from 'vue';
2
2
  import { ElMessage } from 'element-plus';
3
- import { useAudioPlayerConfig } from '../../../hooks/useAudioPlayerConfig.mjs';
4
3
  import { useLocale } from '../../../hooks/useLocale.mjs';
4
+ import { useAudioPlayerConfig } from '../../../hooks/useAudioPlayerConfig.mjs';
5
5
  import { formatDuration } from '../../../utils/date.mjs';
6
6
 
7
7
  const useAudioPlayer = (hy) => {
@@ -1,6 +1,7 @@
1
- import { openBlock, createElementBlock, mergeProps, renderSlot, normalizeClass, createCommentVNode, createElementVNode, createBlock, unref, withCtx, createVNode, Fragment, defineComponent } from 'vue';
1
+ import { openBlock, createElementBlock, mergeProps, renderSlot, normalizeClass, createCommentVNode, createElementVNode, createVNode, unref, withCtx, createBlock, Fragment, defineComponent } from 'vue';
2
2
  import { ElIcon } from 'element-plus';
3
3
  import { Loading, ArrowDown } from '@element-plus/icons-vue';
4
+ import { HyTooltip } from '../hyTooltip/index.mjs';
4
5
  import { HyIcon } from '../hyIcon/index.mjs';
5
6
 
6
7
  import "./style/button.scss";
@@ -23,6 +24,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
23
24
  type: Boolean,
24
25
  default: false
25
26
  },
27
+ loadingTip: {
28
+ // 加载中气泡文本
29
+ type: String
30
+ },
26
31
  size: {
27
32
  type: String,
28
33
  size: "default"
@@ -112,39 +117,49 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
112
117
  },
113
118
  [
114
119
  createElementVNode("div", { class: "hy-button__text relative z-[1] w-full h-full flex items-center justify-center" }, [
115
- renderSlot(_ctx.$slots, "content", {}, () => [
116
- createElementVNode(
117
- "div",
118
- {
119
- class: normalizeClass(["flex items-center text-main", {
120
- "px-3": !__props.expand,
121
- "pl-3 pr-1.5": __props.expand
122
- }])
123
- },
124
- [
125
- !__props.loading ? renderSlot(_ctx.$slots, "svg", { key: 0 }, () => [
126
- __props.svgName ? (openBlock(), createBlock(unref(HyIcon), {
127
- key: 0,
128
- "svg-name": __props.svgName,
129
- "class-name": "!w-3 !h-3 text-main mr-2"
130
- }, null, 8, ["svg-name"])) : createCommentVNode("v-if", true)
131
- ]) : (openBlock(), createBlock(unref(ElIcon), {
132
- key: 1,
133
- color: "rgb(var(--hy-main))",
134
- class: "is-loading mr-2"
135
- }, {
136
- default: withCtx(() => [
137
- createVNode(unref(Loading))
138
- ]),
139
- _: 1
140
- /* STABLE */
141
- })),
142
- renderSlot(_ctx.$slots, "default")
143
- ],
144
- 2
145
- /* CLASS */
146
- )
147
- ]),
120
+ createVNode(unref(HyTooltip), {
121
+ "is-always": "",
122
+ disabled: !__props.loading || !__props.loadingTip,
123
+ content: __props.loadingTip
124
+ }, {
125
+ default: withCtx(() => [
126
+ renderSlot(_ctx.$slots, "content", {}, () => [
127
+ createElementVNode(
128
+ "div",
129
+ {
130
+ class: normalizeClass(["flex items-center text-main", {
131
+ "px-3": !__props.expand,
132
+ "pl-3 pr-1.5": __props.expand
133
+ }])
134
+ },
135
+ [
136
+ !__props.loading ? renderSlot(_ctx.$slots, "svg", {}, () => [
137
+ __props.svgName ? (openBlock(), createBlock(unref(HyIcon), {
138
+ key: 0,
139
+ "svg-name": __props.svgName,
140
+ "class-name": "!w-3 !h-3 text-main mr-2"
141
+ }, null, 8, ["svg-name"])) : createCommentVNode("v-if", true)
142
+ ], void 0, 0) : (openBlock(), createBlock(unref(ElIcon), {
143
+ key: 1,
144
+ color: "rgb(var(--hy-main))",
145
+ class: "is-loading mr-2"
146
+ }, {
147
+ default: withCtx(() => [
148
+ createVNode(unref(Loading))
149
+ ]),
150
+ _: 1
151
+ /* STABLE */
152
+ })),
153
+ renderSlot(_ctx.$slots, "default")
154
+ ],
155
+ 2
156
+ /* CLASS */
157
+ )
158
+ ])
159
+ ]),
160
+ _: 3
161
+ /* FORWARDED */
162
+ }, 8, ["disabled", "content"]),
148
163
  __props.expand ? (openBlock(), createElementBlock(
149
164
  Fragment,
150
165
  { key: 0 },
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, useModel, ref, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, createVNode, normalizeClass, toDisplayString, createElementBlock, createTextVNode, createCommentVNode, withModifiers, mergeModels } from 'vue';
2
2
  import { ElDialog, ElIcon } from 'element-plus';
3
3
  import { Warning, CircleClose } from '@element-plus/icons-vue';
4
- import { HyButton } from '../hyButton/index.mjs';
5
4
  import { useLocale } from '../../hooks/useLocale.mjs';
5
+ import { HyButton } from '../hyButton/index.mjs';
6
6
 
7
7
  const __default__ = defineComponent({
8
8
  name: "HyConfirmDialog"
@@ -1,9 +1,9 @@
1
1
  import { unref, createVNode, render } from 'vue';
2
2
  import { defaultAxios } from '../../hooks/useApi.mjs';
3
3
  import _sfc_main from './confirmDialog.vue.mjs';
4
+ import { useLocale } from '../../hooks/useLocale.mjs';
4
5
  import { useGlobalConfig } from '../../hooks/useGlobalConfig.mjs';
5
6
  import { HyConfigProvider } from '../hyConfigProvider/index.mjs';
6
- import { useLocale } from '../../hooks/useLocale.mjs';
7
7
 
8
8
  function appConfirmMethod(config) {
9
9
  let container = document.createDocumentFragment();
@@ -1,6 +1,6 @@
1
1
  import './confirmMethod.mjs';
2
- import _sfc_main from './confirmDialog.vue.mjs';
3
2
  import { withInstall } from '../../utils/handler.mjs';
3
+ import _sfc_main from './confirmDialog.vue.mjs';
4
4
 
5
5
  const HyConfirmDialog = withInstall(_sfc_main);
6
6
 
@@ -2,9 +2,9 @@ import { defineComponent, useModel, useTemplateRef, ref, computed, openBlock, cr
2
2
  import { VueCropper } from 'vue-cropper';
3
3
  import { ElUpload, ElImage, ElIcon, ElMessage } from 'element-plus';
4
4
  import { User, Delete } from '@element-plus/icons-vue';
5
+ import { useLocale } from '../../hooks/useLocale.mjs';
5
6
  import { blobToDataURL, sizeToTextHandler, fileUpload } from '../../utils/file.mjs';
6
7
  import { HyDialog } from '../hyDialog/index.mjs';
7
- import { useLocale } from '../../hooks/useLocale.mjs';
8
8
 
9
9
  import "vue-cropper/dist/index.css";
10
10
 
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, useTemplateRef, useModel, computed, watch, unref, openBlock, createBlock, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, mergeModels } from 'vue';
2
2
  import { ElDatePicker } from 'element-plus';
3
+ import { useLocale } from '../../hooks/useLocale.mjs';
3
4
  import { getDefaultValueFormatByType } from '../../utils/date.mjs';
4
5
  import { isArray } from '../../utils/is.mjs';
5
- import { useLocale } from '../../hooks/useLocale.mjs';
6
6
 
7
7
  import "./style/datePicker.scss";
8
8
 
@@ -1,4 +1,4 @@
1
- import { useModel, ref, computed, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, normalizeClass, renderSlot, createElementBlock, createTextVNode, toDisplayString, createCommentVNode, createVNode, mergeModels, defineComponent } from 'vue';
1
+ import { useModel, ref, openBlock, createElementBlock, Fragment, createCommentVNode, createVNode, unref, mergeProps, withCtx, createElementVNode, normalizeClass, renderSlot, createBlock, withModifiers, createTextVNode, toDisplayString, mergeModels, defineComponent } from 'vue';
2
2
  import { ElDialog } from 'element-plus';
3
3
  import { useLocale } from '../../hooks/useLocale.mjs';
4
4
  import { HyButton } from '../hyButton/index.mjs';
@@ -19,7 +19,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
19
19
  default: "default"
20
20
  // default-默认类型 right-右侧弹窗 fullscreen-全屏
21
21
  },
22
+ dialogClass: {
23
+ type: String,
24
+ default: "default"
25
+ },
26
+ zIndex: {
27
+ type: Number,
28
+ default: null
29
+ // default-默认类型 right-右侧弹窗 fullscreen-全屏
30
+ },
22
31
  top: String,
32
+ // 支持缩小化
33
+ showShrink: { type: Boolean, default: false },
23
34
  showOperate: { type: Boolean, default: true },
24
35
  showClose: { type: Boolean, default: true },
25
36
  showCancel: {
@@ -41,6 +52,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
41
52
  type: String,
42
53
  default: "primary"
43
54
  },
55
+ width: {
56
+ type: String,
57
+ default: () => {
58
+ return "1000px";
59
+ }
60
+ },
44
61
  submitText: {
45
62
  type: String
46
63
  },
@@ -51,37 +68,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
51
68
  "modelValue": { type: Boolean, default: false },
52
69
  "modelModifiers": {}
53
70
  }),
54
- emits: /* @__PURE__ */ mergeModels(["hide"], ["update:modelValue"]),
71
+ emits: /* @__PURE__ */ mergeModels(["onMinimized", "onDialogMousedown"], ["update:modelValue"]),
55
72
  setup(__props, { expose: __expose, emit: __emit }) {
56
73
  const props = __props;
57
74
  const emits = __emit;
58
75
  const { t } = useLocale();
59
76
  const visible = useModel(__props, "modelValue");
60
77
  const loading = ref(false);
61
- const dialogClass = computed(() => {
62
- if (["right", "fullscreen"].includes(props.dialogType)) {
63
- let value = "h-[calc(100vh-32px)] flex flex-col !my-4 !mr-4";
64
- if (props.dialogType === "right") {
65
- value += " !ml-auto";
66
- } else {
67
- value += " !ml-4";
68
- }
69
- return value;
70
- }
71
- return "flex flex-col";
72
- });
73
- const width = computed(() => {
74
- if (props.dialogType === "fullscreen") {
75
- return "calc(100vw-32px)";
76
- }
77
- return "37.5rem";
78
- });
79
- const top = computed(() => {
80
- if (["right", "fullscreen"].includes(props.dialogType)) {
81
- return "16px";
82
- }
83
- return props.top;
84
- });
78
+ const dragLevelIndex = ref(null);
79
+ const minimized = ref(false);
80
+ const animating = ref(false);
81
+ let animTimer = null;
85
82
  async function onSubmitHandler() {
86
83
  if (loading.value) return;
87
84
  loading.value = true;
@@ -96,7 +93,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
96
93
  }
97
94
  visible.value = false;
98
95
  loading.value = false;
99
- emits("hide");
100
96
  }
101
97
  async function onCancelHandler() {
102
98
  if (loading.value) return;
@@ -112,7 +108,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
112
108
  }
113
109
  visible.value = false;
114
110
  loading.value = false;
115
- emits("hide");
116
111
  }
117
112
  async function onCloseHandler() {
118
113
  if (loading.value) return;
@@ -128,127 +123,173 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
128
123
  }
129
124
  visible.value = false;
130
125
  loading.value = false;
131
- emits("hide");
132
126
  }
133
- __expose({});
127
+ function runAnim(onEnd) {
128
+ animating.value = true;
129
+ clearTimeout(animTimer);
130
+ animTimer = setTimeout(() => {
131
+ animating.value = false;
132
+ onEnd?.();
133
+ }, 750);
134
+ }
135
+ function showToWorkspace(initDragLevelIndex) {
136
+ dragLevelIndex.value = initDragLevelIndex;
137
+ if (minimized.value) runAnim();
138
+ minimized.value = false;
139
+ emits("onMinimized", minimized.value);
140
+ }
141
+ function hideToWorkspace() {
142
+ runAnim(() => {
143
+ dragLevelIndex.value = 1;
144
+ });
145
+ minimized.value = true;
146
+ emits("onMinimized", minimized.value);
147
+ }
148
+ const dialogTestRef = ref();
149
+ function dialogMousedown(e) {
150
+ if (props.zIndex != null) return;
151
+ emits("onDialogMousedown", e);
152
+ }
153
+ __expose({
154
+ showToWorkspace,
155
+ hideToWorkspace
156
+ });
134
157
  return (_ctx, _cache) => {
135
- return openBlock(), createBlock(unref(ElDialog), mergeProps({
136
- modelValue: visible.value,
137
- "onUpdate:modelValue": ($event) => visible.value = $event,
138
- width: width.value,
139
- "append-to-body": true,
140
- "close-on-click-modal": false,
141
- "close-on-press-escape": false,
142
- "show-close": false,
143
- overflow: false,
144
- top: top.value,
145
- modal: false,
146
- "modal-penetrable": "",
147
- draggable: "",
148
- class: dialogClass.value,
149
- "align-center": !["right", "fullscreen"].includes(props.dialogType),
150
- "body-class": "h-0 flex-1"
151
- }, _ctx.$attrs), {
152
- header: withCtx(() => [
153
- createElementVNode(
154
- "div",
155
- {
156
- class: normalizeClass(["box-border w-full border-0 border-b border-solid border-background-3 px-4 py-[10px] text-main text-sm font-bold flex justify-between items-center relative", { "!justify-center": __props.titleAlign === "center" }])
158
+ return openBlock(), createElementBlock(
159
+ Fragment,
160
+ null,
161
+ [
162
+ createCommentVNode(" @mousedown.stop"),
163
+ createCommentVNode(' :z-index="zIndex || dragLevelIndex"'),
164
+ createCommentVNode(" draggable"),
165
+ createCommentVNode(` :align-center="!['right', 'fullscreen'].includes(props.dialogType)"`),
166
+ createCommentVNode(' body-class="h-0 flex-1"'),
167
+ createCommentVNode(' :class="dialogClass"'),
168
+ createCommentVNode(' :overflow="false"'),
169
+ createCommentVNode(' :modal="false"'),
170
+ createVNode(unref(ElDialog), mergeProps({
171
+ ref_key: "dialogTestRef",
172
+ ref: dialogTestRef,
173
+ onMousedown: dialogMousedown,
174
+ "append-to-body": true,
175
+ "close-on-click-modal": false,
176
+ "close-on-press-escape": false,
177
+ "show-close": false,
178
+ "modal-penetrable": "",
179
+ "modal-class": {
180
+ "hy-dialog-app-shrink": animating.value || minimized.value,
181
+ "hy-dialog-is-minimized": minimized.value
157
182
  },
158
- [
183
+ modelValue: visible.value,
184
+ "onUpdate:modelValue": ($event) => visible.value = $event,
185
+ width: props.width,
186
+ top: __props.top
187
+ }, _ctx.$attrs), {
188
+ header: withCtx(() => [
159
189
  createElementVNode(
160
- "span",
161
- null,
162
- toDisplayString(__props.title),
163
- 1
164
- /* TEXT */
165
- ),
166
- __props.showClose ? (openBlock(), createElementBlock(
167
190
  "div",
168
191
  {
169
- key: 0,
170
- class: normalizeClass(["text-lg absolute right-4 cursor-pointer text-danger-2", { "cursor-not-allowed": loading.value }]),
171
- onClick: onCloseHandler
192
+ class: normalizeClass(["box-border w-full border-0 border-b border-solid border-background-3 px-4 py-[10px] text-main text-sm font-bold flex justify-between items-center relative", { "!justify-center": __props.titleAlign === "center" }])
172
193
  },
173
194
  [
174
- createVNode(unref(HyIcon), {
175
- "svg-name": "layout-dialog-close-v2",
176
- class: "!w-[20px] !h-[20px]"
177
- })
195
+ createElementVNode(
196
+ "div",
197
+ { class: "flex-grow w-0 mr-2 over_one_line" },
198
+ toDisplayString(__props.title),
199
+ 1
200
+ /* TEXT */
201
+ ),
202
+ createElementVNode("div", { class: "text-lg cursor-pointer" }, [
203
+ renderSlot(_ctx.$slots, "title-operate-box"),
204
+ __props.showShrink ? (openBlock(), createBlock(unref(HyIcon), {
205
+ key: 0,
206
+ onClick: hideToWorkspace,
207
+ "svg-name": "layout-dialog-narrow",
208
+ class: "!w-[20px] !h-[20px] ml-2 clickBox"
209
+ })) : createCommentVNode("v-if", true),
210
+ __props.showClose ? (openBlock(), createBlock(unref(HyIcon), {
211
+ key: 1,
212
+ onClick: onCloseHandler,
213
+ "svg-name": "layout-dialog-close-v2",
214
+ class: normalizeClass([{ "cursor-not-allowed": loading.value }, "!w-[20px] !h-[20px] ml-2 text-danger-2"])
215
+ }, null, 8, ["class"])) : createCommentVNode("v-if", true)
216
+ ])
178
217
  ],
179
218
  2
180
219
  /* CLASS */
181
- )) : createCommentVNode("v-if", true)
182
- ],
183
- 2
184
- /* CLASS */
185
- )
186
- ]),
187
- default: withCtx(() => [
188
- createElementVNode(
189
- "div",
190
- {
191
- class: normalizeClass(["max-h-full flex flex-col text-main", { "h-full": ["right", "fullscreen"].includes(props.dialogType) }])
192
- },
193
- [
194
- renderSlot(_ctx.$slots, "content", {}, () => [
195
- createElementVNode("div", { class: "scroll-body overflow-auto h-0 flex-1 px-6 py-4" }, [
196
- renderSlot(_ctx.$slots, "default")
197
- ])
198
- ]),
199
- __props.showOperate ? (openBlock(), createElementBlock("div", {
200
- key: 0,
201
- class: "flex items-center flex-row-reverse justify-between p-5 pr-[26px] bg-[rgba(var(--hy-background-2),0.5)] mt-auto"
202
- }, [
203
- renderSlot(_ctx.$slots, "operate-left-box"),
204
- createElementVNode("div", { class: "flex items-center" }, [
205
- renderSlot(_ctx.$slots, "operate", {}, () => [
206
- __props.showCancel ? (openBlock(), createBlock(unref(HyButton), {
207
- key: 0,
208
- type: __props.cancelType,
209
- disabled: loading.value,
210
- class: "!min-w-[120px]",
211
- onClick: onCancelHandler
212
- }, {
213
- default: withCtx(() => [
214
- createTextVNode(
215
- toDisplayString(unref(t)("dialog.cancel")),
216
- 1
217
- /* TEXT */
218
- )
219
- ]),
220
- _: 1
221
- /* STABLE */
222
- }, 8, ["type", "disabled"])) : createCommentVNode("v-if", true),
223
- __props.showSubmit ? (openBlock(), createBlock(unref(HyButton), {
224
- key: 1,
225
- type: __props.submitType,
226
- disabled: loading.value,
227
- class: "!min-w-[120px]",
228
- onClick: onSubmitHandler
229
- }, {
230
- default: withCtx(() => [
231
- createTextVNode(
232
- toDisplayString(unref(t)("dialog.confirm")),
233
- 1
234
- /* TEXT */
235
- )
236
- ]),
237
- _: 1
238
- /* STABLE */
239
- }, 8, ["type", "disabled"])) : createCommentVNode("v-if", true)
220
+ )
221
+ ]),
222
+ default: withCtx(() => [
223
+ createElementVNode(
224
+ "div",
225
+ {
226
+ class: normalizeClass(["max-h-full flex flex-col text-main", { "h-full": ["right", "fullscreen"].includes(props.dialogType) }])
227
+ },
228
+ [
229
+ renderSlot(_ctx.$slots, "content", {}, () => [
230
+ createElementVNode("div", { class: "scroll-body overflow-auto h-0 flex-1 px-6 py-4" }, [
231
+ renderSlot(_ctx.$slots, "default")
232
+ ])
240
233
  ]),
241
- renderSlot(_ctx.$slots, "operate-right-box")
242
- ])
243
- ])) : createCommentVNode("v-if", true)
244
- ],
245
- 2
246
- /* CLASS */
247
- )
248
- ]),
249
- _: 3
250
- /* FORWARDED */
251
- }, 16, ["modelValue", "onUpdate:modelValue", "width", "top", "class", "align-center"]);
234
+ __props.showOperate ? (openBlock(), createElementBlock("div", {
235
+ key: 0,
236
+ class: "flex items-center flex-row-reverse justify-between p-5 pr-[26px] mt-auto"
237
+ }, [
238
+ renderSlot(_ctx.$slots, "operate-left-box"),
239
+ createElementVNode("div", { class: "flex items-center" }, [
240
+ renderSlot(_ctx.$slots, "operate", {}, () => [
241
+ __props.showCancel ? (openBlock(), createBlock(unref(HyButton), {
242
+ key: 0,
243
+ type: __props.cancelType,
244
+ disabled: loading.value,
245
+ class: "!min-w-[120px]",
246
+ onMousedown: withModifiers(() => {
247
+ }, ["stop"]),
248
+ onClick: onCancelHandler
249
+ }, {
250
+ default: withCtx(() => [
251
+ createTextVNode(
252
+ toDisplayString(unref(t)("dialog.cancel")),
253
+ 1
254
+ /* TEXT */
255
+ )
256
+ ]),
257
+ _: 1
258
+ /* STABLE */
259
+ }, 8, ["type", "disabled", "onMousedown"])) : createCommentVNode("v-if", true),
260
+ __props.showSubmit ? (openBlock(), createBlock(unref(HyButton), {
261
+ key: 1,
262
+ type: __props.submitType,
263
+ disabled: loading.value,
264
+ class: "!min-w-[120px]",
265
+ onClick: onSubmitHandler
266
+ }, {
267
+ default: withCtx(() => [
268
+ createTextVNode(
269
+ toDisplayString(unref(t)("dialog.confirm")),
270
+ 1
271
+ /* TEXT */
272
+ )
273
+ ]),
274
+ _: 1
275
+ /* STABLE */
276
+ }, 8, ["type", "disabled"])) : createCommentVNode("v-if", true)
277
+ ]),
278
+ renderSlot(_ctx.$slots, "operate-right-box")
279
+ ])
280
+ ])) : createCommentVNode("v-if", true)
281
+ ],
282
+ 2
283
+ /* CLASS */
284
+ )
285
+ ]),
286
+ _: 3
287
+ /* FORWARDED */
288
+ }, 16, ["modal-class", "modelValue", "onUpdate:modelValue", "width", "top"])
289
+ ],
290
+ 2112
291
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
292
+ );
252
293
  };
253
294
  }
254
295
  });
@@ -0,0 +1,13 @@
1
+ .hy-dialog-app-shrink {
2
+ transform-origin: 100% 100%;
3
+ transition:
4
+ transform 0.7s cubic-bezier(0.65, 0, 0.35, 1),
5
+ opacity 0.7s ease;
6
+ will-change: transform, opacity;
7
+ &.hy-dialog-is-minimized {
8
+ transform: translate(calc(50vw - 100%), calc(100vh - 0px - 100%))
9
+ scale(0.01) !important;
10
+ opacity: 0.95;
11
+ pointer-events: none;
12
+ }
13
+ }
@@ -2,14 +2,14 @@ import { computed, unref, openBlock, createBlock, normalizeStyle, withCtx, creat
2
2
  import { ElFormItem, ElIcon, ElSelect, ElRadioGroup, ElCheckboxGroup, ElSwitch, ElInputNumber } from 'element-plus';
3
3
  import { QuestionFilled } from '@element-plus/icons-vue';
4
4
  import { columnShowHandler, columnItemStyle, isRequired, renderText, isDisabled, optionsHandler } from '../js/index.mjs';
5
+ import { isArray } from '../../../utils/is.mjs';
5
6
  import { setValueByProp, getValueByProp } from '../../../utils/form.mjs';
7
+ import { funRunHandler } from '../../../utils/handler.mjs';
6
8
  import { HyTooltip } from '../../hyTooltip/index.mjs';
7
9
  import { HyInput } from '../../hyInput/index.mjs';
8
10
  import { HyDatePicker } from '../../hyDatePicker/index.mjs';
9
11
  import { HyTimePicker } from '../../hyTimePicker/index.mjs';
10
12
  import { HyOrgCascader } from '../../hyOrgCascader/index.mjs';
11
- import { isArray } from '../../../utils/is.mjs';
12
- import { funRunHandler } from '../../../utils/handler.mjs';
13
13
 
14
14
  const _sfc_main = {
15
15
  __name: "formItem",
@@ -158,11 +158,10 @@ const _sfc_main = {
158
158
  [
159
159
  createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
160
160
  __props.column.slot && _ctx.$slots[__props.column.slot] ? renderSlot(_ctx.$slots, __props.column.slot, {
161
- key: 0,
162
161
  column: __props.column,
163
162
  model: __props.model,
164
163
  required: unref(isRequired)(props, __props.column)
165
- }) : __props.column.type === "input" ? (openBlock(), createElementBlock(
164
+ }, void 0, void 0, 0) : __props.column.type === "input" ? (openBlock(), createElementBlock(
166
165
  Fragment,
167
166
  { key: 1 },
168
167
  [