在iconfont.cn 抉择好我的项目须要的icon,增加进我的项目,下载好font文件,而后在
全局scss代码里写上:
@font-face { font-family: "zr"; src: url('../icon/download.ttf') format('truetype');}.zr { font-family: zr!important; font-style: normal; font-weight: 400; font-variant: normal; text-transform: none; line-height: 1; vertical-align: baseline; display: inline-block; -webkit-font-smoothing: antialiased;}.icon-download:before { content: "\e635";}.icon-imp:before { content: "\e6fd";}
应用:
<el-button size="mini" icon="zr icon-imp" @click="handleImp(scope.$index, scope.row)" :disabled="scope.row.state === 1" > 导入 </el-button>