abichinger / vue-js-cron

Renderless Vue.js cron editor
MIT License
73 stars 23 forks source link

element-plus版本无法正常使用的问题 #21

Closed Shimmers688 closed 1 year ago

Shimmers688 commented 1 year ago

当我在Vue3项目中按需引入Element Plus时,然后按照起步文档安装并引入vue-js-cron/element-plus,运行其中的example后,页面上仅展示为一行文本,不能点击,也没有el-button的样式。请问如何解决这个问题?

abichinger commented 1 year ago

Hello @Shimmers688

Sorry, but I'm not quite sure what you have done. Can you provide a minimal reproducible example?

Google Translate:

你好@Shimmers688

对不起,但我不太确定你做了什么。 你能提供一个最小的可重现的例子吗?

Shimmers688 commented 1 year ago

截图如下: image

Shimmers688 commented 1 year ago

demo如下: demo@vue-js-cron_element-plus.zip 请注意 readme.md 文件中的内容

Shimmers688 commented 1 year ago

在 main.ts 文件中全局引入 Element-Plus 后可以正常使用

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import cronElementPlus from '@vue-js-cron/element-plus'
import '@vue-js-cron/element-plus/dist/element-plus.css'

createApp(App).use(router).use(ElementPlus).use(cronElementPlus).mount('#app')
abichinger commented 1 year ago

在 main.ts 文件中全局引入 Element-Plus 后可以正常使用

Yes, you have to register ElementPlus before you can use vue-js-con/element-plus. I should probably mention this in the documentation.

Can I close this issue?

Google Translate:

是的,你必须先注册 ElementPlus 才能使用 vue-js-con/element-plus。 我应该在文档中提到这一点。 我可以关闭这个问题吗?

Shimmers688 commented 1 year ago

可以的,谢谢您对该问题的关注。