const template=`
.chooseIcon .el-drawer__header{
margin-bottom:0;
}
.chooseIcon .el-drawer__body{
display:flex;
flex-wrap: wrap;
}
.chooseIcon .li{
width:41px;
height:42px;
line-height:42px;
border:1px solid #efefef;
padding:1px;
margin:1px;
text-align: center;
font-size:18px;
}
.chooseIcon .li:hover{
border:1px solid #2c3e50;
cursor:pointer;
}
搜索图标
`;
export default {
name: "CheckIcon",
data: function () {
return {
show:false,
iconlist:[],
searchlist:[],
search:''
}
},
emits:['selected'],
mounted:function (){
let url=location.origin+'/assets/libs/font-awesome/less/variables.less'
Yunqi.ajax.get(url,'',false,false,true).then(ret=>{
var exp = /fa-var-(.*):/ig;
var result;
let iconlist=[];
while ((result = exp.exec(ret)) != null) {
iconlist.push(result[1]);
}
this.iconlist=iconlist;
});
},
template:template,
methods:{
clickIcon:function (i){
this.$emit('selected',i);
this.show=false;
},
open:function (){
this.show=true;
}
}
};