|
|
@@ -484,7 +484,7 @@ export default {
|
|
|
{ icon: 'note', title: '笔记', handle: 'getNote', param: { type: '12' } },
|
|
|
{ icon: 'translate', title: '多语言', handle: 'openTranslate', param: { type: '21' } },
|
|
|
{ icon: 'setting', title: '设置', handle: 'openSetting', param: { type: 6 } },
|
|
|
- { icon: 'feedback', title: '意见反馈', handle: 'getFeedback', param: { type: 22 } },
|
|
|
+ { icon: 'feedback', title: '用户反馈', handle: 'getFeedback', param: { type: 22 } },
|
|
|
];
|
|
|
|
|
|
const book_id = getLocalStore('book_id') || '';
|
|
|
@@ -536,10 +536,10 @@ export default {
|
|
|
5: '文本资源',
|
|
|
6: '设置',
|
|
|
11: '收藏列表',
|
|
|
- 12: '笔记列表1',
|
|
|
+ 12: '笔记列表',
|
|
|
13: '搜索结果',
|
|
|
21: '多语言',
|
|
|
- 22: '意见反馈',
|
|
|
+ 22: '用户反馈',
|
|
|
},
|
|
|
sidebarIconList,
|
|
|
twoSidebarList: [],
|
|
|
@@ -1222,6 +1222,28 @@ export default {
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
+ * 为HTML内容中的图片添加最大宽度限制
|
|
|
+ * @param {string} html - HTML字符串
|
|
|
+ * @returns {string} - 处理后的HTML字符串
|
|
|
+ */
|
|
|
+ addImageMaxWidth(html) {
|
|
|
+ if (!html) return html;
|
|
|
+
|
|
|
+ const regex = /<img([^>]*)>/gi;
|
|
|
+ return html.replace(regex, (match, attributes) => {
|
|
|
+ if (attributes.includes('style=')) {
|
|
|
+ return match.replace(/style=["']([^"']*)["']/i, (styleMatch, styleValue) => {
|
|
|
+ if (styleValue.includes('max-width')) {
|
|
|
+ return styleMatch;
|
|
|
+ }
|
|
|
+ return `style="${styleValue}; max-width: 200px;"`;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return `<img${attributes} style="max-width: 200px;">`;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
* 获取笔记列表
|
|
|
* @param {Object} params - 参数对象
|
|
|
*/
|
|
|
@@ -1240,7 +1262,7 @@ export default {
|
|
|
startIndex: n.startIndex,
|
|
|
endIndex: n.endIndex,
|
|
|
text: n.text,
|
|
|
- note: n.note,
|
|
|
+ note: this.addImageMaxWidth(n.note),
|
|
|
};
|
|
|
this.allNoteList.push(obj);
|
|
|
}
|
|
|
@@ -1420,7 +1442,7 @@ export default {
|
|
|
startIndex: n.startIndex,
|
|
|
endIndex: n.endIndex,
|
|
|
text: n.text,
|
|
|
- feedBack: n.feedBack,
|
|
|
+ feedBack: this.addImageMaxWidth(n.feedBack),
|
|
|
};
|
|
|
this.allFeedbackList.push(obj);
|
|
|
}
|