@web-utils/form-ui 1.0.0-beta97 → 1.0.0-beta98
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/api/index.d.ts +4 -0
- package/api/index.mjs +9 -9
- package/biz-loading-view/index.d.ts +18 -0
- package/biz-loading-view/index.mjs +27 -0
- package/biz-loading-view/style.css +1 -0
- package/editable-tree/index.mjs +1 -1
- package/fy-avatar/index.d.ts +40 -0
- package/fy-avatar/index.mjs +58 -0
- package/fy-avatar/style.css +1 -0
- package/fy-time/index.mjs +1 -1
- package/index.css +1 -1
- package/index.d.ts +3 -1
- package/index.mjs +147 -145
- package/package.json +1 -1
- package/resolver/components.mjs +1 -1
- package/table-view/index.mjs +9 -9
- package/web-types.json +1 -1
package/api/index.d.ts
CHANGED
|
@@ -45,7 +45,11 @@ export interface ConfigOptions {
|
|
|
45
45
|
toolbar?: {
|
|
46
46
|
goBack?: (path: string) => void;
|
|
47
47
|
};
|
|
48
|
+
defaultAvatar?: string;
|
|
49
|
+
logo?: string;
|
|
48
50
|
}
|
|
51
|
+
export declare const getDefaultAvatar: () => string | undefined;
|
|
52
|
+
export declare const getLogo: () => string | undefined;
|
|
49
53
|
export declare const processButtons: (buttons: Array<string | Record<string, string>>) => (string | Record<string, boolean>)[] | undefined;
|
|
50
54
|
export declare const hasAuthority: (str: string) => boolean | undefined;
|
|
51
55
|
export declare const goBack: (path: string) => void | undefined;
|
package/api/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var r = { privilege: {
|
|
|
6
6
|
return n.map((n) => {
|
|
7
7
|
if (e(n)) {
|
|
8
8
|
let e = n, r = {};
|
|
9
|
-
for (let n in e) t(e[n]) && (r[n] =
|
|
9
|
+
for (let n in e) t(e[n]) && (r[n] = s(e[n]) ?? !0);
|
|
10
10
|
return r;
|
|
11
11
|
}
|
|
12
12
|
return n;
|
|
@@ -15,28 +15,28 @@ var r = { privilege: {
|
|
|
15
15
|
hasAuthority(e) {
|
|
16
16
|
return !0;
|
|
17
17
|
}
|
|
18
|
-
} }, i = (e) => {
|
|
18
|
+
} }, i = () => r.defaultAvatar, a = () => r.logo, o = (e) => {
|
|
19
19
|
var t, n;
|
|
20
20
|
return (t = r.privilege) == null || (n = t.processButtons) == null ? void 0 : n.call(t, e);
|
|
21
|
-
},
|
|
21
|
+
}, s = (e) => {
|
|
22
22
|
var t, n;
|
|
23
23
|
return (t = r.privilege) == null || (n = t.hasAuthority) == null ? void 0 : n.call(t, e);
|
|
24
|
-
},
|
|
24
|
+
}, c = (e) => {
|
|
25
25
|
var t, n;
|
|
26
26
|
return (t = r.toolbar) == null || (n = t.goBack) == null ? void 0 : n.call(t, e);
|
|
27
|
-
},
|
|
27
|
+
}, l = () => {
|
|
28
28
|
var e, t;
|
|
29
29
|
return (e = r.tableView) == null || (t = e.reload) == null ? void 0 : t.call(e);
|
|
30
|
-
},
|
|
30
|
+
}, u = (e, t) => {
|
|
31
31
|
var n, i;
|
|
32
32
|
return (n = r.dict) == null || (i = n.getDictTreeByType) == null ? void 0 : i.call(n, e, t);
|
|
33
|
-
},
|
|
33
|
+
}, d = (e) => {
|
|
34
34
|
var t, n;
|
|
35
35
|
return (t = r.dict) == null || (n = t.remote) == null ? void 0 : n.call(t, e);
|
|
36
|
-
},
|
|
36
|
+
}, f = (e) => {
|
|
37
37
|
n(r, e, (e, t) => {
|
|
38
38
|
if (typeof t == "function") return t;
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
//#endregion
|
|
42
|
-
export {
|
|
42
|
+
export { f as config, i as getDefaultAvatar, u as getDictTreeByType, a as getLogo, c as goBack, s as hasAuthority, o as processButtons, l as reloadTable, d as remote };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
backdrop: BooleanConstructor;
|
|
5
|
+
tips: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
10
|
+
backdrop: BooleanConstructor;
|
|
11
|
+
tips: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {
|
|
16
|
+
backdrop: boolean;
|
|
17
|
+
tips: string;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getLogo as e } from "../api/index.mjs";
|
|
2
|
+
import { createElementBlock as t, createElementVNode as n, normalizeStyle as r, openBlock as i, toDisplayString as a, unref as o } from "vue";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
//#region src/components/BizLoadingView.vue
|
|
5
|
+
var s = { class: "cu-load load-modal" }, c = ["src"], l = { class: "gray-text" }, u = {
|
|
6
|
+
__name: "BizLoadingView",
|
|
7
|
+
props: {
|
|
8
|
+
backdrop: Boolean,
|
|
9
|
+
tips: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "加载中..."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(u) {
|
|
15
|
+
let d = e();
|
|
16
|
+
return (e, f) => (i(), t("div", {
|
|
17
|
+
class: "loading",
|
|
18
|
+
style: r({ backgroundColor: u.backdrop ? "rgba(0, 0, 0, 0.2)" : "#eff2f7" })
|
|
19
|
+
}, [n("div", s, [n("img", {
|
|
20
|
+
class: "image",
|
|
21
|
+
src: o(d),
|
|
22
|
+
alt: ""
|
|
23
|
+
}, null, 8, c), n("div", l, a(u.tips), 1)])], 4));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { u as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.loading{z-index:100;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}@keyframes cuIcon-spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}.cu-load{text-align:center;line-height:3em;display:block}.cu-load:before{margin-right:6rpx;font-family:cuIcon,serif;display:inline-block}.cu-load.loading:before{content:"";animation:2s linear infinite cuIcon-spin}.cu-load.loading:after{content:"加载中..."}.cu-load.over:before{content:""}.cu-load.over:after{content:"没有更多了"}.cu-load.erro:before{content:""}.cu-load.erro:after{content:"加载失败"}.cu-load.load-icon:before{font-size:32rpx}.cu-load.load-icon:after,.cu-load.load-icon.over{display:none}.cu-load.load-modal{z-index:9999;background-color:#fff;border-radius:.3125rem;flex-direction:column;justify-content:center;align-items:center;width:8.125rem;height:8.125rem;margin:auto;font-size:.875rem;line-height:2.4em;display:flex;bottom:4.375rem}.cu-load.load-modal [class*=cuIcon-]{font-size:60rpx}.cu-load.load-modal .image{width:2.1875rem;height:2.1875rem}.cu-load.load-modal:after{z-index:-1;content:"";background-color:#fff;border:.1875rem solid #0000000d;border-left-color:#f37b1d;border-radius:50%;width:6.25rem;height:6.25rem;font-size:.625rem;animation:1s linear infinite cuIcon-spin;position:absolute}.load-progress{z-index:2000;pointer-events:none;width:100%;position:fixed;top:0;left:0}.load-progress.hide{display:none}.load-progress .load-progress-bar{width:100%;height:4rpx;transition:all .2s;position:relative;overflow:hidden}.load-progress .load-progress-spinner{top:10rpx;right:10rpx;z-index:2000;display:block;position:absolute}.load-progress .load-progress-spinner:after{box-sizing:border-box;width:24rpx;height:24rpx;border:solid 4rpx transparent;border-top-color:inherit;border-left-color:inherit;content:"";border-radius:50%;animation:.4s linear infinite load-progress-spinner;display:block}@keyframes load-progress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
package/editable-tree/index.mjs
CHANGED
|
@@ -8,8 +8,8 @@ import "element-plus/es/components/input/style/css";
|
|
|
8
8
|
import { Fragment as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, mergeProps as v, normalizeClass as y, normalizeStyle as b, openBlock as x, renderSlot as S, toDisplayString as C, toHandlers as w, vShow as T, withCtx as E, withDirectives as D, withModifiers as O } from "vue";
|
|
9
9
|
import { computePosition as k, delay as A, fastClone as j, findTreeChildren as M, isFunction as N, isNotEmpty as P, isPlainObject as F, isUndefined as I, isVerticalScrollbarVisible as L, patch as R, scrollbarWidth as z } from "@web-utils/core";
|
|
10
10
|
import "element-plus/es/components/message/style/css";
|
|
11
|
-
import "element-plus/es/components/message-box/style/css";
|
|
12
11
|
import { cloneDeep as B } from "@web-utils/integrations/lodash";
|
|
12
|
+
import "element-plus/es/components/message-box/style/css";
|
|
13
13
|
import "element-plus/es/components/tree/style/css";
|
|
14
14
|
import "element-plus/es/components/popconfirm/style/css";
|
|
15
15
|
import { addResizeListener as V, removeResizeListener as H } from "@web-utils/integrations/resize";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
src: StringConstructor;
|
|
5
|
+
name: StringConstructor;
|
|
6
|
+
fallback: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
border: BooleanConstructor;
|
|
11
|
+
size: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
radius: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
20
|
+
src: StringConstructor;
|
|
21
|
+
name: StringConstructor;
|
|
22
|
+
fallback: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
border: BooleanConstructor;
|
|
27
|
+
size: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
radius: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
35
|
+
}>> & Readonly<{}>, {
|
|
36
|
+
size: string;
|
|
37
|
+
border: boolean;
|
|
38
|
+
fallback: string;
|
|
39
|
+
radius: string;
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { getDefaultAvatar as e } from "../api/index.mjs";
|
|
2
|
+
import { computed as t, createElementBlock as n, normalizeClass as r, normalizeStyle as i, openBlock as a, toDisplayString as o, unref as s } from "vue";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
//#region src/components/FyAvatar.vue
|
|
5
|
+
var c = ["src"], l = ["src"], u = {
|
|
6
|
+
__name: "FyAvatar",
|
|
7
|
+
props: {
|
|
8
|
+
src: String,
|
|
9
|
+
name: String,
|
|
10
|
+
fallback: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: e()
|
|
13
|
+
},
|
|
14
|
+
border: Boolean,
|
|
15
|
+
size: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "30px"
|
|
18
|
+
},
|
|
19
|
+
radius: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "100%"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(e) {
|
|
25
|
+
let u = e, d = u.fallback, f = t(() => ({
|
|
26
|
+
borderRadius: u.radius,
|
|
27
|
+
width: u.size,
|
|
28
|
+
height: u.size,
|
|
29
|
+
lineHeight: u.size
|
|
30
|
+
}));
|
|
31
|
+
function p(e) {
|
|
32
|
+
e.target.src = u.fallback;
|
|
33
|
+
}
|
|
34
|
+
return (t, u) => {
|
|
35
|
+
var m;
|
|
36
|
+
return e.src ? (a(), n("img", {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: r(["fy-avatar", { border: e.border }]),
|
|
39
|
+
style: i(s(f)),
|
|
40
|
+
src: e.src,
|
|
41
|
+
alt: "头像",
|
|
42
|
+
onError: p
|
|
43
|
+
}, null, 46, c)) : e.name ? (a(), n("span", {
|
|
44
|
+
key: 1,
|
|
45
|
+
class: r(["fy-avatar", { border: e.border }]),
|
|
46
|
+
style: i(s(f))
|
|
47
|
+
}, o((m = e.name) == null ? void 0 : m.substring(e.name.length - 2, e.name.length)), 7)) : (a(), n("img", {
|
|
48
|
+
key: 2,
|
|
49
|
+
class: r(["fy-avatar", { border: e.border }]),
|
|
50
|
+
style: i(s(f)),
|
|
51
|
+
src: s(d),
|
|
52
|
+
alt: "头像"
|
|
53
|
+
}, null, 14, l));
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { u as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fy-avatar{object-fit:cover;color:#fff;text-align:center;vertical-align:middle;background:#9aa5c3;font-size:.9em;font-weight:700;display:inline-block}.fy-avatar.border{box-sizing:border-box;border:1px solid #eee;padding:2px}
|
package/fy-time/index.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { ElTimePicker as r, ElTimeSelect as i } from "element-plus/es";
|
|
|
4
4
|
import "element-plus/es/components/base/style/css";
|
|
5
5
|
import { createBlock as a, createElementBlock as o, openBlock as s, resolveDynamicComponent as c } from "vue";
|
|
6
6
|
import { isBlank as l } from "@web-utils/core";
|
|
7
|
-
import "element-plus/es/components/time-picker/style/css";
|
|
8
7
|
import "element-plus/es/components/time-select/style/css";
|
|
8
|
+
import "element-plus/es/components/time-picker/style/css";
|
|
9
9
|
//#region src/components/avue/fy-from/time/FyTime.vue
|
|
10
10
|
var u = {
|
|
11
11
|
name: "FyTime",
|