1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // components/tail_tip/index.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- total: {
- type: Number,
- value: 0
- },
- pageNum: {
- type: Number,
- value: 0
- },
- pageSize: {
- type: Number,
- value: 10
- },
- loadding: {
- type: Boolean,
- value: false
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- type: 3
- },
- /**
- * 组件的方法列表
- */
- methods: {},
- observers: {
- "total, pageNum": function(total, pageNum) {
- if (this.data.loadding) {
- this.setData({
- type: 1
- });
- } else if (total > pageNum * this.data.pageSize) {
- this.setData({
- type: 2
- });
- } else {
- this.setData({
- type: 3
- });
- }
- }
- }
- });
|