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