@web-utils/form-ui 1.0.0-beta94 → 1.0.0-beta95
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/address-input/index.d.ts +2 -2
- package/awesome-button/index.d.ts +6 -4
- package/capsule-tab/index.d.ts +2 -2
- package/card/index.d.ts +2 -2
- package/chunks/{6dpdFLpv2.mjs → B0i3ywbn2.mjs} +35 -44
- package/chunks/{Cv1iIzzy2.mjs → BanS-yUY2.mjs} +1 -1
- package/chunks/{BZw-uhPj.mjs → C23Qaggp.mjs} +27 -26
- package/chunks/{n1KViU9y2.mjs → CIVnqVAQ2.mjs} +12 -9
- package/chunks/{JUkvPXqc.mjs → CZxWWk4N.mjs} +8 -8
- package/chunks/{BKdkhZkk2.mjs → D7kTwnJK2.mjs} +1 -1
- package/chunks/{C6l7TFPU.mjs → D8C17D2k.mjs} +7 -7
- package/chunks/{DngNYJVa2.mjs → DzfHfYvS2.mjs} +1 -1
- package/chunks/{5BOS55Lv2.mjs → NYkLWtyw2.mjs} +1 -1
- package/chunks/{BpZ0yk642.mjs → bBwzYT0T2.mjs} +23 -18
- package/chunks/{-d4DuTH12.mjs → dgRz6V6p2.mjs} +1 -1
- package/chunks/qIca9lDu2.mjs +108 -0
- package/chunks/{DRkvaPr32.mjs → q_m3gw_j2.mjs} +11 -8
- package/chunks/{BTVXdtOG.mjs → sCsjgWvR.mjs} +104 -95
- package/chunks/{D6B1lNKn2.mjs → v2GLQDzI2.mjs} +18 -18
- package/code-mirror-editor/index.d.ts +2 -2
- package/confirm-button/index.d.ts +121 -1
- package/confirmable/index.d.ts +92 -1
- package/context-menu/index.d.ts +3 -3
- package/count-up/index.d.ts +3 -3
- package/custom-scrollbar/index.d.ts +2 -2
- package/data-box/index.d.ts +2 -2
- package/data-card/index.d.ts +2 -2
- package/data-card-text/index.d.ts +2 -2
- package/data-display/index.d.ts +2 -2
- package/data-icons/index.d.ts +2 -2
- package/data-imgtext/index.d.ts +2 -2
- package/data-operatext/index.d.ts +2 -2
- package/data-panel/index.d.ts +2 -2
- package/data-pay/index.d.ts +2 -2
- package/data-price/index.d.ts +2 -2
- package/data-progress/index.d.ts +2 -2
- package/data-rotate/index.d.ts +2 -2
- package/data-table-picker/index.d.ts +2 -2
- package/data-table-picker/index.mjs +1 -1
- package/data-tabs/index.d.ts +2 -2
- package/dialog-form/index.d.ts +1 -1
- package/dict-render/index.d.ts +2 -2
- package/e-charts/index.d.ts +2 -2
- package/easy-popup/index.d.ts +3 -3
- package/editable-progress/index.d.ts +2 -2
- package/editable-tree/index.d.ts +4 -4
- package/element-dialog/index.d.ts +294 -16
- package/flex-box/index.d.ts +2 -2
- package/flex-column/index.d.ts +2 -2
- package/flex-item/index.d.ts +2 -2
- package/flex-row/index.d.ts +2 -2
- package/flex-scroll-area/index.d.ts +1 -1
- package/flex-scroller/index.d.ts +2 -2
- package/flow-designer/index.d.ts +6 -6
- package/flow-viewer/index.d.ts +2 -2
- package/form-button/index.d.ts +92 -1
- package/form-cascader/index.d.ts +9 -7
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.d.ts +8 -6
- package/form-checkbox-group/index.d.ts +372 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.d.ts +10 -8
- package/form-holder/index.d.ts +2 -2
- package/form-image/index.d.ts +7 -5
- package/form-input/index.d.ts +11 -9
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.d.ts +8 -6
- package/form-input-email/index.d.ts +8 -8
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +8 -8
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +11 -9
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +8 -8
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +8 -6
- package/form-input-time/index.d.ts +10 -8
- package/form-item/index.d.ts +5 -5
- package/form-item-config-provider/index.d.ts +3 -3
- package/form-item-group/index.d.ts +6 -4
- package/form-radio-group/index.d.ts +15 -13
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +8 -6
- package/form-row/index.d.ts +2 -2
- package/form-select/index.d.ts +11 -9
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +9 -7
- package/form-switch/index.d.ts +8 -6
- package/form-table/index.d.ts +10 -6
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.d.ts +10 -8
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.d.ts +7 -5
- package/form-textarea/index.d.ts +6 -6
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.d.ts +8 -6
- package/form-tree-select/index.d.ts +10 -8
- package/form-tree-select-multiple/index.d.ts +10 -8
- package/form-view/index.d.ts +4 -4
- package/fy-array/index.d.ts +266 -3
- package/fy-cascader/index.d.ts +266 -3
- package/fy-checkbox/index.d.ts +266 -3
- package/fy-curd/index.d.ts +10 -10
- package/fy-date/index.d.ts +266 -3
- package/fy-dynamic/index.d.ts +266 -3
- package/fy-empty/index.d.ts +2 -2
- package/fy-form/index.d.ts +9 -9
- package/fy-input/index.d.ts +266 -3
- package/fy-input-color/index.d.ts +266 -3
- package/fy-input-icon/index.d.ts +266 -3
- package/fy-input-map/index.d.ts +266 -3
- package/fy-input-number/index.d.ts +266 -3
- package/fy-input-table/index.d.ts +266 -3
- package/fy-input-tree/index.d.ts +267 -4
- package/fy-radio/index.d.ts +266 -3
- package/fy-rate/index.d.ts +266 -3
- package/fy-select/index.d.ts +267 -4
- package/fy-slider/index.d.ts +266 -3
- package/fy-switch/index.d.ts +266 -3
- package/fy-tabs/index.d.ts +2 -2
- package/fy-time/index.d.ts +731 -4
- package/fy-title/index.d.ts +266 -3
- package/fy-tree/index.d.ts +2 -2
- package/fy-u-editor/index.d.ts +3 -3
- package/fy-upload/index.d.ts +267 -4
- package/guide-steps/index.d.ts +2 -2
- package/helper/form-item.d.ts +1 -1
- package/helper/input.d.ts +18 -12
- package/highlight-j-s/index.d.ts +2 -2
- package/icon-temp/index.d.ts +2 -2
- package/image-cropper/index.d.ts +354 -1
- package/image-preview/index.d.ts +2 -2
- package/image-viewer/index.d.ts +2 -2
- package/index.mjs +15 -15
- package/input-number-range/index.d.ts +2 -2
- package/json-editor/index.d.ts +2 -2
- package/keyboard/index.d.ts +2 -2
- package/loading-view/index.d.ts +2 -2
- package/monaco-editor/index.d.ts +2 -2
- package/name-avatar/index.d.ts +2 -2
- package/package.json +3 -4
- package/page-index/index.d.ts +2 -2
- package/page-index-top/index.d.ts +2 -2
- package/page-skeleton/index.d.ts +2 -2
- package/page-skeleton-new/index.d.ts +2 -2
- package/pageable-table/index.d.ts +4 -4
- package/pageable-table/index.mjs +1 -1
- package/photo-swipe/index.d.ts +2 -2
- package/props/col.d.ts +1 -1
- package/props/form-item.d.ts +1 -1
- package/props/input-number.d.ts +1 -1
- package/props/input-number.mjs +5 -1
- package/props/input.d.ts +1 -1
- package/props/input.mjs +3 -2
- package/sign-panel/index.d.ts +2 -2
- package/split-pane/index.d.ts +4 -4
- package/stateful/index.d.ts +5 -3
- package/sub-table/index.d.ts +4 -2
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.d.ts +4 -2
- package/sub-table-plus/index.mjs +1 -1
- package/table-column/index.d.ts +3 -3
- package/table-column-def/index.d.ts +4 -4
- package/table-view/index.d.ts +7 -4
- package/table-view/index.mjs +13 -18
- package/tag-render/index.d.ts +2 -2
- package/text-ellipsis/index.d.ts +3 -3
- package/toolbar/index.d.ts +4 -4
- package/toolbar-button/index.d.ts +5 -5
- package/vue/directives/chat-drag.d.ts +2 -0
- package/vue/directives/chat-drag.mjs +12 -0
- package/vue/directives/click-outside.d.ts +10 -0
- package/vue/directives/click-outside.mjs +36 -0
- package/vue/directives/dialog-drag.d.ts +2 -0
- package/vue/directives/dialog-drag.mjs +15 -0
- package/vue/directives/drag-move.d.ts +10 -0
- package/vue/directives/drag-move.mjs +27 -0
- package/vue/directives/fix-fixed-column-height.d.ts +7 -0
- package/vue/directives/fix-fixed-column-height.mjs +20 -0
- package/vue/directives/index.d.ts +7 -0
- package/vue/directives/index.mjs +8 -0
- package/vue/directives/resize.d.ts +2 -0
- package/vue/directives/resize.mjs +12 -0
- package/vue/directives/scroll-bottom.d.ts +5 -0
- package/vue/directives/scroll-bottom.mjs +6 -0
- package/vue/hooks/index.d.ts +3 -0
- package/vue/hooks/index.mjs +4 -0
- package/vue/hooks/useDictionary.d.ts +60 -0
- package/{hook → vue/hooks}/useDictionary.mjs +2 -2
- package/vue/hooks/useEventBus.d.ts +1 -0
- package/vue/hooks/useEventBus.mjs +20 -0
- package/{hook → vue/hooks}/useVisibilityChange.mjs +1 -1
- package/vue/index.d.ts +3 -0
- package/vue/index.mjs +83 -0
- package/vue/mixin/bus.d.ts +5 -0
- package/vue/mixin/bus.mjs +33 -0
- package/vue/mixin/dialog.d.ts +38 -0
- package/vue/mixin/dialog.mjs +2 -0
- package/vue/mixin/index.d.ts +6 -0
- package/vue/mixin/index.mjs +7 -0
- package/vue/mixin/message.d.ts +2 -0
- package/vue/mixin/message.mjs +27 -0
- package/vue/mixin/multi-items.d.ts +43 -0
- package/vue/mixin/multi-items.mjs +70 -0
- package/vue/mixin/page.d.ts +28 -0
- package/vue/mixin/page.mjs +38 -0
- package/vue/mixin/resize-mixin.d.ts +15 -0
- package/vue/mixin/resize-mixin.mjs +24 -0
- package/vue-cron/index.d.ts +3 -3
- package/vue-qr-code/index.d.ts +2 -2
- package/vue-tags-input/index.d.ts +3 -3
- package/vue-tree-select/index.d.ts +13 -13
- package/vue-video-player/index.d.ts +2 -2
- package/watermark/index.d.ts +3 -3
- package/web-types.json +1 -1
- package/year-calendar/index.d.ts +2 -2
- package/chunks/DML17Idh2.mjs +0 -108
- package/hook/useDictionary.d.ts +0 -3
- /package/{hook → vue/hooks}/useVisibilityChange.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
size: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
default: string;
|
|
@@ -81,7 +81,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
81
81
|
title: StringConstructor;
|
|
82
82
|
cancelButtonText: StringConstructor;
|
|
83
83
|
confirmButtonText: StringConstructor;
|
|
84
|
-
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<
|
|
84
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
85
85
|
size: {
|
|
86
86
|
type: StringConstructor;
|
|
87
87
|
default: string;
|
|
@@ -167,10 +167,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
167
167
|
}>> & Readonly<{}>, {
|
|
168
168
|
disabled: boolean;
|
|
169
169
|
type: string;
|
|
170
|
-
|
|
170
|
+
plain: boolean;
|
|
171
171
|
size: string;
|
|
172
|
+
primary: boolean;
|
|
172
173
|
loading: boolean;
|
|
173
|
-
plain: boolean;
|
|
174
174
|
autofocus: boolean;
|
|
175
175
|
round: boolean;
|
|
176
176
|
nativeType: string;
|
|
@@ -181,9 +181,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
181
181
|
loadable: boolean;
|
|
182
182
|
warning: boolean;
|
|
183
183
|
confirm: boolean;
|
|
184
|
-
dark: boolean;
|
|
185
184
|
bg: boolean;
|
|
186
185
|
dashed: boolean;
|
|
186
|
+
dark: boolean;
|
|
187
187
|
autoInsertSpace: boolean;
|
|
188
188
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
189
189
|
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { drag as e } from "@web-utils/core";
|
|
2
|
+
//#region src/vue/directives/chat-drag.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
let n = t.querySelector(".chat-toolbar");
|
|
5
|
+
n && e(t, n);
|
|
6
|
+
}
|
|
7
|
+
var n = {
|
|
8
|
+
mounted: (e) => t(e),
|
|
9
|
+
updated: (e) => t(e)
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as chatDrag };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/vue/directives/click-outside.ts
|
|
2
|
+
var e = /* @__PURE__ */ new Map();
|
|
3
|
+
function t(e, t) {
|
|
4
|
+
let n = [];
|
|
5
|
+
return Array.isArray(t.arg) ? n = t.arg : n.push(t.arg), function(r, i) {
|
|
6
|
+
var a;
|
|
7
|
+
let o = (a = t.instance) == null ? void 0 : a.popperRef, s = r.target, c = i == null ? void 0 : i.target, l = !t || !t.instance, u = !s || !c, d = e.contains(s) || e.contains(c), f = e === s, p = n.length && n.some((e) => e == null ? void 0 : e.contains(s)) || n.length && n.includes(c), m = o && (o.contains(s) || o.contains(c));
|
|
8
|
+
l || u || d || f || p || m || t.value(r, i);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
var n = {
|
|
12
|
+
mounted(n, r) {
|
|
13
|
+
let i = (t) => {
|
|
14
|
+
e.get(n).mousedownEvent = t;
|
|
15
|
+
}, a = (t) => {
|
|
16
|
+
let { documentHandler: r, mousedownEvent: i } = e.get(n);
|
|
17
|
+
r(t, i);
|
|
18
|
+
};
|
|
19
|
+
e.set(n, {
|
|
20
|
+
mouseDownHandler: i,
|
|
21
|
+
mouseUpHandler: a,
|
|
22
|
+
documentHandler: t(n, r),
|
|
23
|
+
bindingFn: r.value
|
|
24
|
+
}), document.addEventListener("mousedown", i), document.addEventListener("mouseup", a);
|
|
25
|
+
},
|
|
26
|
+
updated(n, r) {
|
|
27
|
+
let i = e.get(n);
|
|
28
|
+
i.documentHandler = t(n, r), i.bindingFn = r.value;
|
|
29
|
+
},
|
|
30
|
+
unmounted(t) {
|
|
31
|
+
let { mouseDownHandler: n, mouseUpHandler: r } = e.get(t);
|
|
32
|
+
document.removeEventListener("mousedown", n), document.removeEventListener("mouseup", r), e.delete(t);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { n as clickOutside };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { drag as e, hasOwn as t } from "@web-utils/core";
|
|
2
|
+
//#region src/vue/directives/dialog-drag.ts
|
|
3
|
+
function n(n, r) {
|
|
4
|
+
let i = n.querySelector(".el-dialog__header"), a = n.querySelector(".el-dialog");
|
|
5
|
+
if (i) {
|
|
6
|
+
var o, s;
|
|
7
|
+
r.arg ? i.style.cssText += ";cursor:default;" : i.style.cssText += ";cursor:move;", e(a, i, t(r.value, "limit") ? (o = r.value) == null ? void 0 : o.limit : !0, { onMove: (s = r.value) == null ? void 0 : s.onMove });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
var r = {
|
|
11
|
+
mounted: (e, t) => n(e, t),
|
|
12
|
+
updated: (e, t) => n(e, t)
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { r as dialogDrag };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { dragMove as e, off as t, on as n } from "@web-utils/core";
|
|
2
|
+
//#region src/vue/directives/drag-move.ts
|
|
3
|
+
var r = 1, i = "drag_move_id", a = {}, o = (e) => {
|
|
4
|
+
let n = e[i], r = a[n];
|
|
5
|
+
r && (delete a[n], delete e[i], t(e, "mousedown", r));
|
|
6
|
+
}, s = (t, o) => {
|
|
7
|
+
if (!t) return;
|
|
8
|
+
let s = r++;
|
|
9
|
+
t[i] = s;
|
|
10
|
+
let c = (t) => e(t, {
|
|
11
|
+
...o.value,
|
|
12
|
+
fullScreen: o.arg
|
|
13
|
+
});
|
|
14
|
+
a[s] = c, n(t, "mousedown", c);
|
|
15
|
+
}, c = {
|
|
16
|
+
mounted: (e, t) => {
|
|
17
|
+
s(e, t);
|
|
18
|
+
},
|
|
19
|
+
updated: (e, t) => {
|
|
20
|
+
e && (o(e), s(e, t));
|
|
21
|
+
},
|
|
22
|
+
unmounted: (e) => {
|
|
23
|
+
o(e);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { c as dragMove };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getComputedHeight as e } from "@web-utils/core";
|
|
2
|
+
//#region src/vue/directives/fix-fixed-column-height.ts
|
|
3
|
+
var t = { updated(t, n, r) {
|
|
4
|
+
let { layout: i } = r.component;
|
|
5
|
+
if (i.scrollX && !t.calculated) {
|
|
6
|
+
let n = t.querySelector(".el-table__fixed");
|
|
7
|
+
if (n) {
|
|
8
|
+
let t = e(n);
|
|
9
|
+
n.style.height = `${t - i.gutterWidth}px`;
|
|
10
|
+
}
|
|
11
|
+
let r = t.querySelector(".el-table__fixed-right");
|
|
12
|
+
if (r) {
|
|
13
|
+
let t = e(r);
|
|
14
|
+
r.style.height = `${t - i.gutterWidth}px`;
|
|
15
|
+
}
|
|
16
|
+
t.calculated = !0;
|
|
17
|
+
}
|
|
18
|
+
} };
|
|
19
|
+
//#endregion
|
|
20
|
+
export { t as fixFixedColumnHeight };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { chatDrag as e } from "./chat-drag.mjs";
|
|
2
|
+
import { clickOutside as t } from "./click-outside.mjs";
|
|
3
|
+
import { dialogDrag as n } from "./dialog-drag.mjs";
|
|
4
|
+
import { dragMove as r } from "./drag-move.mjs";
|
|
5
|
+
import { fixFixedColumnHeight as i } from "./fix-fixed-column-height.mjs";
|
|
6
|
+
import { resize as a } from "./resize.mjs";
|
|
7
|
+
import { scrollBottom as o } from "./scroll-bottom.mjs";
|
|
8
|
+
export { e as chatDrag, t as clickOutside, n as dialogDrag, r as dragMove, i as fixFixedColumnHeight, a as resize, o as scrollBottom };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { elementResizeDetectorMaker as e } from "@web-utils/integrations/element-resize-detector";
|
|
2
|
+
//#region src/vue/directives/resize.ts
|
|
3
|
+
var t = e(), n = {
|
|
4
|
+
mounted(e, n) {
|
|
5
|
+
n.value && t.listenTo(e, n.value);
|
|
6
|
+
},
|
|
7
|
+
unmounted(e, n) {
|
|
8
|
+
t.uninstall(e);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as resize };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DictItem } from '../../api';
|
|
2
|
+
export declare const useDictionary: (props: Record<string, any>) => {
|
|
3
|
+
dictItems: globalThis.Ref<{
|
|
4
|
+
id: string;
|
|
5
|
+
dictId: string;
|
|
6
|
+
label: string;
|
|
7
|
+
dictType: string;
|
|
8
|
+
description: string;
|
|
9
|
+
sortOrder: number;
|
|
10
|
+
createBy: string;
|
|
11
|
+
updateBy: string;
|
|
12
|
+
createTime: string;
|
|
13
|
+
updateTime: string;
|
|
14
|
+
remarks: null;
|
|
15
|
+
delFlag: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[] | readonly {
|
|
18
|
+
id: string;
|
|
19
|
+
dictId: string;
|
|
20
|
+
label: string;
|
|
21
|
+
dictType: string;
|
|
22
|
+
description: string;
|
|
23
|
+
sortOrder: number;
|
|
24
|
+
createBy: string;
|
|
25
|
+
updateBy: string;
|
|
26
|
+
createTime: string;
|
|
27
|
+
updateTime: string;
|
|
28
|
+
remarks: null;
|
|
29
|
+
delFlag: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}[] | null, DictItem[] | readonly DictItem[] | {
|
|
32
|
+
id: string;
|
|
33
|
+
dictId: string;
|
|
34
|
+
label: string;
|
|
35
|
+
dictType: string;
|
|
36
|
+
description: string;
|
|
37
|
+
sortOrder: number;
|
|
38
|
+
createBy: string;
|
|
39
|
+
updateBy: string;
|
|
40
|
+
createTime: string;
|
|
41
|
+
updateTime: string;
|
|
42
|
+
remarks: null;
|
|
43
|
+
delFlag: string;
|
|
44
|
+
value: string;
|
|
45
|
+
}[] | readonly {
|
|
46
|
+
id: string;
|
|
47
|
+
dictId: string;
|
|
48
|
+
label: string;
|
|
49
|
+
dictType: string;
|
|
50
|
+
description: string;
|
|
51
|
+
sortOrder: number;
|
|
52
|
+
createBy: string;
|
|
53
|
+
updateBy: string;
|
|
54
|
+
createTime: string;
|
|
55
|
+
updateTime: string;
|
|
56
|
+
remarks: null;
|
|
57
|
+
delFlag: string;
|
|
58
|
+
value: string;
|
|
59
|
+
}[] | null>;
|
|
60
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getDictData as e } from "
|
|
1
|
+
import { getDictData as e } from "../../helper/dictionary.mjs";
|
|
2
2
|
import { ref as t, watchEffect as n } from "vue";
|
|
3
|
-
//#region src/
|
|
3
|
+
//#region src/vue/hooks/useDictionary.ts
|
|
4
4
|
var r = (r) => {
|
|
5
5
|
let i = t([]);
|
|
6
6
|
return n(async () => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useEventBus: (event: string | Record<string, () => void>, cb: (...args: any[]) => void) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { onBeforeMount as e, onBeforeUnmount as t } from "vue";
|
|
2
|
+
import { emitter as n, isObject as r } from "@web-utils/core";
|
|
3
|
+
//#region src/vue/hooks/useEventBus.ts
|
|
4
|
+
var i = (i, a) => {
|
|
5
|
+
e(() => {
|
|
6
|
+
if (a) n.on(i, a);
|
|
7
|
+
else if (r(i)) {
|
|
8
|
+
let e = i;
|
|
9
|
+
for (let t in e) n.on(t, e[t]);
|
|
10
|
+
}
|
|
11
|
+
}), t(() => {
|
|
12
|
+
if (a) n.off(i, a);
|
|
13
|
+
else if (r(i)) {
|
|
14
|
+
let e = i;
|
|
15
|
+
for (let t in e) n.off(t, e[t]);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as useEventBus };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { onBeforeMount as e, onBeforeUnmount as t } from "vue";
|
|
2
|
-
//#region src/
|
|
2
|
+
//#region src/vue/hooks/useVisibilityChange.ts
|
|
3
3
|
var n = ({ onPageHidden: n, onPageVisible: r } = {}) => {
|
|
4
4
|
let i = () => {
|
|
5
5
|
document.hidden ? n == null || n() : r == null || r();
|
package/vue/index.d.ts
ADDED
package/vue/index.mjs
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { bus as e, eventBusPlugin as t } from "./mixin/bus.mjs";
|
|
2
|
+
import { chatDrag as n } from "./directives/chat-drag.mjs";
|
|
3
|
+
import { clickOutside as r } from "./directives/click-outside.mjs";
|
|
4
|
+
import { useVisibilityChange as i } from "./hooks/useVisibilityChange.mjs";
|
|
5
|
+
import { dialogDrag as a } from "./directives/dialog-drag.mjs";
|
|
6
|
+
import { dragMove as o } from "./directives/drag-move.mjs";
|
|
7
|
+
import { fixFixedColumnHeight as s } from "./directives/fix-fixed-column-height.mjs";
|
|
8
|
+
import { resize as c } from "./directives/resize.mjs";
|
|
9
|
+
import { scrollBottom as l } from "./directives/scroll-bottom.mjs";
|
|
10
|
+
import "./directives/index.mjs";
|
|
11
|
+
import { useDictionary as u } from "./hooks/useDictionary.mjs";
|
|
12
|
+
import { useEventBus as d } from "./hooks/useEventBus.mjs";
|
|
13
|
+
import "./hooks/index.mjs";
|
|
14
|
+
import { ServerMessageManager as f, messageMixin as p } from "./mixin/message.mjs";
|
|
15
|
+
import { childMixin as m, parentMixin as h } from "./mixin/multi-items.mjs";
|
|
16
|
+
import { page as g } from "./mixin/page.mjs";
|
|
17
|
+
import { resizeMixin as _ } from "./mixin/resize-mixin.mjs";
|
|
18
|
+
import { getComputedHeight as v } from "@web-utils/core";
|
|
19
|
+
//#region src/vue/mixin/dialog.ts
|
|
20
|
+
var y = {
|
|
21
|
+
directives: {
|
|
22
|
+
dialogDrag: a,
|
|
23
|
+
alignCenter: { async inserted(e, t, n) {
|
|
24
|
+
await n.componentInstance.$nextTick();
|
|
25
|
+
let r = v(n.componentInstance.$refs.dialog), i = window.document.body.offsetHeight - r;
|
|
26
|
+
n.componentInstance.$refs.dialog.style.marginTop = `${i / 2}px`;
|
|
27
|
+
} }
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
visible: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
closeOnClickModal: Boolean,
|
|
35
|
+
reservePositionOnClose: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
show: !1,
|
|
43
|
+
fullScreen: !1
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
closed() {
|
|
48
|
+
if (!this.reservePositionOnClose && this.$refs.dialog) {
|
|
49
|
+
let { dialog: e } = this.$refs.dialog.$refs;
|
|
50
|
+
e.style.top = "unset", e.style.left = "unset";
|
|
51
|
+
}
|
|
52
|
+
this.exitFullScreen(), this.$emit("closed");
|
|
53
|
+
},
|
|
54
|
+
close() {
|
|
55
|
+
this.show = !1;
|
|
56
|
+
},
|
|
57
|
+
toggleFullScreen() {
|
|
58
|
+
this.fullScreen = !this.fullScreen;
|
|
59
|
+
},
|
|
60
|
+
enterFullScreen() {
|
|
61
|
+
this.fullScreen = !0;
|
|
62
|
+
},
|
|
63
|
+
exitFullScreen() {
|
|
64
|
+
this.fullScreen = !1;
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
watch: {
|
|
68
|
+
visible: {
|
|
69
|
+
immediate: !0,
|
|
70
|
+
handler(e) {
|
|
71
|
+
this.show = e;
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
show(e) {
|
|
75
|
+
e !== this.visible && this.$emit("update:visible", e), e || this.$emit("close");
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
beforeDestroy() {
|
|
79
|
+
this.show && this.close();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { f as ServerMessageManager, e as bus, n as chatDrag, m as childMixin, r as clickOutside, y as dialog, a as dialogDrag, o as dragMove, t as eventBusPlugin, s as fixFixedColumnHeight, p as messageMixin, g as page, h as parentMixin, c as resize, _ as resizeMixin, l as scrollBottom, u as useDictionary, d as useEventBus, i as useVisibilityChange };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { emitter as e, isArray as t, isObject as n, isString as r, isUndefined as i } from "@web-utils/core";
|
|
2
|
+
//#region src/vue/mixin/bus.ts
|
|
3
|
+
function a(i) {
|
|
4
|
+
if (n(i)) for (let t in i) {
|
|
5
|
+
let o;
|
|
6
|
+
r(i[t]) ? o = this[i[t]] : n(i[t]) ? a.call(this, i[t]) : o = i[t].bind(this), o && (e.on(t, o), this.$Bus.push({
|
|
7
|
+
event: t,
|
|
8
|
+
handler: o
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
t(i) && i.forEach((t) => {
|
|
12
|
+
let i = this[t];
|
|
13
|
+
r(t) && i && (e.on(t, i), this.$Bus.push({
|
|
14
|
+
event: t,
|
|
15
|
+
handler: i
|
|
16
|
+
})), n(t) && a.call(this, t);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
var o = { install(n, r) {
|
|
20
|
+
n.config.globalProperties.$bus = (t, ...n) => {
|
|
21
|
+
e.emit(t, ...n);
|
|
22
|
+
}, n.mixin({
|
|
23
|
+
beforeCreate() {
|
|
24
|
+
let e = this.$options.bus;
|
|
25
|
+
this.$Bus = [], e && a.call(this, e), a.call(this, r);
|
|
26
|
+
},
|
|
27
|
+
beforeUnmount() {
|
|
28
|
+
if (this.$Bus) for (let t of this.$Bus) e.off(t.event, t.handler);
|
|
29
|
+
}
|
|
30
|
+
}), n.config.optionMergeStrategies.bus = (e, n) => t(e) ? t(n) ? e.concat(n) : (i(n) || e.push(n), e) : t(n) ? (i(e) || n.push(e), n) : e && n ? [e, n] : e || n;
|
|
31
|
+
} };
|
|
32
|
+
//#endregion
|
|
33
|
+
export { e as bus, o as eventBusPlugin };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const dialog: {
|
|
2
|
+
directives: {
|
|
3
|
+
dialogDrag: import('vue').ObjectDirective<any, any, string, any>;
|
|
4
|
+
alignCenter: {
|
|
5
|
+
inserted(el: any, binding: any, vNode: any): Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
props: {
|
|
9
|
+
visible: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
closeOnClickModal: BooleanConstructor;
|
|
14
|
+
reservePositionOnClose: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
data(): {
|
|
20
|
+
show: boolean;
|
|
21
|
+
fullScreen: boolean;
|
|
22
|
+
};
|
|
23
|
+
methods: {
|
|
24
|
+
closed(this: any): void;
|
|
25
|
+
close(this: any): void;
|
|
26
|
+
toggleFullScreen(this: any): void;
|
|
27
|
+
enterFullScreen(this: any): void;
|
|
28
|
+
exitFullScreen(this: any): void;
|
|
29
|
+
};
|
|
30
|
+
watch: {
|
|
31
|
+
visible: {
|
|
32
|
+
immediate: boolean;
|
|
33
|
+
handler(this: any, newVal: boolean): void;
|
|
34
|
+
};
|
|
35
|
+
show(this: any, newVal: boolean): void;
|
|
36
|
+
};
|
|
37
|
+
beforeDestroy(this: any): void;
|
|
38
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { bus as e, eventBusPlugin as t } from "./bus.mjs";
|
|
2
|
+
import { ServerMessageManager as n, messageMixin as r } from "./message.mjs";
|
|
3
|
+
import { childMixin as i, parentMixin as a } from "./multi-items.mjs";
|
|
4
|
+
import { page as o } from "./page.mjs";
|
|
5
|
+
import { resizeMixin as s } from "./resize-mixin.mjs";
|
|
6
|
+
import { dialog as c } from "../index.mjs";
|
|
7
|
+
export { n as ServerMessageManager, e as bus, i as childMixin, c as dialog, t as eventBusPlugin, r as messageMixin, o as page, a as parentMixin, s as resizeMixin };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { capitalize as e, createMessageManager as t, isObject as n, isString as r } from "@web-utils/core";
|
|
2
|
+
//#region src/vue/mixin/message.ts
|
|
3
|
+
var i = t({ loggerTag: "ServerMessageManager" }), a = {
|
|
4
|
+
beforeCreate() {
|
|
5
|
+
let t = this.$options.message;
|
|
6
|
+
if (t) {
|
|
7
|
+
this.$MessageEvents = [];
|
|
8
|
+
for (let n in t) {
|
|
9
|
+
let r = (e) => {
|
|
10
|
+
t[n].call(this, e);
|
|
11
|
+
}, a = e(n);
|
|
12
|
+
i.addMessageListener(a, r), this.$MessageEvents.push({
|
|
13
|
+
model: a,
|
|
14
|
+
handler: r
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
beforeDestroy() {
|
|
20
|
+
if (this.$MessageEvents) for (let e of this.$MessageEvents) i.removeMessageListener(e.model, e.handler);
|
|
21
|
+
},
|
|
22
|
+
methods: { sendMessageToServer(e) {
|
|
23
|
+
(r(e) || n(e)) && i.sendMessage(r(e) ? e : JSON.stringify(e));
|
|
24
|
+
} }
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { i as ServerMessageManager, a as messageMixin };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tab组件用到
|
|
3
|
+
*/
|
|
4
|
+
export declare const parentMixin: {
|
|
5
|
+
mounted(this: any): void;
|
|
6
|
+
methods: {
|
|
7
|
+
updateIndex(this: any): void;
|
|
8
|
+
};
|
|
9
|
+
props: {
|
|
10
|
+
value: NumberConstructor;
|
|
11
|
+
};
|
|
12
|
+
watch: {
|
|
13
|
+
currentIndex(this: any, val: number, oldVal: number): void;
|
|
14
|
+
index(this: any, val: number): void;
|
|
15
|
+
value(this: any, val: number): void;
|
|
16
|
+
};
|
|
17
|
+
data(this: any): {
|
|
18
|
+
index: number;
|
|
19
|
+
currentIndex: any;
|
|
20
|
+
number: any;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const childMixin: {
|
|
24
|
+
props: {
|
|
25
|
+
selected: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
mounted(this: any): void;
|
|
31
|
+
beforeDestroy(this: any): void;
|
|
32
|
+
methods: {
|
|
33
|
+
onItemClick(this: any, hasLink: string | boolean): void;
|
|
34
|
+
};
|
|
35
|
+
watch: {
|
|
36
|
+
currentSelected(this: any, val: boolean): void;
|
|
37
|
+
selected(this: any, val: boolean): void;
|
|
38
|
+
};
|
|
39
|
+
data(this: any): {
|
|
40
|
+
currentIndex: number;
|
|
41
|
+
currentSelected: any;
|
|
42
|
+
};
|
|
43
|
+
};
|