fix:修复\\i显示图标的问题

This commit is contained in:
lizhuoyuan 2025-02-07 10:41:59 +08:00
parent 0ad2913d89
commit 6e2f9f4abb

View File

@ -1369,10 +1369,9 @@ ui.prototype._drawTextContent_drawIcon = function (tempCtx, content, config) {
// 绘制一个 \i 效果
var index = config.index, index2;
if (content.charAt(config.index + 1) == '[' && ((index2 = content.indexOf(']', index + 1)) >= 0)) {
console.log(1);
var str = core.replaceText(content.substring(index + 2, index2));
// --- 获得图标
var cls = core.getClsFromId(str);
var cls = core.getClsFromId(str) || '';
var iconInfo = core.ui._getDrawableIconInfo(str), image = iconInfo[0], icon = iconInfo[1];
if (image == null) return this._drawTextContent_next(tempCtx, content, config);
// 检查自动换行