|
@@ -2,11 +2,18 @@
|
|
|
import { magicApi } from "@/utils/database/magic-api-request";
|
|
|
import { useResizeObserver } from "@vueuse/core";
|
|
|
import { stringIsBlank } from "@/utils/blank-utils";
|
|
|
+import {
|
|
|
+ InpatientBoardKey,
|
|
|
+ type InpatientBoardType,
|
|
|
+} from "@/views/single-page/InpatientBoardV2/index";
|
|
|
+import XEUtils from "xe-utils";
|
|
|
|
|
|
defineOptions({
|
|
|
name: "RenderTable",
|
|
|
});
|
|
|
|
|
|
+const root = inject(InpatientBoardKey) as InpatientBoardType;
|
|
|
+
|
|
|
const props = defineProps<{
|
|
|
htmlData: string;
|
|
|
wardCode: string;
|
|
@@ -80,11 +87,16 @@ async function replace(query = true) {
|
|
|
td.innerHTML = "";
|
|
|
td.appendChild(marqueeDiv);
|
|
|
|
|
|
- const timePerCharacter = 0.2;
|
|
|
+ const timePerCharacter = XEUtils.toNumber(
|
|
|
+ `${root.urlQuery.tableDisplay}`
|
|
|
+ );
|
|
|
const totalCharacters = td.textContent.length;
|
|
|
const totalDuration = totalCharacters * timePerCharacter;
|
|
|
|
|
|
- marqueeDiv.style.setProperty("--translate-second", `${totalDuration}s`);
|
|
|
+ marqueeDiv.style.setProperty(
|
|
|
+ "--translate-second",
|
|
|
+ `${totalDuration * 0.05}s`
|
|
|
+ );
|
|
|
}
|
|
|
});
|
|
|
}
|