@growing-web-examples/basic-layout
Advanced tools
+0
-6
@@ -69,7 +69,2 @@ var __defProp = Object.defineProperty; | ||
| } | ||
| .wrapper aside { | ||
| width: 200px; | ||
| background: pink; | ||
| height: 100%; | ||
| } | ||
| .wrapper main { | ||
@@ -84,3 +79,2 @@ flex: 1; | ||
| <section class="wrapper"> | ||
| <aside> aside </aside> | ||
| <main slot="main"></main> | ||
@@ -87,0 +81,0 @@ </section> |
+23
-18
@@ -1,28 +0,33 @@ | ||
| import allStyleProvider from "virtual:style-provider?query=~/*"; | ||
| function vue2Adapter(Vue, App, { vueOptions = {}, lifeCycle = {} } = {}) { | ||
| let appWrap; | ||
| let app; | ||
| let allStyle; | ||
| import allStyleProvider from 'virtual:style-provider?query=~/*' | ||
| export function vue2Adapter( | ||
| Vue, | ||
| App, | ||
| { vueOptions = {}, lifeCycle = {} } = {}, | ||
| ) { | ||
| let appWrap | ||
| let app | ||
| let allStyle | ||
| return { | ||
| async bootstrap(props) { | ||
| allStyle = allStyleProvider(props.container); | ||
| allStyle = allStyleProvider(props.container) | ||
| }, | ||
| async mount(props) { | ||
| appWrap = document.createElement("div"); | ||
| props.container.appendChild(appWrap); | ||
| allStyle.mount(); | ||
| appWrap = document.createElement('div') | ||
| props.container.appendChild(appWrap) | ||
| allStyle.mount() | ||
| app = new Vue({ | ||
| ...vueOptions, | ||
| el: appWrap, | ||
| render: (h) => h(App) | ||
| }); | ||
| render: (h) => h(App), | ||
| }) | ||
| }, | ||
| async unmount(props) { | ||
| app.$destroy(); | ||
| allStyle.unmount(); | ||
| props.container.innerHTML = ""; | ||
| appWrap = app = null; | ||
| } | ||
| }; | ||
| app.$destroy() | ||
| allStyle.unmount() | ||
| props.container.innerHTML = '' | ||
| appWrap = app = null | ||
| }, | ||
| } | ||
| } | ||
| export { vue2Adapter }; |
+3
-3
| { | ||
| "name": "@growing-web-examples/basic-layout", | ||
| "version": "0.0.2", | ||
| "version": "0.0.3", | ||
| "publishConfig": { | ||
@@ -18,8 +18,8 @@ "access": "public" | ||
| "devDependencies": { | ||
| "@web-widget/container": "^0.0.25" | ||
| "@web-widget/container": "^0.0.27" | ||
| }, | ||
| "license": "MIT", | ||
| "scripts": { | ||
| "build": "pnpm web-builder build" | ||
| "build": "pnpm web-builder build --no-clean && node scripts/copy.mjs" | ||
| } | ||
| } |
4857
-2.49%118
-2.48%