Error in v-on handler: “TypeError: this.$confirm is not a function“
In the Vue project, an error is reported after changing the global import of element UI to on-demand import
Solution:
1. Introduce MessageBox plug-in
import {MessageBox} from ‘element-ui’
2 mount confirm
on the prototype object of Vue
Vue.prototype.$confirm = MessageBox.confirm
Similar Posts:
- How to Solve Request failed with status code 404
- When vue3 introduces element plus, index.css cannot be found. Solve the problem
- Vue3 vue.draggable slot jsx Error: Error: draggable element must have an item slot
- [Solved] Selenium Error: ElementClickInterceptedException
- JQuery Error: TypeError: jQuery.curCSS is not a function [How to Solve]
- The applet reports an error thirdscripterror DateValue is not defined;
- NPM update element UI error reporting
- Mybatis where 1 = 1 and Tags
- seleniumTypeError: ‘FirefoxWebElement’ object is not iterable
- These dependencies were not found: * throttle-debounce/debounce in ./node_modules/element-ui/lib/tooltip.js * throttle-debounce/throttle in ./node_modules/element-ui/lib/element-ui.common.js