|
|
|
@ -107,6 +107,16 @@
|
|
|
|
|
|
|
|
|
|
_cleanHtml: function (value) { |
|
|
|
|
var editorService = BI.Services.getService("bi.service.design.chart.common.editor"); |
|
|
|
|
var dimensionIds = this.options.dimensionIds; |
|
|
|
|
var dataIdMap = {}; |
|
|
|
|
|
|
|
|
|
for (var i = 0, len = dimensionIds.length; i < len; i++) { |
|
|
|
|
var dimensionId = dimensionIds[i]; |
|
|
|
|
var key = BI.keys(dimensionId)[0]; |
|
|
|
|
|
|
|
|
|
dataIdMap[key] = dimensionId[key]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var result = BI.replaceAll(value, "<p></p>", ""); |
|
|
|
|
// 去掉image的src属性,因为数据太大了
|
|
|
|
|
result = value.replaceAll("<img.*?>", function (imageStr) { |
|
|
|
@ -117,6 +127,10 @@
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
str += " " + key + "=\"" + value + "\""; |
|
|
|
|
|
|
|
|
|
if (key === "alt" && dataIdMap[value]) { |
|
|
|
|
str += " " + "data-id" + "=\"" + dataIdMap[value] + "\""; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return str + " />"; |
|
|
|
|