vue-cli

在index.html中采用 cdn 引入 element

	<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>

webpack.base.conf.js 中代码如下

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

前往低代码交流专区

更多推荐