NEZ-1812 feat:value mapping更新内置icon

This commit is contained in:
zyh
2022-05-12 11:11:02 +08:00
parent 0eb5c1cf67
commit 57c2140464
2 changed files with 16 additions and 11 deletions

View File

@@ -1157,13 +1157,11 @@ li {
margin-right: 5px;
color: $--color-success;
font-size: 14px;
background: $--background-color-empty;
}
.nz-icon-import-failed {
margin-right: 5px;
color: $--color-danger;
font-size: 14px;
background: $--background-color-empty;
}
.result-detail {
opacity: 0.9;

View File

@@ -3,6 +3,7 @@ import { getUUID, resetZIndex } from '@/components/common/js/common'
import { randomcolor, ColorReverse } from '@/components/common/js/radomcolor/randomcolor'
import { isStat } from '@/components/chart/chart/tools'
import lodash from 'lodash'
import iconList from '@/assets/css/font/iconfont.json'
const rz = {
methods: {
rz (e) {
@@ -58,15 +59,7 @@ export default {
value: 'regx'
}
],
mappingIconList: [
{
value: 'nz-icon nz-icon-overview-alert'
}, {
value: 'nz-icon nz-icon-overview-alert1'
}, {
value: 'nz-icon nz-icon-model'
}
],
mappingIconList: this.iconFormat(), // 获取icon列表
letter: [
'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N',
@@ -193,6 +186,20 @@ export default {
mixins: [rz],
methods: {
isStat,
iconFormat () {
const iconArr = iconList.glyphs.map(item => {
const str = iconList.font_family + ' ' + iconList.css_prefix_text + item.font_class
return {
value: str
}
})
return iconArr
// return [
// {
// value: 'nz-icon nz-icon-overview-alert'
// }
// ]
},
expressionChange: function () {
if (this.expressions.length) {
this.chartConfig.elements = []