@pubinfo-pr/module-crypto 0.203.4 → 0.203.5

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.
@@ -0,0 +1,110 @@
1
+ import { i as e } from "./index.js";
2
+ import { Button as t, Drawer as n, Form as r, FormItem as i, Input as a, Space as o, Textarea as s } from "ant-design-vue/es";
3
+ import { createBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, isRef as f, openBlock as p, ref as m, shallowRef as h, toValue as g, unref as _, withCtx as v } from "vue";
4
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
5
+ function y(e = !1, t = {}) {
6
+ let { truthyValue: n = !0, falsyValue: r = !1 } = t, i = f(e), a = h(e);
7
+ function o(e) {
8
+ if (arguments.length) return a.value = e, a.value;
9
+ {
10
+ let e = g(n);
11
+ return a.value = a.value === e ? g(r) : e, a.value;
12
+ }
13
+ }
14
+ return i ? o : [a, o];
15
+ }
16
+ //#endregion
17
+ //#region src/pages/components/drawerCryptoUrl.vue?vue&type=script&setup=true&lang.ts
18
+ var b = /* @__PURE__ */ d({
19
+ name: "DrawerCryptoUrl",
20
+ __name: "drawerCryptoUrl",
21
+ emits: ["submit"],
22
+ setup(e, { expose: d, emit: h }) {
23
+ let g = h, b = { url: [{
24
+ required: !0,
25
+ validator: O,
26
+ trigger: ["blur", "change"]
27
+ }] }, [x, S] = y(!1), C = m(), w = m({}), T = m(!1), E = m([]), D = m(0);
28
+ function O(e, t, n) {
29
+ t ? /^\/(?!.*\*{3})(?:[\w-]+|:\w+|\*{1,2})(?:\/(?:[\w-]+|:\w+|\*{1,2}))*$/.test(t) ? n() : n(/* @__PURE__ */ Error("url格式不正确")) : n(/* @__PURE__ */ Error("请输入url"));
30
+ }
31
+ async function k(e, t, n) {
32
+ S(!0), E.value = t || [], D.value = n || 0, e ? (T.value = !0, w.value = { ...t?.[n || 0] }) : (T.value = !1, w.value = {});
33
+ }
34
+ let [A, j] = y(!1);
35
+ function M() {
36
+ C.value?.validate().then(() => {
37
+ j(!0);
38
+ let e = { ...w.value };
39
+ T.value ? E.value[D.value] = e : E.value.push(e), j(!1), N(), g("submit", E.value);
40
+ });
41
+ }
42
+ function N() {
43
+ S(!1);
44
+ }
45
+ return d({ open: k }), (e, d) => {
46
+ let m = a, h = i, g = s, y = r, S = t, T = o, E = n;
47
+ return p(), c(E, {
48
+ open: _(x),
49
+ "onUpdate:open": d[3] ||= (e) => f(x) ? x.value = e : null,
50
+ title: "url信息",
51
+ placement: "right",
52
+ width: 600,
53
+ "destroy-on-close": "",
54
+ "footer-style": { textAlign: "right" },
55
+ onClose: N
56
+ }, {
57
+ footer: v(() => [u(T, null, {
58
+ default: v(() => [u(S, { onClick: N }, {
59
+ default: v(() => [...d[4] ||= [l(" 取消 ", -1)]]),
60
+ _: 1
61
+ }), u(S, {
62
+ type: "primary",
63
+ loading: _(A),
64
+ onClick: d[2] ||= (e) => M()
65
+ }, {
66
+ default: v(() => [...d[5] ||= [l(" 提交 ", -1)]]),
67
+ _: 1
68
+ }, 8, ["loading"])]),
69
+ _: 1
70
+ })]),
71
+ default: v(() => [u(y, {
72
+ ref_key: "formRef",
73
+ ref: C,
74
+ model: _(w),
75
+ rules: b,
76
+ "label-col": { style: { width: "90px" } }
77
+ }, {
78
+ default: v(() => [u(h, {
79
+ label: "url地址",
80
+ name: "url",
81
+ tooltip: "支持url通配符,示例:/api/v1/user/*,/api/login/**"
82
+ }, {
83
+ default: v(() => [u(m, {
84
+ value: _(w).url,
85
+ "onUpdate:value": d[0] ||= (e) => _(w).url = e,
86
+ maxlength: 200
87
+ }, null, 8, ["value"])]),
88
+ _: 1
89
+ }), u(h, {
90
+ label: "描述",
91
+ name: "description"
92
+ }, {
93
+ default: v(() => [u(g, {
94
+ value: _(w).description,
95
+ "onUpdate:value": d[1] ||= (e) => _(w).description = e,
96
+ rows: 3,
97
+ "show-count": "",
98
+ maxlength: 200
99
+ }, null, 8, ["value"])]),
100
+ _: 1
101
+ })]),
102
+ _: 1
103
+ }, 8, ["model"])]),
104
+ _: 1
105
+ }, 8, ["open"]);
106
+ };
107
+ }
108
+ }), x = /* @__PURE__ */ e({ default: () => S }), S = b;
109
+ //#endregion
110
+ export { x as n, y as r, S as t };