1234567891011121314151617181920212223242526272829303132333435 |
- "use strict";
- Component({
- ready: function () {
- if (!this.data.tabList.length)
- return;
- var id = this.data.tabList[0].id;
- this.setData({
- tab: id
- });
- this.triggerEvent('change', id);
- },
- properties: {
- list: {
- type: Array,
- value: []
- }
- },
- data: {
- tab: 0,
- tabList: [
- {
- title: "剪辑",
- number: 0,
- id: 0
- },
- ]
- },
- methods: {
- clickTab: function () {
- var _this = this;
- var tabData = arguments[0].currentTarget.dataset;
- this.setData({ tab: tabData.id }, function () { return _this.triggerEvent("Change", tabData.id); });
- }
- }
- });
|