@fangzhongya/vue-archive 0.0.3-2 → 0.0.3-21
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/dist/node/index.cjs +1473 -1139
- package/dist/node/index.js +1473 -1139
- package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.cjs +1 -0
- package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js +13 -0
- package/dist/node_modules/.pnpm/es-module-lexer@1.2.0/node_modules/es-module-lexer/dist/lexer.cjs +3 -0
- package/dist/node_modules/.pnpm/es-module-lexer@1.2.0/node_modules/es-module-lexer/dist/lexer.js +52 -0
- package/dist/packages/components/compo/index.vue.cjs +1 -1
- package/dist/packages/components/compo/index.vue.js +48 -42
- package/dist/packages/components/compo/top.cjs +1 -1
- package/dist/packages/components/compo/top.d.ts +1 -1
- package/dist/packages/components/compo/top.js +41 -40
- package/dist/packages/components/test/top.cjs +1 -1
- package/dist/packages/components/test/top.d.ts +1 -1
- package/dist/packages/components/test/top.js +52 -51
- package/dist/packages/components/use/code.cjs +10 -10
- package/dist/packages/components/use/code.d.ts +13 -0
- package/dist/packages/components/use/code.js +88 -59
- package/dist/packages/components/use/index.cjs +1 -1
- package/dist/packages/components/use/index.js +2 -2
- package/dist/packages/components/use/retrie/choice/index.vue.cjs +1 -1
- package/dist/packages/components/use/retrie/choice/index.vue.js +1 -1
- package/dist/packages/components/use/set-props.vue.cjs +1 -1
- package/dist/packages/components/use/set-props.vue.js +46 -63
- package/dist/packages/config.cjs +1 -1
- package/dist/packages/config.js +1 -1
- package/dist/packages/page/comprops/index.vue2.cjs +1 -1
- package/dist/packages/page/comprops/index.vue2.js +50 -40
- package/dist/packages/router/file.cjs +1 -0
- package/dist/packages/router/file.d.ts +8 -0
- package/dist/packages/router/file.js +43 -0
- package/dist/packages/router/index.cjs +1 -1
- package/dist/packages/router/index.d.ts +1 -0
- package/dist/packages/router/index.js +62 -89
- package/dist/packages/utils/common.cjs +1 -1
- package/dist/packages/utils/common.js +4 -4
- package/dist/packages/utils/glob.cjs +1 -1
- package/dist/packages/utils/glob.js +6 -6
- package/dist/packages/utils/index.cjs +1 -1
- package/dist/packages/utils/index.js +1 -1
- package/package.json +7 -7
- package/dist/markdown-it.d.ts +0 -1
- package/dist/node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.cjs +0 -3
- package/dist/node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.js +0 -52
- package/dist/packages/components/md/markdown-it.d.ts +0 -1
- package/dist/packages/components/use/prettier.d.ts +0 -7
- package/dist/prettier.d.ts +0 -7
- package/dist/src/vite-env.d.ts +0 -1
- package/dist/vite-env.d.ts +0 -1
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.7-20}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
|
@@ -1,92 +1,75 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as v, ref as a, watch as T, nextTick as k, openBlock as x, createElementBlock as j, createVNode as B, createCommentVNode as C } from "vue";
|
|
2
|
+
import E from "./retrie/index.vue.js";
|
|
3
|
+
import { getSpecType as N } from "./code.js";
|
|
4
|
+
const S = {
|
|
4
5
|
key: 0,
|
|
5
6
|
class: "set-props"
|
|
6
|
-
},
|
|
7
|
+
}, Q = /* @__PURE__ */ v({
|
|
7
8
|
__name: "set-props",
|
|
8
9
|
props: {
|
|
9
10
|
name: String,
|
|
10
11
|
list: Array
|
|
11
12
|
},
|
|
12
13
|
emits: ["change"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
function
|
|
14
|
+
setup(u, { emit: m }) {
|
|
15
|
+
const r = u, c = a({}), p = a(0), o = a({}), n = a([]);
|
|
16
|
+
function f() {
|
|
16
17
|
var e;
|
|
17
18
|
o.value = {};
|
|
18
|
-
const
|
|
19
|
-
(e =
|
|
20
|
-
let
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
label: u,
|
|
32
|
-
prop: w[0].trim()
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}), f.value[t] = h, r == "function" ? r = "function" : r == "array" ? r = "choice" : r = "select";
|
|
36
|
-
}
|
|
37
|
-
let E = {
|
|
38
|
-
label: g(t, l),
|
|
39
|
-
prop: t,
|
|
40
|
-
type: r,
|
|
41
|
-
dataType: c,
|
|
42
|
-
select: t
|
|
19
|
+
const l = [];
|
|
20
|
+
(e = r.list) == null || e.forEach((t) => {
|
|
21
|
+
let s = t.name;
|
|
22
|
+
if (s.includes(".") ? s = "" : s = (s.split("/")[0] || "").trim(), s) {
|
|
23
|
+
o.value[s] = (t.default || "").trim();
|
|
24
|
+
const { arr: y, type: b, dataType: g } = N(t);
|
|
25
|
+
c.value[s] = y;
|
|
26
|
+
let V = {
|
|
27
|
+
label: d(s, t),
|
|
28
|
+
prop: s,
|
|
29
|
+
type: b,
|
|
30
|
+
dataType: g,
|
|
31
|
+
select: s
|
|
43
32
|
};
|
|
44
|
-
|
|
33
|
+
l.push(V);
|
|
45
34
|
}
|
|
46
|
-
}),
|
|
47
|
-
}
|
|
48
|
-
function g(s, e) {
|
|
49
|
-
let l = s + ": { " + (e.type || "any") + " } " + e.description;
|
|
50
|
-
return e.default && (l += " 默认值=" + e.default), e.selectable && (l += " 可选值=" + e.selectable), l;
|
|
35
|
+
}), n.value = l;
|
|
51
36
|
}
|
|
52
|
-
function
|
|
53
|
-
let
|
|
54
|
-
return (
|
|
55
|
-
t = t.trim(), t && e.push(t);
|
|
56
|
-
}), [...new Set(e)].sort();
|
|
37
|
+
function d(l, e) {
|
|
38
|
+
let t = l + ": { " + (e.type || "any") + " } " + e.description;
|
|
39
|
+
return e.default && (t += " 默认值=" + e.default), e.selectable && (t += " 可选值=" + e.selectable), t;
|
|
57
40
|
}
|
|
58
|
-
function
|
|
59
|
-
let
|
|
60
|
-
|
|
41
|
+
function h(l, e) {
|
|
42
|
+
let t = Object.assign({}, l);
|
|
43
|
+
m("change", t, e);
|
|
61
44
|
}
|
|
62
|
-
let
|
|
63
|
-
function
|
|
64
|
-
clearTimeout(
|
|
65
|
-
|
|
45
|
+
let i;
|
|
46
|
+
function _() {
|
|
47
|
+
clearTimeout(i), i = setTimeout(() => {
|
|
48
|
+
f();
|
|
66
49
|
}, 400);
|
|
67
50
|
}
|
|
68
|
-
return
|
|
69
|
-
() =>
|
|
51
|
+
return T(
|
|
52
|
+
() => r.name,
|
|
70
53
|
() => {
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
n.value = [], k(() => {
|
|
55
|
+
_();
|
|
73
56
|
});
|
|
74
57
|
},
|
|
75
58
|
{
|
|
76
59
|
immediate: !0
|
|
77
60
|
}
|
|
78
|
-
), (
|
|
79
|
-
|
|
80
|
-
refresh:
|
|
61
|
+
), (l, e) => n.value && n.value.length > 0 ? (x(), j("div", S, [
|
|
62
|
+
B(E, {
|
|
63
|
+
refresh: p.value,
|
|
81
64
|
modelValue: o.value,
|
|
82
|
-
selects:
|
|
83
|
-
list:
|
|
84
|
-
name:
|
|
85
|
-
onQuery:
|
|
65
|
+
selects: c.value,
|
|
66
|
+
list: n.value,
|
|
67
|
+
name: r.name,
|
|
68
|
+
onQuery: h
|
|
86
69
|
}, null, 8, ["refresh", "modelValue", "selects", "list", "name"])
|
|
87
|
-
])) :
|
|
70
|
+
])) : C("", !0);
|
|
88
71
|
}
|
|
89
72
|
});
|
|
90
73
|
export {
|
|
91
|
-
|
|
74
|
+
Q as default
|
|
92
75
|
};
|
package/dist/packages/config.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs"),n={components:[]};function o(e){return t.mergeObject(n,e,2)}function r(e){return n[e]}exports.getConfig=r;exports.userConfig=o;
|
package/dist/packages/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeObject as t } from "../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
import { mergeObject as t } from "../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js";
|
|
2
2
|
const o = {
|
|
3
3
|
components: []
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),_=require("../../components/boxurl/index.vue.cjs"),p=require("../../components/compo/props.vue.cjs"),h=require("../../components/header/index.vue.cjs"),x=require("../../config.cjs"),f=require("../../utils/common.cjs"),u=require("../../utils/glob.cjs"),N={class:"__document-index"},g={class:"index-aside"},E={class:"index-aside-div"},V={class:"choice aside"},k=["onClick"],C={class:"aside-li-name"},y={class:"aside-li-name-name"},q={class:"index-body"},B={class:"index-div"},w={class:"index-header"},b={class:"index-main"},D={class:"index-main-top"},O={class:"aside-li-name"},P={class:"aside-li-name-name"},R={class:"index-main-div"},S=e.defineComponent({__name:"index",setup($){const c=x.getConfig("components").map(t=>t.comprops),v=Object.values(u.getComponentPropsObjs()).filter(t=>{for(let s=0;s<c.length;s++){const n=c[s]||"";if(n&&f.isComprops(t.key,n))return!0}});function i(t){const n=new RegExp(t.comprops+"(.+)$").exec("/"+t.value);return n?n[1]:t.value}const a=e.ref(v),o=e.ref(a.value[0]),r=e.ref("");function m(t){o.value=t,l()}function l(){u.getPropsRaws([o.value]).then(t=>{const s=t[0];r.value=s.raw})}return l(),(t,s)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",g,[e.createElementVNode("div",E,[e.createElementVNode("div",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(n,j)=>{var d;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["aside-li",{on:n.key==((d=e.unref(o))==null?void 0:d.key)}]),onClick:z=>m(n)},[e.createVNode(_,{value:n},{default:e.withCtx(()=>[e.createElementVNode("div",C,[e.createElementVNode("div",y,e.toDisplayString(i(n)),1)])]),_:2},1032,["value"])],10,k)}),256))])])]),e.createElementVNode("div",q,[e.createElementVNode("div",B,[e.createElementVNode("div",w,[e.createVNode(h)]),e.createElementVNode("div",b,[e.createElementVNode("div",D,[e.createVNode(_,{value:e.unref(o)},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createElementVNode("div",P,e.toDisplayString(i(e.unref(o))),1)])]),_:1},8,["value"])]),e.createElementVNode("div",R,[e.createVNode(p,{value:r.value},null,8,["value"])])])])])]))}});module.exports=S;
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as C, ref as a, openBlock as c, createElementBlock as d, createElementVNode as e, Fragment as y, renderList as w, normalizeClass as $, unref as l, createVNode as i, withCtx as f, toDisplayString as h } from "vue";
|
|
2
|
+
import x from "../../components/boxurl/index.vue.js";
|
|
3
3
|
import E from "../../components/compo/props.vue.js";
|
|
4
4
|
import N from "../../components/header/index.vue.js";
|
|
5
5
|
import { getConfig as b } from "../../config.js";
|
|
6
6
|
import { isComprops as B } from "../../utils/common.js";
|
|
7
7
|
import { getComponentPropsObjs as D, getPropsRaws as O } from "../../utils/glob.js";
|
|
8
|
-
const P = { class: "__document-index" }, R = { class: "index-aside" }, V = { class: "index-aside-div" }, j = { class: "choice aside" }, z = ["onClick"], F = { class: "aside-li-name" }, H = { class: "aside-li-name-name" }, L = { class: "index-body" }, S = { class: "index-div" }, q = { class: "index-header" }, A = { class: "index-main" }, G = { class: "index-main-div" },
|
|
8
|
+
const P = { class: "__document-index" }, R = { class: "index-aside" }, V = { class: "index-aside-div" }, j = { class: "choice aside" }, z = ["onClick"], F = { class: "aside-li-name" }, H = { class: "aside-li-name-name" }, L = { class: "index-body" }, S = { class: "index-div" }, q = { class: "index-header" }, A = { class: "index-main" }, G = { class: "index-main-top" }, I = { class: "aside-li-name" }, J = { class: "aside-li-name-name" }, K = { class: "index-main-div" }, te = /* @__PURE__ */ C({
|
|
9
9
|
__name: "index",
|
|
10
|
-
setup(
|
|
11
|
-
const r = b("components").map((
|
|
12
|
-
(
|
|
10
|
+
setup(M) {
|
|
11
|
+
const r = b("components").map((s) => s.comprops), g = Object.values(D()).filter(
|
|
12
|
+
(s) => {
|
|
13
13
|
for (let o = 0; o < r.length; o++) {
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
14
|
+
const t = r[o] || "";
|
|
15
|
+
if (t && B(s.key, t))
|
|
16
16
|
return !0;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
return
|
|
20
|
+
function _(s) {
|
|
21
|
+
const t = new RegExp(s.comprops + "(.+)$").exec("/" + s.value);
|
|
22
|
+
return t ? t[1] : s.value;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
function
|
|
26
|
-
n.value =
|
|
24
|
+
const m = a(g), n = a(m.value[0]), u = a("");
|
|
25
|
+
function k(s) {
|
|
26
|
+
n.value = s, v();
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function v() {
|
|
29
29
|
O([n.value]).then(
|
|
30
|
-
(
|
|
31
|
-
const o =
|
|
32
|
-
|
|
30
|
+
(s) => {
|
|
31
|
+
const o = s[0];
|
|
32
|
+
u.value = o.raw;
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(c(!0),
|
|
41
|
-
var
|
|
42
|
-
return c(),
|
|
43
|
-
class:
|
|
44
|
-
on:
|
|
36
|
+
return v(), (s, o) => (c(), d("div", P, [
|
|
37
|
+
e("div", R, [
|
|
38
|
+
e("div", V, [
|
|
39
|
+
e("div", j, [
|
|
40
|
+
(c(!0), d(y, null, w(m.value, (t, Q) => {
|
|
41
|
+
var p;
|
|
42
|
+
return c(), d("div", {
|
|
43
|
+
class: $(["aside-li", {
|
|
44
|
+
on: t.key == ((p = l(n)) == null ? void 0 : p.key)
|
|
45
45
|
}]),
|
|
46
|
-
onClick: (
|
|
46
|
+
onClick: (T) => k(t)
|
|
47
47
|
}, [
|
|
48
|
-
|
|
49
|
-
default:
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
i(x, { value: t }, {
|
|
49
|
+
default: f(() => [
|
|
50
|
+
e("div", F, [
|
|
51
|
+
e("div", H, h(_(t)), 1)
|
|
52
52
|
])
|
|
53
53
|
]),
|
|
54
54
|
_: 2
|
|
@@ -58,14 +58,24 @@ const P = { class: "__document-index" }, R = { class: "index-aside" }, V = { cla
|
|
|
58
58
|
])
|
|
59
59
|
])
|
|
60
60
|
]),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
e("div", L, [
|
|
62
|
+
e("div", S, [
|
|
63
|
+
e("div", q, [
|
|
64
|
+
i(N)
|
|
65
65
|
]),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
e("div", A, [
|
|
67
|
+
e("div", G, [
|
|
68
|
+
i(x, { value: l(n) }, {
|
|
69
|
+
default: f(() => [
|
|
70
|
+
e("div", I, [
|
|
71
|
+
e("div", J, h(_(l(n))), 1)
|
|
72
|
+
])
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
}, 8, ["value"])
|
|
76
|
+
]),
|
|
77
|
+
e("div", K, [
|
|
78
|
+
i(E, { value: u.value }, null, 8, ["value"])
|
|
69
79
|
])
|
|
70
80
|
])
|
|
71
81
|
])
|
|
@@ -74,5 +84,5 @@ const P = { class: "__document-index" }, R = { class: "index-aside" }, V = { cla
|
|
|
74
84
|
}
|
|
75
85
|
});
|
|
76
86
|
export {
|
|
77
|
-
|
|
87
|
+
te as default
|
|
78
88
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));function s(){return Object.assign({"../page/compon/index.vue":()=>Promise.resolve().then(()=>o(require("../page/compon/index.vue.cjs"))),"../page/comprops/index.vue":()=>Promise.resolve().then(()=>o(require("../page/comprops/index.vue.cjs"))),"../page/develop/index.vue":()=>Promise.resolve().then(()=>o(require("../page/develop/index.vue.cjs"))),"../page/index/index.vue":()=>Promise.resolve().then(()=>o(require("../page/index/index.vue.cjs"))),"../page/single/index.vue":()=>Promise.resolve().then(()=>o(require("../page/single/index.vue.cjs"))),"../page/tests/index.vue":()=>Promise.resolve().then(()=>o(require("../page/tests/index.vue.cjs")))})}function a(e){let t=e.replace(/\.\/|\/index.(ts|vue)/g,"");return t=t.replace(".page/",""),t}function l(e){let t=e.split("/"),r=[];return t.forEach(n=>{r.push(...n.split("-"))}),r=r.map(n=>n.slice(0,1).toUpperCase()+n.slice(1)),r.join("")}function p(e){return e}function g(){let e=[];const t=s();for(const r in t){const n=t[r];let i=a(r),u=i;i=l(i),e.push({name:i,key:r,value:u,component:n})}return e}exports.getFileName=g;exports.getRouterName=l;exports.getRouterValueName=p;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function i() {
|
|
2
|
+
return /* @__PURE__ */ Object.assign({
|
|
3
|
+
"../page/compon/index.vue": () => import("../page/compon/index.vue.js"),
|
|
4
|
+
"../page/comprops/index.vue": () => import("../page/comprops/index.vue.js"),
|
|
5
|
+
"../page/develop/index.vue": () => import("../page/develop/index.vue.js"),
|
|
6
|
+
"../page/index/index.vue": () => import("../page/index/index.vue.js"),
|
|
7
|
+
"../page/single/index.vue": () => import("../page/single/index.vue.js"),
|
|
8
|
+
"../page/tests/index.vue": () => import("../page/tests/index.vue.js")
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function a(e) {
|
|
12
|
+
let t = e.replace(/\.\/|\/index.(ts|vue)/g, "");
|
|
13
|
+
return t = t.replace(".page/", ""), t;
|
|
14
|
+
}
|
|
15
|
+
function l(e) {
|
|
16
|
+
let t = e.split("/"), n = [];
|
|
17
|
+
return t.forEach((o) => {
|
|
18
|
+
n.push(...o.split("-"));
|
|
19
|
+
}), n = n.map((o) => o.slice(0, 1).toUpperCase() + o.slice(1)), n.join("");
|
|
20
|
+
}
|
|
21
|
+
function s(e) {
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
function u() {
|
|
25
|
+
let e = [];
|
|
26
|
+
const t = i();
|
|
27
|
+
for (const n in t) {
|
|
28
|
+
const o = t[n];
|
|
29
|
+
let p = a(n), r = p;
|
|
30
|
+
p = l(p), e.push({
|
|
31
|
+
name: p,
|
|
32
|
+
key: n,
|
|
33
|
+
value: r,
|
|
34
|
+
component: o
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return e;
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
u as getFileName,
|
|
41
|
+
l as getRouterName,
|
|
42
|
+
s as getRouterValueName
|
|
43
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../config.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../config.cjs"),l=require("../utils/storage.cjs"),g=require("./file.cjs"),y=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),s=[{path:"/__document",name:"__document",component:()=>Promise.resolve().then(()=>y(require("../index/index.vue.cjs"))),redirect:{name:"__documentIndex"},meta:{title:"文档"},children:[]}];let m=0;document.addEventListener("keydown",h);function h(e){e=e||window.event,(e.ctrlKey&&e.location==82||e.location==116)&&l.setSession("-keydown-F5",2)}let a="__document";function k(e){var o;a=u.getConfig("router")||"__document";let t="/"+a;s[0].path=t,s[0].redirect={name:a+"Index"},(o=s[0].children)==null||o.unshift({path:t+"/:chapters+",redirect:{name:a+"Index"}}),g.getFileName().forEach(n=>{var r;(r=s[0].children)==null||r.push({path:n.value,name:a+n.name,component:n.component})});const i=u.getConfig("redirect");if(s.forEach(n=>{e.addRoute(n),e.beforeEach((r,p)=>{if(p.fullPath=="/"){let f=l.getSession("-keydown-F5");document.referrer||f==2?(console.log("刷新"),m=2):(console.log("地址栏输入 或者 刷新"),m=3)}else console.log("跳转"),m=1;l.setSession("-keydown-F5",0)})}),i){const n=e.getRoutes().filter(r=>r.path=="/")[0]||{path:"/"};n.redirect=t,n.name?e.addRoute(n.name,n):e.addRoute(n)}}const d={};function _(e){let t=e.path,i=e.params;if(i&&Object.keys(i).length)return i;{let o=d[t];return o&&Object.keys(o).length?o:m==3?{}:l.getSession("router.toPage."+t)}}function c(e,t,i="push"){let o=t.path||"";const n=t.name,r=t.params||{};e[i](t),n&&(o=e.resolve({name:n}).path),d[o]=r,l.setSession("router.toPage."+o,r)}function v(e,t){c(e,{name:a+"Single",query:{id:t.name+"/"+t.value},params:{key:t.key,comkey:t.comkey}})}function P(e,t){c(e,{name:a+"Develop",query:{id:t.value},params:{key:t.key}})}function S(e,t){c(e,{name:a+"Tests",query:{id:t.value},params:{key:t.key}})}function q(e,t){c(e,{name:a+"Compon",query:{id:t.value},params:{key:t.key}})}exports.getPageParams=_;exports.init=k;exports.toCompon=q;exports.toDevelop=P;exports.toPage=c;exports.toSingle=v;exports.toTests=S;
|
|
@@ -11,6 +11,7 @@ type PushObj = {
|
|
|
11
11
|
query?: LocationQueryRaw;
|
|
12
12
|
};
|
|
13
13
|
export declare function toPage(router: Router, push: PushObj, type?: ToPush): void;
|
|
14
|
+
export declare function tos(router: Router, obj: ComponentsObj, name?: string): void;
|
|
14
15
|
export declare function toSingle(router: Router, obj: TestsObj): void;
|
|
15
16
|
export declare function toDevelop(router: Router, obj: ComponentsObj): void;
|
|
16
17
|
export declare function toTests(router: Router, obj: ComponentsObj): void;
|
|
@@ -1,129 +1,102 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import { setSession as
|
|
3
|
-
|
|
1
|
+
import { getConfig as d } from "../config.js";
|
|
2
|
+
import { setSession as s, getSession as p } from "../utils/storage.js";
|
|
3
|
+
import { getFileName as y } from "./file.js";
|
|
4
|
+
const m = [
|
|
4
5
|
{
|
|
5
6
|
path: "/__document",
|
|
6
7
|
name: "__document",
|
|
7
8
|
component: () => import("../index/index.vue.js"),
|
|
8
9
|
redirect: { name: "__documentIndex" },
|
|
9
10
|
meta: { title: "文档" },
|
|
10
|
-
children: [
|
|
11
|
-
{
|
|
12
|
-
path: "index",
|
|
13
|
-
name: "__documentIndex",
|
|
14
|
-
component: () => import("../page/index/index.vue.js"),
|
|
15
|
-
meta: { title: "首页" }
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
path: "compon",
|
|
19
|
-
name: "__documentCompon",
|
|
20
|
-
component: () => import("../page/compon/index.vue.js"),
|
|
21
|
-
meta: { title: "组件" }
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
path: "tests",
|
|
25
|
-
name: "__documentTests",
|
|
26
|
-
component: () => import("../page/tests/index.vue.js"),
|
|
27
|
-
meta: { title: "示例" }
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
path: "develop",
|
|
31
|
-
name: "__documentDevelop",
|
|
32
|
-
component: () => import("../page/develop/index.vue.js"),
|
|
33
|
-
meta: { title: "开发" }
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
path: "single",
|
|
37
|
-
name: "__documentSingle",
|
|
38
|
-
component: () => import("../page/single/index.vue.js"),
|
|
39
|
-
meta: { title: "单例开发" }
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
path: "comprops",
|
|
43
|
-
name: "__documentComprops",
|
|
44
|
-
component: () => import("../page/comprops/index.vue.js"),
|
|
45
|
-
meta: { title: "公共参数" }
|
|
46
|
-
}
|
|
47
|
-
]
|
|
11
|
+
children: []
|
|
48
12
|
}
|
|
49
13
|
];
|
|
50
14
|
let c = 0;
|
|
51
|
-
document.addEventListener("keydown",
|
|
52
|
-
function
|
|
15
|
+
document.addEventListener("keydown", g);
|
|
16
|
+
function g(e) {
|
|
53
17
|
e = e || window.event, (e.ctrlKey && e.location == 82 || //ctrl+R
|
|
54
|
-
e.location == 116) &&
|
|
18
|
+
e.location == 116) && s("-keydown-F5", 2);
|
|
55
19
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
20
|
+
let a = "__document";
|
|
21
|
+
function P(e) {
|
|
22
|
+
var o;
|
|
23
|
+
a = d("router") || "__document";
|
|
24
|
+
let t = "/" + a;
|
|
25
|
+
m[0].path = t, m[0].redirect = { name: a + "Index" }, (o = m[0].children) == null || o.unshift({
|
|
60
26
|
path: t + "/:chapters+",
|
|
61
|
-
redirect: { name: "
|
|
27
|
+
redirect: { name: a + "Index" }
|
|
28
|
+
}), y().forEach((n) => {
|
|
29
|
+
var r;
|
|
30
|
+
(r = m[0].children) == null || r.push({
|
|
31
|
+
path: n.value,
|
|
32
|
+
name: a + n.name,
|
|
33
|
+
component: n.component
|
|
34
|
+
});
|
|
62
35
|
});
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
e.addRoute(
|
|
66
|
-
if (
|
|
67
|
-
let
|
|
68
|
-
document.referrer ||
|
|
36
|
+
const i = d("redirect");
|
|
37
|
+
if (m.forEach((n) => {
|
|
38
|
+
e.addRoute(n), e.beforeEach((r, f) => {
|
|
39
|
+
if (f.fullPath == "/") {
|
|
40
|
+
let h = p("-keydown-F5");
|
|
41
|
+
document.referrer || h == 2 ? (console.log("刷新"), c = 2) : (console.log("地址栏输入 或者 刷新"), c = 3);
|
|
69
42
|
} else
|
|
70
43
|
console.log("跳转"), c = 1;
|
|
71
|
-
|
|
44
|
+
s("-keydown-F5", 0);
|
|
72
45
|
});
|
|
73
|
-
}),
|
|
74
|
-
const
|
|
46
|
+
}), i) {
|
|
47
|
+
const n = e.getRoutes().filter((r) => r.path == "/")[0] || {
|
|
75
48
|
path: "/"
|
|
76
49
|
};
|
|
77
|
-
|
|
50
|
+
n.redirect = t, n.name ? e.addRoute(n.name, n) : e.addRoute(n);
|
|
78
51
|
}
|
|
79
52
|
}
|
|
80
|
-
const
|
|
81
|
-
function
|
|
82
|
-
let t = e.path,
|
|
83
|
-
if (
|
|
84
|
-
return
|
|
53
|
+
const u = {};
|
|
54
|
+
function w(e) {
|
|
55
|
+
let t = e.path, i = e.params;
|
|
56
|
+
if (i && Object.keys(i).length)
|
|
57
|
+
return i;
|
|
85
58
|
{
|
|
86
|
-
let
|
|
87
|
-
return
|
|
59
|
+
let o = u[t];
|
|
60
|
+
return o && Object.keys(o).length ? o : c == 3 ? {} : p(
|
|
88
61
|
"router.toPage." + t
|
|
89
62
|
);
|
|
90
63
|
}
|
|
91
64
|
}
|
|
92
|
-
function
|
|
93
|
-
let
|
|
94
|
-
const
|
|
95
|
-
e[
|
|
65
|
+
function l(e, t, i = "push") {
|
|
66
|
+
let o = t.path || "";
|
|
67
|
+
const n = t.name, r = t.params || {};
|
|
68
|
+
e[i](t), n && (o = e.resolve({ name: n }).path), u[o] = r, s("router.toPage." + o, r);
|
|
96
69
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
name: "
|
|
70
|
+
function x(e, t) {
|
|
71
|
+
l(e, {
|
|
72
|
+
name: a + "Single",
|
|
100
73
|
query: {
|
|
101
74
|
id: t.name + "/" + t.value
|
|
102
75
|
},
|
|
103
76
|
params: { key: t.key, comkey: t.comkey }
|
|
104
77
|
});
|
|
105
78
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
108
|
-
name: "
|
|
79
|
+
function q(e, t) {
|
|
80
|
+
l(e, {
|
|
81
|
+
name: a + "Develop",
|
|
109
82
|
query: {
|
|
110
83
|
id: t.value
|
|
111
84
|
},
|
|
112
85
|
params: { key: t.key }
|
|
113
86
|
});
|
|
114
87
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
name: "
|
|
88
|
+
function E(e, t) {
|
|
89
|
+
l(e, {
|
|
90
|
+
name: a + "Tests",
|
|
118
91
|
query: {
|
|
119
92
|
id: t.value
|
|
120
93
|
},
|
|
121
94
|
params: { key: t.key }
|
|
122
95
|
});
|
|
123
96
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
name: "
|
|
97
|
+
function F(e, t) {
|
|
98
|
+
l(e, {
|
|
99
|
+
name: a + "Compon",
|
|
127
100
|
query: {
|
|
128
101
|
id: t.value
|
|
129
102
|
},
|
|
@@ -131,11 +104,11 @@ function x(e, t) {
|
|
|
131
104
|
});
|
|
132
105
|
}
|
|
133
106
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
107
|
+
w as getPageParams,
|
|
108
|
+
P as init,
|
|
109
|
+
F as toCompon,
|
|
110
|
+
q as toDevelop,
|
|
111
|
+
l as toPage,
|
|
112
|
+
x as toSingle,
|
|
113
|
+
E as toTests
|
|
141
114
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./storage.cjs"),R=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./storage.cjs"),R=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs"),q=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs"),m=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs"),E=require("../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs"),A=["vue","js"];function K(t,e){let n=R.humpToLine(t.name),i=[];return t.alias&&i.push(t.alias+"-"+n),e&&e.length>0&&e.forEach(s=>{t.alias&&i.push(t.alias+"-"+s+"-"+n),i.push(s+"-"+n)}),i}function T(t){return t.sort((e,n)=>{let i=m.appearNum(e,"/"),s=m.appearNum(n,"/");return i==s?n.length-e.length:s-i}),t}function C(t=[],e=[],n=[]){let i=e;(!i||i.length==0)&&(i=A);let s=[];return t&&t.length>0&&(s=t),n&&n.length>0&&n.forEach(l=>{i==null||i.forEach(a=>{s.push(l+"."+a)})}),s=[...new Set(s)],T(s)}function N(t,e,n={},i=""){for(let s=0;s<e.length;s++){const l=e[s],a=new RegExp("^.*/([^/]+)"+l+"$");let c=t.match(a);if(c){const p=[],u={};let f="";Object.keys(n).forEach(g=>{let h=n[g];t.startsWith(h+"/")&&(f=h,u[g]=h,p.push(g))});let o=c[1],r={dir:"",suffix:E.getSuffix(t),name:q.lineToLargeHump(o),value:o,key:"",tdir:"",adir:f,alias:i,aliass:u,aliasNames:[],raw:"",getRaw:null,mds:[],tests:void 0};return r.aliasNames=K(r,p),r}}}function y(t){x.setSession("aside.key",t)}function D(){return x.getSession("aside.key")}function H(t){let e=t.match(/\/([^\/]+)\/$/);return e&&e.length>1?e[1]:""}function w(t,e){return e?new RegExp(e+".+(\\.(js|ts))?$").test(t):!1}function S(t,e){return e?new RegExp("/"+e+"(\\.(js|ts))?$").test(t):!1}function M(t,e,n,i,s){const l=[],a=[],c=C(e.matchexts,e.extensions,e.matchs),p=H(e.dir);return t.forEach(u=>{const f=new RegExp("^"+e.dir);let o=u.replace(f,"");if(s.comprops&&w(o,s.comprops)||s.curprops&&S(o,s.curprops)){let r={};r.comprops=s.comprops||"",r.curprops=s.curprops||"",r.value=o,r.dir=e.dir,r.suffix=E.getSuffix(u),r.tdir=p,r.key=u,r.raw="",r.getRaw=d(n,u),l.push(r)}else{let r=N(o,c,e.aliass,e.alias);r&&(r.comprops=s.comprops,r.curprops=s.curprops,r.dir=e.dir,r.tdir=p,r.key=u,r.component=i[u],r.getRaw=d(n,u),a.push(r))}}),{props:l,components:a}}function d(t,e){return typeof t=="function"?t:t?t[e]:null}exports.defaultExtensions=A;exports.getAsideKey=D;exports.getComponentsArr=M;exports.getMatchs=C;exports.getRawValue=d;exports.getUrlName=N;exports.isComprops=w;exports.isCurprops=S;exports.setAsideKey=y;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { setSession as E, getSession as w } from "./storage.js";
|
|
2
|
-
import { humpToLine as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
3
|
-
import { lineToLargeHump as A } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
4
|
-
import { appearNum as h } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
5
|
-
import { getSuffix as x } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-
|
|
2
|
+
import { humpToLine as N } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js";
|
|
3
|
+
import { lineToLargeHump as A } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js";
|
|
4
|
+
import { appearNum as h } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js";
|
|
5
|
+
import { getSuffix as x } from "../../node_modules/.pnpm/@fangzhongya_utils@0.0.7-20/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js";
|
|
6
6
|
const R = ["vue", "js"];
|
|
7
7
|
function S(t, e) {
|
|
8
8
|
let n = N(t.name), i = [];
|