@daoyi/nmtl-ui 2.0.1-beta.141 → 2.0.1-beta.142
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.
|
@@ -56,6 +56,15 @@ var enhanceNotes = function enhanceNotes(html, toggleHint) {
|
|
|
56
56
|
var remark = tip.querySelector('span.remark');
|
|
57
57
|
var text = tip.querySelector('.tooltiptext');
|
|
58
58
|
if (!remark || !text) return;
|
|
59
|
+
/* 資料來源是空的(後台沒填):整個「註」不顯示,避免按下去只有「資料來源:」(2026-10-08) */
|
|
60
|
+
/* 主站的來源包在 .tooltipsources;子站直接寫「資料來源:…」→ 去掉開頭的標籤(到第一個「:」或「:」)再判斷 */
|
|
61
|
+
var sources = tip.querySelector('.tooltipsources');
|
|
62
|
+
var sourceText = sources ? sources.textContent : text.textContent.replace(/^[^::]*[::]/, '');
|
|
63
|
+
if (!sourceText.trim()) {
|
|
64
|
+
tip.remove();
|
|
65
|
+
changed = true;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
59
68
|
noteSeq += 1;
|
|
60
69
|
var id = "tl-note-".concat(noteSeq);
|
|
61
70
|
text.id = id;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daoyi/nmtl-ui",
|
|
3
3
|
"packageManager": "pnpm@10.34.5",
|
|
4
|
-
"version": "2.0.1-beta.
|
|
4
|
+
"version": "2.0.1-beta.142",
|
|
5
5
|
"description": "This project is to be used as a starter kit for building React component using Storybook and Rollup",
|
|
6
6
|
"author": "daoyi",
|
|
7
7
|
"main": "lib/index.js",
|