| | |
| | | }, |
| | | tabValue: 0, |
| | | tabPanelstyle: 'display:flex;justify-content:center;align-items:center;', |
| | | // tab选项 |
| | | tabList: [{ |
| | | title: "图书", |
| | | index: "0", |
| | | // bookTotal: this.data.bookTotal |
| | | }, |
| | | { |
| | | title: "课程", |
| | | index: "1", |
| | | // bookTotal: this.data.courseTotal |
| | | }, |
| | | { |
| | | title: "数字教材", |
| | | index: "2", |
| | | // bookTotal: this.data.digitalTextbooksTotal |
| | | }, { |
| | | title: "专题", |
| | | index: "3", |
| | | // bookTotal: this.data.seminarTotal |
| | | }, |
| | | { |
| | | title: "书目", |
| | | index: "4", |
| | | // bookTotal: this.data.bookFairTotal |
| | | }, |
| | | { |
| | | title: "书展", |
| | | index: "5", |
| | | // bookTotal: this.data.biblioClassificationTotal |
| | | }, |
| | | ], |
| | | tabsId: 0, //默认选型为装备 |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | //标签的切换 |
| | | onTabsChange(event) { |
| | | const value = event.detail.value |
| | | console.log(value); |
| | | this.setData({ |
| | | tabValue: value, |
| | | isMore: false |
| | |
| | | method: 'post', |
| | | data: body |
| | | }).then((resp) => { |
| | | console.log(resp, 'resp'); |
| | | //图书 0 |
| | | const data1 = resp[0] |
| | | const datas1 = handleQueryResourceListData({ |
| | |
| | | onTabsClick(event) { |
| | | console.log(`Click tab, tab-panel value is ${event.detail.value}.`); |
| | | }, |
| | | tabClick() { |
| | | console.log(2323); |
| | | }, |
| | | // 滑动时触发的事件 |
| | | slideOn(e) { |
| | | // 拿到当前索引并动态改变 |
| | | this.setData({ |
| | | tabsId: e.detail.current |
| | | }) |
| | | }, |
| | | |
| | | //点击tab时触发 |
| | | tabsOn(e) { |
| | | this.setData({ |
| | | //拿到当前索引并动态改变 |
| | | tabsId: e.currentTarget.dataset.idx |
| | | }) |
| | | }, |
| | | |
| | | }) |