1、到Element - The world's most popular Vue UI framework中找到CDN
2、找到CDN里script中的代码,复制路径href双引号的部分
https://unpkg.com/element-ui@2.15.9/lib/theme-chalk/index.css
https://unpkg.com/element-ui@2.15.9/lib/index.js
3、打开之后,界面如下,按住Ctrl+S下载到自己保存的文件夹中
4、在项目中引入,注意还得自己引入一个vue.js文件
需要注意的是:以下两个文件可以不在文件中引入,但是一定需要放在此文件夹下,因为请求路径里有一个fonts文件夹
5、在容器中使用
new Vue({
el: '#app',
data() {
return {
input3: '',
}
},
methods: {
btn_click() {
if(this.input3 == "") {
alert("请输入内容!")
}else {
console.log(this.input3);
}
}
}
})
6、文件下载
https://unpkg.com/browse/element-ui@2.5.4/lib/theme-chalk/fonts/
文章链接
发表评论