@vtj/pro 0.13.15 → 0.13.16
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/@vtj/materials/assets/antdv/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/uni-h5/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/uni-ui/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/vant/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/assets/{Editor-Cz8yc4Be-CJ6QIyZd.js → Editor-BYRlEJ7f-DrA-LA5d.js} +15 -15
- package/dist/assets/auth-BI3jjRhC.js +1 -0
- package/dist/assets/{index-C-QbgK75.js → index-DcoapbuN.js} +1 -1
- package/dist/assets/{index-Cuu7uClp.js → index-Dfyhed0K.js} +2 -2
- package/dist/assets/{page-iscKEHqz.js → page-BVW4_EMo.js} +1 -1
- package/dist/assets/{preview-BIPNn20h.js → preview-BsDp3_vl.js} +1 -1
- package/dist/assets/utils-DY6MzNJy.js +1 -0
- package/dist/index.html +3 -3
- package/dist/uni/assets/{index-BKfu2Ore.js → index-BJvCL257.js} +5 -5
- package/dist/uni/index.html +1 -1
- package/package.json +11 -11
- package/dist/assets/auth-rz7RA39c.js +0 -1
- package/dist/assets/utils-B3xHoT-f.js +0 -1
- /package/dist/assets/{Editor-Cz8yc4Be-C5Cx8zyv.css → Editor-BYRlEJ7f-C5Cx8zyv.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var x=Object.defineProperty;var f=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var h=(o,t,e)=>t in o?x(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,u=(o,t)=>{for(var e in t||(t={}))b.call(t,e)&&h(o,e,t[e]);if(f)for(var e of f(t))A.call(t,e)&&h(o,e,t[e]);return o};var p=(o,t,e)=>new Promise((c,s)=>{var n=a=>{try{i(e.next(a))}catch(r){s(r)}},m=a=>{try{i(e.throw(a))}catch(r){s(r)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(n,m);i((e=e.apply(o,t)).next())});import"./element-plus-ByPIA5X9.js";import"./vxe-BRrz13Uv.js";import{a as B,aB as v,a5 as y,aC as E,aD as I,M as R}from"./Editor-BYRlEJ7f-DrA-LA5d.js";import{useRoute as U}from"./vue-router-BUqJHGtN.js";import{d as C,az as k,c as $,o as w,K as g,O as q,u as _}from"./vue-CWi9lEhc.js";import{_ as M}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./lodash-es-BaeSyToa.js";import"./@vueuse-DQGZ4KR4.js";import"./@element-plus-icons-vue-CM8mFRtE.js";import"./shared-CiMZBXIr.js";import"./dayjs-C1e0w4cr.js";import"./monaco-editor-xcHgnT1C.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-DhpLkc3z.js";import"./marked-BQZxLJfc.js";const S={class:"loading"},z=C({__name:"Auth",props:{remote:{},access:{},baseUrl:{default:"/"}},setup(o){return p(this,null,function*(){let t,e;const c=o,s=B(u(u({alert:y},v),c.access)),n=U(),m=r=>p(null,null,function*(){const d=`${c.remote||E}/api/open/user/${r}`,l=yield I(d).catch(()=>null);return!l||!l.success?(yield y("登录失败"),null):l.data}),i=n.query.token,a=i?([t,e]=k(()=>m(i)),t=yield t,e(),t):null;if(a)try{s.login(a);const r=n.query.redirect;location.href=decodeURIComponent(r||c.baseUrl)}catch(r){location.reload()}return(r,d)=>(w(),$("div",S,"正在登录中..."))})}}),D=M(z,[["__scopeId","data-v-2674e98b"]]),Z=C({__name:"auth",setup(o){return p(this,null,function*(){let t,e;const c=new R,s=([t,e]=k(()=>c.getExtension().catch(()=>null)),t=yield t,e(),t),n=s==null?void 0:s.remote,m=s==null?void 0:s.__ACCESS__;return(i,a)=>_(n)?(w(),g(_(D),{key:0,remote:_(n),access:_(m)},null,8,["remote","access"])):q("",!0)})}});export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var M=Object.defineProperty;var E=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var P=(o,e,t)=>e in o?M(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,g=(o,e)=>{for(var t in e||(e={}))N.call(e,t)&&P(o,t,e[t]);if(E)for(var t of E(e))V.call(e,t)&&P(o,t,e[t]);return o};var d=(o,e,t)=>new Promise((_,i)=>{var l=n=>{try{r(t.next(n))}catch(c){i(c)}},a=n=>{try{r(t.throw(n))}catch(c){i(c)}},r=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,a);r((t=t.apply(o,e)).next())});import{useRoute as W}from"./vue-router-BUqJHGtN.js";import{v as z}from"./@vueuse-DQGZ4KR4.js";import{M as J,I as U,E as j,
|
|
1
|
+
var M=Object.defineProperty;var E=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var P=(o,e,t)=>e in o?M(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,g=(o,e)=>{for(var t in e||(e={}))N.call(e,t)&&P(o,t,e[t]);if(E)for(var t of E(e))V.call(e,t)&&P(o,t,e[t]);return o};var d=(o,e,t)=>new Promise((_,i)=>{var l=n=>{try{r(t.next(n))}catch(c){i(c)}},a=n=>{try{r(t.throw(n))}catch(c){i(c)}},r=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,a);r((t=t.apply(o,e)).next())});import{useRoute as W}from"./vue-router-BUqJHGtN.js";import{v as z}from"./@vueuse-DQGZ4KR4.js";import{M as J,I as U,E as j,a as D,c as v,s as G,i as C}from"./Editor-BYRlEJ7f-DrA-LA5d.js";import"./element-plus-ByPIA5X9.js";import"./vxe-BRrz13Uv.js";import{E as K,a as S,n as A,l as L}from"./utils-DY6MzNJy.js";import{d as O,e as Q,az as B,f as X,c as Y,o as Z}from"./vue-CWi9lEhc.js";import{_ as ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-xcHgnT1C.js";import"./@element-plus-icons-vue-CM8mFRtE.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-DhpLkc3z.js";import"./dayjs-C1e0w4cr.js";import"./marked-BQZxLJfc.js";import"./lodash-es-BaeSyToa.js";import"./shared-CiMZBXIr.js";const te=O({__name:"index",setup(o){return d(this,null,function*(){let e,t;const _=W(),i=Q(),l=new J(U(A)),a=([e,t]=B(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e||{}),r=j({loading:L,notify:A,useTitle:z,alert:S,access:a==null?void 0:a.access}),n=D(g({alert:S},a==null?void 0:a.__ACCESS__)),c=a?([e,t]=B(()=>new K(a).load()),e=yield e,t(),e):{},{__BASE_PATH__:h="/",history:k="hash",base:$="/",pageRouteName:y="page",remote:R,auth:F,checkVersion:I=!0,enhance:T}=a||{},b=()=>k==="hash",q=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);v.set("Switcher",{props:{onClick:s=>{const u=s.platform==="uniapp",p=location.pathname;let m=p===`${h}__vtj__/`?h:p;const f=s.currentFile;if(f&&f.type==="page"&&s.homepage!==f.id){const H=a.pageBasePath?`/${y}`:"",x=`${q($)}${u?`pages${H}`:y}/${f.id}`;m=b()?`${m}#/${x}`:`${m}${x}`}window.open(m,"VTJProject")}}}),v.set("Previewer",{props:{path:(s,u)=>{const p=location.pathname;return u.platform==="uniapp"?`${p}uni/#/pages/${s.id}`:`${p}#/preview/${s.id}`}}});const w=new G(g({container:i,service:l,materialPath:h,pageBasePath:$==="/"?"":$,adapter:r,access:n,remote:R,auth:F,checkVersion:I,enhance:T},c));return w.ready(()=>d(null,null,function*(){yield C(300),w.openFile(_.query.id)})),X(()=>_.query.id,s=>d(null,null,function*(){yield C(300),w.openFile(s)})),(s,u)=>(Z(),Y("div",{class:"designer",ref_key:"container",ref:i},null,512))})}}),ge=ee(te,[["__scopeId","data-v-79f08aff"]]);export{ge as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{d as _,K as p,u as s,an as d,o as m,L as u,aB as f,T as h,aw as v}from"./vue-CWi9lEhc.js";import{z as g,d as y}from"./element-plus-ByPIA5X9.js";import{_ as r}from"./monaco-editor-xcHgnT1C.js";import{createRouter as E,createWebHashHistory as L}from"./vue-router-BUqJHGtN.js";import"./lodash-es-BaeSyToa.js";import"./@vueuse-DQGZ4KR4.js";import"./@element-plus-icons-vue-CM8mFRtE.js";import"./shared-CiMZBXIr.js";import"./dayjs-C1e0w4cr.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const n of t.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&i(n)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();const O=_({__name:"app",setup(l){return(o,a)=>{const i=d("router-view");return m(),p(s(y),{locale:s(g)},{default:u(()=>[(m(),p(f,null,{default:u(()=>[h(i)]),_:1}))]),_:1},8,["locale"])}}}),P=[{path:"/",name:"home",component:()=>r(()=>import("./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DcoapbuN.js","./vue-router-BUqJHGtN.js","./vue-CWi9lEhc.js","./@vueuse-DQGZ4KR4.js","./Editor-BYRlEJ7f-DrA-LA5d.js","./monaco-editor-xcHgnT1C.js","./monaco-editor-Cpw7ccEV.css","./element-plus-ByPIA5X9.js","./lodash-es-BaeSyToa.js","./@element-plus-icons-vue-CM8mFRtE.js","./shared-CiMZBXIr.js","./dayjs-C1e0w4cr.js","./element-plus-DeBM2g7b.css","./vxe-BRrz13Uv.js","./vxe-BAb1d5vW.css","./html2canvas-DNSjNh3_.js","./mockjs-DhpLkc3z.js","./marked-BQZxLJfc.js","./Editor-BYRlEJ7f-C5Cx8zyv.css","./utils-DY6MzNJy.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-CrVHlN_5.css","./preview-BsDp3_vl.js","./page-BVW4_EMo.js","./uni-page-CHxZwhGN.js","./uni-page-Diqmj53r.css","./auth-BI3jjRhC.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as _,K as p,u as s,an as d,o as m,L as u,aB as f,T as h,aw as v}from"./vue-CWi9lEhc.js";import{z as g,d as y}from"./element-plus-ByPIA5X9.js";import{_ as r}from"./monaco-editor-xcHgnT1C.js";import{createRouter as E,createWebHashHistory as L}from"./vue-router-BUqJHGtN.js";import"./lodash-es-BaeSyToa.js";import"./@vueuse-DQGZ4KR4.js";import"./@element-plus-icons-vue-CM8mFRtE.js";import"./shared-CiMZBXIr.js";import"./dayjs-C1e0w4cr.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const n of t.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&i(n)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();const O=_({__name:"app",setup(l){return(o,a)=>{const i=d("router-view");return m(),p(s(y),{locale:s(g)},{default:u(()=>[(m(),p(f,null,{default:u(()=>[h(i)]),_:1}))]),_:1},8,["locale"])}}}),P=[{path:"/",name:"home",component:()=>r(()=>import("./index-DcoapbuN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>r(()=>import("./preview-BsDp3_vl.js"),__vite__mapDeps([22,5,6,1,2,7,8,3,9,10,11,12,13,14,4,15,16,17,18,19]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>r(()=>import("./page-BVW4_EMo.js"),__vite__mapDeps([23,5,6,1,2,7,8,3,9,10,11,12,13,14,4,15,16,17,18,19]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"pages",component:()=>r(()=>import("./uni-page-CHxZwhGN.js"),__vite__mapDeps([24,1,2,20,25]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>r(()=>import("./auth-BI3jjRhC.js"),__vite__mapDeps([26,7,2,8,3,9,10,11,12,13,14,4,5,6,1,15,16,17,18,20]),import.meta.url)}],w=E({history:L(),routes:P}),c=v(O);c.use(w);c.mount("#app");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-BUqJHGtN.js","./vue-CWi9lEhc.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var x=Object.defineProperty;var C=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var E=(o,t,e)=>t in o?x(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,v=(o,t)=>{for(var e in t||(t={}))P.call(t,e)&&E(o,e,t[e]);if(C)for(var e of C(t))g.call(t,e)&&E(o,e,t[e]);return o};var c=(o,t,e)=>new Promise((_,s)=>{var u=r=>{try{p(e.next(r))}catch(i){s(i)}},d=r=>{try{p(e.throw(r))}catch(i){s(i)}},p=r=>r.done?_(r.value):Promise.resolve(r.value).then(u,d);p((e=e.apply(o,t)).next())});import{_ as R}from"./monaco-editor-xcHgnT1C.js";import{useRoute as A}from"./vue-router-BUqJHGtN.js";import"./element-plus-ByPIA5X9.js";import"./vxe-BRrz13Uv.js";import{M as I,I as V,E as T,C as k,y as B,R as D,$ as O}from"./Editor-
|
|
2
|
+
var x=Object.defineProperty;var C=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var E=(o,t,e)=>t in o?x(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,v=(o,t)=>{for(var e in t||(t={}))P.call(t,e)&&E(o,e,t[e]);if(C)for(var e of C(t))g.call(t,e)&&E(o,e,t[e]);return o};var c=(o,t,e)=>new Promise((_,s)=>{var u=r=>{try{p(e.next(r))}catch(i){s(i)}},d=r=>{try{p(e.throw(r))}catch(i){s(i)}},p=r=>r.done?_(r.value):Promise.resolve(r.value).then(u,d);p((e=e.apply(o,t)).next())});import{_ as R}from"./monaco-editor-xcHgnT1C.js";import{useRoute as A}from"./vue-router-BUqJHGtN.js";import"./element-plus-ByPIA5X9.js";import"./vxe-BRrz13Uv.js";import{M as I,I as V,E as T,C as k,y as B,R as D,$ as O}from"./Editor-BYRlEJ7f-DrA-LA5d.js";import{a as L,n as h,l as M,E as S}from"./utils-DY6MzNJy.js";import{v as $}from"./@vueuse-DQGZ4KR4.js";import{d as z,az as w,e as H,f as K,K as N,O as b,P as j,o as q,h as F}from"./vue-CWi9lEhc.js";import"./lodash-es-BaeSyToa.js";import"./@element-plus-icons-vue-CM8mFRtE.js";import"./shared-CiMZBXIr.js";import"./dayjs-C1e0w4cr.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-DhpLkc3z.js";import"./marked-BQZxLJfc.js";const it=z({__name:"page",setup(o){return c(this,null,function*(){let t,e;const _=new I(V(h)),s=([t,e]=w(()=>_.getExtension().catch(()=>null)),t=yield t,e(),t),u=T({loading:M,notify:h,useTitle:$,alert:L,access:s==null?void 0:s.access}),d=s?([t,e]=w(()=>new S(s).load()),t=yield t,e(),t):{},{__BASE_PATH__:p="/"}=s||{},{provider:r,onReady:i}=k({mode:B.Runtime,service:_,materialPath:p,adapter:v(v({},u),d.adapter),dependencies:{Vue:()=>R(()=>import("./vue-CWi9lEhc.js").then(a=>a.aA),[],import.meta.url),VueRouter:()=>R(()=>import("./vue-router-BUqJHGtN.js"),__vite__mapDeps([0,1]),import.meta.url)}}),l=A(),f=H(),n=F(),y=a=>c(null,null,function*(){f.value=yield r.getRenderComponent(l.params.id.toString(),m=>{O(a,l,m)})});return i(()=>c(null,null,function*(){const a=n==null?void 0:n.appContext.app;a&&(a.use(D),a.use(r),y(a))})),K(()=>l.params.id,a=>c(null,null,function*(){if(a){const m=n==null?void 0:n.appContext.app;if(!m)return;y(m)}})),(a,m)=>f.value?(q(),N(j(f.value),{key:0})):b("",!0)})}});export{it as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-BUqJHGtN.js","./vue-CWi9lEhc.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var A=Object.defineProperty;var E=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var C=(o,e,t)=>e in o?A(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))x.call(e,t)&&C(o,t,e[t]);if(E)for(var t of E(e))P.call(e,t)&&C(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((c,s)=>{var _=a=>{try{i(t.next(a))}catch(p){s(p)}},n=a=>{try{i(t.throw(a))}catch(p){s(p)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,n);i((t=t.apply(o,e)).next())});import{_ as R}from"./monaco-editor-xcHgnT1C.js";import{useRoute as I}from"./vue-router-BUqJHGtN.js";import"./element-plus-ByPIA5X9.js";import"./vxe-BRrz13Uv.js";import{M as V,I as g,E as T,C as k,y as B,A as D,R as O,$ as L}from"./Editor-
|
|
2
|
+
var A=Object.defineProperty;var E=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var C=(o,e,t)=>e in o?A(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))x.call(e,t)&&C(o,t,e[t]);if(E)for(var t of E(e))P.call(e,t)&&C(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((c,s)=>{var _=a=>{try{i(t.next(a))}catch(p){s(p)}},n=a=>{try{i(t.throw(a))}catch(p){s(p)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,n);i((t=t.apply(o,e)).next())});import{_ as R}from"./monaco-editor-xcHgnT1C.js";import{useRoute as I}from"./vue-router-BUqJHGtN.js";import"./element-plus-ByPIA5X9.js";import"./vxe-BRrz13Uv.js";import{M as V,I as g,E as T,C as k,y as B,A as D,R as O,$ as L}from"./Editor-BYRlEJ7f-DrA-LA5d.js";import{a as M,n as h,l as S,E as $}from"./utils-DY6MzNJy.js";import{v as z}from"./@vueuse-DQGZ4KR4.js";import{d as H,az as w,e as K,K as N,O as b,P as j,o as q,h as F}from"./vue-CWi9lEhc.js";import"./lodash-es-BaeSyToa.js";import"./@element-plus-icons-vue-CM8mFRtE.js";import"./shared-CiMZBXIr.js";import"./dayjs-C1e0w4cr.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-DhpLkc3z.js";import"./marked-BQZxLJfc.js";const pe=H({__name:"preview",setup(o){return f(this,null,function*(){let e,t;const c=new V(g(h)),s=([e,t]=w(()=>c.getExtension().catch(()=>null)),e=yield e,t(),e||{}),_=T({loading:S,notify:h,useTitle:z,alert:M,access:s==null?void 0:s.access}),n=s?([e,t]=w(()=>new $(s).load()),e=yield e,t(),e):{},{__BASE_PATH__:i="/"}=s||{},{provider:a,onReady:p}=k({mode:B.Runtime,service:c,materialPath:i,adapter:d(d({},_),n.adapter),dependencies:{Vue:()=>R(()=>import("./vue-CWi9lEhc.js").then(m=>m.aA),[],import.meta.url),VueRouter:()=>R(()=>import("./vue-router-BUqJHGtN.js"),__vite__mapDeps([0,1]),import.meta.url)}}),v=I(),u=K(),l=F();return p(()=>f(null,null,function*(){const m=yield D(s.enhance),r=l==null?void 0:l.appContext.app;r&&(n.install&&n.install(r),m&&r.use(m,a),r.use(O),r.use(a),u.value=yield a.getRenderComponent(v.params.id.toString(),y=>{L(r,v,y)}))})),(m,r)=>u.value?(q(),N(j(u.value),{key:0})):b("",!0)})}});export{pe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Object.defineProperty;var g=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var p=(t,a,s)=>a in t?h(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,_=(t,a)=>{for(var s in a||(a={}))T.call(a,s)&&p(t,s,a[s]);if(g)for(var s of g(a))f.call(a,s)&&p(t,s,a[s]);return t};var c=(t,a,s)=>p(t,typeof a!="symbol"?a+"":a,s);var S=(t,a,s)=>new Promise((o,n)=>{var e=r=>{try{i(s.next(r))}catch(l){n(l)}},E=r=>{try{i(s.throw(r))}catch(l){n(l)}},i=r=>r.done?o(r.value):Promise.resolve(r.value).then(e,E);i((s=s.apply(t,a)).next())});import{aA as d}from"./vue-CWi9lEhc.js";import{d as A,g as I,m as O,b,r as m,e as V,l as P,p as R,D as y,s as M,G as N,f as B,t as D,K as L,h as K,j,k,u as v,Q as w,n as x,o as G,q as H,v as W,w as Y,x as U,z as F,B as C,W as $,F as z,H as J,S as X,J as Z,L as q,N as Q,O as aa,P as sa,T as ea,U as ta,V as ra,X as na,Y as ia,Z as oa,_ as la,a0 as ca,a1 as _a,a2 as Ea,a3 as pa,a4 as ga,a5 as Sa,a6 as ua,a7 as ha,a8 as Ta,a9 as fa,aa as da,ab as Aa,ac as Ia,ad as Oa,ae as ba,af as ma,ag as Va,ah as Pa,ai as Ra,aj as ya,ak as Ma,al as Na,am as Ba,an as Da,ao as La,ap as Ka,c as ja,aq as ka,ar as va,as as wa,at as xa,au as Ga,av as Ha,aw as Wa,ax as Ya,ay as Ua,az as Fa,aA as Ca}from"./Editor-BYRlEJ7f-DrA-LA5d.js";import{E as $a,a as za,b as Ja,c as Xa}from"./element-plus-ByPIA5X9.js";const Za=Object.freeze(Object.defineProperty({__proto__:null,API_METHOD_TYPES:A,ActionMenu:I,Assets:O,Binder:b,Box:m,Designer:V,DevTools:P,EVENT_MODIFIERS:R,Editor:y,Engine:M,EventBinder:N,GET_TOKENS_LINK:B,Icon:D,Item:L,KEYBOARD_EVENT_LIST:K,MAX_TOKENS:j,MOBILE_SIZE:k,MOUSE_EVENT_LIST:v,NAME_REGEX:w,NPM_REGISTRY_URL:x,OpenApi:G,PAD_SIZE:H,Panel:W,REPORT_API:Y,RegionType:U,RegionWrapper:F,Renderer:C,SAVE_BLOCK_FILE_FINISH:$,SESSION_ID_KEY:z,STATE_KEY:J,SetterView:X,SetterWrapper:Z,Simulator:q,Skeleton:Q,SkeletonWrapper:aa,SlotsPicker:sa,State:ea,Tabs:ta,VERSION_REGEX:ra,VTJ_DESIGNER_VERSION:na,VUE_DEVTOOLS_FRAME_STATE_KEY:ia,VUE_DEVTOOLS_OVERLAY_PATH:oa,VUE_DEVTOOLS_PATH:la,VariableBinder:ca,Viewer:_a,Viewport:Ea,WidgetGroup:pa,WidgetWrapper:ga,alert:Sa,builtInDeps:ua,builtInMaterials:ha,builtInSetters:Ta,builtInWidgets:fa,confirm:da,createSlotsPicker:Aa,defaultSetter:Ia,depsManager:Oa,engineKey:ba,expressionValidate:ma,getClassProperties:Va,message:Pa,normalizedStyle:Ra,notify:ya,proxyContext:Ma,readJsonFile:Na,regions:Ba,setterManager:Da,setters:La,useEngine:Ka,widgetManager:ja,widgets:ka},Symbol.toStringTag,{value:"Module"}));class es{constructor(a){c(this,"urls",[]);c(this,"library","");c(this,"params",[]);c(this,"__BASE_PATH__","/");this.config=a;const s=_(_(_({},Ha),Za),Ga),o={Vue:d,__VTJ_PRO__:s,VtjUtils:xa,VtjIcons:wa,VtjUI:va,ElementPlus:$a};for(const[l,u]of Object.entries(o))window[l]=u;const{extension:n,__BASE_PATH__:e="/"}=a||{},{urls:E=[],library:i,params:r=[]}=n||{};i&&(this.urls=E,this.library=i,this.params=r,this.__BASE_PATH__=e)}load(){return S(this,null,function*(){let a={};if(this.library){const s=this.__BASE_PATH__,o=this.urls.filter(e=>Wa(e)).map(e=>`${s}${e}`),n=this.urls.filter(e=>Ya(e)).map(e=>`${s}${e}`);if(Ua(o),n.length){const e=yield Fa(n,this.library).catch(()=>null);e&&typeof e=="function"?a=e.call(e,this.config,...this.params):a=e||{}}}return Object.assign({},this.getEngineOptions(),a)})}getEngineOptions(){const a=["materialPath","pageBasePath","pageRouteName","remote","checkVersion","noMask"];return Ca(this.config,a)}}function ts(){return Xa.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"})}function rs(t,a="",s="warning"){Ja({title:a,message:t,type:s})}function ns(t,a){return za.alert(t,a)}export{es as E,ns as a,ts as l,rs as n};
|
package/dist/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<meta http-equiv="Expires" content="0"/>
|
|
10
10
|
<title>低代码设计器 - VTJ.PRO</title>
|
|
11
11
|
<script>
|
|
12
|
-
var __BUILD_TIME__ = '
|
|
12
|
+
var __BUILD_TIME__ = '1756784125449';
|
|
13
13
|
(function () {
|
|
14
14
|
const regex = /<!--{{(\d*)}}-->/;
|
|
15
15
|
window.fetch('?t=' + Date.now()).then(async (res) => {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
});
|
|
26
26
|
})();
|
|
27
27
|
</script>
|
|
28
|
-
<!--{{
|
|
28
|
+
<!--{{1756784125449}}-->
|
|
29
29
|
|
|
30
|
-
<script type="module" crossorigin src="./assets/index-
|
|
30
|
+
<script type="module" crossorigin src="./assets/index-Dfyhed0K.js"></script>
|
|
31
31
|
<link rel="modulepreload" crossorigin href="./assets/vue-CWi9lEhc.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="./assets/lodash-es-BaeSyToa.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="./assets/@vueuse-DQGZ4KR4.js">
|
|
@@ -51,7 +51,7 @@ version: 2.9.0
|
|
|
51
51
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
52
52
|
* @name @vtj/core
|
|
53
53
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
54
|
-
* @version 0.13.
|
|
54
|
+
* @version 0.13.16
|
|
55
55
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
56
56
|
*/const qd="VueMaterial",zd="VueRouterMaterial",Kd={[qd]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[zd]:["RouterView","RouterLink"]};let Wd=class{constructor(){z(this,"listeners",[]);z(this,"isReady",!1)}triggerReady(){this.isReady=!0;for(const t of this.listeners)t();this.listeners=[]}ready(t){this.isReady?t():this.listeners.push(t)}resetReady(){this.isReady=!1}};var Jd=Object.defineProperty,Yd=(e,t,r)=>t in e?Jd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lt=(e,t,r)=>Yd(e,typeof t!="symbol"?t+"":t,r);(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,n){typeof n!="boolean"&&(n=n||{},n.passive=!1),e.call(this,t,r,n)}})();const Gd=e=>typeof e=="symbol";new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Gd));function _o(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zd}=Object.prototype,{getPrototypeOf:yn}=Object,{iterator:tr,toStringTag:Eo}=Symbol,er=(e=>t=>{const r=Zd.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),yt=e=>(e=e.toLowerCase(),t=>er(t)===e),rr=e=>t=>typeof t===e,{isArray:ae}=Array,be=rr("undefined");function Qd(e){return e!==null&&!be(e)&&e.constructor!==null&&!be(e.constructor)&&ot(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const So=yt("ArrayBuffer");function Xd(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&So(e.buffer),t}const tm=rr("string"),ot=rr("function"),xo=rr("number"),nr=e=>e!==null&&typeof e=="object",em=e=>e===!0||e===!1,ke=e=>{if(er(e)!=="object")return!1;const t=yn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Eo in e)&&!(tr in e)},rm=yt("Date"),nm=yt("File"),im=yt("Blob"),sm=yt("FileList"),om=e=>nr(e)&&ot(e.pipe),am=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ot(e.append)&&((t=er(e))==="formdata"||t==="object"&&ot(e.toString)&&e.toString()==="[object FormData]"))},um=yt("URLSearchParams"),[cm,lm,fm,hm]=["ReadableStream","Request","Response","Headers"].map(yt),pm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Se(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),ae(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(n=0;n<o;n++)a=s[n],t.call(null,e[a],a,e)}}function To(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Ut=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ro=e=>!be(e)&&e!==Ut;function qr(){const{caseless:e}=Ro(this)&&this||{},t={},r=(n,i)=>{const s=e&&To(t,i)||i;ke(t[s])&&ke(n)?t[s]=qr(t[s],n):ke(n)?t[s]=qr({},n):ae(n)?t[s]=n.slice():t[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Se(arguments[n],r);return t}const dm=(e,t,r,{allOwnKeys:n}={})=>(Se(t,(i,s)=>{r&&ot(i)?e[s]=_o(i,r):e[s]=i},{allOwnKeys:n}),e),mm=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),gm=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},ym=(e,t,r,n)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!n||n(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=r!==!1&&yn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},vm=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},bm=e=>{if(!e)return null;if(ae(e))return e;let t=e.length;if(!xo(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},wm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&yn(Uint8Array)),_m=(e,t)=>{const r=(e&&e[tr]).call(e);let n;for(;(n=r.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},Em=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Sm=yt("HTMLFormElement"),xm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,n){return r.toUpperCase()+n}),Di=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Tm=yt("RegExp"),Ao=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Se(r,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(n[s]=o||i)}),Object.defineProperties(e,n)},Rm=e=>{Ao(e,(t,r)=>{if(ot(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ot(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Am=(e,t)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return ae(e)?n(e):n(String(e).split(t)),r},$m=()=>{},Om=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function jm(e){return!!(e&&ot(e.append)&&e[Eo]==="FormData"&&e[tr])}const Dm=e=>{const t=new Array(10),r=(n,i)=>{if(nr(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const s=ae(n)?[]:{};return Se(n,(o,a)=>{const l=r(o,i+1);!be(l)&&(s[a]=l)}),t[i]=void 0,s}}return n};return r(e,0)},Bm=yt("AsyncFunction"),Cm=e=>e&&(nr(e)||ot(e))&&ot(e.then)&&ot(e.catch),$o=((e,t)=>e?setImmediate:t?((r,n)=>(Ut.addEventListener("message",({source:i,data:s})=>{i===Ut&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Ut.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ot(Ut.postMessage)),Nm=typeof queueMicrotask<"u"?queueMicrotask.bind(Ut):typeof process<"u"&&process.nextTick||$o,Im=e=>e!=null&&ot(e[tr]),R={isArray:ae,isArrayBuffer:So,isBuffer:Qd,isFormData:am,isArrayBufferView:Xd,isString:tm,isNumber:xo,isBoolean:em,isObject:nr,isPlainObject:ke,isReadableStream:cm,isRequest:lm,isResponse:fm,isHeaders:hm,isUndefined:be,isDate:rm,isFile:nm,isBlob:im,isRegExp:Tm,isFunction:ot,isStream:om,isURLSearchParams:um,isTypedArray:wm,isFileList:sm,forEach:Se,merge:qr,extend:dm,trim:pm,stripBOM:mm,inherits:gm,toFlatObject:ym,kindOf:er,kindOfTest:yt,endsWith:vm,toArray:bm,forEachEntry:_m,matchAll:Em,isHTMLForm:Sm,hasOwnProperty:Di,hasOwnProp:Di,reduceDescriptors:Ao,freezeMethods:Rm,toObjectSet:Am,toCamelCase:xm,noop:$m,toFiniteNumber:Om,findKey:To,global:Ut,isContextDefined:Ro,isSpecCompliantForm:jm,toJSONObject:Dm,isAsyncFn:Bm,isThenable:Cm,setImmediate:$o,asap:Nm,isIterable:Im};function K(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}R.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const Oo=K.prototype,jo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jo[e]={value:e}});Object.defineProperties(K,jo);Object.defineProperty(Oo,"isAxiosError",{value:!0});K.from=(e,t,r,n,i,s)=>{const o=Object.create(Oo);return R.toFlatObject(e,o,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),K.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Pm=null;function zr(e){return R.isPlainObject(e)||R.isArray(e)}function Do(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Bi(e,t,r){return e?e.concat(t).map(function(n,i){return n=Do(n),!r&&i?"["+n+"]":n}).join(r?".":""):t}function km(e){return R.isArray(e)&&!e.some(zr)}const Fm=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});function ir(e,t,r){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=R.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,d){return!R.isUndefined(d[p])});const n=r.metaTokens,i=r.visitor||u,s=r.dots,o=r.indexes,a=(r.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(R.isDate(p))return p.toISOString();if(R.isBoolean(p))return p.toString();if(!a&&R.isBlob(p))throw new K("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(p)||R.isTypedArray(p)?a&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,d,m){let b=p;if(p&&!m&&typeof p=="object"){if(R.endsWith(d,"{}"))d=n?d:d.slice(0,-2),p=JSON.stringify(p);else if(R.isArray(p)&&km(p)||(R.isFileList(p)||R.endsWith(d,"[]"))&&(b=R.toArray(p)))return d=Do(d),b.forEach(function(_,y){!(R.isUndefined(_)||_===null)&&t.append(o===!0?Bi([d],y,s):o===null?d:d+"[]",l(_))}),!1}return zr(p)?!0:(t.append(Bi(m,d,s),l(p)),!1)}const c=[],f=Object.assign(Fm,{defaultVisitor:u,convertValue:l,isVisitable:zr});function h(p,d){if(!R.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+d.join("."));c.push(p),R.forEach(p,function(m,b){(!(R.isUndefined(m)||m===null)&&i.call(t,m,R.isString(b)?b.trim():b,d,f))===!0&&h(m,d?d.concat(b):[b])}),c.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Ci(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function vn(e,t){this._pairs=[],e&&ir(e,this,t)}const Bo=vn.prototype;Bo.append=function(e,t){this._pairs.push([e,t])};Bo.toString=function(e){const t=e?function(r){return e.call(this,r,Ci)}:Ci;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function Mm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Co(e,t,r){if(!t)return e;const n=r&&r.encode||Mm;R.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(i?s=i(t,r):s=R.isURLSearchParams(t)?t.toString():new vn(t,r).toString(n),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}let Ni=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}};const No={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Um=typeof URLSearchParams<"u"?URLSearchParams:vn,Lm=typeof FormData<"u"?FormData:null,Vm=typeof Blob<"u"?Blob:null,Hm={isBrowser:!0,classes:{URLSearchParams:Um,FormData:Lm,Blob:Vm},protocols:["http","https","file","blob","url","data"]},bn=typeof window<"u"&&typeof document<"u",Kr=typeof navigator=="object"&&navigator||void 0,qm=bn&&(!Kr||["ReactNative","NativeScript","NS"].indexOf(Kr.product)<0),zm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Km=bn&&window.location.href||"http://localhost",Wm=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bn,hasStandardBrowserEnv:qm,hasStandardBrowserWebWorkerEnv:zm,navigator:Kr,origin:Km},Symbol.toStringTag,{value:"Module"})),rt=V(V({},Wm),Hm);function Jm(e,t){return ir(e,new rt.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){return rt.isNode&&R.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Ym(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gm(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function Io(e){function t(r,n,i,s){let o=r[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=r.length;return o=!o&&R.isArray(i)?i.length:o,l?(R.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):((!i[o]||!R.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],s)&&R.isArray(i[o])&&(i[o]=Gm(i[o])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){const r={};return R.forEachEntry(e,(n,i)=>{t(Ym(n),i,r,0)}),r}return null}function Zm(e,t,r){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const xe={transitional:No,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return n?JSON.stringify(Io(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e)||R.isReadableStream(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Jm(e,this.formSerializer).toString();if((s=R.isFileList(e))||r.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return ir(s?{"files[]":e}:e,o&&new o,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),Zm(e)):e}],transformResponse:[function(e){const t=this.transitional||xe.transitional,r=t&&t.forcedJSONParsing,n=this.responseType==="json";if(R.isResponse(e)||R.isReadableStream(e))return e;if(e&&R.isString(e)&&(r&&!this.responseType||n)){const i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(s){if(i)throw s.name==="SyntaxError"?K.from(s,K.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{xe.headers[e]={}});const Qm=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xm=e=>{const t={};let r,n,i;return e&&e.split(`
|
|
57
57
|
`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&Qm[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Ii=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function Fe(e){return e===!1||e==null?e:R.isArray(e)?e.map(Fe):String(e)}function tg(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const eg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _r(e,t,r,n,i){if(R.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!R.isString(t)){if(R.isString(n))return t.indexOf(n)!==-1;if(R.isRegExp(n))return n.test(t)}}function rg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function ng(e,t){const r=R.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:!0})})}let at=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(a,l,u){const c=pe(l);if(!c)throw new Error("header name must be a non-empty string");const f=R.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Fe(a))}const o=(a,l)=>R.forEach(a,(u,c)=>s(u,c,l));if(R.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(R.isString(t)&&(t=t.trim())&&!eg(t))o(Xm(t),r);else if(R.isObject(t)&&R.isIterable(t)){let a={},l,u;for(const c of t){if(!R.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?R.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=pe(t),t){const n=R.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return tg(i);if(R.isFunction(r))return r.call(this,i,n);if(R.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=pe(t),t){const n=R.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||_r(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(o){if(o=pe(o),o){const a=R.findKey(n,o);a&&(!r||_r(n,n[a],a,r))&&(delete n[a],i=!0)}}return R.isArray(t)?t.forEach(s):s(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!t||_r(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return R.forEach(this,(i,s)=>{const o=R.findKey(n,s);if(o){r[o]=Fe(i),delete r[s];return}const a=t?rg(s):String(s).trim();a!==s&&delete r[s],r[a]=Fe(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return R.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&R.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
@@ -62,18 +62,18 @@ version: 2.9.0
|
|
|
62
62
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
63
63
|
* @name @vtj/renderer
|
|
64
64
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
65
|
-
* @version 0.13.
|
|
65
|
+
* @version 0.13.16
|
|
66
66
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
67
|
-
*/const Ar="0.13.
|
|
67
|
+
*/const Ar="0.13.16";var tt=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(tt||{});const Yi=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],Qg=["vIf","vElseIf","vElse","vShow","vModel","vFor","vBind","vHtml"],Xg={String,Number,Boolean,Array,Object,Function,Date},Ve="VtjPage",$r="VtjHomepage",ty="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(","),ey="component,slot".split(",");function Ne(e,t){return e.map(r=>ze(r)||r.startsWith("/")?r:`${t}${r}`)}function ar(e){return/\.css$/.test(e)}function ur(e){return/\.js$/.test(e)}function ry(e){return/\.json$/.test(e)}function ny(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function iy(e,t,r=!1){const n=e.filter(h=>!!h.enabled),i=[],s=[],o=[],a=[],l={},u={},c=[],f={};return n.forEach(({urls:h,assetsUrl:p,library:d,assetsLibrary:m,localeLibrary:b})=>{h==null||h.forEach(_=>{ur(_)&&i.push(ny(_,r)),ar(_)&&s.push(_)}),d&&(a.push(d),l[d]=Ne(h||[],t),b&&(u[d]=b)),p&&o.push(p),m&&c.push(m),d&&m&&(f[m]=d)}),{scripts:Ne(i,t),css:Ne(s,t),materials:Ne(o,t),libraryExports:a,materialExports:jd(c),materialMapLibrary:f,libraryMap:l,libraryLocaleMap:u}}function sy(e,t){var s;const{name:r,parent:n,alias:i}=e;return n?(s=t[n])==null?void 0:s[i||r]:t[i||r]}function oy(e=[]){const t=e.filter(n=>ar(n)),r=e.filter(n=>ur(n));return{css:t,js:r}}function ay(e,t){const r=u=>{const c=[];let f=0;for(;f<u.length;){if(/\s/.test(u[f])){f++;continue}if(u.substring(f,f+2)==="/*"){const _=u.indexOf("*/",f+2);if(_!==-1){f=_+2;continue}}if(u[f]==="@"){const _=f;for(;f<u.length&&u[f]!=="{"&&u[f]!==";";)f++;const y=u.substring(_,f).trim(),v=y.includes("@keyframes");if(u[f]===";")c.push({type:"simple-at-rule",content:u.substring(_,f+1)}),f++;else if(u[f]==="{"){const w=f+1;let S=1;for(f++;f<u.length&&S>0;)u[f]==="{"?S++:u[f]==="}"&&S--,f++;const g=u.substring(_,f),x=u.substring(w,f-1);c.push({type:v?"keyframes":"at-rule",rule:y,content:g,inner:x})}continue}const h=f;for(;f<u.length&&u[f]!=="{";)f++;if(f>=u.length)break;const p=u.substring(h,f).trim();if(!p){f++;continue}const d=f+1;let m=1;for(f++;f<u.length&&m>0;)u[f]==="{"?m++:u[f]==="}"&&m--,f++;const b=u.substring(d,f-1);c.push({type:"rule",selector:p,content:b.trim()})}return c},n=u=>{const c=u.trim();return/^(from|to|\d+(\.\d+)?%)$/.test(c)},i=u=>u.replace(/::v-deep\(/g,":deep(").replace(/::v-deep\s+/g,":deep(").replace(/\/deep\//g," ").replace(/>>>/g," ").replace(/(.*?):deep\(([^)]+)\)/g,(c,f,h)=>{const p=f.trim(),d=h.trim();return p?`${p}[${t}] ${d}`:d}),s=u=>{const c=u.trim();if(!c||c.includes(`[${t}]`)||/^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(c)||n(c))return c;const f=c.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);if(f){const[,h,p=""]=f,d=h.trim();return d?`${d}[${t}]${p}`:c}return`${c}[${t}]`},o=u=>i(u).split(",").map(c=>s(c)).filter(c=>c.trim()).join(", "),a=u=>u.map(c=>{switch(c.type){case"simple-at-rule":return c.content;case"keyframes":return c.content;case"at-rule":try{const h=r(c.inner),p=a(h);return`${c.rule} { ${p} }`}catch(h){return c.content}case"rule":if(!c.selector||!c.content)return"";const f=o(c.selector);return f.trim()?`${f} { ${c.content} }`:"";default:return""}}).filter(c=>c.trim()).join(" "),l=u=>u.replace(/\s*{\s*/g," { ").replace(/\s*}\s*/g," } ").replace(/\s*;\s*/g,"; ").replace(/\s*,\s*/g,", ").replace(/\s+/g," ").replace(/^\s+|\s+$/g,"").replace(/\s*}\s*}/g," } }").trim();try{const u=e.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g,"").replace(/^\s+|\s+$/gm,"").replace(/\n\s*\n/g,`
|
|
68
68
|
`),c=r(u),f=a(c);return l(f)}catch(u){return console.error("CSS scoping failed:",u),console.error("Input CSS:",e),e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,c=>c).replace(/([^{}@]+)(?=\s*{)/g,c=>{const f=c.trim();return!f||f.startsWith("@")||f.includes(`[${t}]`)||n(f)?c:`${f}[${t}]`})}}function Zo(e){return Dt(e)?e:JSON.stringify(e)}function cr(e,t,r,n=!1){const i=e.CSSStyleSheet,s=n?`data-v-${t}`:t,o=n?ay(r,s):r;if(i.prototype.replaceSync){const a=new i;a.id=t,a.replaceSync(o);const l=e.document,u=l.adoptedStyleSheets,c=Array.from(u).filter(f=>f.id!==t);l.adoptedStyleSheets=[...c,a]}else{const a=e.document;let l=a.getElementById(t);l?l.innerHTML=o:(l=a.createElement("style"),l.id=t,l.innerHTML=o,a.head.appendChild(l))}}function uy(e,t){return k(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&cr(window,e,r)})}function Qo(e,t=window){const r=t.document,n=t.document.head;for(const i of e)if(!r.getElementById(i)){const s=r.createElement("link");s.rel="stylesheet",s.id=i,s.href=i,n.appendChild(s)}}function Xo(n,i){return k(this,arguments,function*(e,t,r=window){const s=r.document,o=r.document.head;let a=r[t];return a?a.default||a:new Promise((l,u)=>{for(const c of e){const f=s.createElement("script");f.src=c,f.onload=()=>{a=r[t],a?l(a.default||a):u(null)},f.onerror=h=>{u(h)},o.appendChild(f)}})})}function cy(e){return Ht(e)||Ht(e==null?void 0:e.install)}function ly(e){return ey.includes(e)}function fy(e){return ty.includes(e)}function we(e=window){const t=window==null?void 0:window.Mock;if(t)return t;const r=e==null?void 0:e.Mock;if(r&&window)return window.Mock=r,r}function _e(e,t,r=!1,n=!1,i=!1){var s;try{const o=['"use strict";',"var __self = arguments[0];"];o.push("return ");let a=(e.value||"").trim();i||(a=a.replace(/this(\W|$)/g,(u,c)=>`__self${c}`)),a=o.join(`
|
|
69
69
|
`)+a;const l=i?`
|
|
70
70
|
${a}
|
|
71
71
|
`:`with(${r?"{}":"$scope || {}"}) { ${a} }`;return new Function("$scope",l)(t)}catch(o){if(re.error("parseExpression.error",o,e,(s=t==null?void 0:t.__self)!=null?s:t),n)throw o}}function ht(e,t,r=!1,n=!1,i=!1){var o;const s=_e(e,t,r,n,i);if(typeof s!="function"&&(re.error("parseFunction.error","not a function",e,(o=t==null?void 0:t.__self)!=null?o:t),n))throw new Error(`"${e.value}" not a function`);return s}function mt(e){return e&&e.type==="JSExpression"}function pt(e){return typeof e=="object"&&e&&e.type==="JSFunction"}const hy={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:"",statusKey:"code"},py=Symbol("access");class ta{constructor(t){z(this,"options");z(this,"data",null);z(this,"mode",tt.Raw);z(this,"interceptResponse",!0);this.options=Object.assign({},hy,t),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(t){const{mode:r,router:n,request:i}=t;this.mode=r,n&&this.mode!==tt.Design&&this.setGuard(n),i&&this.setRequest(i)}login(t){const{storageKey:r,storagePrefix:n,session:i,authKey:s}=this.options;this.setData(t),this.data&&(xr.save(r,t,{type:"local",prefix:n}),i&&Rr.set(s,this.data.token))}clear(){const{storageKey:t,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,xr.remove(t,{type:"local",prefix:r}),n&&Rr.remove(i)}logout(){this.clear(),this.toLogin()}getData(){return this.data?this.data:(this.loadData(),this.data)}getToken(){var t;return this.data||this.loadData(),(t=this.data)==null?void 0:t.token}can(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return typeof t=="function"?t(n):ji(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return ji(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access=this,t.provide(py,this)}isAuthPath(t){const{auth:r,isAuth:n}=this.options;if(n)return n(t);if(t.path&&typeof r=="string"){const i=r.split("#")[1]||r;return t.path===i}return!1}toLogin(){const{auth:t,redirectParam:r}=this.options;if(!t)return;const n=r?`?${r}=${encodeURIComponent(location.href)}`:"";typeof t=="function"?t(n):location.href=r?`${t}${n}`:t}setData(t){const{privateKey:r}=this.options;if(Array.isArray(t)&&r){const n=t.map(i=>Oi(i,r));try{this.data=JSON.parse(n.join(""))}catch(i){console.warn(i)}return}if(typeof t=="string")try{const n=r?Oi(t,r):t;n?this.data=JSON.parse(n):console.warn("RSA解密失败或登录信息缺失")}catch(n){console.warn(n)}else this.data=t}loadData(){const{storageKey:t,storagePrefix:r}=this.options,n=xr.get(t,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:t,authKey:r}=this.options;return t&&r?!!Rr.get(r):!!this.getToken()}hasRoutePermission(t){if(t.name===Ve){const r=t.params.id;return r&&this.can(r)}return t.meta.__vtj__?this.can(t.meta.__vtj__):!0}setGuard(t){t.beforeEach((r,n,i)=>this.guard(r,i))}guard(t,r){return k(this,null,function*(){if(this.isWhiteList(t)||this.isAuthPath(t))return r();if(this.isLogined()){if(this.hasRoutePermission(t))return r();{const{noPermissionMessage:n="无权限访问",unauthorized:i=!1}=this.options;return yield this.showTip(n),Ht(i)?(i(),r(!1)):Dt(i)?r(i):r(!1)}}r(!1),yield Ke(0),this.toLogin()})}isWhiteList(t){const{whiteList:r}=this.options;return r?Array.isArray(r)?r.some(n=>t.fullPath.startsWith(n)):r(t):!1}isUnauthorized(t){var i;const{unauthorizedCode:r=401,statusKey:n="code"}=this.options;return t.status===r||((i=t.data)==null?void 0:i[n])===r}showUnauthorizedAlert(t){return k(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(t)&&(yield this.showTip(r),this.toLogin())})}showTip(t){return k(this,null,function*(){var n;const{alert:r}=this.options;return r?(yield Ke(150),yield(n=r(t,{title:"提示",type:"warning"}))==null?void 0:n.catch(()=>!1)):(window.alert(t),!1)})}setRequest(t){t.useRequest(r=>{var n,i;return(n=this.data)!=null&&n.token&&(r.headers[this.options.authKey]=(i=this.data)==null?void 0:i.token),r}),t.useResponse(r=>k(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(r)),r}),r=>k(this,null,function*(){if(!this.interceptResponse)return Promise.reject(r);const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function dy(e={}){const{notify:t,loading:r,settings:n={},Startup:i,access:s,useTitle:o,alert:a}=e;let l=null;return{request:wn({settings:V({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:u=>{var c,f;return((c=u.data)==null?void 0:c.code)===0||!!((f=u.data)!=null&&f.success)},failMessage:!0,showError:u=>{t&&t(u||"未知错误")},showLoading:()=>{l&&l.close(),r&&(l=r())},hideLoading:()=>{l&&(l.close(),l=null)}},n)}),jsonp:Go,notify:t,loading:r,useTitle:o,alert:a,startupComponent:i,access:s?new ta(V({alert:a},s)):void 0}}function my(e,t){const{jsonp:r,request:n}=t;if(e.method==="jsonp")return(i={})=>r(e.url,et(V({},e.jsonpOptions),{query:i}));{const i=e.headers?_e(e.headers,{},!0):void 0,s={url:e.url,method:e.method,settings:et(V({},e.settings),{headers:i})};return(o,a)=>(delete s.data,n.send(de(s,a||{},{data:o})))}}function gy(e,t){const{metaQuery:r}=t;if(!r)return;const{code:n,queryCode:i}=e;return(s,o)=>{if(!r){console.warn("adapter.metaQuery is not defined!");return}return r(n,i,s,o)}}function yy(e=[],t=[],r){const n={};for(const i of e)n[i.id]=my(i,r);for(const i of t)n[i.id]=gy(i,r);return n}function vy(){return k(this,arguments,function*(e=[],t=window){const r=we(t);r&&(ea(t),e.forEach(n=>wy(r,n)))})}function by(e,t=window){const r=pt(e.mockTemplate)&&e.mockTemplate.value?ht(e.mockTemplate,{},!0):void 0,n=we(t);return(...i)=>k(null,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){re.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function wy(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n)try{const i=ze(r)?new URL(r).pathname:r,s=gn(`(.*)${i}(.*)`),o=Id(i,{decode:decodeURIComponent}),a=_e(n,{},!0);e.mock(s,l=>{var p;const u=Le.parse(l.url)||{},c=l.body instanceof FormData?Bg(l.body):l.body,f=ze(l.url)?new URL(l.url).pathname:l.url.split("?")[0],h=(p=o(f))==null?void 0:p.params;Object.assign(l,{data:c,params:h,query:u});try{return e.mock(a(l))}catch(d){return console.warn("[mockApi]",s,l,d),null}})}catch(i){console.warn("mockApi",i)}}function ea(e=window){const t=we(e);t&&(t._mocked={})}class _y{constructor(t){z(this,"__id",null);z(this,"__mode");z(this,"__instance",null);z(this,"__contextRefs",{});z(this,"__refs",{});z(this,"context",{});z(this,"state",{});z(this,"props",{});z(this,"$props",{});z(this,"$refs",{});z(this,"$el",null);z(this,"$emit",null);z(this,"$nextTick",null);z(this,"$parent",null);z(this,"$root",null);z(this,"$attrs",null);z(this,"$slots",null);z(this,"$watch",null);z(this,"$options",null);z(this,"$forceUpdate",null);z(this,"$components",{});z(this,"$libs",{});z(this,"$apis",{});z(this,"__transform",{});const{mode:r,dsl:n,attrs:i}=t;this.__mode=r,n&&(this.__id=n.id||null,this.__transform=n.transform||{}),i&&Object.assign(this,i)}setup(t,r=Ye){const n=r.getCurrentInstance();if(!n)return;this.__refs={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=n.proxy;const i=n.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,t||{}),this.__proxy(),r.onMounted(()=>{this.__proxy()}),r.onUnmounted(()=>{this.__cleanup()}),r.onBeforeUpdate(()=>{this.__reset()})}__proxy(){this.__instance&&Yi.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){Yi.forEach(t=>{this[t]=null}),this.__reset()}__reset(){this.__refs={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(t){var r;if(t)if(this.__mode===tt.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return ht({type:i,value:s},this)}else return ht(t,this)}__parseExpression(t){var r;if(t)if(this.__mode===tt.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return _e({type:i,value:s},this)}else return _e(t,this)}__ref(t=null,r){if(this.__mode!==tt.VNode)return t&&t!==this.__id&&(this.__contextRefs[t]=this),n=>k(this,null,function*(){var s,o;yield Ke(0);let i=(n==null?void 0:n.$vtjEl)||(n==null?void 0:n.$el)||((o=(s=n==null?void 0:n._)==null?void 0:s.vnode)==null?void 0:o.el)||n;if(!i){typeof r=="string"&&(delete this.$refs[r],t&&delete this.__refs[t]);return}return i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),i.__vtj__=t,tt.Design===this.__mode&&(i.__context__=this,i.draggable=!0),t&&(this.__refs[t]=this.__getRefEl(this.__refs,t,n)),typeof r=="function"?r(n):r&&(this.$refs[r]=this.__getRefEl(this.$refs,r,n)),n})}__getRefEl(t,r,n){const i=t[r];if(i&&n!==i){const s=new Set([].concat(i,n));return Array.from(s)}else return n}__clone(t={}){const r=V(V({},this.context),t),n=et(V({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function tn(e){var f,h;const{Vue:t=Ye,mode:r=tt.Runtime,components:n={},libs:i={},apis:s={},loader:o}=e,a=t.computed(()=>e.dsl),l={$components:n,$libs:i,$apis:s},u=new _y({mode:r,dsl:a.value,attrs:l}),c=t.defineComponent(V({name:a.value.name,__scopeId:a.value.id?`data-v-${a.value.id}`:void 0,props:V({},Sy((f=a.value.props)!=null?f:[],u)),setup(p){var v,w,S,g;u.$props=p,u.props=p,a.value.id&&cr(e.window||window,a.value.id,a.value.css||"",!0),u.state=xy(t,(v=a.value.state)!=null?v:{},u);const d=Ty(t,(w=a.value.computed)!=null?w:{},u),m=Ry((S=a.value.methods)!=null?S:{},u),b=Ay(t,a.value.inject,u);for(const[x,A]of Object.entries(b||{}))b[x]=t.inject(x,A);const _=$y(a.value.dataSources||{},u),y=V(V(V(V({},b),d),m),_);return u.setup(y,t),Oy(t,(g=a.value.watch)!=null?g:[],u),{vtj:u}},emits:Ey(a.value.emits),expose:["vtj"],render(){if(!a.value.nodes)return null;const p=a.value.nodes||[];return p.length===1?ie(p[0],u,t,o,p):p.map(d=>ie(d,u,t,o,p))}},jy((h=a.value.lifeCycles)!=null?h:{},u)));return{renderer:t.markRaw(c),context:u}}function Ey(e=[]){return e.map(t=>Dt(t)?t:t.name)}function Sy(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>Xg[i]):void 0;return e.map(n=>Dt(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:mt(n.default)?t.__parseExpression(n.default):n.default}).reduce((n,i)=>(n[i.name]={type:r(i.type),required:i.required,default:i.default},n),{})}function xy(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return mt(s)?s=r.__parseExpression(s):pt(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function Ty(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function Ry(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function Ay(e,t=[],r){return t.reduce((n,i)=>{var u;const{name:s,from:o}=i||{};i.default;const a=mt(o)?r.__parseExpression(o)||s:o!=null?o:s,l=mt(i.default)?r.__parseExpression(i.default):(u=i.default)!=null?u:null;return n[s]=e.inject(a,l),n},{})}function $y(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=by(i);else if(i.ref){const s=t.$apis[i.ref],o=pt(i.transform)?i.transform.value?t.__parseFunction(i.transform):void 0:i.transform;r[n]=(...a)=>k(null,null,function*(){const l=yield s.apply(t,a);return o?o(l):l})}return r},{})}function Oy(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function jy(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>{const s=t.__parseFunction(i);return r[n]=()=>k(null,null,function*(){yield Ke(0),Ht(s)&&s()}),r},{})}const Dy=new Hd;let Or=[],Zt={};const By=e=>e;function ra(r){return k(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(a=>ur(a));if(s.length===0||!i)return null;const o=n.filter(a=>ar(a));return o.length&&Qo(o,t),yield Xo(s,i,t).catch(a=>(console.warn("loadScriptUrl error",s,i,a),null))})}function en(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Or.forEach(i=>{delete n.window[i]}),Or=[]),(i,s,o=Ye)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id)return o.defineAsyncComponent(()=>k(null,null,function*(){const a=Zt[s.id]||(yield Dy.add(s.id,()=>t(s.id)));return a&&(a.name=i,Zt[s.id]=a),a?tn(et(V({},n),{Vue:o,dsl:ii(a),mode:tt.Runtime,loader:en(e)})).renderer:null}));if(s.type==="UrlSchema"&&s.url)return o.defineAsyncComponent(()=>k(null,null,function*(){const a=Zt[s.url]||(yield r(s.url));return a&&(a.name=i,Zt[s.url]=a),a?tn(et(V({},n),{Vue:o,dsl:ii(a),mode:tt.Runtime,loader:en(e)})).renderer:null}));if(s.type==="Plugin"){let a=s.library?Zt[s.library]:null;return a||(s.library&&Or.push(s.library),a=Zt[s.library||Symbol()]=o.defineAsyncComponent(()=>k(null,null,function*(){return(yield ra(s,n.window))||(console.warn("getPlugin result is null",s),null)})),a)}return i}}function ie(e,t,r=Ye,n=By,i=[],s=!1){var v;if(!e||!e.name||e.invisible)return null;const o=(v=r.getCurrentInstance())==null?void 0:v.appContext,{id:a=null,directives:l=[]}=e,{vIf:u,vElseIf:c,vElse:f,vFor:h,vShow:p,vModels:d,vBind:m,vHtml:b,others:_}=na(l);if(!s&&(c||f))return null;if(u&&!Ny(u,t))return Fy(e,t,r,n,i);const y=(w,S=0)=>{var j,N,L,M;const g=w.$components,x=(()=>{var q,$,D,C;if(e.name==="component")return Iy(w,(q=e.props)==null?void 0:q.is);if(e.name==="slot")return e.name;const H=n(e.name,e.from,r);if(Dt(H))return ly(H)||fy(H)?H:(C=(D=g[H])!=null?D:($=o==null?void 0:o.app)==null?void 0:$.component(H))!=null?C:H;if(ct(H)&&e.id){const I=`Loader${e.id}_${S}`;return g[I]||(g[I]=H)}return H})(),A=Py(a,(j=e.props)!=null?j:{},w),U=ky(r,(N=e.events)!=null?N:{},w);if(e.name==="slot")return My(r,e,A,w,n);m&&Object.assign(A,w.__parseExpression(m.value)),p&&(A.style=Object.assign((L=A.style)!=null?L:{},Ly(p,w))),b&&Object.assign(A,Vy(b,w)),d.forEach(H=>{Object.assign(A,Hy(r,H,w))});const E=qy(r,(M=e.children)!=null?M:[],w,n,e),T=w!=null&&w.__id?`data-v-${w.__id}`:void 0,F=T?{[T]:""}:{};let B=r.createVNode(x,V(V(V({key:`${a}_${S}`},F),A),U),E);const P=o?Cy(o,_,w):[];return P.length&&(B=r.withDirectives(B,P)),B};return h?Wy(h,y,t):y(t)}function Cy(e,t,r){const n=e.app;return t.map(i=>{const s=typeof i.name=="string"?n.directive(i.name):r.__parseExpression(i.name);if(!s)return null;const o=[s];return i.value&&o.push(r.__parseExpression(i.value)),i.arg&&o.push(i.arg),i.modifiers&&o.push(i.modifiers),o}).filter(i=>!!i)}function na(e=[]){const t=e.find(c=>Et(c.name)==="vIf"),r=e.find(c=>Et(c.name)==="vElseIf"),n=e.find(c=>Et(c.name)==="vElse"),i=e.find(c=>Et(c.name)==="vFor"),s=e.find(c=>Et(c.name)==="vShow"),o=e.find(c=>Et(c.name)==="vBind"),a=e.find(c=>Et(c.name)==="vHtml"),l=e.filter(c=>Et(c.name)==="vModel"),u=e.filter(c=>!Qg.includes(Et(c.name)));return{vIf:t,vElseIf:r,vElse:n,vFor:i,vShow:s,vModels:l,vBind:o,others:u,vHtml:a}}function Ny(e,t){return!!t.__parseExpression(e.value)}function Iy(e,t){return t?mt(t)?e.__parseExpression(t):t:"div"}function Py(e,t,r){const n=rn(t,r);return n.ref=r.__ref(e,n.ref),n}function rn(e,t){return mt(e)?t.__parseExpression(e):pt(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>rn(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=rn(i,t),r},{}):e}function ky(e,t,r){const n=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(t||{}).reduce((s,o)=>{const a=t[o],l=ia(a.modifiers),u=l.find(h=>n.includes(h)),c="on"+js(o)+(u&&i[u]||""),f=r.__parseFunction(a.handler);return f&&(s[c]=e.withModifiers(f,l)),s},{})}function Fy(e,t,r,n,i=[]){let s=i.findIndex(o=>o.id===e.id);for(let o=++s;o<i.length;o++){const{directives:a=[]}=i[o],{vElseIf:l,vElse:u}=na(a);if(l){if(t.__parseExpression(l.value))return ie(i[o],t,r,n,i,!0);continue}if(u)return ie(i[o],t,r,n,i,!0)}return null}function ia(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function My(e,t,r,n,i){var l;const{children:s}=t,o=Uy(t,n),a=(l=n.$slots)==null?void 0:l[o.name];return a?a(r):s?Dt(s)?e.createTextVNode(s):mt(s)?e.createTextVNode(Zo(n.__parseExpression(s))):Array.isArray(s)?s.map(u=>ie(u,n,e,i,s)):null:null}function Uy(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:mt(n)?t.__parseExpression(n):n,params:[]}}function Ly(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function Vy(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function Hy(e,t,r){var a;const n={type:"JSFunction",value:(a=t.value)!=null&&a.value?`(v) => {
|
|
72
72
|
${t.value.value} = v;
|
|
73
|
-
}`:"(v) => {}"},i=r.__parseFunction(n),s=ia(mt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=mt(t.arg)?r.__parseExpression(t.arg):t.arg||"modelValue";return{[o]:r.__parseExpression(t.value),[`onUpdate:${o}`]:s.length&&i?e.withModifiers(i,s):i}}function qy(e,t,r,n,i){if(!t)return null;if(Dt(t))return{default:()=>t};if(mt(t))return{default:()=>Zo(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=zy(t),o=(a,l)=>!a||!i?{}:i!=null&&i.id&&Object.keys(a).length?l?{[l]:a}:{[`scope_${i.id}`]:a}:l?{[l]:Object.create(null)}:{};return Object.entries(s).reduce((a,[l,{nodes:u,params:c,scope:f}])=>(a[l]=h=>{const p=c.length?Dd(h!=null?h:{},c):o(h,f);return u.map(d=>ie(d,r.__clone(p),e,n,u))},a),{})}return null}function zy(e){const t={};for(const r of e){const n=Ky(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params),t[i].scope=n.scope||""):t[i]={nodes:[r],params:n.params,scope:n.scope||""}}return t}function Ky(e="default"){return Dt(e)?{name:e,params:[],scope:""}:V({params:[],scope:""},e)}function Wy(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let a=r.__parseExpression(n)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((l,u)=>u+1)),Array.isArray(a)?a.map((l,u)=>t(r.__clone({[s]:l,[o]:u}),u)):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const jr=Qi({name:"VtjPageContainer",setup(){return k(this,null,function*(){const e=i0(),t=va(),r=t.meta.__vtj__||t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=ga(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?Br(e,et(V({},t),{key:r})):Br("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),Jy=Qi({name:"VtjStartupContainer",render(){return Br("div","page not found!")}});function nn(e,t,r=[]){const n=[];for(const i of r){const{id:s,title:o,icon:a,children:l,hidden:u,layout:c}=i;if(c){const f=nn(e,t,l||[]);n.push(...f)}else{const f={id:s,title:o,icon:a,hidden:u,url:`${e}/${t}/${s}`,children:l&&l.length?nn(e,t,l):void 0};n.push(f)}}return n}function Dr(e,t){const{id:r,title:n,meta:i}=e,{name:s="page",prefix:o="",component:a,routeMeta:l}=t;return{name:r,path:`${o}${s}/${r}`,component:a,meta:et(V(V({title:n},l),i),{__vtj__:r})}}function sn(e){const{name:t="page",prefix:r="",pages:n=[],component:i,loader:s,routeMeta:o,homepage:a}=e,l=[];for(const u of n){const{id:c,title:f,dir:h,layout:p,children:d,meta:m}=u;if(h){const b=sn({name:t,prefix:r,component:i,routeMeta:o,homepage:a,loader:s,pages:d||[]});l.push(...b)}else if(p){const b=sn({name:t,prefix:r,component:i,routeMeta:o,homepage:a,loader:s,pages:d||[]}),_={name:`layout_${c}`,path:r,component:()=>s(c),meta:et(V(V({title:f},o),m),{__vtj__:c}),children:b};l.push(_),l.push(Dr(u,e))}else if(l.push(Dr(u,e)),a===c){const b=Dr(u,e);b.path="",b.name=`home_${c}`,l.push(b)}}return l}function Yy(e={},t){const{css:r,store:n,enhance:i}=e,{window:s,app:o,library:a={},adapter:l,mode:u}=t,{Pinia:c}=a;cr(s,"global-css",r||""),c&&n&&Gy(n,o,c),Qy(o,l,e),!l.access&&e.access&&Zy(e.access,o,u,l),Xy(o,e),i&&t0(i,o,a)}function Gy(e,t,r){const n=r.createPinia();if(t.use(n),pt(e)&&e.value){const i=ht(e,{},!1,!1,!0),s=r.defineStore("$store",i(t)||{});t.config.globalProperties.$store=s()}}function Zy(e,t,r,n){if(pt(e)&&e.value){const i=ht(e,{},!1,!1,!0),{alert:s,request:o}=n,a=new ta(V({alert:s,storagePrefix:"__VTJ_APP_"},i(t))),l=t.config.globalProperties.$router;a.connect({mode:r,router:l,request:o}),t.use(a)}}function Qy(e,t,r){if(!t.request)return;const{axios:n,request:i,response:s}=r;if(n&&pt(n)&&n.value){const o=ht(n,{},!1,!1,!0);t.request.setConfig(o(e))}if(i&&pt(i)&&i.value){const o=ht(i,{},!1,!1,!0);t.request.useRequest(a=>o(a,e))}if(s&&pt(s)&&s.value){const o=ht(s,{},!1,!1,!0);t.request.useResponse(a=>o(a,e))}}function Xy(e,t){const{beforeEach:r,afterEach:n}=t,i=e.config.globalProperties.$router;if(r&&pt(r)&&r.value){const s=ht(r,{},!1,!1,!0);i&&i.beforeEach((o,a,l)=>s(o,a,l,e))}if(n&&pt(n)&&n.value){const s=ht(n,{},!1,!1,!0);i&&i.afterEach((o,a,l)=>s(o,a,l,e))}}function t0(e,t,r={}){pt(e)&&e.value&&ht(e,{},!1,!1,!0)(t,r)}function e0(e,t,r){if(!e||!t||!r)return;const{VueI18n:n}=t;if(n){const{locale:i,fallbackLocale:s,messages:o=[]}=r,a={};for(let u of o){const c=Object.keys(u).filter(f=>f!=="key");for(const f of c)a[f]||(a[f]={}),a[f][u.key]=u[f]}const l=n.createI18n({legacy:!1,locale:i,fallbackLocale:s,messages:a});e.use(l)}}const sa=Symbol("Provider");class r0 extends Wd{constructor(r){super();z(this,"mode");z(this,"globals",{});z(this,"modules",{});z(this,"adapter",{request:Gr,jsonp:Go});z(this,"apis",{});z(this,"dependencies",{});z(this,"materials",{});z(this,"library",{});z(this,"service");z(this,"project",null);z(this,"components",{});z(this,"nodeEnv","development");z(this,"router",null);z(this,"materialPath","./");z(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=tt.Raw,dependencies:s,materials:o,project:a={},adapter:l={},globals:u={},modules:c={},router:f=null,materialPath:h="./",nodeEnv:p="development"}=r;this.mode=i,this.modules=c,this.service=n,this.router=f,this.materialPath=h,this.nodeEnv=p,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,l);const{access:d,request:m}=this.adapter;d&&d.connect({mode:i,router:f,request:m}),a&&i!==tt.Design?this.load(a):this.project=a}createMock(r){return(...n)=>k(null,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){re.warn("模拟数据模版异常",o)}return(s=we())==null?void 0:s.mock(i)})}load(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/projects/${r.id}.json`]||this.modules[`/src/${n}/projects/${r.id}.json`];if(this.project=i?yield i():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:s=[],meta:o=[]}=this.project,a=window;a&&(a.CKEDITOR_VERSION=void 0),this.mode===tt.Raw?yield this.loadDependencies(a):yield this.loadAssets(a),this.initMock(a),this.apis=yy(s,o,this.adapter),ea(a),vy(s,a),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=we(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return k(this,null,function*(){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(r){return k(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:l}=this,{libraryExports:u,libraryMap:c,materials:f,materialExports:h,materialMapLibrary:p}=iy(n,a,l==="development");for(const d of u){const m=i[d],b=r[d];if(b)s[d]=b;else if(m)r[d]=s[d]=yield m();else{const _=c[d]||[];for(const y of _)ar(y)&&(yield uy(y,Le.append(y,{v:Ar}))),ur(y)&&(yield Wi(Le.append(y,{v:Ar})));s[d]=r[d]}}if(l==="development"){for(const m of f)yield Wi(Le.append(m,{v:Ar}));const d=this.materials||{};for(const m of h){const b=r[p[m]],_=Kd[m];if(_)b&&_.forEach(y=>{o[y]=b[y]});else{const y=d[m]?(yield d[m]()).default:r[m];y&&b&&(y.components||[]).forEach(v=>{o[v.name]=sy(v,b)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const o=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:a,pageRouteName:l=o,routeMeta:u}=i,c=a?"":"/",f={path:`${c}${l}/:id`,name:Ve,component:jr},h={path:c,name:$r,component:n!=null&&n.homepage?jr:s.startupComponent||Jy,meta:u};if(r.hasRoute(Ve)&&r.removeRoute(Ve),r.hasRoute($r)&&r.removeRoute($r),i.enableStaticRoute){const p=(n==null?void 0:n.pages)||[];sn({name:l,prefix:c,pages:p,component:jr,loader:this.getRenderComponent.bind(this),homepage:n==null?void 0:n.homepage}).forEach(d=>{a?r.addRoute(a,d):r.addRoute(d)}),n!=null&&n.homepage||(a?r.addRoute(a,h):r.addRoute(h))}else a?(r.addRoute(a,f),r.addRoute(a,h)):(r.addRoute(f),r.addRoute(h))}install(r){var i,s,o;const n=r.config.globalProperties.installed||{};for(const[a,l]of Object.entries(this.library))!n[a]&&cy(l)&&(r.use(l),n[a]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),((i=this.project)==null?void 0:i.platform)!=="uniapp"&&this.mode!==tt.Design&&this.initGlobals(((s=this.project)==null?void 0:s.globals)||{},{app:r,window,adapter:this.adapter,library:this.library,mode:this.mode}),this.mode!==tt.Design&&((o=this.project)!=null&&o.i18n)&&this.initI18n(r,this.library,this.project.i18n),r.provide(sa,this),r.config.globalProperties.$provider=this,this.options.enhance&&r.use(this.options.enhance,this),this.mode===tt.Design&&(r.config.errorHandler=(a,l,u)=>{const c=l==null?void 0:l.$options.name,f=typeof a=="string"?a:(a==null?void 0:a.message)||(a==null?void 0:a.msg)||"未知错误",h=`[ ${c} ] ${f} ${u}`;console.error("[VTJ Error]:",{err:a,instance:l,info:u},a==null?void 0:a.stack),this.adapter.notify&&this.adapter.notify(h,"组件渲染错误","error")}),r.config.globalProperties.installed=n}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,o=[])=>{for(const a of o){if(a.id===s)return a;if(a.children&&a.children.length){const l=i(s,a.children);if(l)return l}}};return i(r,n)||null}getMenus(r="page",n=""){var i;return nn(n,r,((i=this.project)==null?void 0:i.pages)||[])}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/files/${r}.json`]||this.modules[`/src/${n}/files/${r}.json`];return i?yield i():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return k(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,l=V({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),u=en({getDsl:c=>k(this,null,function*(){return(yield this.getDsl(c))||null}),getDslByUrl:c=>k(this,null,function*(){return(yield this.getDslByUrl(c))||null}),options:l});return tn(et(V({},l),{dsl:r,loader:u}))}getRenderComponent(r,n){return k(this,null,function*(){var o;const i=this.getFile(r);if(!i)return re.warn(`Can not find file: ${r}`),null;if(n&&n(i),this.mode===tt.Raw){const{vtjRawDir:a=".vtj/vue"}=this.options,l=`${a}/${r}.vue`,u=this.modules[l]||this.modules[`/src/pages/${r}.vue`];return u?(o=yield u())==null?void 0:o.default:this.nodeEnv==="development"&&this.adapter.startupComponent||null}const s=yield this.getDsl(i.id);return s?this.createDslRenderer(s).renderer:(re.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return xn(()=>k(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return xn(()=>k(null,null,function*(){return yield ra(r,window)}))}initGlobals(r,n){const i=Object.assign({adapter:this.adapter,window},n);Yy(r,i)}initI18n(r,n,i){e0(r,n,i)}}function n0(e){const t=new r0(e);return{provider:t,onReady:r=>t.ready(r)}}function i0(e={}){const t=ya(sa,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&k(null,null,function*(){const i=yield t.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&t.adapter.notify&&t.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return t}function s0(e,t=""){return k(this,null,function*(){const{name:r,urls:n=[]}=e||{},i=n.map(a=>t+a),{css:s,js:o}=oy(i);if(s.length&&Qo(s),o.length)return yield Xo(o,r).catch(()=>{})})}const oa={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},o0=(e,t="/__vtj__/api/:type.json")=>(r,n,i)=>e.send({url:t,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:oa}),a0=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>k(null,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:et(V({},oa),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function u0(e){return wn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var r;return((r=t.data)==null?void 0:r.code)===0},showError:t=>{e&&e(t||"未知错误")}}})}class c0{constructor(t=Gr){z(this,"api");z(this,"pluginCaches",{});z(this,"uploader");this.req=t,this.api=o0(t),this.uploader=a0(t)}getExtension(){return k(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return k(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return k(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return k(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return k(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return k(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return k(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return k(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return k(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return k(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return k(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return k(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return k(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}parseVue(t,r){return k(this,null,function*(){return yield this.api("parseVue",V({project:t},r))})}createRawPage(t){return k(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return k(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return k(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return k(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return k(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return k(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return k(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>ry(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=Gr.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return k(this,null,function*(){return console.log("BaseService.genSource",t),""})}}new Ko({type:"local",expired:0,prefix:"__VTJ_"});class l0 extends c0{constructor(){super(...arguments);z(this,"getFileCaches",{})}getExtension(){return k(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return k(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return k(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return k(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:Od(n)}).catch(()=>!1))})}saveFile(r){return k(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return k(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return k(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return k(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return k(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return k(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return k(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}/**!
|
|
73
|
+
}`:"(v) => {}"},i=r.__parseFunction(n),s=ia(mt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=mt(t.arg)?r.__parseExpression(t.arg):t.arg||"modelValue";return{[o]:r.__parseExpression(t.value),[`onUpdate:${o}`]:s.length&&i?e.withModifiers(i,s):i}}function qy(e,t,r,n,i){if(!t)return null;if(Dt(t))return{default:()=>t};if(mt(t))return{default:()=>Zo(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=zy(t),o=(a,l)=>!a||!i?{}:i!=null&&i.id&&Object.keys(a).length?l?{[l]:a}:{[`scope_${i.id}`]:a}:l?{[l]:Object.create(null)}:{};return Object.entries(s).reduce((a,[l,{nodes:u,params:c,scope:f}])=>(a[l]=h=>{const p=c.length?Dd(h!=null?h:{},c):o(h,f);return u.map(d=>ie(d,r.__clone(p),e,n,u))},a),{})}return null}function zy(e){const t={};for(const r of e){const n=Ky(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params),t[i].scope=n.scope||""):t[i]={nodes:[r],params:n.params,scope:n.scope||""}}return t}function Ky(e="default"){return Dt(e)?{name:e,params:[],scope:""}:V({params:[],scope:""},e)}function Wy(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let a=r.__parseExpression(n)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((l,u)=>u+1)),Array.isArray(a)?a.map((l,u)=>t(r.__clone({[s]:l,[o]:u}),u)):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const jr=Qi({name:"VtjPageContainer",setup(){return k(this,null,function*(){const e=i0(),t=va(),r=t.meta.__vtj__||t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=ga(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?Br(e,et(V({},t),{key:r})):Br("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),Jy=Qi({name:"VtjStartupContainer",render(){return Br("div","page not found!")}});function nn(e,t,r=[]){const n=[];for(const i of r){const{id:s,title:o,icon:a,children:l,hidden:u,layout:c}=i;if(c){const f=nn(e,t,l||[]);n.push(...f)}else{const f={id:s,title:o,icon:a,hidden:u,url:`${e}/${t}/${s}`,children:l&&l.length?nn(e,t,l):void 0};n.push(f)}}return n}function Dr(e,t){const{id:r,title:n,meta:i}=e,{name:s="page",prefix:o="",component:a,routeMeta:l}=t;return{name:r,path:`${o}${s}/${r}`,component:a,meta:et(V(V({title:n},l),i),{__vtj__:r})}}function sn(e){const{name:t="page",prefix:r="",pages:n=[],component:i,loader:s,routeMeta:o,homepage:a}=e,l=[];for(const u of n){const{id:c,title:f,dir:h,layout:p,children:d,meta:m}=u;if(h){const b=sn({name:t,prefix:r,component:i,routeMeta:o,homepage:a,loader:s,pages:d||[]});l.push(...b)}else if(p){const b=sn({name:t,prefix:r,component:i,routeMeta:o,homepage:a,loader:s,pages:d||[]}),_={name:`layout_${c}`,path:r,component:()=>s(c),meta:et(V(V({title:f},o),m),{__vtj__:c}),children:b};l.push(_),l.push(Dr(u,e))}else if(l.push(Dr(u,e)),a===c){const b=Dr(u,e);b.path="",b.name=`home_${c}`,l.push(b)}}return l}function Yy(e={},t){const{css:r,store:n,enhance:i}=e,{window:s,app:o,library:a={},adapter:l,mode:u}=t,{Pinia:c}=a;o.config.globalProperties.$libs=a,cr(s,"global-css",r||""),c&&n&&Gy(n,o,c),Qy(o,l,e),!l.access&&e.access&&Zy(e.access,o,u,l),Xy(o,e),i&&t0(i,o,a)}function Gy(e,t,r){const n=r.createPinia();if(t.use(n),pt(e)&&e.value){const i=ht(e,{},!1,!1,!0),s=r.defineStore("$store",i(t)||{});t.config.globalProperties.$store=s()}}function Zy(e,t,r,n){if(pt(e)&&e.value){const i=ht(e,{},!1,!1,!0),{alert:s,request:o}=n,a=new ta(V({alert:s,storagePrefix:"__VTJ_APP_"},i(t))),l=t.config.globalProperties.$router;a.connect({mode:r,router:l,request:o}),t.use(a)}}function Qy(e,t,r){if(!t.request)return;const{axios:n,request:i,response:s}=r;if(n&&pt(n)&&n.value){const o=ht(n,{},!1,!1,!0);t.request.setConfig(o(e))}if(i&&pt(i)&&i.value){const o=ht(i,{},!1,!1,!0),a=t.request;a.__unReq&&a.__unReq(),a.__unReq=t.request.useRequest(l=>o(l,e))}if(s&&pt(s)&&s.value){const o=ht(s,{},!1,!1,!0),a=t.request;a.__unRes&&a.__unRes(),a.__unRes=t.request.useResponse(l=>o(l,e))}}function Xy(e,t){const{beforeEach:r,afterEach:n}=t,i=e.config.globalProperties.$router;if(r&&pt(r)&&r.value){const s=ht(r,{},!1,!1,!0);i&&i.beforeEach((o,a,l)=>s(o,a,l,e))}if(n&&pt(n)&&n.value){const s=ht(n,{},!1,!1,!0);i&&i.afterEach((o,a,l)=>s(o,a,l,e))}}function t0(e,t,r={}){pt(e)&&e.value&&ht(e,{},!1,!1,!0)(t,r)}function e0(e,t,r){if(!e||!t||!r)return;const{VueI18n:n}=t;if(n){const{locale:i,fallbackLocale:s,messages:o=[]}=r,a={};for(let u of o){const c=Object.keys(u).filter(f=>f!=="key");for(const f of c)a[f]||(a[f]={}),a[f][u.key]=u[f]}const l=n.createI18n({legacy:!1,locale:i,fallbackLocale:s,messages:a});e.use(l)}}const sa=Symbol("Provider");class r0 extends Wd{constructor(r){super();z(this,"mode");z(this,"globals",{});z(this,"modules",{});z(this,"adapter",{request:Gr,jsonp:Go});z(this,"apis",{});z(this,"dependencies",{});z(this,"materials",{});z(this,"library",{});z(this,"service");z(this,"project",null);z(this,"components",{});z(this,"nodeEnv","development");z(this,"router",null);z(this,"materialPath","./");z(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=tt.Raw,dependencies:s,materials:o,project:a={},adapter:l={},globals:u={},modules:c={},router:f=null,materialPath:h="./",nodeEnv:p="development"}=r;this.mode=i,this.modules=c,this.service=n,this.router=f,this.materialPath=h,this.nodeEnv=p,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,l);const{access:d,request:m}=this.adapter;d&&d.connect({mode:i,router:f,request:m}),a&&i!==tt.Design?this.load(a):this.project=a}createMock(r){return(...n)=>k(null,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){re.warn("模拟数据模版异常",o)}return(s=we())==null?void 0:s.mock(i)})}load(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/projects/${r.id}.json`]||this.modules[`/src/${n}/projects/${r.id}.json`];if(this.project=i?yield i():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:s=[],meta:o=[]}=this.project,a=window;a&&(a.CKEDITOR_VERSION=void 0),this.mode===tt.Raw?yield this.loadDependencies(a):yield this.loadAssets(a),this.initMock(a),this.apis=yy(s,o,this.adapter),ea(a),vy(s,a),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=we(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return k(this,null,function*(){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(r){return k(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:l}=this,{libraryExports:u,libraryMap:c,materials:f,materialExports:h,materialMapLibrary:p}=iy(n,a,l==="development");for(const d of u){const m=i[d],b=r[d];if(b)s[d]=b;else if(m)r[d]=s[d]=yield m();else{const _=c[d]||[];for(const y of _)ar(y)&&(yield uy(y,Le.append(y,{v:Ar}))),ur(y)&&(yield Wi(Le.append(y,{v:Ar})));s[d]=r[d]}}if(l==="development"){for(const m of f)yield Wi(Le.append(m,{v:Ar}));const d=this.materials||{};for(const m of h){const b=r[p[m]],_=Kd[m];if(_)b&&_.forEach(y=>{o[y]=b[y]});else{const y=d[m]?(yield d[m]()).default:r[m];y&&b&&(y.components||[]).forEach(v=>{o[v.name]=sy(v,b)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const o=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:a,pageRouteName:l=o,routeMeta:u}=i,c=a?"":"/",f={path:`${c}${l}/:id`,name:Ve,component:jr},h={path:c,name:$r,component:n!=null&&n.homepage?jr:s.startupComponent||Jy,meta:u};if(r.hasRoute(Ve)&&r.removeRoute(Ve),r.hasRoute($r)&&r.removeRoute($r),i.enableStaticRoute){const p=(n==null?void 0:n.pages)||[];sn({name:l,prefix:c,pages:p,component:jr,loader:this.getRenderComponent.bind(this),homepage:n==null?void 0:n.homepage}).forEach(d=>{a?r.addRoute(a,d):r.addRoute(d)}),n!=null&&n.homepage||(a?r.addRoute(a,h):r.addRoute(h))}else a?(r.addRoute(a,f),r.addRoute(a,h)):(r.addRoute(f),r.addRoute(h))}install(r){var i,s,o;const n=r.config.globalProperties.installed||{};for(const[a,l]of Object.entries(this.library))!n[a]&&cy(l)&&(r.use(l),n[a]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),((i=this.project)==null?void 0:i.platform)!=="uniapp"&&this.mode!==tt.Design&&this.initGlobals(((s=this.project)==null?void 0:s.globals)||{},{app:r,window,adapter:this.adapter,library:this.library,mode:this.mode}),this.mode!==tt.Design&&((o=this.project)!=null&&o.i18n)&&this.initI18n(r,this.library,this.project.i18n),r.provide(sa,this),r.config.globalProperties.$provider=this,this.options.enhance&&r.use(this.options.enhance,this),this.mode===tt.Design&&(r.config.errorHandler=(a,l,u)=>{const c=l==null?void 0:l.$options.name,f=typeof a=="string"?a:(a==null?void 0:a.message)||(a==null?void 0:a.msg)||"未知错误",h=`[ ${c} ] ${f} ${u}`;console.error("[VTJ Error]:",{err:a,instance:l,info:u},a==null?void 0:a.stack),this.adapter.notify&&this.adapter.notify(h,"组件渲染错误","error")}),r.config.globalProperties.installed=n}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,o=[])=>{for(const a of o){if(a.id===s)return a;if(a.children&&a.children.length){const l=i(s,a.children);if(l)return l}}};return i(r,n)||null}getMenus(r="page",n=""){var i;return nn(n,r,((i=this.project)==null?void 0:i.pages)||[])}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return k(this,null,function*(){const{vtjDir:n=".vtj"}=this.options,i=this.modules[`${n}/files/${r}.json`]||this.modules[`/src/${n}/files/${r}.json`];return i?yield i():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return k(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,l=V({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),u=en({getDsl:c=>k(this,null,function*(){return(yield this.getDsl(c))||null}),getDslByUrl:c=>k(this,null,function*(){return(yield this.getDslByUrl(c))||null}),options:l});return tn(et(V({},l),{dsl:r,loader:u}))}getRenderComponent(r,n){return k(this,null,function*(){var o;const i=this.getFile(r);if(!i)return re.warn(`Can not find file: ${r}`),null;if(n&&n(i),this.mode===tt.Raw){const{vtjRawDir:a=".vtj/vue"}=this.options,l=`${a}/${r}.vue`,u=this.modules[l]||this.modules[`/src/pages/${r}.vue`];return u?(o=yield u())==null?void 0:o.default:this.nodeEnv==="development"&&this.adapter.startupComponent||null}const s=yield this.getDsl(i.id);return s?this.createDslRenderer(s).renderer:(re.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return xn(()=>k(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return xn(()=>k(null,null,function*(){return yield ra(r,window)}))}initGlobals(r,n){const i=Object.assign({adapter:this.adapter,window},n);Yy(r,i)}initI18n(r,n,i){e0(r,n,i)}}function n0(e){const t=new r0(e);return{provider:t,onReady:r=>t.ready(r)}}function i0(e={}){const t=ya(sa,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&k(null,null,function*(){const i=yield t.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&t.adapter.notify&&t.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return t}function s0(e,t=""){return k(this,null,function*(){const{name:r,urls:n=[]}=e||{},i=n.map(a=>t+a),{css:s,js:o}=oy(i);if(s.length&&Qo(s),o.length)return yield Xo(o,r).catch(()=>{})})}const oa={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},o0=(e,t="/__vtj__/api/:type.json")=>(r,n,i)=>e.send({url:t,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:oa}),a0=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>k(null,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:et(V({},oa),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function u0(e){return wn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var r;return((r=t.data)==null?void 0:r.code)===0},showError:t=>{e&&e(t||"未知错误")}}})}class c0{constructor(t=Gr){z(this,"api");z(this,"pluginCaches",{});z(this,"uploader");this.req=t,this.api=o0(t),this.uploader=a0(t)}getExtension(){return k(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return k(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return k(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return k(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return k(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return k(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return k(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return k(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return k(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return k(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return k(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return k(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return k(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return k(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}parseVue(t,r){return k(this,null,function*(){return yield this.api("parseVue",V({project:t},r))})}createRawPage(t){return k(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return k(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return k(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return k(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return k(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return k(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return k(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>ry(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=Gr.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return k(this,null,function*(){return console.log("BaseService.genSource",t),""})}}new Ko({type:"local",expired:0,prefix:"__VTJ_"});class l0 extends c0{constructor(){super(...arguments);z(this,"getFileCaches",{})}getExtension(){return k(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return k(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return k(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return k(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:Od(n)}).catch(()=>!1))})}saveFile(r){return k(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return k(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return k(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return k(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return k(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return k(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return k(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return k(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}/**!
|
|
74
74
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
75
75
|
* @name @vtj/uni
|
|
76
76
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
77
|
-
* @version 0.13.
|
|
77
|
+
* @version 0.13.16
|
|
78
78
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
79
79
|
*/const f0=["onLaunch","onShow","onHide","onError","onPageNotFound","onUnhandledRejection","onThemeChange","onPageNotFound","onUniNViewMessage","onExit"],Gi="/pages",h0="VTJ",p0="__UNI__1FC118B",d0="VTJ移动跨端项目",m0="1.0.0",g0="100",y0=!1,v0={},b0={enable:!1},w0="3",_0={name:h0,appid:p0,description:d0,versionName:m0,versionCode:g0,transformPx:y0,"app-plus":{usingComponents:!0,nvueStyleCompiler:"uni-app",compilerVersion:3,splashscreen:{alwaysShowBeforeRender:!0,waiting:!0,autoclose:!0,delay:0},modules:{},distribute:{android:{permissions:['<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>','<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>','<uses-permission android:name="android.permission.VIBRATE"/>','<uses-permission android:name="android.permission.READ_LOGS"/>','<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>','<uses-feature android:name="android.hardware.camera.autofocus"/>','<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>','<uses-permission android:name="android.permission.CAMERA"/>','<uses-permission android:name="android.permission.GET_ACCOUNTS"/>','<uses-permission android:name="android.permission.READ_PHONE_STATE"/>','<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>','<uses-permission android:name="android.permission.WAKE_LOCK"/>','<uses-permission android:name="android.permission.FLASHLIGHT"/>','<uses-feature android:name="android.hardware.camera"/>','<uses-permission android:name="android.permission.WRITE_SETTINGS"/>']},ios:{},sdkConfigs:{},icons:{android:{hdpi:"src/static/logo.png",xhdpi:"src/static/logo.png",xxhdpi:"src/static/logo.png",xxxhdpi:"src/static/logo.png"}}}},quickapp:v0,"mp-weixin":{appid:"",setting:{urlCheck:!1},usingComponents:!0},"mp-alipay":{usingComponents:!0},"mp-baidu":{usingComponents:!0},"mp-toutiao":{usingComponents:!0},uniStatistics:b0,vueVersion:w0},E0=[],S0={navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},x0={autoscan:!0,custom:{"^uni-(.*)":"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"}},T0={pages:E0,globalStyle:S0,easycom:x0};function R0(e){let{manifestJson:t={},pagesJson:r={},routes:n=[]}=e;const i=n.map(s=>{const{path:o,style:a,needLogin:l}=s;return{path:o,style:a,needLogin:l}});return et(V({},e),{manifestJson:Object.assign({},_0,t),pagesJson:Object.assign({},T0,r,{pages:i})})}const on={navigationBarBackgroundColor:"backgroundColor",navigationBarTextStyle:"titleColor",navigationBarTitleText:"titleText",navigationStyle:"style",titleImage:"titleImage",titlePenetrate:"titlePenetrate",transparentTitle:"transparentTitle"};function aa(e){const t={},r={black:"#000000",white:"#ffffff"};for(const n in e)on[n]&&(t[on[n]]=n==="navigationBarTextStyle"?r[e[n]]||r.black:e[n]);return t}function A0(e){const t={};for(const r in e)on[r]||(t[r]=e[r]);return t}function $0(e){var t,r;return((r=(t=e.h5)==null?void 0:t.router)==null?void 0:r.mode)||"hash"}function O0(e){var t,r,n;return{topWindow:!!((t=e.topWindow)!=null&&t.path),leftWindow:!!((r=e.leftWindow)!=null&&r.path),rightWindow:!!((n=e.rightWindow)!=null&&n.path)}}function j0(e){const{pagesJson:t={}}=e,{globalStyle:r,pages:n=[]}=t;return!!(r!=null&&r.enablePullDownRefresh||n.find(i=>{var s;return!!((s=i.style)!=null&&s.enablePullDownRefresh)}))}function D0(e){const{pagesJson:t={}}=e,{globalStyle:r,pages:n=[]}=t;let i=!1;return(r==null?void 0:r.navigationStyle)==="custom"?(i=!0,n.find(s=>{var o;return((o=s.style)==null?void 0:o.navigationStyle)==="default"})&&(i=!1)):n.every(s=>{var o;return((o=s.style)==null?void 0:o.navigationStyle)==="custom"})&&(i=!0),i}function B0(e){var a;const t=D0(e),r={navigationBar:!1,navigationBarButtons:!1,navigationBarSearchInput:!1,navigationBarTransparent:!1},{pagesJson:n={}}=e,{globalStyle:i,pages:s=[]}=n;if(t)return r;r.navigationBar=!0;const o=(a=i==null?void 0:i.h5)==null?void 0:a.titleNView;return s.find(l=>{var u,c,f;return!!((f=(c=(u=l.style)==null?void 0:u.h5)==null?void 0:c.titleNView)!=null&&f.buttons.length)})&&(r.navigationBarButtons=!0),(o!=null&&o.searchInput||s.find(l=>{var u,c,f;return!!((f=(c=(u=l.style)==null?void 0:u.h5)==null?void 0:c.titleNView)!=null&&f.searchInput)}))&&(r.navigationBarSearchInput=!0),((o==null?void 0:o.type)==="transparent"||s.find(l=>{var u,c,f;return((f=(c=(u=l.style)==null?void 0:u.h5)==null?void 0:c.titleNView)==null?void 0:f.type)==="transparent"}))&&(r.navigationBarTransparent=!0),r}function C0(e,t=window){var h,p,d,m;const{pagesJson:r={},manifestJson:n={}}=e,{topWindow:i,leftWindow:s,rightWindow:o}=O0(r),{navigationBar:a,navigationBarButtons:l,navigationBarSearchInput:u,navigationBarTransparent:c}=B0(e),f={__VUE_OPTIONS_API__:!0,__VUE_PROD_DEVTOOLS__:!1,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:!1,__UNI_FEATURE_WX__:!1,__UNI_FEATURE_WXS__:!1,__UNI_FEATURE_RPX__:!1,__UNI_FEATURE_PROMISE__:!1,__UNI_FEATURE_LONGPRESS__:!1,__UNI_FEATURE_I18N_EN__:!1,__UNI_FEATURE_I18N_ES__:!1,__UNI_FEATURE_I18N_FR__:!1,__UNI_FEATURE_I18N_ZH_HANS__:!0,__UNI_FEATURE_I18N_ZH_HANT__:!1,__UNI_FEATURE_UNI_CLOUD__:!1,__UNI_FEATURE_I18N_LOCALE__:!1,__UNI_FEATURE_NVUE__:!1,__UNI_FEATURE_ROUTER_MODE__:$0(n),__UNI_FEATURE_PAGES__:!!((h=r.pages)!=null&&h.length),__UNI_FEATURE_TABBAR__:!!((d=(p=r.tabBar)==null?void 0:p.list)!=null&&d.length),__UNI_FEATURE_TABBAR_MIDBUTTON__:!!((m=r.tabBar)!=null&&m.midButton),__UNI_FEATURE_TOPWINDOW__:i,__UNI_FEATURE_LEFTWINDOW__:s,__UNI_FEATURE_RIGHTWINDOW__:o,__UNI_FEATURE_RESPONSIVE__:!1,__UNI_FEATURE_NAVIGATIONBAR__:a,__UNI_FEATURE_PULL_DOWN_REFRESH__:j0(e),__UNI_FEATURE_NAVIGATIONBAR_BUTTONS__:l,__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__:u,__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__:c};Object.entries(f).forEach(([b,_])=>{t[b]=_})}const N0="4.57";function I0(e,t=window){var f,h;const{pagesJson:r={},manifestJson:n={}}=e,{easycom:i={}}=r,{appid:s="",name:o="",versionCode:a="",versionName:l=""}=n,u=r.globalStyle,c=((f=n.h5)==null?void 0:f.router)||{};t.__uniConfig={easycom:i,globalStyle:et(V({},A0(u)),{navigationBar:aa(u),isNVue:!1}),compilerVersion:N0,appId:s,appName:o,appVersion:l,appVersionCode:String(a),async:V({loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0},((h=n.h5)==null?void 0:h.async)||{}),debug:!1,networkTimeout:V({request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},n.networkTimeout||{}),sdkConfigs:{},nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:{},router:V({mode:"hash",base:"/",assets:"assets",routerBase:c.base||"/"},c),darkmode:!1,themeConfig:{},tabBar:r.tabBar?V({position:"bottom",color:"#7A7E83",selectedColor:"#3cc51f",borderStyle:"black",blurEffect:"none",fontSize:"10px",iconWidth:"24px",spacing:"3px",height:"50px",backgroundColor:"#ffffff",selectedIndex:0,shown:!0},r.tabBar):void 0}}function P0(e,t=window){const{UniServiceJSBridge:r,UniViewJSBridge:n,getApp:i,uni:s,getCurrentPages:o,upx2px:a,setupPage:l}=e;t.UniServiceJSBridge=r,t.UniViewJSBridge=n,t.getApp=i,t.uni=s,t.wx=s,t.getCurrentPages=o,t.upx2px=a,t.__setupPage=u=>l(u)}function k0(e,t,r){const{openBlock:n,createBlock:i,withCtx:s,createVNode:o}=e,{PageComponent:a,setupPage:l,getApp:u}=t;return{mpType:"page",setup(){return k(this,null,function*(){var m,b;const f=((b=(m=u())==null?void 0:m.$route)==null?void 0:b.query)||{},{loader:h,component:p}=r,d=h?yield h(r):p||{};return()=>(n(),i(a,null,{page:s(()=>[o(l(d),Object.assign({},f,{ref:"page"}),null,512)]),_:1}))})}}}function F0(e,t,r){var p;const{path:n,style:i={},meta:s={},home:o,id:a}=t,l=((p=e.tabBar)==null?void 0:p.list)||[],u=l.findIndex(d=>{var m;return d.pagePath===n||((m=d.pagePath)==null?void 0:m.endsWith(a))}),c=l[u],f=!!c,h=r===0;return V({isTabBar:f,tabBarIndex:u,isQuit:o!=null?o:h,isEntry:o!=null?o:h,navigationBar:V({type:"default"},aa(i)),isNVue:!1,route:c?c.pagePath:n},s)}function M0(e,t,r,n,i=window){const s=r.map((o,a)=>{const l=F0(n,o,a),u=k0(e,t,o),{path:c}=o;return{path:c,alias:c,meta:l,component:{render(){return e.h(e.Suspense,[e.h(u)])}}}});i.__uniRoutes=s,i.__uniLayout={}}function U0(e,t,r=window){cr(r,String(e),t)}function L0(e,t){t&&["View","ScrollView","Swiper","MovableArea","MovableView","CoverView","CoverImage","Icon","Text","RichText","Progress","Button","CheckboxGroup","Checkbox","Editor","Form","Input","Label","Picker","PickerView","RadioGroup","Radio","Slider","Switch","Textarea","Navigator","Image","Video","Map","Canvas","WebView","PickerViewColumn","ResizeSensor","SwiperItem"].forEach(r=>{const n=t[r];e.component(r,n)})}function V0(e){const t=R0(e),{Vue:r,App:n,UniH5:i,routes:s=[],pagesJson:o={},manifestJson:a={},window:l,css:u=""}=t;if(!i)return r.createApp(n);const{plugin:c,setupApp:f}=i;C0(t,l),I0(t,l),P0(i,l),M0(r,i,s,o,l),U0(a.appid||Date.now(),u,l);const h=r.createApp(f(n));return h.use(L0,i),h.use(c),h}function H0(e,t){const r={};return Object.entries(e).forEach(([n,i])=>{f0.includes(n)&&i&&(r[n]=t(i))}),r}function Zi(e,t){return()=>k(null,null,function*(){const r=yield e.getDsl(t);if(r){const{renderer:n}=e.createDslRenderer(r);return n}return null})}function q0(n){return k(this,arguments,function*(e,t=!1,r=Gi){var a,l,u;const i=((a=e.project)==null?void 0:a.pages)||[],s=[];for(const c of i){const f=((l=e.project)==null?void 0:l.homepage)===c.id;s.push({id:c.id,path:`${r}/${c.id}`,loader:Zi(e,c.id),style:V({navigationBarTitleText:c.title},c.style),needLogin:c.needLogin,home:f})}const o=s.find(c=>!!c.home)||s[0];if(o){const c=r===Gi?"/":r;s.unshift(et(V({},o),{path:c}))}if(t){const c=((u=e.project)==null?void 0:u.blocks)||[];for(const f of c)s.push({id:f.id,path:`${r}/${f.id}`,loader:Zi(e,f.id),style:{navigationStyle:"custom"}})}return s})}function z0(){var e;return(e=window.uni)!=null&&e.showLoading&&window.uni.showLoading({title:"加载中...",mask:!0}),{close:()=>{var t;(t=window.uni)!=null&&t.hideLoading&&window.uni.hideLoading()}}}function ua(e,t="",r="warning"){return k(this,null,function*(){var n;return(n=window.uni)!=null&&n.showModal?window.uni.showModal({title:t,content:e,showCancel:!1}):Promise.reject(new Error("window.uni.showModal is undefined"))})}function K0(e=tt.Runtime){return e===tt.Runtime?Object.assign({}):Object.assign({})}const W0=dy({loading:z0,notify:ua}),ca=new l0(u0(ua)),J0=K0(),{provider:Y0,onReady:G0}=n0({nodeEnv:"production",mode:tt.Runtime,modules:J0,materialPath:"../",adapter:W0,service:ca,dependencies:{Vue:()=>Rn(()=>import("./@dcloudio-uni-h5-vue-Dkyr-yjK.js").then(e=>e.z),__vite__mapDeps([0,1,2]),import.meta.url),VueRouter:()=>Rn(()=>import("./vue-router-BPElbjFz.js"),__vite__mapDeps([3,0,1,2]),import.meta.url)}}),Z0=e=>k(null,null,function*(){const t=(yield ca.getExtension().catch(()=>null))||{},r=top||window,n=yield s0(t.enhance,r.location.pathname),{Vue:i,UniH5:s}=window,o=e.project;if(!o)return;const a=o.uniConfig||{},l=H0(a,d=>ht(d,window,!1,!0)),{manifestJson:u,pagesJson:c,css:f}=a,h=yield q0(e,!0),p=V0({Vue:i,App:l,UniH5:s,routes:h,css:f,manifestJson:u,pagesJson:c});p.use(e),n&&p.use(n,e),p.mount(document.body)});G0(()=>Z0(Y0));
|
package/dist/uni/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<title></title>
|
|
14
14
|
<!--preload-links-->
|
|
15
15
|
<!--app-context-->
|
|
16
|
-
<script type="module" crossorigin src="./assets/index-
|
|
16
|
+
<script type="module" crossorigin src="./assets/index-BJvCL257.js"></script>
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vue-BK7aLblh.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/@dcloudio-uni-shared-Cc-Ey1iB.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="./assets/@dcloudio-uni-h5-vue-Dkyr-yjK.js">
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/pro",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.16",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"低代码引擎",
|
|
7
7
|
"LowCode Engine",
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@vtj/
|
|
25
|
-
"@vtj/
|
|
26
|
-
"@vtj/
|
|
27
|
-
"@vtj/
|
|
28
|
-
"@vtj/
|
|
29
|
-
"@vtj/
|
|
24
|
+
"@vtj/core": "~0.13.16",
|
|
25
|
+
"@vtj/local": "~0.13.16",
|
|
26
|
+
"@vtj/designer": "~0.13.16",
|
|
27
|
+
"@vtj/materials": "~0.13.16",
|
|
28
|
+
"@vtj/renderer": "~0.13.16",
|
|
29
|
+
"@vtj/uni": "~0.13.16"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"vue": "~3.5.5",
|
|
33
33
|
"vue-router": "~4.5.0",
|
|
34
|
-
"@vtj/icons": "~0.13.15",
|
|
35
34
|
"@vtj/cli": "~0.12.10",
|
|
36
|
-
"@vtj/charts": "~0.13.
|
|
37
|
-
"@vtj/
|
|
38
|
-
"@vtj/utils": "~0.13.
|
|
35
|
+
"@vtj/charts": "~0.13.16",
|
|
36
|
+
"@vtj/icons": "~0.13.16",
|
|
37
|
+
"@vtj/utils": "~0.13.16",
|
|
38
|
+
"@vtj/ui": "~0.13.16"
|
|
39
39
|
},
|
|
40
40
|
"exports": {
|
|
41
41
|
"./vite": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var w=Object.defineProperty;var f=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var h=(o,t,e)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,u=(o,t)=>{for(var e in t||(t={}))x.call(t,e)&&h(o,e,t[e]);if(f)for(var e of f(t))A.call(t,e)&&h(o,e,t[e]);return o};var p=(o,t,e)=>new Promise((c,s)=>{var n=r=>{try{i(e.next(r))}catch(a){s(a)}},m=r=>{try{i(e.throw(r))}catch(a){s(a)}},i=r=>r.done?c(r.value):Promise.resolve(r.value).then(n,m);i((e=e.apply(o,t)).next())});import"./element-plus-ByPIA5X9.js";import"./vxe-BRrz13Uv.js";import{b as B,aB as v,a5 as y,aC as E,aD as I,M as U}from"./Editor-Cz8yc4Be-CJ6QIyZd.js";import{useRoute as $}from"./vue-router-BUqJHGtN.js";import{d as C,az as b,c as g,o as k,K as q,O as M,u as _}from"./vue-CWi9lEhc.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./lodash-es-BaeSyToa.js";import"./@vueuse-DQGZ4KR4.js";import"./@element-plus-icons-vue-CM8mFRtE.js";import"./shared-CiMZBXIr.js";import"./dayjs-C1e0w4cr.js";import"./monaco-editor-xcHgnT1C.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-DhpLkc3z.js";import"./marked-BQZxLJfc.js";const S={class:"loading"},z=C({__name:"Auth",props:{remote:{},access:{},baseUrl:{default:"/"}},setup(o){return p(this,null,function*(){let t,e;const c=o,s=B(u(u({alert:y},v),c.access)),n=$(),m=a=>p(null,null,function*(){const d=`${c.remote||E}/api/open/user/${a}`,l=yield I(d).catch(()=>null);return!l||!l.success?(yield y("登录失败"),null):l.data}),i=n.query.token,r=i?([t,e]=b(()=>m(i)),t=yield t,e(),t):null;if(r)try{s.login(r);const a=n.query.redirect;location.href=decodeURIComponent(a||c.baseUrl)}catch(a){location.reload()}return(a,d)=>(k(),g("div",S,"正在登录中..."))})}}),D=R(z,[["__scopeId","data-v-2674e98b"]]),Z=C({__name:"auth",setup(o){return p(this,null,function*(){let t,e;const c=new U,s=([t,e]=b(()=>c.getExtension().catch(()=>null)),t=yield t,e(),t),n=s==null?void 0:s.remote,m=s==null?void 0:s.__ACCESS__;return(i,r)=>_(n)?(k(),q(_(D),{key:0,remote:_(n),access:_(m)},null,8,["remote","access"])):M("",!0)})}});export{Z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var g=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var p=(t,a,s)=>a in t?h(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,_=(t,a)=>{for(var s in a||(a={}))T.call(a,s)&&p(t,s,a[s]);if(g)for(var s of g(a))f.call(a,s)&&p(t,s,a[s]);return t};var c=(t,a,s)=>p(t,typeof a!="symbol"?a+"":a,s);var S=(t,a,s)=>new Promise((o,n)=>{var e=r=>{try{i(s.next(r))}catch(l){n(l)}},E=r=>{try{i(s.throw(r))}catch(l){n(l)}},i=r=>r.done?o(r.value):Promise.resolve(r.value).then(e,E);i((s=s.apply(t,a)).next())});import{aA as d}from"./vue-CWi9lEhc.js";import{d as A,g as I,m as O,a as m,r as V,e as b,l as P,p as R,D as y,s as M,G as N,f as B,t as D,K as L,h as K,j,k,u as v,Q as w,n as x,o as G,q as H,v as W,w as Y,x as U,z as F,B as C,W as $,F as z,H as J,S as X,J as Z,L as q,N as Q,O as aa,P as sa,T as ea,U as ta,V as ra,X as na,Y as ia,Z as oa,_ as la,a0 as ca,a1 as _a,a2 as Ea,a3 as pa,a4 as ga,a5 as Sa,a6 as ua,a7 as ha,a8 as Ta,a9 as fa,aa as da,ab as Aa,ac as Ia,ad as Oa,ae as ma,af as Va,ag as ba,ah as Pa,ai as Ra,aj as ya,ak as Ma,al as Na,am as Ba,an as Da,ao as La,ap as Ka,c as ja,aq as ka,ar as va,as as wa,at as xa,au as Ga,av as Ha,aw as Wa,ax as Ya,ay as Ua,az as Fa,aA as Ca}from"./Editor-Cz8yc4Be-CJ6QIyZd.js";import{E as $a,a as za,b as Ja,c as Xa}from"./element-plus-ByPIA5X9.js";const Za=Object.freeze(Object.defineProperty({__proto__:null,API_METHOD_TYPES:A,ActionMenu:I,Assets:O,Binder:m,Box:V,Designer:b,DevTools:P,EVENT_MODIFIERS:R,Editor:y,Engine:M,EventBinder:N,GET_TOKENS_LINK:B,Icon:D,Item:L,KEYBOARD_EVENT_LIST:K,MAX_TOKENS:j,MOBILE_SIZE:k,MOUSE_EVENT_LIST:v,NAME_REGEX:w,NPM_REGISTRY_URL:x,OpenApi:G,PAD_SIZE:H,Panel:W,REPORT_API:Y,RegionType:U,RegionWrapper:F,Renderer:C,SAVE_BLOCK_FILE_FINISH:$,SESSION_ID_KEY:z,STATE_KEY:J,SetterView:X,SetterWrapper:Z,Simulator:q,Skeleton:Q,SkeletonWrapper:aa,SlotsPicker:sa,State:ea,Tabs:ta,VERSION_REGEX:ra,VTJ_DESIGNER_VERSION:na,VUE_DEVTOOLS_FRAME_STATE_KEY:ia,VUE_DEVTOOLS_OVERLAY_PATH:oa,VUE_DEVTOOLS_PATH:la,VariableBinder:ca,Viewer:_a,Viewport:Ea,WidgetGroup:pa,WidgetWrapper:ga,alert:Sa,builtInDeps:ua,builtInMaterials:ha,builtInSetters:Ta,builtInWidgets:fa,confirm:da,createSlotsPicker:Aa,defaultSetter:Ia,depsManager:Oa,engineKey:ma,expressionValidate:Va,getClassProperties:ba,message:Pa,normalizedStyle:Ra,notify:ya,proxyContext:Ma,readJsonFile:Na,regions:Ba,setterManager:Da,setters:La,useEngine:Ka,widgetManager:ja,widgets:ka},Symbol.toStringTag,{value:"Module"}));class es{constructor(a){c(this,"urls",[]);c(this,"library","");c(this,"params",[]);c(this,"__BASE_PATH__","/");this.config=a;const s=_(_(_({},Ha),Za),Ga),o={Vue:d,__VTJ_PRO__:s,VtjUtils:xa,VtjIcons:wa,VtjUI:va,ElementPlus:$a};for(const[l,u]of Object.entries(o))window[l]=u;const{extension:n,__BASE_PATH__:e="/"}=a||{},{urls:E=[],library:i,params:r=[]}=n||{};i&&(this.urls=E,this.library=i,this.params=r,this.__BASE_PATH__=e)}load(){return S(this,null,function*(){let a={};if(this.library){const s=this.__BASE_PATH__,o=this.urls.filter(e=>Wa(e)).map(e=>`${s}${e}`),n=this.urls.filter(e=>Ya(e)).map(e=>`${s}${e}`);if(Ua(o),n.length){const e=yield Fa(n,this.library).catch(()=>null);e&&typeof e=="function"?a=e.call(e,this.config,...this.params):a=e||{}}}return Object.assign({},this.getEngineOptions(),a)})}getEngineOptions(){const a=["materialPath","pageBasePath","pageRouteName","remote","checkVersion","noMask"];return Ca(this.config,a)}}function ts(){return Xa.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"})}function rs(t,a="",s="warning"){Ja({title:a,message:t,type:s})}function ns(t,a){return za.alert(t,a)}export{es as E,ns as a,ts as l,rs as n};
|
|
File without changes
|