@fangzhongya/vue-archive 0.0.85 → 0.0.87
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/index.css +2 -2
- package/dist/packages/components/use/retrie/input/editor/editor.d.ts +0 -49
- package/dist/packages/index/index.vue.cjs +1 -1
- package/dist/packages/index/index.vue.js +2 -3
- package/dist/packages/index/index.vue2.cjs +1 -1
- package/dist/packages/index/index.vue2.js +6 -5
- package/dist/packages/index.cjs +1 -1
- package/dist/packages/index.js +8 -7
- package/dist/packages/router/index.cjs +1 -1
- package/dist/packages/router/index.js +29 -31
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.form-input-text{padding:10px;height:160px;width:100%;box-sizing:border-box}.editor-div{padding:10px;height:160px;background-color:#eee}.editor-div .editor-code{height:100%;width:100%;min-height:80px;background-color:#fff}.form-input{font-size:16px}.form-select{position:relative;font-size:16px}.form-select .form-select-input{padding:10px;width:100%;font-size:16px;box-sizing:border-box}.form-select .form-select-box{position:absolute;width:100%;z-index:100;background-color:#000;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #000000}.form-select .form-select-box .form-select-list-div .form-select-list-li{background-color:#e9e9e9;padding:10px;cursor:pointer;border-bottom:1px solid #000000}.form-select{position:relative}.form-select .form-select-box{position:absolute;background-color:#fff;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #fff}.form-select .form-select-box .form-select-list-div .form-select-list-li{padding:10px;border-bottom:1px solid #eee}.form-select .form-select-box .form-select-list-div .form-select-list-li:last-child{border:0}.form-select .form-select-box .form-select-list-div .form-select-list-li.active{color:#0051ff}.form-boolean{display:flex;font-size:16px;padding:10px}.form-boolean .form-boolean-div{margin-right:10px}.form-string{font-size:16px}.form-string .form-string-text{padding:10px;width:100%;box-sizing:border-box}.form-number{font-size:16px}.form-number .form-number-input{padding:10px;width:100%;box-sizing:border-box}.set-emit .set-emit-li{padding:10px}.set-emit .set-emit-name{font-size:18px;padding:5px 0}.set-emit .set-emit-value{font-size:16px;background-color:azure}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
1
|
+
:root{--bor-cor: rgb(239, 248, 255);--but-cor: rgb(27, 155, 253);--but-hover-cor: rgb(0, 145, 255);--bg-but-hover-cor: rgb(128, 199, 253);--bg-aside-cor: rgb(228, 251, 197);--bg-aside-on-cor: rgb(78, 250, 87);--bg-index-cor: rgb(248, 248, 248);--bg-table-th-cor: rgb(207, 246, 251);--bg-table-td-cor: rgb(221, 243, 246);--bg-test-cor: rgb(236 255 236);--bg-test-err-cor: rgb(255, 210, 210);--bg-test-pro-cor: rgb(203, 246, 255);--bg-test-err-pro-cor: rgb(251, 203, 255);--te-test-err-cor: rgb(247, 56, 56);--te-test-pro-cor: rgb(106, 131, 255);--bg-test-body: rgb(255, 255, 255);--bg-code-highlig: rgb(255, 251, 223);--bg-code: rgb(255, 255, 255);--bg-box-cor: rgb(198, 198, 198);--bg-md-cor: rgb(255, 233, 243);--bg-use-cor: rgb(193, 219, 255);--bg-use-component-cor: rgb(246, 246, 246);--text-cor: rgb(0, 0, 0);--fs-1: 12px;--fs-2: 14px;--fs-3: 16px;--fs-4: 18px;--fs-5: 20px}.__document{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow:auto;text-align:left;width:100%;height:100%;padding:0;margin:0}.__document .but-div{cursor:pointer;color:var(--but-cor);padding:5px 10px}.__document .but-div:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside{width:250px;overflow:hidden;padding:20px 20px 20px 10px}.__document .aside .aside-li{padding:5px 10px;height:60px;font-size:20px;font-weight:600;border-bottom:1px solid var(--bor-cor);cursor:pointer;display:flex;flex-direction:row;align-items:center}.__document .aside .aside-li:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .aside .aside-li.on{background-color:var(--bg-aside-on-cor)}.__document .aside .aside-li .aside-li-name{width:100%}.__document .aside .aside-li .aside-li-name .aside-li-name-alias{font-size:var(--fs-2)}.__document .aside .aside-li .aside-li-name .aside-li-name-aliass{font-size:var(--fs-1)}.__document .md{position:relative}.__document .use .use-component{padding:10px;display:flex;justify-content:center;align-items:center;height:300px;background-color:var(--bg-use-component-cor)}.__document .set-code .set-code-buts{display:flex;align-items:center}.__document .form-item.error{background-color:var(--te-test-err-cor)}.__document .compo .compo-top .compo-top-name{padding:10px;font-size:var(--fs-4)}.__document .compo .compo-top .compo-top-name .compo-top-name-li{font-size:var(--fs-2)}.__document .compo .compo-top .compo-top-info{padding:10px;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-info .compo-top-athor,.__document .compo .compo-top .compo-top-info .compo-top-date{flex:1;display:flex;flex-direction:row;align-items:center}.__document .compo .compo-top .compo-top-descriptions{padding:0 10px;font-size:var(--fs-2)}.__document .compo .compo-li h4{margin:10px 0 0;padding:10px}.__document .compo .compo-li .compo-talbe{width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body{border:1px solid var(--bor-cor);width:100%}.__document .compo .compo-li .compo-talbe .compo-talbe-body td,.__document .compo .compo-li .compo-talbe .compo-talbe-body th{padding:5px 10px;border-bottom:1px solid var(--bor-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body th{background-color:var(--bg-table-th-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body td{background-color:var(--bg-table-td-cor)}.__document .compo .compo-li .compo-talbe .compo-talbe-body tr:last-child td{border-bottom:0}.__document .compo .compo-li .compo-talbe .compo-talbe-body .compo-talbe-zw{width:100%;text-align:center;padding:10px}.__document .compo .compo-md{padding:10px;background-color:var(--bg-md-cor)}.__document .compo .compo-use{padding:10px;background-color:var(--bg-use-cor)}.__document .main .main-but{text-align:right;display:flex;flex-direction:row;align-items:center}.__document .test.error .test-top{background-color:var(--bg-test-err-cor)}.__document .test.proposal .test-top{background-color:var(--bg-test-pro-cor)}.__document .test.error-proposal .test-top{background-color:var(--bg-test-err-pro-cor)}.__document .test .test-top{padding:5px;background-color:var(--bg-test-cor)}.__document .test .test-top .test-top-error{color:var(--te-test-err-cor)}.__document .test .test-top .test-top-proposal{color:var(--te-test-pro-cor)}.__document .test .test-div .test-body{padding:5px;background-color:var(--bg-test-body)}.__document .code{padding:0}.__document .code .code-top .code-top-but,.__document .code .code-top .code-top-but .top-but-files{display:flex;flex-direction:row;align-items:center}.__document .code .code-highlightjs{padding:0}.__document .code .code-highlightjs .hljs{background-color:var(--bg-code-highlig)}.__document .box-url{position:relative}.__document .box-url:hover .box-url-box{display:block}.__document .box-url .box-url-box{position:fixed;top:25px;display:none;background-color:var(--bg-box-cor);font-size:var(--fs-1);color:var(--text-cor);z-index:100000}.__document .box-url .box-url-box .box-div-li{height:20px;line-height:20px;display:flex;flex-direction:row;align-items:center}.__document .box-url .box-url-box .box-div-li .box-div-li-span{white-space:nowrap;padding:5px 10px}.__document .box-url .box-url-box .box-div-but{padding:10px;cursor:pointer;color:var(--but-cor)}.__document .box-url .box-url-box .box-div-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.__document .__document-index{width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:row}.__document .__document-index .index-aside{position:relative;z-index:100}.__document .__document-index .index-aside .index-aside-div{height:100%;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-index .index-body{flex:1;position:relative;background-color:var(--bg-index-cor)}.__document .__document-index .index-body .index-div{padding:20px;position:absolute;inset:0;overflow-y:auto}.__document .__document-tests{padding:10px;height:100%;position:relative}.__document .__document-tests .tests-top .but-div.on{background-color:var(--bg-aside-on-cor)}.__document .__document-develop,.__document .__document-single{padding:10px;height:100%;position:relative}.__document .__document-single .single-top .single-top-li{display:flex;flex-direction:row;align-items:center}.__document .__document-single .single-top .single-top-li .single-top-li-span{padding:5px 10px}.__document .__document-compon{box-sizing:border-box;height:100%;width:100%;position:relative;display:flex}.__document .__document-compon .__document-compon-body{padding:10px;flex:1;overflow-y:auto}.__document .__document-compon .__document-compon-body.choice{padding-left:30px}.__document .__document-compon .__document-compon-choice{display:flex;overflow-y:auto;background-color:var(--bg-aside-cor)}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but{cursor:pointer}.__document .__document-compon .__document-compon-choice .__document-compon-choice-but:hover{color:var(--but-hover-cor);background-color:var(--bg-but-hover-cor)}.form-input-text{padding:10px;height:160px;width:100%;box-sizing:border-box}.editor-div{padding:10px;height:160px;background-color:#eee}.editor-div .editor-code{height:100%;width:100%;min-height:80px;background-color:#fff}.form-input{font-size:16px}.form-select{position:relative;font-size:16px}.form-select .form-select-input{padding:10px;width:100%;font-size:16px;box-sizing:border-box}.form-select .form-select-box{position:absolute;width:100%;z-index:100;background-color:#000;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #000000}.form-select .form-select-box .form-select-list-div .form-select-list-li{background-color:#e9e9e9;padding:10px;cursor:pointer;border-bottom:1px solid #000000}.form-select{position:relative}.form-select .form-select-box{position:absolute;background-color:#fff;text-align:center}.form-select .form-select-box .form-select-list-div{border:1px solid #fff}.form-select .form-select-box .form-select-list-div .form-select-list-li{padding:10px;border-bottom:1px solid #eee}.form-select .form-select-box .form-select-list-div .form-select-list-li:last-child{border:0}.form-select .form-select-box .form-select-list-div .form-select-list-li.active{color:#0051ff}.form-boolean{display:flex;font-size:16px;padding:10px}.form-boolean .form-boolean-div{margin-right:10px}.form-string{font-size:16px}.form-string .form-string-text{padding:10px;width:100%;box-sizing:border-box}.form-number{font-size:16px}.form-number .form-number-input{padding:10px;width:100%;box-sizing:border-box}.set-emit .set-emit-li{padding:10px}.set-emit .set-emit-name{font-size:18px;padding:5px 0}.set-emit .set-emit-value{font-size:16px;background-color:azure}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
2
|
Theme: StackOverflow Light
|
|
3
3
|
Description: Light theme as used on stackoverflow.com
|
|
4
4
|
Author: stackoverflow.com
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
Updated for @stackoverflow/stacks v0.64.0
|
|
11
11
|
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
|
|
12
12
|
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
|
|
13
|
-
*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-keyword,.hljs-selector-tag,.hljs-meta .hljs-keyword,.hljs-doctag,.hljs-section,.hljs-attr{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-type,.hljs-number,.hljs-selector-id,.hljs-quote,.hljs-template-tag{color:#b75501}.hljs-selector-class{color:#015692}.hljs-string,.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-title,.hljs-literal{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.expose .expose-label{padding:10px 0;font-size:18px}.expose .expose-return{padding:5px;background-color:azure}.set-expose .set-expose-li{position:relative}.set-expose .set-expose-li .set-expose-delete{color:red;position:absolute;right:20px;top:10px}.code-edit{padding:10px;display:flex}.code-edit .edit-input{flex:1}.code-edit .edit-effect{flex:1;margin-right:10px}
|
|
13
|
+
*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-keyword,.hljs-selector-tag,.hljs-meta .hljs-keyword,.hljs-doctag,.hljs-section,.hljs-attr{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-type,.hljs-number,.hljs-selector-id,.hljs-quote,.hljs-template-tag{color:#b75501}.hljs-selector-class{color:#015692}.hljs-string,.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-title,.hljs-literal{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.expose .expose-label{padding:10px 0;font-size:18px}.expose .expose-return{padding:5px;background-color:azure}.set-expose .set-expose-li{position:relative}.set-expose .set-expose-li .set-expose-delete{color:red;position:absolute;right:20px;top:10px}.code-edit{padding:10px;display:flex}.code-edit .edit-input{flex:1}.code-edit .edit-effect{flex:1;margin-right:10px}
|
|
@@ -3,52 +3,3 @@ export declare function getJs(parent: HTMLElement, value: string, options?: stri
|
|
|
3
3
|
export declare function getHtml(parent: HTMLElement, value: string, options?: string[]): monaco.editor.IStandaloneCodeEditor;
|
|
4
4
|
export declare function getJson(parent: HTMLElement, value: string, options?: string[]): monaco.editor.IStandaloneCodeEditor;
|
|
5
5
|
export declare function getCss(parent: HTMLElement, value: string, options?: string[]): monaco.editor.IStandaloneCodeEditor;
|
|
6
|
-
...items: string[]): string[];
|
|
7
|
-
isArray(arg: any): arg is any[];
|
|
8
|
-
readonly prototype: any[];
|
|
9
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
10
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
11
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
12
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
13
|
-
of<T>(...items: T[]): T[];
|
|
14
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
15
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
16
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
20
|
-
"update:modelValue": (...args: any[]) => void;
|
|
21
|
-
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
22
|
-
modelValue: {
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
|
-
format: {
|
|
27
|
-
type: StringConstructor;
|
|
28
|
-
};
|
|
29
|
-
options: {
|
|
30
|
-
type: {
|
|
31
|
-
(arrayLength: number): string[];
|
|
32
|
-
(...items: string[]): string[];
|
|
33
|
-
new (arrayLength: number): string[];
|
|
34
|
-
new (...items: string[]): string[];
|
|
35
|
-
isArray(arg: any): arg is any[];
|
|
36
|
-
readonly prototype: any[];
|
|
37
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
38
|
-
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
39
|
-
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
40
|
-
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
41
|
-
of<T>(...items: T[]): T[];
|
|
42
|
-
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
43
|
-
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
44
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
}>> & Readonly<{
|
|
48
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
49
|
-
}>, {
|
|
50
|
-
modelValue: string;
|
|
51
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
52
|
-
refText: HTMLDivElement;
|
|
53
|
-
}, HTMLDivElement>;
|
|
54
|
-
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e
|
|
1
|
+
"use strict";const e=require("./index.vue2.cjs");module.exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue")
|
|
1
|
+
"use strict";const e=require("vue");;/* empty css */const t=require("vue-router"),r={class:"__document"},n=e.defineComponent({__name:"index",setup(o){return(c,s)=>(e.openBlock(),e.createElementBlock("div",r,[e.createVNode(e.unref(t.RouterView))]))}});module.exports=n;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as e, createElementBlock as o, openBlock as t, createVNode as
|
|
1
|
+
import { defineComponent as e, createElementBlock as o, openBlock as t, createVNode as r, unref as n } from "vue";
|
|
2
|
+
/* empty css */
|
|
2
3
|
import { RouterView as c } from "vue-router";
|
|
3
|
-
const _ = { class: "__document" },
|
|
4
|
+
const _ = { class: "__document" }, u = /* @__PURE__ */ e({
|
|
4
5
|
__name: "index",
|
|
5
6
|
setup(m) {
|
|
6
|
-
return (
|
|
7
|
-
n(
|
|
7
|
+
return (i, p) => (t(), o("div", _, [
|
|
8
|
+
r(n(c))
|
|
8
9
|
]));
|
|
9
10
|
}
|
|
10
11
|
});
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
u as default
|
|
13
14
|
};
|
package/dist/packages/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */const n=require("./router/index.cjs"),t=require("./config.cjs");function u(e){return t.userConfig(e)}const o={install:function(e,i){n.init(i),e.use(i)}};exports.default=o;exports.defineConfig=u;
|
package/dist/packages/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
/* empty css */
|
|
1
2
|
import { init as o } from "./router/index.js";
|
|
2
3
|
import { userConfig as t } from "./config.js";
|
|
3
|
-
function
|
|
4
|
-
return t(
|
|
4
|
+
function m(i) {
|
|
5
|
+
return t(i);
|
|
5
6
|
}
|
|
6
|
-
const
|
|
7
|
-
install: function(
|
|
8
|
-
o(i);
|
|
7
|
+
const s = {
|
|
8
|
+
install: function(i, n) {
|
|
9
|
+
o(n), i.use(n);
|
|
9
10
|
}
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
s as default,
|
|
14
|
+
m as defineConfig
|
|
14
15
|
};
|
|
@@ -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"),c=require("../utils/storage.cjs");require("@fangzhongya/utils/basic/string/firstUpper");const p=require("./file.cjs"),f=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),s=[{path:"/__document",name:"__document",component:()=>Promise.resolve().then(()=>f(require("../index/index.vue.cjs"))),redirect:{name:"__documentIndex"},meta:{title:"文档"},children:[]}];let m=0;document.addEventListener("keydown",g);function g(e){e=e||window.event,(e.ctrlKey&&e.location==82||e.location==116)&&c.setSession("-keydown-F5",2)}let o="__document";function y(e){o=u.getConfig("router")||"__document";let t="/"+o;if(s[0].path=t,s[0].redirect={name:o+"Index"},s[0].children?.unshift({path:t+"/:chapters+",redirect:{name:o+"Index"}}),p.getFileName().forEach(n=>{s[0].children?.push({path:n.value,name:o+n.name,component:n.component})}),s.forEach(n=>{e.addRoute(n)}),e.beforeEach((n,r)=>{if(r.fullPath=="/"){let l=c.getSession("-keydown-F5");document.referrer||l==2?(console.log("刷新"),m=2):(console.log("地址栏输入 或者 刷新"),m=3)}else console.log("跳转"),m=1;c.setSession("-keydown-F5",0)}),u.getConfig("redirect")){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 h(e){let t=e.path,a=e.params;if(a&&Object.keys(a).length)return a;{let n=d[t];return n&&Object.keys(n).length?n:m==3?{}:c.getSession("router.toPage."+t)}}function i(e,t,a="push"){let n=t.path||"";const r=t.name,l=t.params||{};e[a](t),r&&(n=e.resolve({name:r}).path),d[n]=l,c.setSession("router.toPage."+n,l)}function k(e,t){i(e,{name:o+"Single",query:{id:t?.name+"/"+t?.value},params:{key:t?.key,comkey:t?.comkey}})}function v(e,t){i(e,{name:o+"Develop",query:{id:t?.value},params:{key:t?.key}})}function _(e,t){i(e,{name:o+"Edit",query:{id:t?.value},params:{key:t?.key}})}function P(e,t){i(e,{name:o+"Tests",query:{id:t?.value},params:{key:t?.key}})}function S(e,t){i(e,{name:o+"Compon",query:{id:t?.value},params:{key:t?.key}})}exports.getPageParams=h;exports.init=y;exports.toCompon=S;exports.toDevelop=v;exports.toEdit=_;exports.toPage=i;exports.toSingle=k;exports.toTests=P;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getConfig as d } from "../config.js";
|
|
2
2
|
import { setSession as s, getSession as p } from "../utils/storage.js";
|
|
3
3
|
import "@fangzhongya/utils/basic/string/firstUpper";
|
|
4
|
-
import { getFileName as
|
|
4
|
+
import { getFileName as f } from "./file.js";
|
|
5
5
|
const i = [
|
|
6
6
|
{
|
|
7
7
|
path: "/__document",
|
|
@@ -13,36 +13,34 @@ const i = [
|
|
|
13
13
|
}
|
|
14
14
|
];
|
|
15
15
|
let l = 0;
|
|
16
|
-
document.addEventListener("keydown",
|
|
17
|
-
function
|
|
16
|
+
document.addEventListener("keydown", y);
|
|
17
|
+
function y(t) {
|
|
18
18
|
t = t || window.event, (t.ctrlKey && t.location == 82 || //ctrl+R
|
|
19
19
|
t.location == 116) && s("-keydown-F5", 2);
|
|
20
20
|
}
|
|
21
21
|
let o = "__document";
|
|
22
|
-
function
|
|
22
|
+
function _(t) {
|
|
23
23
|
o = d("router") || "__document";
|
|
24
24
|
let e = "/" + o;
|
|
25
|
-
i[0].path = e, i[0].redirect = { name: o + "Index" }, i[0].children?.unshift({
|
|
25
|
+
if (i[0].path = e, i[0].redirect = { name: o + "Index" }, i[0].children?.unshift({
|
|
26
26
|
path: e + "/:chapters+",
|
|
27
27
|
redirect: { name: o + "Index" }
|
|
28
|
-
}),
|
|
28
|
+
}), f().forEach((n) => {
|
|
29
29
|
i[0].children?.push({
|
|
30
30
|
path: n.value,
|
|
31
31
|
name: o + n.name,
|
|
32
32
|
component: n.component
|
|
33
33
|
});
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
}), a) {
|
|
34
|
+
}), i.forEach((n) => {
|
|
35
|
+
t.addRoute(n);
|
|
36
|
+
}), t.beforeEach((n, r) => {
|
|
37
|
+
if (r.fullPath == "/") {
|
|
38
|
+
let c = p("-keydown-F5");
|
|
39
|
+
document.referrer || c == 2 ? (console.log("刷新"), l = 2) : (console.log("地址栏输入 或者 刷新"), l = 3);
|
|
40
|
+
} else
|
|
41
|
+
console.log("跳转"), l = 1;
|
|
42
|
+
s("-keydown-F5", 0);
|
|
43
|
+
}), d("redirect")) {
|
|
46
44
|
const n = t.getRoutes().filter((r) => r.path == "/")[0] || {
|
|
47
45
|
path: "/"
|
|
48
46
|
};
|
|
@@ -50,7 +48,7 @@ function P(t) {
|
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
50
|
const u = {};
|
|
53
|
-
function
|
|
51
|
+
function P(t) {
|
|
54
52
|
let e = t.path, a = t.params;
|
|
55
53
|
if (a && Object.keys(a).length)
|
|
56
54
|
return a;
|
|
@@ -64,7 +62,7 @@ function m(t, e, a = "push") {
|
|
|
64
62
|
const r = e.name, c = e.params || {};
|
|
65
63
|
t[a](e), r && (n = t.resolve({ name: r }).path), u[n] = c, s("router.toPage." + n, c);
|
|
66
64
|
}
|
|
67
|
-
function
|
|
65
|
+
function w(t, e) {
|
|
68
66
|
m(t, {
|
|
69
67
|
name: o + "Single",
|
|
70
68
|
query: {
|
|
@@ -73,7 +71,7 @@ function E(t, e) {
|
|
|
73
71
|
params: { key: e?.key, comkey: e?.comkey }
|
|
74
72
|
});
|
|
75
73
|
}
|
|
76
|
-
function
|
|
74
|
+
function E(t, e) {
|
|
77
75
|
m(t, {
|
|
78
76
|
name: o + "Develop",
|
|
79
77
|
query: {
|
|
@@ -82,7 +80,7 @@ function q(t, e) {
|
|
|
82
80
|
params: { key: e?.key }
|
|
83
81
|
});
|
|
84
82
|
}
|
|
85
|
-
function
|
|
83
|
+
function q(t, e) {
|
|
86
84
|
m(t, {
|
|
87
85
|
name: o + "Edit",
|
|
88
86
|
query: {
|
|
@@ -91,7 +89,7 @@ function x(t, e) {
|
|
|
91
89
|
params: { key: e?.key }
|
|
92
90
|
});
|
|
93
91
|
}
|
|
94
|
-
function
|
|
92
|
+
function x(t, e) {
|
|
95
93
|
m(t, {
|
|
96
94
|
name: o + "Tests",
|
|
97
95
|
query: {
|
|
@@ -100,7 +98,7 @@ function F(t, e) {
|
|
|
100
98
|
params: { key: e?.key }
|
|
101
99
|
});
|
|
102
100
|
}
|
|
103
|
-
function
|
|
101
|
+
function F(t, e) {
|
|
104
102
|
m(t, {
|
|
105
103
|
name: o + "Compon",
|
|
106
104
|
query: {
|
|
@@ -110,12 +108,12 @@ function R(t, e) {
|
|
|
110
108
|
});
|
|
111
109
|
}
|
|
112
110
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
P as getPageParams,
|
|
112
|
+
_ as init,
|
|
113
|
+
F as toCompon,
|
|
114
|
+
E as toDevelop,
|
|
115
|
+
q as toEdit,
|
|
118
116
|
m as toPage,
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
w as toSingle,
|
|
118
|
+
x as toTests
|
|
121
119
|
};
|