Introducing element-ui into cdn in vue how to introduce element-ui into other js

vue-cli

introduce element using cdn in index.html

<link rel="stylesheet" href="https://unpkg.com/element-ui@2.3.7/lib/theme-chalk/index.css">
<script src="https://cdn.bootcss.com/vue/2.5.2/vue.min.js"></script>
<script src="https://cdn.bootcss.com/vue-router/3.0.1/vue-router.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
<script src="https://cdn.bootcss.com/vue-i18n/7.6.0/vue-i18n.min.js"></script>
<script src="https://unpkg.com/element-ui@2.3.7/lib/index.js"></script>
The code in

webpack.base.conf.js is as follows

externals: {
    "vue": "Vue",
    "vue-router": "VueRouter",
    "axios": "axios",
    "element-ui": "element-ui",
    "i18n": "i18n",
},

now you want to use the element component in your own js. How to reference it

import {Message} from "element-ui"
Message(123);

if you use Message in this way, you will report external "element-ui"? c60b:1 Uncaught ReferenceError: element is not defined error

Thank you

Aug.25,2021

The global variable set by element-ui in the

cdn version is ELEMENT

.
externals: {
    'vue': 'Vue',
    'vue-router': 'VueRouter',
    'vuex': 'Vuex',
    'element-ui': 'ELEMENT',
   },
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaaaef-1fed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaaaef-1fed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?