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