From d6823c8996d72d2416bd9b7f1fa1f5412fdd72de Mon Sep 17 00:00:00 2001 From: roger_home_pc Date: Thu, 14 Sep 2023 21:45:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=80=89=E9=A1=B9=E8=AF=95?= =?UTF-8?q?=E7=9A=84=E7=BB=84=E4=BB=B6API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/component-1.html | 2 ++ demo/component-2/src/App.vue | 44 +++++++++++++++++++++++++++++++ demo/component-2/src/main.js | 4 +++ src/App-org.vue | 26 +++++++++++++++++++ src/App.vue | 50 ++++++++++++++++++++++++------------ src/main-org.js | 8 ++++++ src/main.js | 10 +++----- 7 files changed, 121 insertions(+), 23 deletions(-) create mode 100644 demo/component-2/src/App.vue create mode 100644 demo/component-2/src/main.js create mode 100644 src/App-org.vue create mode 100644 src/main-org.js diff --git a/demo/component-1.html b/demo/component-1.html index 23be643..75aa301 100644 --- a/demo/component-1.html +++ b/demo/component-1.html @@ -1,3 +1,5 @@ + + diff --git a/demo/component-2/src/App.vue b/demo/component-2/src/App.vue new file mode 100644 index 0000000..43b010f --- /dev/null +++ b/demo/component-2/src/App.vue @@ -0,0 +1,44 @@ + + + + + + diff --git a/demo/component-2/src/main.js b/demo/component-2/src/main.js new file mode 100644 index 0000000..2703293 --- /dev/null +++ b/demo/component-2/src/main.js @@ -0,0 +1,4 @@ +import {createApp} from "vue"; +import App from "./App.vue" + +createApp(App).mount('#app') diff --git a/src/App-org.vue b/src/App-org.vue new file mode 100644 index 0000000..591a031 --- /dev/null +++ b/src/App-org.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/src/App.vue b/src/App.vue index 591a031..390e7e2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,26 +1,44 @@ - diff --git a/src/main-org.js b/src/main-org.js new file mode 100644 index 0000000..b775cfd --- /dev/null +++ b/src/main-org.js @@ -0,0 +1,8 @@ +import {createApp} from 'vue' +import ElementPlus from 'element-plus' // 完整引入Element-Plus +import 'element-plus/dist/index.css' // 引入样式文件 +import App from './App-org.vue' + +const app = createApp(App) +app.use(ElementPlus, {size: 'small', zIndex: 3000}) +app.mount('#app') diff --git a/src/main.js b/src/main.js index e00fa98..2703293 100644 --- a/src/main.js +++ b/src/main.js @@ -1,8 +1,4 @@ -import {createApp} from 'vue' -import ElementPlus from 'element-plus' // 完整引入Element-Plus -import 'element-plus/dist/index.css' // 引入样式文件 -import App from './App.vue' +import {createApp} from "vue"; +import App from "./App.vue" -const app = createApp(App) -app.use(ElementPlus, {size: 'small', zIndex: 3000}) -app.mount('#app') +createApp(App).mount('#app')