feat:设备使用记录
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @version : 3.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:01:51
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/image.js
|
||||
* @LastAuthor : jry
|
||||
* @lastTime : 2025-12-19 08:55:21
|
||||
* @FilePath : /uview-plus/libs/config/props/image.js
|
||||
*/
|
||||
export default {
|
||||
// image组件
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user