@haluo/biz 2.0.45 → 2.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/haluo-biz.js +9 -7
- package/dist/haluo-biz.umd.cjs +9 -7
- package/package.json +1 -1
package/dist/haluo-biz.js
CHANGED
|
@@ -4952,6 +4952,7 @@ const _sfc_main$3 = {
|
|
|
4952
4952
|
const topicElement = document.createElement("div");
|
|
4953
4953
|
topicElement.className = "topic-item";
|
|
4954
4954
|
topicElement.setAttribute("data-topic-id", topic.id);
|
|
4955
|
+
topicElement.setAttribute("data-topic-type", topic.type);
|
|
4955
4956
|
topicElement.textContent = `#${topic.title}`;
|
|
4956
4957
|
topicElement.addEventListener("click", () => {
|
|
4957
4958
|
this.insertTopicToEditor(topic);
|
|
@@ -4975,6 +4976,7 @@ const _sfc_main$3 = {
|
|
|
4975
4976
|
const topicElement = document.createElement("div");
|
|
4976
4977
|
topicElement.className = "topic-item";
|
|
4977
4978
|
topicElement.setAttribute("data-topic-id", topic.id);
|
|
4979
|
+
topicElement.setAttribute("data-topic-type", topic.type);
|
|
4978
4980
|
topicElement.textContent = `#${topic.exactlyMatchTitle || topic.title}`;
|
|
4979
4981
|
topicElement.addEventListener("click", () => {
|
|
4980
4982
|
this.insertTopicToEditor(topic);
|
|
@@ -5028,7 +5030,7 @@ const _sfc_main$3 = {
|
|
|
5028
5030
|
topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
|
|
5029
5031
|
} else {
|
|
5030
5032
|
topicListHTML = hotTopics.map(
|
|
5031
|
-
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
5033
|
+
(topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
|
|
5032
5034
|
).join("");
|
|
5033
5035
|
if (loading) {
|
|
5034
5036
|
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
@@ -5041,7 +5043,7 @@ const _sfc_main$3 = {
|
|
|
5041
5043
|
topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
|
|
5042
5044
|
} else {
|
|
5043
5045
|
topicListHTML = recentTopics.map(
|
|
5044
|
-
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
5046
|
+
(topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
|
|
5045
5047
|
).join("");
|
|
5046
5048
|
}
|
|
5047
5049
|
}
|
|
@@ -5076,7 +5078,7 @@ const _sfc_main$3 = {
|
|
|
5076
5078
|
topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
|
|
5077
5079
|
} else {
|
|
5078
5080
|
topicListHTML = searchTopics.map(
|
|
5079
|
-
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
5081
|
+
(topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
|
|
5080
5082
|
).join("");
|
|
5081
5083
|
if (loading) {
|
|
5082
5084
|
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
@@ -6302,10 +6304,10 @@ const _sfc_main = {
|
|
|
6302
6304
|
var descInputWrap;
|
|
6303
6305
|
var descInput = editor.createElement("textarea", {
|
|
6304
6306
|
class: "desc-input",
|
|
6305
|
-
maxlength: "
|
|
6307
|
+
maxlength: "100",
|
|
6306
6308
|
rows: "2",
|
|
6307
6309
|
cols: "50",
|
|
6308
|
-
placeholder: "请输入图片描述(最多
|
|
6310
|
+
placeholder: "请输入图片描述(最多100字)",
|
|
6309
6311
|
contenteditable: "false"
|
|
6310
6312
|
});
|
|
6311
6313
|
descInput.disabled = me2.disabled;
|
|
@@ -6313,8 +6315,8 @@ const _sfc_main = {
|
|
|
6313
6315
|
const parent = me2.findParentByClass(e.target, "halo-img-content");
|
|
6314
6316
|
const img = parent.querySelector(".halo-picture-area");
|
|
6315
6317
|
img.dataset.desc = e.target.value;
|
|
6316
|
-
if (e.target.value.length >
|
|
6317
|
-
return me2.setToast("限制
|
|
6318
|
+
if (e.target.value.length > 99) {
|
|
6319
|
+
return me2.setToast("限制100个字符");
|
|
6318
6320
|
}
|
|
6319
6321
|
};
|
|
6320
6322
|
descInput.value = data.content || "";
|
package/dist/haluo-biz.umd.cjs
CHANGED
|
@@ -4951,6 +4951,7 @@
|
|
|
4951
4951
|
const topicElement = document.createElement("div");
|
|
4952
4952
|
topicElement.className = "topic-item";
|
|
4953
4953
|
topicElement.setAttribute("data-topic-id", topic.id);
|
|
4954
|
+
topicElement.setAttribute("data-topic-type", topic.type);
|
|
4954
4955
|
topicElement.textContent = `#${topic.title}`;
|
|
4955
4956
|
topicElement.addEventListener("click", () => {
|
|
4956
4957
|
this.insertTopicToEditor(topic);
|
|
@@ -4974,6 +4975,7 @@
|
|
|
4974
4975
|
const topicElement = document.createElement("div");
|
|
4975
4976
|
topicElement.className = "topic-item";
|
|
4976
4977
|
topicElement.setAttribute("data-topic-id", topic.id);
|
|
4978
|
+
topicElement.setAttribute("data-topic-type", topic.type);
|
|
4977
4979
|
topicElement.textContent = `#${topic.exactlyMatchTitle || topic.title}`;
|
|
4978
4980
|
topicElement.addEventListener("click", () => {
|
|
4979
4981
|
this.insertTopicToEditor(topic);
|
|
@@ -5027,7 +5029,7 @@
|
|
|
5027
5029
|
topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
|
|
5028
5030
|
} else {
|
|
5029
5031
|
topicListHTML = hotTopics.map(
|
|
5030
|
-
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
5032
|
+
(topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
|
|
5031
5033
|
).join("");
|
|
5032
5034
|
if (loading) {
|
|
5033
5035
|
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
@@ -5040,7 +5042,7 @@
|
|
|
5040
5042
|
topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
|
|
5041
5043
|
} else {
|
|
5042
5044
|
topicListHTML = recentTopics.map(
|
|
5043
|
-
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
5045
|
+
(topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
|
|
5044
5046
|
).join("");
|
|
5045
5047
|
}
|
|
5046
5048
|
}
|
|
@@ -5075,7 +5077,7 @@
|
|
|
5075
5077
|
topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
|
|
5076
5078
|
} else {
|
|
5077
5079
|
topicListHTML = searchTopics.map(
|
|
5078
|
-
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
5080
|
+
(topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
|
|
5079
5081
|
).join("");
|
|
5080
5082
|
if (loading) {
|
|
5081
5083
|
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
@@ -6301,10 +6303,10 @@
|
|
|
6301
6303
|
var descInputWrap;
|
|
6302
6304
|
var descInput = editor.createElement("textarea", {
|
|
6303
6305
|
class: "desc-input",
|
|
6304
|
-
maxlength: "
|
|
6306
|
+
maxlength: "100",
|
|
6305
6307
|
rows: "2",
|
|
6306
6308
|
cols: "50",
|
|
6307
|
-
placeholder: "请输入图片描述(最多
|
|
6309
|
+
placeholder: "请输入图片描述(最多100字)",
|
|
6308
6310
|
contenteditable: "false"
|
|
6309
6311
|
});
|
|
6310
6312
|
descInput.disabled = me2.disabled;
|
|
@@ -6312,8 +6314,8 @@
|
|
|
6312
6314
|
const parent = me2.findParentByClass(e.target, "halo-img-content");
|
|
6313
6315
|
const img = parent.querySelector(".halo-picture-area");
|
|
6314
6316
|
img.dataset.desc = e.target.value;
|
|
6315
|
-
if (e.target.value.length >
|
|
6316
|
-
return me2.setToast("限制
|
|
6317
|
+
if (e.target.value.length > 99) {
|
|
6318
|
+
return me2.setToast("限制100个字符");
|
|
6317
6319
|
}
|
|
6318
6320
|
};
|
|
6319
6321
|
descInput.value = data.content || "";
|