wj
litian
2024-10-23 abe52e53bee051e3f801d001c4de58d34a3fefd7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const app = getApp();
Component({
  properties: {
    treeList: {
      type: Array,
      value: [],
    },
    bookInfo: {
      type: Object,
      value: {},
    },
    tab: {
      type: String,
      value: "",
    },
    openIds: {
      type: Array,
      value: [],
    },
  },
  data: {},
  ready() {},
 
  onLoad() {
    console.log(this.properties.openIds, "1111")
  },
 
  methods: {
 
    // 节点展开
    handleChange(e) {
      this.setData({
        openIds: e.detail.value,
      });
    },
    goTest(e) {
      const value = e.currentTarget.dataset;
      var myEventDetail = {
        value,
      };
      var myEventOption = {
        bubbles: true,
        composed: true,
      };
      this.triggerEvent("goTest", myEventDetail, myEventOption);
    },
  },
});