micro-ice-vue3-ts 0.1.0
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/README.md +24 -0
- package/lib/MicroIceApp/index.d.ts +223 -0
- package/lib/index.common.js +7947 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.esm.js +1 -0
- package/lib/index.umd.js +7966 -0
- package/lib/index.umd.min.js +3 -0
- package/package.json +71 -0
- package/yarn-error.log +6581 -0
package/lib/index.d.ts
ADDED
package/lib/index.esm.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bus as e,startApp as t}from"wujie";export{destroyApp,bus as eventBus,preloadApp,setupApp}from"wujie";import{defineComponent as o,ref as n,onMounted as a,watch as l,onBeforeUnmount as u,h as r}from"vue";const i=o({name:"MicroIceApp",props:{width:{type:String,default:""},height:{type:String,default:""},name:{type:String,default:""},loading:{type:Object,default:void 0},url:{type:String,default:""},sync:{type:Boolean,default:void 0},prefix:{type:Object,default:void 0},alive:{type:Boolean,default:void 0},props:{type:Object,default:void 0},attrs:{type:Object,default:void 0},replace:{type:Function,default:void 0},fetch:{type:Function,default:void 0},fiber:{type:Boolean,default:void 0},degrade:{type:Boolean,default:void 0},plugins:{type:Array,default:null},beforeLoad:{type:Function,default:null},beforeMount:{type:Function,default:null},afterMount:{type:Function,default:null},beforeUnmount:{type:Function,default:null},afterUnmount:{type:Function,default:null},activated:{type:Function,default:null},deactivated:{type:Function,default:null},loadError:{type:Function,default:null}},setup(o,{emit:i}){const d=n(null);let p=Promise.resolve();const f=(e,...t)=>{i(e,...t)},c=async()=>{try{await t({name:o.name,url:o.url,el:d.value,loading:o.loading,alive:o.alive,fetch:o.fetch,props:o.props,attrs:o.attrs,replace:o.replace,sync:o.sync,prefix:o.prefix,fiber:o.fiber,degrade:o.degrade,plugins:o.plugins,beforeLoad:o.beforeLoad,beforeMount:o.beforeMount,afterMount:o.afterMount,beforeUnmount:o.beforeUnmount,afterUnmount:o.afterUnmount,activated:o.activated,deactivated:o.deactivated,loadError:o.loadError})}catch(e){console.log(e)}},s=()=>{p=p.then(c)};return a((()=>{e.$onAll(f),s(),l((()=>o.name+o.url),(()=>s()))})),u((()=>{e.$offAll(f)})),()=>r("div",{style:{width:o.width,height:o.height},ref:d})}});i.install=function(e){e.component("MicroIceApp",i)};const d=[i];var p={install:e=>{d.map((t=>e.component("MicroIceApp",t)))}};export{p as default};
|