@fangzhongya/vue-archive 0.1.14 → 0.1.15

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.
@@ -1,18 +1,25 @@
1
- import { ObjStr, ObjUnk } from '../../config';
2
- import { SpecObjs, Spec } from '../../utils/index';
3
- import { DataType } from './util';
4
- export declare function getHmtl(propsname: string, param: {
5
- [key: string]: SpecObjs[];
6
- }, value: ObjUnk, slotValue?: ObjStr, propsText?: ObjStr, exposeText?: ObjUnk): Promise<string>;
7
- export declare function setValStringify(v: unknown, key: string, propsText?: ObjStr): string | Promise<string>;
8
- type SelectsObj = {
9
- label: string;
10
- prop: unknown;
11
- };
12
- export declare function getSpecType(val: Spec): {
13
- arr: SelectsObj[];
14
- type: string;
15
- dataType: DataType[];
16
- };
17
- export declare function getDefaultValue(obj: Spec, is?: boolean): any;
18
- export {};
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from '../../../vue/dist/vue.esm-bundler.js';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ name: {
4
+ type: StringConstructor;
5
+ };
6
+ html: {
7
+ type: StringConstructor;
8
+ default(): string;
9
+ };
10
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
11
+ refresh: (...args: any[]) => void;
12
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
13
+ name: {
14
+ type: StringConstructor;
15
+ };
16
+ html: {
17
+ type: StringConstructor;
18
+ default(): string;
19
+ };
20
+ }>> & Readonly<{
21
+ onRefresh?: ((...args: any[]) => any) | undefined;
22
+ }>, {
23
+ html: string;
24
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
25
+ export default _default;
@@ -1 +1 @@
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 g=require("./file.cjs"),y=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),l="__document",i=[{path:"/"+l,name:l,component:()=>Promise.resolve().then(()=>y(require("../index/index.vue.cjs"))),redirect:{name:l+"Index"},meta:{title:"文档"},children:[]}];let d=0;document.addEventListener("keydown",h);function h(e){e=e||window.event,(e.ctrlKey&&e.location==82||e.location==116)&&c.setSession("-keydown-F5",2)}let o=l;function k(e){o=u.getConfig("router")||l;let t="/"+o;if(i[0].path=t,i[0].name=o,i[0].redirect={name:o+"Index"},i[0].children?.unshift({path:t+"/:chapters+",redirect:{name:o+"Index"}}),g.getFileName().forEach(n=>{i[0].children?.push({path:n.value,name:o+n.name,component:n.component})}),i.forEach(n=>{e.addRoute(n)}),e.beforeEach((n,r,m)=>{if(r.fullPath=="/"){let p=c.getSession("-keydown-F5");document.referrer||p==2?(console.log("刷新"),d=2):(console.log("地址栏输入 或者 刷新"),d=3)}else console.log("跳转"),d=1;c.setSession("-keydown-F5",0),m()}),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 f={};function v(e){let t=e.path,a=e.params;if(a&&Object.keys(a).length)return a;{let n=f[t];return n&&Object.keys(n).length?n:d==3?{}:c.getSession("router.toPage."+t)}}function s(e,t,a="push"){let n=t.path||"";const r=t.name,m=t.params||{};delete t.params,e[a](t),r&&(n=e.resolve({name:r}).path),f[n]=m,c.setSession("router.toPage."+n,m)}function P(e,t){s(e,{name:o+"Single",query:{id:t?.name+"/"+t?.value},params:{key:t?.key,comkey:t?.comkey}})}function S(e,t){s(e,{name:o+"Develop",query:{id:t?.value},params:{key:t?.key}})}function q(e,t){s(e,{name:o+"Edit",query:{id:t?.value},params:{key:t?.key}})}function w(e,t){s(e,{name:o+"Tests",query:{id:t?.value},params:{key:t?.key}})}function E(e,t){s(e,{name:o+"Compon",query:{id:t?.value},params:{key:t?.key}})}exports.getPageParams=v;exports.init=k;exports.toCompon=E;exports.toDevelop=S;exports.toEdit=q;exports.toPage=s;exports.toSingle=P;exports.toTests=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../config.cjs"),c=require("../utils/storage.cjs");require("@fangzhongya/utils/basic/string/firstUpper");const p=require("./file.cjs"),g=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),l="__document",i=[{path:"/"+l,name:l,component:()=>Promise.resolve().then(()=>g(require("../index/index.vue.cjs"))),redirect:{name:l+"Index"},meta:{title:"文档"},children:[]}];let u=0;document.addEventListener("keydown",y);function y(e){e=e||window.event,(e.ctrlKey&&e.location==82||e.location==116)&&c.setSession("-keydown-F5",2)}let o=l;function h(e){o=d.getConfig("router")||l;let t="/"+o;if(i[0].path=t,i[0].name=o,i[0].redirect={name:o+"Index"},i[0].children?.unshift({path:t+"/:chapters+",redirect:{name:o+"Index"}}),p.getFileName().forEach(n=>{i[0].children?.push({path:n.value,name:o+n.name,component:n.component})}),i.forEach(n=>{e.addRoute(n)}),e.beforeEach((n,r)=>{if(r.fullPath=="/"){let m=c.getSession("-keydown-F5");document.referrer||m==2?(console.log("刷新"),u=2):(console.log("地址栏输入 或者 刷新"),u=3)}else console.log("跳转"),u=1;return c.setSession("-keydown-F5",0),!0}),d.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 f={};function k(e){let t=e.path,a=e.params;if(a&&Object.keys(a).length)return a;{let n=f[t];return n&&Object.keys(n).length?n:u==3?{}:c.getSession("router.toPage."+t)}}function s(e,t,a="push"){let n=t.path||"";const r=t.name,m=t.params||{};delete t.params,e[a](t),r&&(n=e.resolve({name:r}).path),f[n]=m,c.setSession("router.toPage."+n,m)}function v(e,t){s(e,{name:o+"Single",query:{id:t?.name+"/"+t?.value},params:{key:t?.key,comkey:t?.comkey}})}function P(e,t){s(e,{name:o+"Develop",query:{id:t?.value},params:{key:t?.key}})}function S(e,t){s(e,{name:o+"Edit",query:{id:t?.value},params:{key:t?.key}})}function q(e,t){s(e,{name:o+"Tests",query:{id:t?.value},params:{key:t?.key}})}function w(e,t){s(e,{name:o+"Compon",query:{id:t?.value},params:{key:t?.key}})}exports.getPageParams=k;exports.init=h;exports.toCompon=w;exports.toDevelop=P;exports.toEdit=S;exports.toPage=s;exports.toSingle=v;exports.toTests=q;
@@ -1,7 +1,7 @@
1
1
  import { getConfig as p } from "../config.js";
2
- import { setSession as d, getSession as f } from "../utils/storage.js";
2
+ import { setSession as d, getSession as u } from "../utils/storage.js";
3
3
  import "@fangzhongya/utils/basic/string/firstUpper";
4
- import { getFileName as h } from "./file.js";
4
+ import { getFileName as y } from "./file.js";
5
5
  const m = "__document", i = [
6
6
  {
7
7
  path: "/" + m,
@@ -13,19 +13,19 @@ const m = "__document", i = [
13
13
  }
14
14
  ];
15
15
  let s = 0;
16
- document.addEventListener("keydown", k);
17
- function k(t) {
16
+ document.addEventListener("keydown", h);
17
+ function h(t) {
18
18
  t = t || window.event, (t.ctrlKey && t.location == 82 || //ctrl+R
19
19
  t.location == 116) && d("-keydown-F5", 2);
20
20
  }
21
21
  let a = m;
22
- function x(t) {
22
+ function w(t) {
23
23
  a = p("router") || m;
24
24
  let e = "/" + a;
25
25
  if (i[0].path = e, i[0].name = a, i[0].redirect = { name: a + "Index" }, i[0].children?.unshift({
26
26
  path: e + "/:chapters+",
27
27
  redirect: { name: a + "Index" }
28
- }), h().forEach((n) => {
28
+ }), y().forEach((n) => {
29
29
  i[0].children?.push({
30
30
  path: n.value,
31
31
  name: a + n.name,
@@ -33,13 +33,13 @@ function x(t) {
33
33
  });
34
34
  }), i.forEach((n) => {
35
35
  t.addRoute(n);
36
- }), t.beforeEach((n, r, l) => {
36
+ }), t.beforeEach((n, r) => {
37
37
  if (r.fullPath == "/") {
38
- let y = f("-keydown-F5");
39
- document.referrer || y == 2 ? (console.log("刷新"), s = 2) : (console.log("地址栏输入 或者 刷新"), s = 3);
38
+ let l = u("-keydown-F5");
39
+ document.referrer || l == 2 ? (console.log("刷新"), s = 2) : (console.log("地址栏输入 或者 刷新"), s = 3);
40
40
  } else
41
41
  console.log("跳转"), s = 1;
42
- d("-keydown-F5", 0), l();
42
+ return d("-keydown-F5", 0), !0;
43
43
  }), p("redirect")) {
44
44
  const n = t.getRoutes().filter((r) => r.path == "/")[0] || {
45
45
  path: "/"
@@ -47,22 +47,22 @@ function x(t) {
47
47
  n.redirect = e, n.name ? t.addRoute(n.name, n) : t.addRoute(n);
48
48
  }
49
49
  }
50
- const u = {};
51
- function E(t) {
50
+ const f = {};
51
+ function x(t) {
52
52
  let e = t.path, o = t.params;
53
53
  if (o && Object.keys(o).length)
54
54
  return o;
55
55
  {
56
- let n = u[e];
57
- return n && Object.keys(n).length ? n : s == 3 ? {} : f("router.toPage." + e);
56
+ let n = f[e];
57
+ return n && Object.keys(n).length ? n : s == 3 ? {} : u("router.toPage." + e);
58
58
  }
59
59
  }
60
60
  function c(t, e, o = "push") {
61
61
  let n = e.path || "";
62
62
  const r = e.name, l = e.params || {};
63
- delete e.params, t[o](e), r && (n = t.resolve({ name: r }).path), u[n] = l, d("router.toPage." + n, l);
63
+ delete e.params, t[o](e), r && (n = t.resolve({ name: r }).path), f[n] = l, d("router.toPage." + n, l);
64
64
  }
65
- function q(t, e) {
65
+ function E(t, e) {
66
66
  c(t, {
67
67
  name: a + "Single",
68
68
  query: {
@@ -71,7 +71,7 @@ function q(t, e) {
71
71
  params: { key: e?.key, comkey: e?.comkey }
72
72
  });
73
73
  }
74
- function F(t, e) {
74
+ function q(t, e) {
75
75
  c(t, {
76
76
  name: a + "Develop",
77
77
  query: {
@@ -80,7 +80,7 @@ function F(t, e) {
80
80
  params: { key: e?.key }
81
81
  });
82
82
  }
83
- function R(t, e) {
83
+ function F(t, e) {
84
84
  c(t, {
85
85
  name: a + "Edit",
86
86
  query: {
@@ -89,7 +89,7 @@ function R(t, e) {
89
89
  params: { key: e?.key }
90
90
  });
91
91
  }
92
- function S(t, e) {
92
+ function R(t, e) {
93
93
  c(t, {
94
94
  name: a + "Tests",
95
95
  query: {
@@ -98,7 +98,7 @@ function S(t, e) {
98
98
  params: { key: e?.key }
99
99
  });
100
100
  }
101
- function C(t, e) {
101
+ function S(t, e) {
102
102
  c(t, {
103
103
  name: a + "Compon",
104
104
  query: {
@@ -108,12 +108,12 @@ function C(t, e) {
108
108
  });
109
109
  }
110
110
  export {
111
- E as getPageParams,
112
- x as init,
113
- C as toCompon,
114
- F as toDevelop,
115
- R as toEdit,
111
+ x as getPageParams,
112
+ w as init,
113
+ S as toCompon,
114
+ q as toDevelop,
115
+ F as toEdit,
116
116
  c as toPage,
117
- q as toSingle,
118
- S as toTests
117
+ E as toSingle,
118
+ R as toTests
119
119
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-archive",
3
3
  "private": false,
4
- "version": "0.1.14",
4
+ "version": "0.1.15",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",