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