@rfkit/charts 1.2.6 → 1.2.8

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.
@@ -6,6 +6,9 @@ interface StationPosition {
6
6
  left: string;
7
7
  width: string;
8
8
  };
9
+ signalColor?: string;
10
+ signalTypeName?: string;
11
+ tooltip: string;
9
12
  }
10
13
  interface SegmentContainerProps {
11
14
  style: React.CSSProperties;
@@ -0,0 +1,16 @@
1
+ export declare enum SignalType {
2
+ LEGITIMATE = "Legitimate",
3
+ KNOWN = "Know",
4
+ UNKNOWN = "UnKnown",
5
+ ILLEGAL = "Illegal"
6
+ }
7
+ export declare const SIGNAL_TYPE_MAP: Record<string, {
8
+ name: string;
9
+ color: string;
10
+ isLegitimate: boolean;
11
+ }>;
12
+ export declare const signalTypeMap: Record<string, {
13
+ name: string;
14
+ color: string;
15
+ isLegitimate: boolean;
16
+ }>;
package/index.js CHANGED
@@ -2729,9 +2729,11 @@ var __webpack_modules__ = {
2729
2729
  height: 100%;
2730
2730
  color: var(--theme-color-base);
2731
2731
  opacity: .68;
2732
+ pointer-events: auto;
2732
2733
  justify-content: center;
2733
2734
  align-items: center;
2734
- height: 4px;
2735
+ min-width: 1px;
2736
+ height: 8px;
2735
2737
  font-size: 12px;
2736
2738
  display: flex;
2737
2739
  position: absolute;
@@ -2742,7 +2744,7 @@ var __webpack_modules__ = {
2742
2744
  .segmentContainer-gDwnhB .item-ybDTIt:after {
2743
2745
  content: "";
2744
2746
  opacity: .32;
2745
- background: var(--theme-color-base);
2747
+ background: var(--station-bg-color, var(--theme-color-base));
2746
2748
  width: 100%;
2747
2749
  height: 100%;
2748
2750
  position: absolute;
@@ -2757,7 +2759,7 @@ var __webpack_modules__ = {
2757
2759
 
2758
2760
  .segmentContainer-gDwnhB .item-ybDTIt.active-qDPFJm:after {
2759
2761
  opacity: .68;
2760
- background: var(--theme-color-primary);
2762
+ background: var(--station-bg-color, var(--theme-color-primary));
2761
2763
  }
2762
2764
 
2763
2765
  .segmentContainer-gDwnhB .item-ybDTIt:hover {
@@ -7564,16 +7566,9 @@ function initSeriesSubscription(renderer) {
7564
7566
  console.warn("[Series] globalID is required for series subscription");
7565
7567
  return null;
7566
7568
  }
7567
- console.log("[initSeriesSubscription] 开始为 globalID 建立订阅:", globalID);
7568
7569
  const subscriptions = [];
7569
7570
  subscriptions.push(subscribeToSeries(globalID, events_SeriesEventName.UPDATED, (data)=>{
7570
- console.log("[Series\u8BA2\u9605] UPDATED\u4E8B\u4EF6\u6536\u5230:", {
7571
- seriesName: data.seriesName,
7572
- display: data.config.display,
7573
- globalID: data.globalID
7574
- });
7575
7571
  renderer.setSeries(data.config, true);
7576
- console.log("[Series\u8BA2\u9605] \u8C03\u7528 draw()");
7577
7572
  renderer.state.chart?.draw();
7578
7573
  }));
7579
7574
  subscriptions.push(subscribeToSeries(globalID, events_SeriesEventName.MODE_CHANGED, ()=>{
@@ -7592,9 +7587,7 @@ function initSeriesSubscription(renderer) {
7592
7587
  if (renderer.state.series) renderer.state.series = {};
7593
7588
  renderer.initSeries();
7594
7589
  }));
7595
- console.log("[initSeriesSubscription] 订阅建立完成, globalID:", globalID, "\u8BA2\u9605\u6570\u91CF:", subscriptions.length);
7596
7590
  return ()=>{
7597
- console.log("[initSeriesSubscription] 取消订阅, globalID:", globalID);
7598
7591
  for (const unsubscribe of subscriptions)unsubscribe();
7599
7592
  };
7600
7593
  }
@@ -7684,23 +7677,11 @@ function mergeSeriesConfig(config, existing) {
7684
7677
  }
7685
7678
  function updateSeries(globalID, config) {
7686
7679
  if (!config?.name) return;
7687
- console.log("[updateSeries] \u5F00\u59CB\u66F4\u65B0:", {
7688
- globalID,
7689
- name: config.name,
7690
- display: config.display
7691
- });
7692
7680
  const manager = getSeriesManager(globalID);
7693
7681
  const existing = manager.getSeries(config.name);
7694
- console.log('[updateSeries] existing:', existing);
7695
7682
  const finalConfig = mergeSeriesConfig(config, existing);
7696
- console.log('[updateSeries] finalConfig:', finalConfig);
7697
7683
  if (existing) manager.removeSeries(config.name);
7698
7684
  manager.addSeries(finalConfig);
7699
- console.log("[updateSeries] \u53D1\u5E03 UPDATED \u4E8B\u4EF6:", {
7700
- globalID,
7701
- seriesName: config.name,
7702
- display: finalConfig.display
7703
- });
7704
7685
  events_emitSeriesEvent(events_SeriesEventName.UPDATED, {
7705
7686
  globalID,
7706
7687
  seriesName: config.name,
@@ -7878,6 +7859,28 @@ function useFilteredSeries(globalID, filter) {
7878
7859
  ]);
7879
7860
  return filteredData;
7880
7861
  }
7862
+ const SIGNAL_TYPE_MAP = {
7863
+ Legitimate: {
7864
+ name: "\u5408\u6CD5",
7865
+ color: '#52c41a',
7866
+ isLegitimate: true
7867
+ },
7868
+ Know: {
7869
+ name: "\u5DF2\u77E5",
7870
+ color: '#ff9900',
7871
+ isLegitimate: true
7872
+ },
7873
+ UnKnown: {
7874
+ name: "\u672A\u77E5",
7875
+ color: '#bfbfbf',
7876
+ isLegitimate: false
7877
+ },
7878
+ Illegal: {
7879
+ name: "\u4E0D\u5408\u6CD5",
7880
+ color: '#f5222d',
7881
+ isLegitimate: false
7882
+ }
7883
+ };
7881
7884
  var StationInfo_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/FrequencyDataBoard/StationInfo/styles.module.less");
7882
7885
  var StationInfo_styles_module_options = {};
7883
7886
  StationInfo_styles_module_options.styleTagTransform = styleTagTransform_default();
@@ -7887,7 +7890,15 @@ StationInfo_styles_module_options.domAPI = styleDomAPI_default();
7887
7890
  StationInfo_styles_module_options.insertStyleElement = insertStyleElement_default();
7888
7891
  injectStylesIntoStyleTag_default()(StationInfo_styles_module.Z, StationInfo_styles_module_options);
7889
7892
  const FrequencyDataBoard_StationInfo_styles_module = StationInfo_styles_module.Z && StationInfo_styles_module.Z.locals ? StationInfo_styles_module.Z.locals : void 0;
7890
- const StationInfo = ({ stationInfo })=>{
7893
+ const StationInfo_StationInfo = ({ stationInfo })=>{
7894
+ const signalTypeInfo = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
7895
+ if (!stationInfo?.signalType) return null;
7896
+ return SIGNAL_TYPE_MAP[stationInfo.signalType];
7897
+ }, [
7898
+ stationInfo?.signalType
7899
+ ]);
7900
+ const signalColor = signalTypeInfo?.color;
7901
+ const signalTypeName = signalTypeInfo?.name || stationInfo?.signalType;
7891
7902
  if (!stationInfo) return null;
7892
7903
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
7893
7904
  className: FrequencyDataBoard_StationInfo_styles_module.stationInfo,
@@ -7924,10 +7935,15 @@ const StationInfo = ({ stationInfo })=>{
7924
7935
  stationInfo.modulation
7925
7936
  ]
7926
7937
  }),
7927
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
7938
+ signalTypeName && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
7928
7939
  children: [
7929
- "\u72B6\u6001\uFF1A",
7930
- stationInfo.signalType
7940
+ "\u7C7B\u578B\uFF1A",
7941
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
7942
+ style: {
7943
+ color: signalColor
7944
+ },
7945
+ children: signalTypeName
7946
+ })
7931
7947
  ]
7932
7948
  }),
7933
7949
  stationInfo.remark && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
@@ -7939,7 +7955,7 @@ const StationInfo = ({ stationInfo })=>{
7939
7955
  ]
7940
7956
  });
7941
7957
  };
7942
- const FrequencyDataBoard_StationInfo = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(StationInfo);
7958
+ const StationInfo = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(StationInfo_StationInfo);
7943
7959
  var FrequencyDataBoard_styles_module = __webpack_require__("../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/FrequencyDataBoard/styles.module.less");
7944
7960
  var FrequencyDataBoard_styles_module_options = {};
7945
7961
  FrequencyDataBoard_styles_module_options.styleTagTransform = styleTagTransform_default();
@@ -8055,7 +8071,7 @@ const FrequencyDataBoard = ({ left, updateKey, onChange })=>{
8055
8071
  ]
8056
8072
  }),
8057
8073
  value,
8058
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyDataBoard_StationInfo, {
8074
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(StationInfo, {
8059
8075
  stationInfo: sf
8060
8076
  })
8061
8077
  ]
@@ -8652,7 +8668,7 @@ Area_styles_module_options.insertStyleElement = insertStyleElement_default();
8652
8668
  injectStylesIntoStyleTag_default()(Area_styles_module.Z, Area_styles_module_options);
8653
8669
  const HeatmapCapture_Area_styles_module = Area_styles_module.Z && Area_styles_module.Z.locals ? Area_styles_module.Z.locals : void 0;
8654
8670
  const Area_COMPONENT_KEY = constants_ToolType.HeatmapCapture;
8655
- const Area = (props)=>{
8671
+ const Area_Area = (props)=>{
8656
8672
  const { state: { heatmapCapture, segments, axisX: { frequencyFormat, unit }, system, globalID } } = useStore_useStore();
8657
8673
  const { id } = props;
8658
8674
  const { type, show, sync, onChange } = heatmapCapture;
@@ -8819,7 +8835,7 @@ const Area = (props)=>{
8819
8835
  ]
8820
8836
  });
8821
8837
  };
8822
- const HeatmapCapture_Area = Area;
8838
+ const Area = Area_Area;
8823
8839
  var RowIndex_styles_module = __webpack_require__("../../../../node_modules/.pnpm/@rsbuild+core@1.3.18/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[11].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[11].use[2]!../../../../node_modules/.pnpm/@rsbuild+plugin-less@1.5.0_@rsbuild+core@1.6.0/node_modules/@rsbuild/plugin-less/compiled/less-loader/index.js??ruleSet[1].rules[11].use[3]!./src/components/HeatmapCapture/RowIndex/styles.module.less");
8824
8840
  var RowIndex_styles_module_options = {};
8825
8841
  RowIndex_styles_module_options.styleTagTransform = styleTagTransform_default();
@@ -9203,7 +9219,7 @@ const HeatmapCapture_HeatmapCapture = (props)=>{
9203
9219
  ...props
9204
9220
  }) : type === store_HeatmapCaptureType.RowIndex ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(HeatmapCapture_RowIndex, {
9205
9221
  ...props
9206
- }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(HeatmapCapture_Area, {
9222
+ }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Area, {
9207
9223
  ...props
9208
9224
  });
9209
9225
  };
@@ -10160,11 +10176,8 @@ class Spectrum {
10160
10176
  globalID: '',
10161
10177
  ...props
10162
10178
  };
10163
- console.log('[Spectrum.constructor] globalID:', this.state.globalID);
10164
10179
  this.firstRenderAutoFocus = false;
10165
- console.log("[Spectrum.constructor] \u51C6\u5907\u521D\u59CB\u5316\u8BA2\u9605, globalID:", this.state.globalID);
10166
10180
  this.initSeriesSubscription();
10167
- console.log("[Spectrum.constructor] \u8BA2\u9605\u521D\u59CB\u5316\u5B8C\u6210");
10168
10181
  this.init();
10169
10182
  }
10170
10183
  initSeriesSubscription() {
@@ -10189,14 +10202,11 @@ class Spectrum {
10189
10202
  initSeries() {
10190
10203
  const { globalID } = this.state;
10191
10204
  if (!globalID) throw new Error('globalID is required for series initialization');
10192
- console.log("[Spectrum.initSeries] \u5F00\u59CB\u521D\u59CB\u5316 series, globalID:", globalID);
10193
10205
  const seriesWithTypes = getSeriesWithGraphicType(globalID);
10194
- console.log("[Spectrum.initSeries] \u83B7\u53D6\u5230 series \u914D\u7F6E\u6570\u91CF:", seriesWithTypes.size);
10195
10206
  seriesWithTypes.forEach((config)=>{
10196
10207
  this.setSeries(config, true);
10197
10208
  });
10198
10209
  this.state.chart?.draw();
10199
- console.log("[Spectrum.initSeries] \u521D\u59CB\u5316\u5B8C\u6210");
10200
10210
  }
10201
10211
  updateSeries(d, extraData) {
10202
10212
  const { series, chart } = this.state;
@@ -10251,12 +10261,6 @@ class Spectrum {
10251
10261
  const { chart, series, globalID } = this.state;
10252
10262
  const { name } = config;
10253
10263
  if (!chart || !name || !config) return;
10254
- console.log("[Spectrum.setSeries] \u6536\u5230\u914D\u7F6E:", {
10255
- name,
10256
- display: config.display,
10257
- skipEventEmit,
10258
- currentDisplay: series[name]?.display
10259
- });
10260
10264
  const merged = {
10261
10265
  ...series[name],
10262
10266
  ...config
@@ -10269,7 +10273,6 @@ class Spectrum {
10269
10273
  thickness,
10270
10274
  display
10271
10275
  };
10272
- console.log("[Spectrum.setSeries] \u5408\u5E76\u540E\u7684\u914D\u7F6E:", c, "\u539Fmerged:", merged);
10273
10276
  series[name] = c;
10274
10277
  chart.setSeries(c);
10275
10278
  if (!skipEventEmit && globalID) try {
@@ -10305,7 +10308,7 @@ class Spectrum {
10305
10308
  chart.setIntervel(interval);
10306
10309
  }
10307
10310
  reset() {
10308
- this.clear();
10311
+ this.clearChart();
10309
10312
  this.resize();
10310
10313
  }
10311
10314
  resize() {
@@ -10313,13 +10316,23 @@ class Spectrum {
10313
10316
  this.zoom();
10314
10317
  this.state.chart.resize();
10315
10318
  }
10316
- clear() {
10319
+ clearChart() {
10320
+ const { chart } = this.state;
10321
+ chart.clear();
10322
+ }
10323
+ destroy() {
10317
10324
  if (this.seriesUnsubscribe) {
10318
10325
  this.seriesUnsubscribe();
10319
10326
  this.seriesUnsubscribe = void 0;
10320
10327
  }
10321
- const { chart } = this.state;
10322
- chart.clear();
10328
+ this.clearChart();
10329
+ }
10330
+ dispose() {
10331
+ this.destroy();
10332
+ return ()=>{};
10333
+ }
10334
+ clear() {
10335
+ this.clearChart();
10323
10336
  }
10324
10337
  }
10325
10338
  const IQLine = ()=>{
@@ -14679,16 +14692,21 @@ const components_StationAllocation_styles_module = StationAllocation_styles_modu
14679
14692
  const StationAllocation_SegmentContainer_SegmentContainer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ style, stationPositions, currentFrequency, segmentIndex, isCurrentSegment, onStationMouseEnter, onStationMouseLeave, isStationInHoverRange })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
14680
14693
  className: components_StationAllocation_styles_module.segmentContainer,
14681
14694
  style: style,
14682
- children: stationPositions.map(({ station, position }, index)=>{
14695
+ children: stationPositions.map(({ station, position, signalColor, tooltip }, index)=>{
14683
14696
  const isActive = isCurrentSegment && currentFrequency >= station.startFrequency && currentFrequency <= station.stopFrequency;
14684
14697
  const isHovered = isStationInHoverRange(station);
14698
+ const className = `${components_StationAllocation_styles_module.item}${isActive ? ` ${components_StationAllocation_styles_module.active}` : ''}${isHovered ? ` ${components_StationAllocation_styles_module.hovered}` : ''}`;
14699
+ const itemStyle = {
14700
+ left: position.left,
14701
+ width: position.width,
14702
+ ...signalColor && {
14703
+ '--station-bg-color': signalColor
14704
+ }
14705
+ };
14685
14706
  return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
14686
- className: `${components_StationAllocation_styles_module.item} ${isActive ? components_StationAllocation_styles_module.active : ''} ${isHovered ? components_StationAllocation_styles_module.hovered : ''}`,
14687
- style: {
14688
- left: position.left,
14689
- width: position.width
14690
- },
14691
- title: `${station.signalName} - ${station.frequency}${station.orgName ? ` (${station.orgName})` : ''}`,
14707
+ className: className,
14708
+ style: itemStyle,
14709
+ title: tooltip,
14692
14710
  onMouseEnter: ()=>onStationMouseEnter(station),
14693
14711
  onMouseLeave: onStationMouseLeave
14694
14712
  }, `segment-${segmentIndex}-station-${station.signalName}-${station.frequency}-${index}`);
@@ -14704,7 +14722,7 @@ const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
14704
14722
  left,
14705
14723
  frequencyFormat
14706
14724
  ]);
14707
- const handleStationMouseEnter = (station)=>{
14725
+ const handleStationMouseEnter = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((station)=>{
14708
14726
  const yian = station.bandwidth / 2 / 1000;
14709
14727
  const startFreq = station.frequency - yian;
14710
14728
  const stopFreq = station.frequency + yian;
@@ -14712,17 +14730,19 @@ const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
14712
14730
  start: startFreq,
14713
14731
  stop: stopFreq
14714
14732
  });
14715
- };
14716
- const handleStationMouseLeave = ()=>{
14733
+ }, []);
14734
+ const handleStationMouseLeave = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
14717
14735
  setHoveredFrequencyRange(null);
14718
- };
14719
- const isStationInHoverRange = (station)=>{
14736
+ }, []);
14737
+ const isStationInHoverRange = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((station)=>{
14720
14738
  if (!hoveredFrequencyRange) return false;
14721
14739
  const yian = station.bandwidth / 2 / 1000;
14722
14740
  const startFreq = station.frequency - yian;
14723
14741
  const stopFreq = station.frequency + yian;
14724
14742
  return !(stopFreq < hoveredFrequencyRange.start || startFreq > hoveredFrequencyRange.stop);
14725
- };
14743
+ }, [
14744
+ hoveredFrequencyRange
14745
+ ]);
14726
14746
  const currentSegmentIndex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
14727
14747
  if (!segments?.length) return -1;
14728
14748
  let totalPoints = 0;
@@ -14773,8 +14793,19 @@ const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
14773
14793
  }
14774
14794
  startIndex = Math.max(bestStartIndex, 0);
14775
14795
  stopIndex = Math.min(bestStopIndex, segment.point - 1);
14776
- const width = (stopIndex - startIndex + 1) / segment.point * 100;
14796
+ const calculatedWidth = (stopIndex - startIndex + 1) / segment.point * 100;
14777
14797
  const leftPos = startIndex / segment.point * 100;
14798
+ const width = 0 === calculatedWidth ? '1px' : `${calculatedWidth}%`;
14799
+ const signalType = station.signalType;
14800
+ const signalTypeInfo = SIGNAL_TYPE_MAP[signalType];
14801
+ const signalColor = signalTypeInfo?.color;
14802
+ const signalTypeName = signalTypeInfo?.name || station.signalType;
14803
+ const tooltip = [
14804
+ station.signalName,
14805
+ `${station.frequency}MHz`,
14806
+ station.orgName && `\u{5355}\u{4F4D}: ${station.orgName}`,
14807
+ signalTypeName && `\u{7C7B}\u{578B}: ${signalTypeName}`
14808
+ ].filter(Boolean).join(' | ');
14778
14809
  return {
14779
14810
  station: {
14780
14811
  ...station,
@@ -14783,8 +14814,11 @@ const StationAllocation_StationAllocation = ({ show = true, display = true })=>{
14783
14814
  },
14784
14815
  position: {
14785
14816
  left: `${leftPos}%`,
14786
- width: `${width}%`
14787
- }
14817
+ width
14818
+ },
14819
+ signalColor,
14820
+ signalTypeName,
14821
+ tooltip
14788
14822
  };
14789
14823
  });
14790
14824
  const segmentWidth = segment.point / segments.reduce((sum, s)=>sum + s.point, 0) * 100;
@@ -48,6 +48,21 @@ export default class Spectrum {
48
48
  zoom(): void;
49
49
  reset(): void;
50
50
  resize(): void;
51
+ /**
52
+ * 清除图表内容(不取消订阅)
53
+ */
54
+ clearChart(): void;
55
+ /**
56
+ * 销毁实例(取消订阅)
57
+ */
58
+ destroy(): void;
59
+ /**
60
+ * 组件卸载时的清理(useChart 会调用此方法)
61
+ */
62
+ dispose(): () => void;
63
+ /**
64
+ * @deprecated 使用 clearChart() 或 destroy()
65
+ */
51
66
  clear(): void;
52
67
  }
53
68
  export {};
package/package.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "types": "index.d.ts",
6
6
  "author": "Hxgh",
7
7
  "license": "MIT",
8
- "version": "1.2.6",
8
+ "version": "1.2.8",
9
9
  "private": false
10
10
  }