fix ts
This commit is contained in:
@@ -457,7 +457,7 @@ async function reloadCommandList() {
|
||||
for (const obj of result.turn) {
|
||||
const [year, month] = parseYearMonth(yearMonth);
|
||||
let tooltip: string[] = [];
|
||||
let style: Record<string, unknown> = {};
|
||||
let style: Record<string, string> = {};
|
||||
|
||||
const brief = obj.brief;
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ type TurnObjWithTime = TurnObj & {
|
||||
year?: number;
|
||||
month?: number;
|
||||
tooltip?: string;
|
||||
style?: Record<string, unknown>;
|
||||
style?: Record<string, string>;
|
||||
};
|
||||
|
||||
const props = defineProps({
|
||||
@@ -490,7 +490,7 @@ function updateCommandList() {
|
||||
for (const obj of props.turn) {
|
||||
const [year, month] = parseYearMonth(yearMonth);
|
||||
let tooltip: string[] = [];
|
||||
let style: Record<string, unknown> = {};
|
||||
let style: Record<string, string> = {};
|
||||
|
||||
const brief = obj.brief;
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@ exportWindow(jQuery, '$');
|
||||
|
||||
|
||||
htmlReady(() => {
|
||||
for(const refreshBtn of document.querySelectorAll('.refreshPage')){
|
||||
document.querySelectorAll('.refreshPage').forEach(refreshBtn => {
|
||||
refreshBtn.addEventListener('click', function () {
|
||||
document.location.reload();
|
||||
return false;
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
for(const openWindowBtn of document.querySelectorAll('.open-window')){
|
||||
document.querySelectorAll('.open-window').forEach(openWindowBtn => {
|
||||
openWindowBtn.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
console.log(e);
|
||||
@@ -36,7 +36,7 @@ htmlReady(() => {
|
||||
|
||||
window.open((target as HTMLAnchorElement).href);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
activateFlip();
|
||||
initTooltip();
|
||||
|
||||
+1
-1
@@ -189,7 +189,7 @@ export async function reloadWorldMap(option: loadMapOption, drawTarget = '.world
|
||||
async function setMapBackground(obj: MapResult): Promise<MapResult> {
|
||||
function setTheme() {
|
||||
const oldTheme = $world_map.data('currentTheme');
|
||||
const newTheme = obj.theme;
|
||||
const newTheme = (obj as unknown as Record<string, string>).theme;
|
||||
if (oldTheme === newTheme) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ type TurnObjWithTime = TurnObj & {
|
||||
year?: number;
|
||||
month?: number;
|
||||
tooltip?: string;
|
||||
style?: Record<string, unknown>;
|
||||
style?: Record<string, string>;
|
||||
};
|
||||
|
||||
export const getEmptyTurn = (maxTurn: number): TurnObjWithTime[] => Array.from<TurnObjWithTime>({
|
||||
|
||||
Reference in New Issue
Block a user