element-plus / element-plus-icons

Main package for storing Element Plus icon resources.
MIT License
138 stars 100 forks source link

fix the error when options is `{}` or undefined, but the prefix is undefined #43

Closed crossskyLi closed 2 years ago

crossskyLi commented 2 years ago

fix the error when options is {} or undefined, but the prefix is undefined

sxzz commented 2 years ago

Would you please provide a reproduction about this issue you fixed?

crossskyLi commented 2 years ago

import IconVue from '@element-plus/icons-vue' IconVue(App)

sxzz commented 2 years ago

Please upgrade to latest version. I can't reproduce it.

import { createApp } from 'vue'
import icons from '@element-plus/icons-vue/global'
import App from './App.vue'

const app = createApp(App) // or .use(icons)
icons(app)
app.mount('#app')
crossskyLi commented 2 years ago

If you write code like this, won't you report errors?

sxzz commented 2 years ago

So without minimum reproduction, I can't give you any help.

I mean, a real project.

crossskyLi commented 2 years ago

If you write code like this, won't you report errors?

I see you've fixed the situation I was trying to fix, at last few version you can close my request. Thank you.