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