@haluo/biz 2.0.51-beta.2 → 2.0.52

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 CHANGED
@@ -4971,7 +4971,8 @@ const _sfc_main$3 = {
4971
4971
  topicElement.className = "topic-item";
4972
4972
  topicElement.setAttribute("data-topic-id", topic.id);
4973
4973
  topicElement.setAttribute("data-topic-type", topic.type);
4974
- topicElement.textContent = `#${topic.title}`;
4974
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
4975
+ topicElement.innerHTML = `<span>#${topic.title}</span>${viewHtml}</span>`;
4975
4976
  topicElement.addEventListener("click", () => {
4976
4977
  this.insertTopicToEditor(topic);
4977
4978
  });
@@ -5047,9 +5048,10 @@ const _sfc_main$3 = {
5047
5048
  } else if (hotTopics.length === 0) {
5048
5049
  topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
5049
5050
  } else {
5050
- topicListHTML = hotTopics.map(
5051
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5052
- ).join("");
5051
+ topicListHTML = hotTopics.map((topic) => {
5052
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
5053
+ return `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span>${viewHtml}</div>`;
5054
+ }).join("");
5053
5055
  if (loading) {
5054
5056
  topicListHTML += '<div class="topic-loading">加载更多...</div>';
5055
5057
  } else if (!hasMore) {
@@ -5061,7 +5063,7 @@ const _sfc_main$3 = {
5061
5063
  topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
5062
5064
  } else {
5063
5065
  topicListHTML = recentTopics.map(
5064
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5066
+ (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span></div>`
5065
5067
  ).join("");
5066
5068
  }
5067
5069
  }
@@ -5096,7 +5098,10 @@ const _sfc_main$3 = {
5096
5098
  topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
5097
5099
  } else {
5098
5100
  topicListHTML = searchTopics.map(
5099
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5101
+ (topic) => {
5102
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
5103
+ return `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span>${viewHtml}</div>`;
5104
+ }
5100
5105
  ).join("");
5101
5106
  if (loading) {
5102
5107
  topicListHTML += '<div class="topic-loading">加载更多...</div>';
@@ -4970,7 +4970,8 @@
4970
4970
  topicElement.className = "topic-item";
4971
4971
  topicElement.setAttribute("data-topic-id", topic.id);
4972
4972
  topicElement.setAttribute("data-topic-type", topic.type);
4973
- topicElement.textContent = `#${topic.title}`;
4973
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
4974
+ topicElement.innerHTML = `<span>#${topic.title}</span>${viewHtml}</span>`;
4974
4975
  topicElement.addEventListener("click", () => {
4975
4976
  this.insertTopicToEditor(topic);
4976
4977
  });
@@ -5046,9 +5047,10 @@
5046
5047
  } else if (hotTopics.length === 0) {
5047
5048
  topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
5048
5049
  } else {
5049
- topicListHTML = hotTopics.map(
5050
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5051
- ).join("");
5050
+ topicListHTML = hotTopics.map((topic) => {
5051
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
5052
+ return `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span>${viewHtml}</div>`;
5053
+ }).join("");
5052
5054
  if (loading) {
5053
5055
  topicListHTML += '<div class="topic-loading">加载更多...</div>';
5054
5056
  } else if (!hasMore) {
@@ -5060,7 +5062,7 @@
5060
5062
  topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
5061
5063
  } else {
5062
5064
  topicListHTML = recentTopics.map(
5063
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5065
+ (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span></div>`
5064
5066
  ).join("");
5065
5067
  }
5066
5068
  }
@@ -5095,7 +5097,10 @@
5095
5097
  topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
5096
5098
  } else {
5097
5099
  topicListHTML = searchTopics.map(
5098
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5100
+ (topic) => {
5101
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
5102
+ return `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span>${viewHtml}</div>`;
5103
+ }
5099
5104
  ).join("");
5100
5105
  if (loading) {
5101
5106
  topicListHTML += '<div class="topic-loading">加载更多...</div>';
package/dist/style.css CHANGED
@@ -525,6 +525,9 @@
525
525
  overflow-y: auto;
526
526
  }
527
527
  .topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item {
528
+ display: flex;
529
+ align-items: center;
530
+ justify-content: space-between;
528
531
  padding: 12px 16px;
529
532
  font-size: 14px;
530
533
  color: #333;
@@ -532,6 +535,10 @@
532
535
  border-bottom: 1px solid #f8f8f8;
533
536
  transition: background-color 0.2s;
534
537
  }
538
+ .topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item span:nth-child(2) {
539
+ font-size: 12px;
540
+ color: gainsboro;
541
+ }
535
542
  .topic-popover .topic-popover-content .topic-list-container .topic-list .topic-item:hover {
536
543
  background: #f5f5f5;
537
544
  color: #FF3C08;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@haluo/biz",
3
3
  "description": "rich text",
4
- "version": "2.0.51-beta.2",
4
+ "version": "2.0.52",
5
5
  "type": "module",
6
6
  "module": "./dist/haluo-biz.js",
7
7
  "main": "./dist/haluo-biz.umd.cjs",