12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- Component({
-
- options: {
- multipleSlots: true
- },
- properties: {
- isLoading: {
- type: Boolean,
- value: true,
- observer(newVal) {
- if(newVal) {
- var animation= wx.createAnimation({})
- animation.opacity(1).step({
- duration:0
- });
- this.setData({
- showpic:animation.export(),
- hidden:true
- });
- return;
- }
- this.skeletonVis();
- }
- },
- },
-
- data: {
- hidden:true
- },
-
- methods: {
- skeletonVis() {
- var animation= wx.createAnimation({})
- animation.opacity(0).step({
- duration:500
- });
-
-
-
-
- setTimeout(() => {
- this.setData({
- showpic:animation.export(),
- },() => {
- setTimeout(() => {
- this.setData({
- hidden:false,
- })
- }, 500);
- });
- }, 500);
- }
- }
- })
|