Commit f2416620 authored by 李玲燕's avatar 李玲燕

修改页面title

parent 4dd5da06
......@@ -8,7 +8,7 @@ set (CMAKE_CXX_STANDARD 11)
# Version.
set (MAJOR_VERSION "1")
set (MINOR_VERSION "2")
set (PATCH_VERSION "7")
set (PATCH_VERSION "8")
# Import cmake modules.
list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}")
......
......@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
<title>truck-view</title>
</head>
<body>
<div id="app"></div>
......
......@@ -162,7 +162,7 @@ const { appContext } = instance;
const { $indexRoot } = appContext.config.globalProperties;
const vehicleStore = useVehicleStore();
const vehicleStoreToRefs = storeToRefs(vehicleStore);
const { tipInfo, infoPop } = vehicleStoreToRefs;
const { tipInfo, infoPop, pairinfo } = vehicleStoreToRefs;
onBeforeMount(() => {
window.addEventListener("beforeunload", () => {
......@@ -348,6 +348,20 @@ watch(
}
);
watch(
pairinfo,
(msg) => {
if (msg) {
let { truckId } = msg;
window.document.title = truckId || 'truck-view';
}
},
{
deep: true,
immediate: true,
}
);
onBeforeUnmount(() => {
$indexRoot.destroyData();
window.removeEventListener("beforeunload", handleSubscribe());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment