5.10航天ui交易所pc端,代码jiem-pc
lxf
2025-06-13 066ec67b7080f07a0e47dda9864ee6be2e4b9053
src/components/commonTrade/kline.vue
@@ -30,7 +30,7 @@
    data: {
      type: Array,
      default() {
        return [ ];
        return [];
      },
    },
    klineIndex: {
@@ -112,24 +112,24 @@
  },
  methods: {
    klineInIt(newVal) {
      // if (this.klineData ) {
      //   this.klineData.remove(); // 销毁旧的图表实例
      // }
      dispose("kline-BoxMain");
      // if (this.klineData ) {
      //   this.klineData.remove(); // 销毁旧的图表实例
      // }
      dispose("kline-BoxMain");
      if (this.klineData && newVal) {
      console.log('this.klineDatathis.klineData',this.klineData);
        console.log("this.klineDatathis.klineData", this.klineData);
        this.klineData = null;
        this.isVisible = false;
      this.klineData.remove(); // 销毁旧的图表实例
        this.klineData.remove(); // 销毁旧的图表实例
      }
      this.klineData = init("kline-BoxMain", {
        locale: langStore.language, //https://klinecharts.com/guide/i18n.html
        styles: {
          grid: {
            show: false,
            show: true,
            // 网格水平线
            horizontal: {
              show: false,
              show: true,
              size: 1,
              color: "#393939",
              style: "solid",
@@ -137,9 +137,9 @@
            },
            // 网格垂直线
            vertical: {
              show: false,
              show: true,
              size: 1,
              color: "#000",
              color: "#393939",
              style: "solid",
              dashValue: [2, 2],
            },
@@ -220,6 +220,7 @@
    //切换副线
    checkLineType(val) {
      this.lineValue = val;
      this.klineData?.createIndicator(val, false, { id: "pane_1" });
    },
  },