나는 Kendo 그리드에서 font awesome을 사용합니다. 나는 문제없이 일할 것으로 기대한다. 가능한 한 좋은 것을 보여준다. 실제로 아이콘을 클릭하면 (각 아이콘에 부모가 있음) 점프한다. 이 문제를 해결하는 방법에 대해 알고 싶습니다.Kendo 그리드의 awesome 글꼴 사용
CSS :
@font-face {
font-family: "FontAwesome";
/*public/app/admin/assets/fonts/fontawesome-webfont.woff */
src: url("../fonts/fontawesome-webfont.woff") format("woff"),
url("../fonts/fontawesome-webfont.woff") format("truetype");
}
.km-icon:after,
.km-icon:before
{
font: 1em/1em "FontAwesome";
}
HTML :
내 코드를 변경 this link을 읽은 후:
<kendogrid
entity_id='restaurantId'
fields="{restaurantId: {editable: false, nullable: true},rgn: {required: true},type: {required: true},url: {editable: false, nullable: true}}"
controller="restaurant"
tools='false'
colmns='[
{
field: "restaurantId",
title: "id",
width: "100px",
locked: true,
lockable: true,
},
{
field: "type",
title:"type ",
width: "120px",
lockable: true,
minScreenWidth: 500,
sortable :false
},
{
field:"restaurantRateAverage" ,
title:"average ",
width: "80px",
lockable: true
},
{
title: "operation",
width: "110px",
lockable: true,
template: "
<a class=\"warning-color knd-custom-action-btn\" href=\"\\#/foods/add/${restaurantId}\" ><i class=\"fa fa-cutlery\"></i></a>
<a class=\"primary2-color knd-custom-action-btn\" href=\"\\#/delivery-zones/add/${restaurantId}/${restaurantCityId}\" ><i class=\"fa fa-map-marker\"></i></a>
<a class=\"danger-color knd-custom-action-btn k-grid-delete show-${restaurantId}\" href=\"\\#\"><span class=\"fa fa-times\"></span></a>
"
}
]'
hard-delete="true"
></kendogrid>
편집 : 여기
내 코드입니다 {
field:"restaurantRateAverage" ,
title:"average ",
width: "80px",
lockable: true,
template: "<div data-role=\"tabstrip\">
<a data-icon=\"fa fa-check\"> </a></div>"
}
실제로 fa fa-check를 인쇄하고 fontawesome을 표시하지 않습니다.
어디에서 사용할 아이콘을 정의합니까? FontAwesome을 사용하기 위해 ".km-icon"이라고 알려주지 만 폰트의 어떤 문자가 표시되어야하는지에 대한 정의는 어디에 있습니까? – cloned
@cloned 나는 그것을 정의하지 않았다. 예를 들어 답변으로 입력하십시오. – AFN