If in Vue2 , we can use the components of ElementPlus like this:
#/cypress/component.js
import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI)
But how to use 'element-plus' with Vue3?
I try the following code, but no effect.
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
Cypress.Commands.add('mount', (component, options = {}) => {
// Setup options object
options.global = options.global || {}
options.global.components = options.global.components || {}
options.global.plugins = options.global.plugins || []
options.global.plugins.push({
install(app) {
app.use(ElementPlus)
},
})
return mount(component, options)
})