mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 02:47:25 +08:00
refactor: 更新u-tabs组件使用方式及样式调整
This commit is contained in:
@@ -415,8 +415,6 @@ export default {
|
||||
|
||||
mounted() {
|
||||
this.formatSku(this.goodsSpec);
|
||||
|
||||
console.log("goodsDetail",this.goodsDetail)
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -437,9 +435,9 @@ export default {
|
||||
box-shadow: 0 2px 6px 0 rgba(255, 65, 66, 0.2);
|
||||
}
|
||||
|
||||
::v-deep.u-icon-plus,
|
||||
.u-icon-minus,
|
||||
.u-icon-disabled {
|
||||
::v-deep .u-icon-plus,
|
||||
::v-deep .u-icon-minus,
|
||||
::v-deep .u-icon-disabled {
|
||||
height: 30rpx !important;
|
||||
background: #fff !important;
|
||||
}
|
||||
@@ -541,7 +539,7 @@ export default {
|
||||
color: #999;
|
||||
margin-left: 10rpx;
|
||||
|
||||
::v-deep span {
|
||||
.goods-price-bigshow {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,20 +79,15 @@ export default {
|
||||
this.$emit("input", !this.value);
|
||||
},
|
||||
getStatusBar() {
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
uni.getSystemInfo({
|
||||
success: function (e) {
|
||||
let customBar;
|
||||
// #ifdef H5
|
||||
|
||||
customBar = e.statusBarHeight + e.windowTop;
|
||||
|
||||
// #endif
|
||||
resolve(customBar);
|
||||
},
|
||||
});
|
||||
});
|
||||
return promise;
|
||||
const windowInfo = uni.getWindowInfo();
|
||||
// #ifdef H5
|
||||
return Promise.resolve(
|
||||
(windowInfo.statusBarHeight || 0) + (windowInfo.windowTop || 0)
|
||||
);
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
return Promise.resolve(windowInfo.statusBarHeight || 0);
|
||||
// #endif
|
||||
},
|
||||
async popupsPosition() {
|
||||
let statusBar = await this.getStatusBar();
|
||||
@@ -104,6 +99,10 @@ export default {
|
||||
size: true,
|
||||
},
|
||||
(data) => {
|
||||
if (!data) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
let width = data.width;
|
||||
let height = data.height;
|
||||
|
||||
@@ -154,8 +153,7 @@ export default {
|
||||
return promise;
|
||||
},
|
||||
getPlacement(x, y) {
|
||||
let width = uni.getSystemInfoSync().windowWidth;
|
||||
let height = uni.getSystemInfoSync().windowHeight;
|
||||
const { windowWidth: width, windowHeight: height } = uni.getWindowInfo();
|
||||
if (x > width / 2 && y > height / 2) {
|
||||
return "bottom-end";
|
||||
} else if (x < width / 2 && y < height / 2) {
|
||||
@@ -171,20 +169,21 @@ export default {
|
||||
}
|
||||
},
|
||||
dynamicGetY(y, gap) {
|
||||
let height = uni.getSystemInfoSync().windowHeight;
|
||||
const { windowHeight: height } = uni.getWindowInfo();
|
||||
y = y < gap ? gap : y;
|
||||
y = height - y < gap ? height - gap : y;
|
||||
|
||||
return y;
|
||||
},
|
||||
dynamicGetX(x, gap) {
|
||||
let width = uni.getSystemInfoSync().windowWidth;
|
||||
const { windowWidth: width } = uni.getWindowInfo();
|
||||
x = x < gap ? gap : x;
|
||||
x = width - x < gap ? width - gap : x;
|
||||
return x;
|
||||
},
|
||||
transformRpx(params) {
|
||||
return (params * uni.getSystemInfoSync().screenWidth) / 375;
|
||||
const { screenWidth } = uni.getWindowInfo();
|
||||
return (params * screenWidth) / 375;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user