123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- const cf = require("../../utils/checkFile")
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- butType: {
- type: String,
- value: "下载"
- },
- list: {
- type: Array,
- value: []
- },
- callBack: {
- type: Function
- }
- },
- options: {
- addGlobalClass: true
- },
- /**
- * 组件的初始数据
- */
- data: {
- },
- /**
- * 组件的方法列表
- */
- methods: {
- butClick(e) {
- const {
- item
- } = e.currentTarget.dataset;
- if (this.data.butType == '播放') return this.triggerEvent("callBack", item);
- },
- checkFile(e) {
- const {
- item
- } = e.currentTarget.dataset;
- if (this.data.butType == '播放') return this.triggerEvent("callBack", item);
- cf.checkFile(item);
- }
- }
- })
|