@blueking/monitor-trace-log 2.0.22 → 2.0.23
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/main.js +16 -10
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -125505,13 +125505,6 @@ class TaskEventManager {
|
|
|
125505
125505
|
}
|
|
125506
125506
|
const taskEventManager = new TaskEventManager();
|
|
125507
125507
|
class UseSegmentProp {
|
|
125508
|
-
/**
|
|
125509
|
-
* 全局实例递增计数器。
|
|
125510
|
-
* 同一页面可能同时加载多个检索包(例如 apm + trace),它们会共享 document.body。
|
|
125511
|
-
* 这里通过递增计数为每个 UseSegmentProp 实例生成稳定且唯一的 owner id,
|
|
125512
|
-
* 用于隔离弹层 DOM 的查询与复用,避免“后加载包误复用先加载包节点”。
|
|
125513
|
-
*/
|
|
125514
|
-
static instanceCounter = 0;
|
|
125515
125508
|
className = 'bklog-segment-pop-content';
|
|
125516
125509
|
wrapperClassName = 'bklog-pop-wrapper';
|
|
125517
125510
|
wrapperIdName = 'bklog_pop_wrapper';
|
|
@@ -125524,6 +125517,20 @@ class UseSegmentProp {
|
|
|
125524
125517
|
stopPropagation;
|
|
125525
125518
|
aiBluekingEnabled;
|
|
125526
125519
|
highlightEnabled;
|
|
125520
|
+
/**
|
|
125521
|
+
* 生成实例 owner id(跨 bundle 全局唯一)。
|
|
125522
|
+
*
|
|
125523
|
+
* 注意:APM 和 Trace 在宿主页里可能是两个独立构建产物,
|
|
125524
|
+
* 如果只使用“模块内 static 计数器”,每个 bundle 都会从 1 开始计数,
|
|
125525
|
+
* 最终产生同名 owner(例如都叫 segment-pop-1),依然会误复用对方节点。
|
|
125526
|
+
*
|
|
125527
|
+
* 这里把计数器提升到 window 级别,确保两个独立包共享同一计数空间。
|
|
125528
|
+
*/
|
|
125529
|
+
static getNextInstanceId() {
|
|
125530
|
+
const nextCounter = (window.__BKLOG_SEGMENT_POP_COUNTER__ ?? 0) + 1;
|
|
125531
|
+
window.__BKLOG_SEGMENT_POP_COUNTER__ = nextCounter;
|
|
125532
|
+
return `segment-pop-${nextCounter}`;
|
|
125533
|
+
}
|
|
125527
125534
|
constructor() {
|
|
125528
125535
|
let {
|
|
125529
125536
|
delineate = false,
|
|
@@ -125535,9 +125542,8 @@ class UseSegmentProp {
|
|
|
125535
125542
|
const {
|
|
125536
125543
|
$t
|
|
125537
125544
|
} = use_locale();
|
|
125538
|
-
//
|
|
125539
|
-
|
|
125540
|
-
this.instanceId = `segment-pop-${UseSegmentProp.instanceCounter}`;
|
|
125545
|
+
// 生成全局唯一 owner,后续会写到 DOM data 属性中做精确定位。
|
|
125546
|
+
this.instanceId = UseSegmentProp.getNextInstanceId();
|
|
125541
125547
|
this.$t = $t;
|
|
125542
125548
|
this.refContent = (0,vue_esm.ref)();
|
|
125543
125549
|
this.delineate = delineate;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@blueking/monitor-trace-log","version":"2.0.
|
|
1
|
+
{"name":"@blueking/monitor-trace-log","version":"2.0.23","description":"","main":"main.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"MIT"}
|