Files
shoot-miniprograms/src/components/Header.vue

59 lines
1.0 KiB
Vue
Raw Normal View History

2025-05-01 21:38:35 +08:00
<script setup>
2025-06-08 13:55:09 +08:00
import useStore from "@/store";
import { simulShootAPI } from "@/apis";
import { storeToRefs } from "pinia";
const store = useStore();
const { device } = storeToRefs(store);
2025-05-01 21:38:35 +08:00
defineProps({
title: {
type: String,
default: "",
},
});
2025-06-08 13:55:09 +08:00
const simulShoot = async () => {
if (device.value.deviceId) {
await simulShootAPI(device.value.deviceId);
}
};
2025-05-01 21:38:35 +08:00
</script>
<template>
<view class="container">
<navigator open-type="navigateBack" class="back-btn">
<image src="../static/back.png" mode="widthFix" />
</navigator>
<text>{{ title }}</text>
2025-06-08 13:55:09 +08:00
<view class="simul" @click="simulShoot">S</view>
2025-05-01 21:38:35 +08:00
</view>
</template>
<style scoped>
.container {
display: flex;
justify-content: flex-start;
align-items: center;
width: 72vw;
height: 60px;
padding-left: 15px;
padding-top: 36px;
}
.back-btn {
display: flex;
align-items: center;
}
.back-btn > image {
width: 22px;
height: 22px;
margin-right: 10px;
}
.container > text {
color: #fff;
}
2025-06-08 13:55:09 +08:00
.simul {
color: #fff;
margin-left: 20px;
}
2025-05-01 21:38:35 +08:00
</style>