From e5f0506a00656eaa96a91525d01b9b918780ee80 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Wed, 3 Aug 2022 14:59:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(stage,runtime):=20=E5=8E=BB=E6=8E=89runtim?= =?UTF-8?q?e=20getSnapElements=20=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/stage/src/types.ts | 1 - runtime/vue2/src/playground/App.vue | 4 ---- runtime/vue3/src/playground/App.vue | 4 ---- 3 files changed, 9 deletions(-) diff --git a/packages/stage/src/types.ts b/packages/stage/src/types.ts index 24c9740e..83f3fb47 100644 --- a/packages/stage/src/types.ts +++ b/packages/stage/src/types.ts @@ -112,7 +112,6 @@ export interface RemoveData { export interface Runtime { getApp?: () => Core; beforeSelect?: (el: HTMLElement) => Promise | boolean; - getSnapElements?: (el?: HTMLElement) => HTMLElement[]; updateRootConfig?: (config: MApp) => void; updatePageId?: (id: Id) => void; select?: (id: Id) => Promise | HTMLElement; diff --git a/runtime/vue2/src/playground/App.vue b/runtime/vue2/src/playground/App.vue index 2764eadd..98d423b8 100644 --- a/runtime/vue2/src/playground/App.vue +++ b/runtime/vue2/src/playground/App.vue @@ -56,10 +56,6 @@ export default defineComponent({ app?.setPage(id); }, - getSnapElements() { - return Array.from(document.querySelectorAll('[class*=magic-ui][id]')); - }, - select(id: Id) { console.log('select config', id); selectedId.value = id; diff --git a/runtime/vue3/src/playground/App.vue b/runtime/vue3/src/playground/App.vue index 2764eadd..98d423b8 100644 --- a/runtime/vue3/src/playground/App.vue +++ b/runtime/vue3/src/playground/App.vue @@ -56,10 +56,6 @@ export default defineComponent({ app?.setPage(id); }, - getSnapElements() { - return Array.from(document.querySelectorAll('[class*=magic-ui][id]')); - }, - select(id: Id) { console.log('select config', id); selectedId.value = id;