1
0
mirror of synced 2026-03-25 04:28:34 +08:00

fix(magic-admin): 修复发布页面资源路径错误,导致页面无法打开问题

This commit is contained in:
roymondchen
2022-07-11 19:51:47 +08:00
committed by jia000
parent f2893880b1
commit 7dc0b4e261
78 changed files with 468 additions and 7056 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
var t=[{text:"\u9875\u9762\u6807\u8BC6",name:"name",disabled:!0,extra:"\u5728\u591A\u9875\u9762\u7684\u60C5\u51B5\u4E0B\u7528\u6765\u6307\u5B9A\u8981\u6253\u5F00\u7684\u9875\u9762"},{text:"\u9875\u9762\u6807\u9898",name:"title"},{name:"layout",text:"\u5BB9\u5668\u5E03\u5C40",type:"select",defaultValue:"absolute",options:[{value:"absolute",text:"\u7EDD\u5BF9\u5B9A\u4F4D"},{value:"relative",text:"\u6D41\u5F0F\u5E03\u5C40"}]}],e=[{name:"layout",text:"\u5BB9\u5668\u5E03\u5C40",type:"select",defaultValue:"absolute",options:[{value:"absolute",text:"\u7EDD\u5BF9\u5B9A\u4F4D"},{value:"relative",text:"\u6D41\u5F0F\u5E03\u5C40"}]}],a=[{text:"\u6587\u672C",name:"text"}],l=[{name:"text",text:"\u6587\u672C"},{name:"multiple",text:"\u591A\u884C\u6587\u672C",type:"switch"}],n=[{text:"\u56FE\u7247",name:"src"},{text:"\u94FE\u63A5",name:"url"}],o=[{text:"\u94FE\u63A5",name:"url"}],r=[];(function(){const u={page:t,container:e,button:a,text:l,img:n,qrcode:o,overlay:r};window.magicPresetConfigs=u})();
//# sourceMappingURL=config.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
var u={methods:[{label:"\u5237\u65B0\u9875\u9762",value:"refresh"}]},l={methods:[{label:"\u6253\u5F00\u8499\u5C42",value:"openOverlay"},{label:"\u5173\u95ED\u8499\u5C42",value:"closeOverlay"}],events:[{label:"\u6253\u5F00\u8499\u5C42",value:"overlay:open"},{label:"\u5173\u95ED\u8499\u5C42",value:"overlay:close"}]};(function(){const e={page:u,overlay:l};window.magicPresetEvents=e})();
//# sourceMappingURL=event.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"event.js","sources":["../../../../packages/ui/src/page/src/event.ts","../../../../packages/ui/src/overlay/src/event.ts","../../src/event-entry.ts"],"sourcesContent":["export default {\n methods: [\n {\n label: '刷新页面',\n value: 'refresh',\n },\n ],\n};\n","export default {\n methods: [\n {\n label: '打开蒙层',\n value: 'openOverlay',\n },\n {\n label: '关闭蒙层',\n value: 'closeOverlay',\n },\n ],\n events: [\n {\n label: '打开蒙层',\n value: 'overlay:open',\n },\n {\n label: '关闭蒙层',\n value: 'overlay:close',\n },\n ],\n};\n","import page from '/data/magic/tmagic-editor/packages/ui/src/page/src/event';\nimport overlay from '/data/magic/tmagic-editor/packages/ui/src/overlay/src/event';\n\n(function() {\n const events: Record<string, any> = {\n 'page': page,\n 'overlay': overlay,\n };\n\n window.magicPresetEvents = events;\n})();"],"names":[],"mappings":"AAAA,GAAe,GAAA,CACb,QAAS,CACP,CACE,MAAO,2BACP,MAAO,SACT,CACF,CACF,ECPe,EAAA,CACb,QAAS,CACP,CACE,MAAO,2BACP,MAAO,aACT,EACA,CACE,MAAO,2BACP,MAAO,cACT,CACF,EACA,OAAQ,CACN,CACE,MAAO,2BACP,MAAO,cACT,EACA,CACE,MAAO,2BACP,MAAO,eACT,CACF,CACF,EClBC,AAAW,WAAA,CACV,KAAM,GAA8B,CAClC,KAAQ,EACR,QAAW,CAAA,EAGb,OAAO,kBAAoB,CAC7B,GAAG"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
import{A as g,a as m,_ as h}from"./plugin-vue_export-helper.8f6f5b47.js";const v="modulepreload",f={},w="/tmagic-editor/playground/runtime/vue3/",E=function(s,c){return!c||c.length===0?s():Promise.all(c.map(r=>{if(r=`${w}${r}`,r in f)return;f[r]=!0;const t=r.endsWith(".css"),i=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${i}`))return;const e=document.createElement("link");if(e.rel=t?"stylesheet":v,t||(e.as="script",e.crossOrigin=""),e.href=r,document.head.appendChild(e),t)return new Promise((n,u)=>{e.addEventListener("load",n),e.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>s())};const _=Vue.defineComponent({setup(){const o=Vue.ref(),s=Vue.ref(),c=Vue.ref(),r=Vue.computed(()=>{var i,e,n,u;return((e=(i=o.value)==null?void 0:i.items)==null?void 0:e.find(a=>a.id===s.value))||((u=(n=o.value)==null?void 0:n.items)==null?void 0:u[0])}),t=new g({config:o.value,platform:"editor"});return Vue.provide("app",t),Vue.watch(r,async()=>{await Vue.nextTick();const i=document.querySelector(".magic-ui-page");i&&window.magic.onPageElUpdate(i)}),Vue.onMounted(()=>{var i;(i=window.magic)==null||i.onRuntimeReady({getApp(){return t},updateRootConfig(e){console.log("update config",e),o.value=e,t==null||t.setConfig(e,s.value)},updatePageId(e){console.log("update page id",e),s.value=e,t==null||t.setPage(e)},getSnapElements(){return Array.from(document.querySelectorAll("[class*=magic-ui][id]"))},select(e){console.log("select config",e),c.value=e;const n=document.getElementById(`${e}`);return n||Vue.nextTick().then(()=>document.getElementById(`${e}`))},add({config:e}){var l;if(console.log("add config",e),!o.value)throw new Error("error");if(!c.value)throw new Error("error");const n=m(c.value,[o.value]),u=n.pop(),a=u!=null&&u.items?u:n.pop();if(!a)throw new Error("\u672A\u627E\u5230\u7236\u8282\u70B9");(l=a.items)==null||l.push(e)},update({config:e}){var p;if(console.log("update config",e),!o.value)throw new Error("error");const n=m(e.id,[o.value]),u=n.pop(),a=n.pop();if(!u)throw new Error("\u672A\u627E\u5230\u76EE\u6807\u8282\u70B9");if(!a)throw new Error("\u672A\u627E\u5230\u7236\u8282\u70B9");const l=(p=a.items)==null?void 0:p.findIndex(d=>d.id===u.id);a.items.splice(l,1,Vue.reactive(e))},remove({id:e}){var p;if(!o.value)throw new Error("error");const n=m(e,[o.value]),u=n.pop();if(!u)throw new Error("\u672A\u627E\u5230\u76EE\u6807\u5143\u7D20");const a=n.pop();if(!a)throw new Error("\u672A\u627E\u5230\u7236\u5143\u7D20");const l=(p=a.items)==null?void 0:p.findIndex(d=>d.id===u.id);a.items.splice(l,1)}})}),{pageConfig:r}}});function V(o,s,c,r,t,i){const e=Vue.resolveComponent("magic-ui-page");return o.pageConfig?(Vue.openBlock(),Vue.createBlock(e,{key:0,config:o.pageConfig},null,8,["config"])):Vue.createCommentVNode("",!0)}var y=h(_,[["render",V]]);E(()=>import("./comp-entry.4b446d21.js"),["assets/comp-entry.4b446d21.js","assets/plugin-vue_export-helper.8f6f5b47.js"]).then(o=>{const{components:s,plugins:c}=o.default,r=Vue.createApp(y);Object.values(s).forEach(t=>{r.component(t.name,t)}),Object.values(c).forEach(t=>{r.use(t)}),r.mount("#app")});
//# sourceMappingURL=playground.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
#app::-webkit-scrollbar{width:0!important;display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;*display: inline;*zoom: 1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left: -7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align: middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow: visible}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height: 13px;*width: 13px}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}html,body,#app{width:100%;height:100%}#app{position:relative;overflow:auto}#app::-webkit-scrollbar{width:0}.magic-ui-container{background-color:#88888880}.action-area{background-color:#3399ff80!important}

View File

@@ -0,0 +1,2 @@
var e={items:[],style:{width:"100%",height:"100%"}},i={items:[],style:{width:"375",height:"100"}},u={text:"\u8BF7\u8F93\u5165\u6587\u672C\u5185\u5BB9",multiple:!0,style:{width:"270",height:"37.5",border:0,backgroundColor:"#fb6f00"}},o={type:"text",text:"\u8BF7\u8F93\u5165\u6587\u672C\u5185\u5BB9",multiple:!0,style:{width:"100",height:"auto"}},l={src:"https://puui.qpic.cn/vupload/0/1573555382625_bhp0wud8l6w.png/0",url:"",style:{position:"absolute",left:"57",width:"176",height:"176"}},r={url:"https://m.film.qq.com",style:{position:"absolute",left:"57",width:"176",height:"176"}},h={style:{position:"fixed",width:"100%",height:"100%",top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.8)"},items:[]};(function(){const t={page:e,container:i,button:u,text:o,img:l,qrcode:r,overlay:h};window.magicPresetValues=t})();
//# sourceMappingURL=value.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue3 Page</title>
<script src="https://unpkg.com/vue@next/dist/vue.runtime.global.js"></script>
<script type="module" crossorigin src="/runtime/assets/page.js"></script>
<link rel="modulepreload" href="/runtime/assets/plugin-vue_export-helper.8f6f5b47.js">
<link rel="modulepreload" href="/runtime/assets/comp-entry.4b446d21.js">
<link rel="stylesheet" href="/runtime/assets/style.6555bdb0.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en" style="font-size: 100px">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue3 Playground</title>
<style>
html{-ms-overflow-style: none; overflow: -moz-scrollbars-none;}
html,body {height: 100%; margin: 0; padding: 0}
body {
height: fit-content;
min-height: 100%;
}
html::-webkit-scrollbar, .body::-webkit-scrollbar { width: 0 !important }
.magic-ui-page {
overflow: hidden;
}
</style>
<script type="module" crossorigin src="/runtime/assets/playground.js"></script>
<link rel="modulepreload" href="/runtime/assets/plugin-vue_export-helper.8f6f5b47.js">
<link rel="stylesheet" href="/runtime/assets/style.6555bdb0.css">
</head>
<body style="font-size: 14px">
<div id="app"></div>
<script src="https://cdn.bootcdn.net/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
<script src="https://unpkg.com/vue@next/dist/vue.global.js"></script>
</body>
</html>