细节优化
This commit is contained in:
@@ -108,5 +108,6 @@ const rowCount = new Array(6).fill(0);
|
|||||||
.container > text:nth-child(5) {
|
.container > text:nth-child(5) {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
word-break: keep-all;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const onClick = () => {
|
|||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
@click="onClick"
|
@click="onClick"
|
||||||
:style="{ transform: 'translateX(' + (mode ? '-58' : '2') + 'rpx)' }"
|
:style="{ transform: 'translateX(' + (mode ? '-58' : '4') + 'rpx)' }"
|
||||||
>
|
>
|
||||||
<text>放大</text>
|
<text>放大</text>
|
||||||
<view :style="{ background: mode ? '#D8D8D8' : '#53EF56' }"></view>
|
<view :style="{ background: mode ? '#D8D8D8' : '#53EF56' }"></view>
|
||||||
@@ -52,6 +52,7 @@ const onClick = () => {
|
|||||||
word-break: keep-all;
|
word-break: keep-all;
|
||||||
padding: 0 12rpx;
|
padding: 0 12rpx;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
transform: translateX(-58rpx);
|
||||||
}
|
}
|
||||||
.point-switcher > view > text:first-child {
|
.point-switcher > view > text:first-child {
|
||||||
color: #53ef56;
|
color: #53ef56;
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ watch(
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
z-index: 99;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
.modal-content {
|
.modal-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ const getRing = (arrow) => {
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
z-index: 5;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
.container-header {
|
.container-header {
|
||||||
margin-top: 20vh;
|
margin-top: 20vh;
|
||||||
|
|||||||
@@ -10,10 +10,13 @@ import {
|
|||||||
loginAPI,
|
loginAPI,
|
||||||
getHomeData,
|
getHomeData,
|
||||||
getPhoneNumberAPI,
|
getPhoneNumberAPI,
|
||||||
|
getDeviceBatteryAPI,
|
||||||
} from "@/apis";
|
} from "@/apis";
|
||||||
|
|
||||||
import useStore from "@/store";
|
import useStore from "@/store";
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const { updateUser, updateDevice } = store;
|
const { updateUser, updateDevice, updateOnline } = store;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
noBg: {
|
noBg: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -94,6 +97,8 @@ const handleLogin = async () => {
|
|||||||
const devices = await getMyDevicesAPI();
|
const devices = await getMyDevicesAPI();
|
||||||
if (devices.bindings && devices.bindings.length) {
|
if (devices.bindings && devices.bindings.length) {
|
||||||
updateDevice(devices.bindings[0].deviceId, devices.bindings[0].deviceName);
|
updateDevice(devices.bindings[0].deviceId, devices.bindings[0].deviceName);
|
||||||
|
const data = await getDeviceBatteryAPI();
|
||||||
|
updateOnline(data.online);
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
props.onClose();
|
props.onClose();
|
||||||
|
|||||||
@@ -108,12 +108,12 @@ onShow(async () => {
|
|||||||
}
|
}
|
||||||
const devices = await getMyDevicesAPI();
|
const devices = await getMyDevicesAPI();
|
||||||
if (devices.bindings && devices.bindings.length) {
|
if (devices.bindings && devices.bindings.length) {
|
||||||
const data = await getDeviceBatteryAPI();
|
|
||||||
updateOnline(data.online);
|
|
||||||
updateDevice(
|
updateDevice(
|
||||||
devices.bindings[0].deviceId,
|
devices.bindings[0].deviceId,
|
||||||
devices.bindings[0].deviceName
|
devices.bindings[0].deviceName
|
||||||
);
|
);
|
||||||
|
const data = await getDeviceBatteryAPI();
|
||||||
|
updateOnline(data.online);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user