feat:设备使用记录

This commit is contained in:
houjunxiang
2026-03-05 16:54:47 +08:00
parent 749ac7f507
commit 9c88c45d66
357 changed files with 21486 additions and 5845 deletions

View File

@@ -36,22 +36,25 @@
}"
>
<slot name="loading">
<u-icon
<up-icon
:name="loadingIcon"
></u-icon>
></up-icon>
</slot>
</view>
<view
v-if="showError && isError && !loading"
class="u-image__error"
:style="{
borderRadius: shape == 'circle' ? '50%' : addUnit(radius)
borderRadius: shape == 'circle' ? '50%' : addUnit(radius),
backgroundColor: this.bgColor,
width: addUnit(width),
height: addUnit(height)
}"
>
<slot name="error">
<u-icon
<up-icon
:name="errorIcon"
></u-icon>
></up-icon>
</slot>
</view>
</view>
@@ -115,7 +118,6 @@
if (!n) {
// 如果传入null或者''或者false或者undefined标记为错误状态
this.isError = true
} else {
this.isError = false;
this.loading = true;
@@ -132,13 +134,13 @@
style.height = addUnit(this.height);
// #endif
// #ifndef APP-NVUE
if (this.width == '100%') {
style.width = this.width;
if (this.loading || this.isError || this.width == '100%' || this.mode != 'heightFix') {
style.width = addUnit(this.width);
} else {
style.width = 'fit-content';
}
if (this.height == '100%') {
style.height = this.height;
if (this.loading || this.isError || this.height == '100%' || this.mode != 'widthFix') {
style.height = addUnit(this.height);
} else {
style.height = 'fit-content';
}
@@ -153,13 +155,13 @@
style.height = addUnit(this.height);
// #endif
// #ifndef APP-NVUE
if (this.width == '100%') {
style.width = this.width;
if (this.loading || this.isError || this.width == '100%' || this.mode != 'heightFix') {
style.width = addUnit(this.width);
} else {
style.width = 'fit-content';
}
if (this.height == '100%') {
style.height = this.height;
if (this.loading || this.isError || this.height == '100%' || this.mode != 'widthFix') {
style.height = addUnit(this.height);
} else {
style.height = 'fit-content';
}
@@ -221,17 +223,15 @@
// 移除图片的背景色
removeBgColor() {
// 淡入动画过渡完成后将背景设置为透明色否则png图片会看到灰色的背景
this.backgroundStyle = {
backgroundColor: this.bgColor || '#ffffff'
};
// this.backgroundStyle = {
// backgroundColor: this.bgColor || '#ffffff'
// };
}
}
};
</script>
<style lang="scss" scoped>
@import '../../libs/css/components.scss';
$u-image-error-top:0px !default;
$u-image-error-left:0px !default;
$u-image-error-width:100% !default;