细节优化
This commit is contained in:
@@ -11,7 +11,7 @@ import { storeToRefs } from "pinia";
|
||||
const store = useStore();
|
||||
const { updateConfig, updateUser, updateDevice } = store;
|
||||
// 使用storeToRefs,用于UI里显示,保持响应性
|
||||
const { user } = storeToRefs(store);
|
||||
const { user, device } = storeToRefs(store);
|
||||
const showModal = ref(false);
|
||||
|
||||
const toPage = (path) => {
|
||||
@@ -68,7 +68,9 @@ onMounted(async () => {
|
||||
mode="widthFix"
|
||||
@click="() => toPage('/pages/my-device')"
|
||||
/>
|
||||
<text>我的弓箭</text>
|
||||
<text>{{
|
||||
user.id && !device.deviceId ? "请绑定设备" : "我的弓箭"
|
||||
}}</text>
|
||||
<image
|
||||
src="../static/a2@2x.png"
|
||||
mode="widthFix"
|
||||
@@ -151,7 +153,7 @@ onMounted(async () => {
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<AppFooter />
|
||||
<AppFooter :signin="() => (showModal = true)" />
|
||||
<SModal :show="showModal" :onClose="() => (showModal = false)">
|
||||
<Signin :onClose="() => (showModal = false)" />
|
||||
</SModal>
|
||||
|
||||
Reference in New Issue
Block a user