update:优化
This commit is contained in:
@@ -14,8 +14,13 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: "normal",
|
default: "normal",
|
||||||
},
|
},
|
||||||
|
contentHeight: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const getContentHeight = () => {
|
const getContentHeight = () => {
|
||||||
|
if (props.contentHeight) return props.contentHeight;
|
||||||
if (props.mode === "tall") return "50vw";
|
if (props.mode === "tall") return "50vw";
|
||||||
if (props.mode === "square") return "74vw";
|
if (props.mode === "square") return "74vw";
|
||||||
return "36vw";
|
return "36vw";
|
||||||
@@ -82,8 +87,7 @@ const getContentHeight = () => {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
width: 80vw;
|
width: 80vw;
|
||||||
left: -7%;
|
left: -7%;
|
||||||
bottom: -18vw;
|
bottom: -8rpx;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
transform: translateY(-75px);
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -655,7 +655,11 @@ onShow(async () => {
|
|||||||
</view>
|
</view>
|
||||||
</ModalDialog>
|
</ModalDialog>
|
||||||
|
|
||||||
<ScreenHint :show="confirmBindTip" :onClose="closeConfirmBindTip">
|
<ScreenHint
|
||||||
|
:show="confirmBindTip"
|
||||||
|
:onClose="closeConfirmBindTip"
|
||||||
|
contentHeight="360rpx"
|
||||||
|
>
|
||||||
<view class="confirm-bind">
|
<view class="confirm-bind">
|
||||||
<text>智能弓箭和系统账号需一一对应,你确定要将当前登录用户账号绑定这把弓箭吗?绑定后不可随意更换。</text>
|
<text>智能弓箭和系统账号需一一对应,你确定要将当前登录用户账号绑定这把弓箭吗?绑定后不可随意更换。</text>
|
||||||
<view class="confirm-actions">
|
<view class="confirm-actions">
|
||||||
@@ -1319,6 +1323,10 @@ onShow(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.confirm-bind {
|
.confirm-bind {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 100rpx;
|
||||||
|
transform: translateY(24rpx);
|
||||||
color: rgba(255, 255, 255, 0.7);
|
color: rgba(255, 255, 255, 0.7);
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
line-height: 42rpx;
|
line-height: 42rpx;
|
||||||
|
|||||||
+24
-1
@@ -69,6 +69,11 @@ const deviceCardAssets = {
|
|||||||
|
|
||||||
const deviceCardAsset = computed(() => deviceCardAssets[deviceCardState.value]);
|
const deviceCardAsset = computed(() => deviceCardAssets[deviceCardState.value]);
|
||||||
|
|
||||||
|
// 二代设备支持充电时保持开机,仅在设备在线且状态明确为充电中时展示充电标识。
|
||||||
|
const isDeviceCharging = computed(
|
||||||
|
() => deviceCardState.value === "online" && deviceStatus.value?.charging === true
|
||||||
|
);
|
||||||
|
|
||||||
// OTA 相关
|
// OTA 相关
|
||||||
const otaVisible = ref(false);
|
const otaVisible = ref(false);
|
||||||
const wifiRequiredVisible = ref(false);
|
const wifiRequiredVisible = ref(false);
|
||||||
@@ -525,6 +530,7 @@ onShareTimeline(() => {
|
|||||||
<view
|
<view
|
||||||
v-if="user.id && deviceCardState === 'online'"
|
v-if="user.id && deviceCardState === 'online'"
|
||||||
class="device-status-badge device-status-badge--online"
|
class="device-status-badge device-status-badge--online"
|
||||||
|
:class="{ 'device-status-badge--charging': isDeviceCharging }"
|
||||||
@click.stop="$clickSound(() => toPage('/pages/device/my-device'))"
|
@click.stop="$clickSound(() => toPage('/pages/device/my-device'))"
|
||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
@@ -541,6 +547,12 @@ onShareTimeline(() => {
|
|||||||
/>
|
/>
|
||||||
<text class="device-battery-text">{{ deviceBattery === null ? "--" : deviceBattery }}</text>
|
<text class="device-battery-text">{{ deviceBattery === null ? "--" : deviceBattery }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="isDeviceCharging"
|
||||||
|
class="device-charging-icon"
|
||||||
|
src="/static/device-charging.png"
|
||||||
|
mode="aspectFit"
|
||||||
|
/>
|
||||||
<image
|
<image
|
||||||
class="device-status-icon device-status-icon--online"
|
class="device-status-icon device-status-icon--online"
|
||||||
src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-state-dot--online.png"
|
src="https://static.shelingxingqiu.com/shootmini/static/home-device/device-state-dot--online.png"
|
||||||
@@ -806,6 +818,10 @@ onShareTimeline(() => {
|
|||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.device-status-badge--charging .device-status-icon--online {
|
||||||
|
margin-left: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.device-status-icon {
|
.device-status-icon {
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
@@ -837,11 +853,18 @@ onShareTimeline(() => {
|
|||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.device-charging-icon {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 15rpx;
|
||||||
|
height: 20rpx;
|
||||||
|
margin-left: 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
/* 文字容器只覆盖电池主体(60rpx),避开右侧凸起,使数字在框内水平垂直居中。 */
|
/* 文字容器只覆盖电池主体(60rpx),避开右侧凸起,使数字在框内水平垂直居中。 */
|
||||||
.device-battery-text {
|
.device-battery-text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 9rpx;
|
top: 9rpx;
|
||||||
left: 0x;
|
left: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 411 B |
Reference in New Issue
Block a user