index.js 1017 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Component({
  2. options: {
  3. addGlobalClass: true
  4. },
  5. properties: {
  6. search: Boolean, //是否开启搜索
  7. list: {
  8. type: Array,
  9. value: [{
  10. label: "我负责的",
  11. icon: "icon-webxialaxuanxiangjiantou",
  12. color: "",
  13. width: ""
  14. }, {
  15. label: "筛选",
  16. icon: "icon-daoruxialajiantou",
  17. color: "",
  18. width: ""
  19. }, {
  20. label: "创建时间",
  21. icon: "icon-quxiao",
  22. color: "",
  23. width: ""
  24. }]
  25. }, //功能列表
  26. onSearch: Function,
  27. onClick: Function
  28. },
  29. data: {
  30. },
  31. methods: {
  32. onClick(e) {
  33. const {
  34. item
  35. } = e.currentTarget.dataset;
  36. this.triggerEvent("onClick", item)
  37. },
  38. handleSearch() {
  39. this.triggerEvent("onSearch")
  40. }
  41. }
  42. })