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

修改页面title

parent 4dd5da06
...@@ -8,7 +8,7 @@ set (CMAKE_CXX_STANDARD 11) ...@@ -8,7 +8,7 @@ set (CMAKE_CXX_STANDARD 11)
# Version. # Version.
set (MAJOR_VERSION "1") set (MAJOR_VERSION "1")
set (MINOR_VERSION "2") set (MINOR_VERSION "2")
set (PATCH_VERSION "7") set (PATCH_VERSION "8")
# Import cmake modules. # Import cmake modules.
list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}") list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}")
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title> <title>truck-view</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
...@@ -162,7 +162,7 @@ const { appContext } = instance; ...@@ -162,7 +162,7 @@ const { appContext } = instance;
const { $indexRoot } = appContext.config.globalProperties; const { $indexRoot } = appContext.config.globalProperties;
const vehicleStore = useVehicleStore(); const vehicleStore = useVehicleStore();
const vehicleStoreToRefs = storeToRefs(vehicleStore); const vehicleStoreToRefs = storeToRefs(vehicleStore);
const { tipInfo, infoPop } = vehicleStoreToRefs; const { tipInfo, infoPop, pairinfo } = vehicleStoreToRefs;
onBeforeMount(() => { onBeforeMount(() => {
window.addEventListener("beforeunload", () => { window.addEventListener("beforeunload", () => {
...@@ -348,6 +348,20 @@ watch( ...@@ -348,6 +348,20 @@ watch(
} }
); );
watch(
pairinfo,
(msg) => {
if (msg) {
let { truckId } = msg;
window.document.title = truckId || 'truck-view';
}
},
{
deep: true,
immediate: true,
}
);
onBeforeUnmount(() => { onBeforeUnmount(() => {
$indexRoot.destroyData(); $indexRoot.destroyData();
window.removeEventListener("beforeunload", handleSubscribe()); 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