layui 在數據表格中顯示rate星級

{
	title: '評價'
	, field: 'report_score'
	, align: 'right'
	, width: 200
	, templet: function (d) {
		return '<div id="score' + d.report_id + '" title="' + d.report_score + '"></div>'
	}
}
done: function (res) {
	var data = res.data
	console.log(data)
	for (var item in data) {
		rate.render({
			elem: '#score' + data[item].report_id
			, length: 10
			, value: data[item].report_score / 10
			, readonly: true
		})
	}
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章