refactor: common_ts 분리 후 일괄 로드
This commit is contained in:
+12
-12
@@ -1,30 +1,30 @@
|
||||
import $ from 'jquery';
|
||||
import 'bootstrap';
|
||||
import { reloadWorldMap } from '@/map';
|
||||
import { htmlReady } from './util/htmlReady';
|
||||
import { unwrap } from './util/unwrap';
|
||||
|
||||
declare global{
|
||||
interface Window{
|
||||
fitIframe:()=>void;
|
||||
declare global {
|
||||
interface Window {
|
||||
fitIframe: () => void;
|
||||
}
|
||||
}
|
||||
|
||||
$(function($){
|
||||
htmlReady(function () {
|
||||
console.log('haha');
|
||||
void reloadWorldMap({
|
||||
targetJson: "j_map_recent.php",
|
||||
reqType: 'get',
|
||||
dynamicMapTheme: true,
|
||||
callback: function(data, rawObject) {
|
||||
callback: function (data, rawObject) {
|
||||
const historyRaw = rawObject as unknown as {
|
||||
history: string
|
||||
};
|
||||
$('.card-body').html(historyRaw.history);
|
||||
unwrap(document.querySelector('.card-body')).innerHTML = historyRaw.history;
|
||||
|
||||
if(window.parent !== window){
|
||||
setTimeout(()=>{
|
||||
if (window.parent !== window) {
|
||||
setTimeout(() => {
|
||||
window.parent.fitIframe();
|
||||
}, 1);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user