闫增涛
2024-03-26 9e5a84a4e41d7ab2cb820c7f77122f69a9d036dd
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -37,20 +37,32 @@
    }
  },
  data: {
    activeValues: [1, 2],
    webpageSrc: '',
    cloudShoppingCart: []
  },
  ready() {
    this.setData({
    })
    console.log('准备');
  },
  onShow() {
  },
  observers: {
    'treeList': function (newValue) {
    'openIds': function (newValue) {
      var myEventDetail = {
      }
      var myEventOption = {
        bubbles: true,
        composed: true
      }
      this.triggerEvent('handleTree', myEventDetail, myEventOption)
    }
  },
  methods: {
    handleList(tree) {
      for (let index = 0; index < tree.length; index++) {
        const item = tree[index];
@@ -64,11 +76,9 @@
    },
    // 节点展开
    handleChange(e) {
      // console.log(this.properties.treeList, 'this.properties.treeList');
      this.setData({
        activeValues: e.detail.value,
        openIds: e.detail.value,
      });
      // console.log('传递', this.properties.buyIds);
    },
    handleCheck(data) {
      for (let index = 0; index < data.length; index++) {