Browse Source

修改错误引用对象

master
xh-pan1 4 months ago
parent
commit
88cd4408dd
  1. 5
      App.vue
  2. 12
      components/Skeleton/index.vue
  3. 10
      uview-ui/components/u-skeleton/u-skeleton.vue

5
App.vue

@ -70,9 +70,8 @@ export default {
}
NET.request(API.GetAllForMap, {}, 'POST').then(res => {
i18n.mergeLocaleMessage('en',res.data.en);
i18n.mergeLocaleMessage('zh', res.data.zh);
this.$i18n.mergeLocaleMessage('en',res.data.en);
this.$i18n.mergeLocaleMessage('zh', res.data.zh);
})
uni.onTabBarMidButtonTap(() => {

12
components/Skeleton/index.vue

@ -134,11 +134,13 @@ export default {
query = uni.createSelectorQuery()
// #endif
query.selectAll('.u-skeleton').boundingClientRect().exec((res) => {
this.windowHeight = res[0][0].height;
this.windowWinth = res[0][0].width;
res[0][0].bottom = res[0][0].height
this.top = this.marginTop + res[0][0].top;
this.left = res[0][0].left;
if(res[0][0]){
this.windowHeight = res[0][0].height;
this.windowWinth = res[0][0].width;
res[0][0].bottom = res[0][0].height
this.top = this.marginTop + res[0][0].top;
this.left = res[0][0].left;
}
});
//
this.getRectEls();

10
uview-ui/components/u-skeleton/u-skeleton.vue

@ -104,10 +104,12 @@
query = uni.createSelectorQuery()
// #endif
query.selectAll('.u-skeleton').boundingClientRect().exec((res) => {
this.windowHeight = res[0][0].height;
this.windowWinth = res[0][0].width;
this.top = res[0][0].bottom - res[0][0].height;
this.left = res[0][0].left;
if(res[0][0]){
this.windowHeight = res[0][0].height;
this.windowWinth = res[0][0].width;
this.top = res[0][0].bottom - res[0][0].height;
this.left = res[0][0].left;
}
});
//
this.getRectEls();

Loading…
Cancel
Save