vue 사용 가능 확인

This commit is contained in:
2021-08-14 05:44:13 +09:00
parent 7c2e2c9c59
commit 322d9e5fe3
7 changed files with 52 additions and 7 deletions
+6 -2
View File
@@ -43,6 +43,8 @@ foreach(array_keys(General::INHERITANCE_KEY) as $key){
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" />
<?= WebUtil::preloadCSS('css/inheritPoint.css') ?>
<?= WebUtil::preloadJS('js/inheritPoint.js') ?>
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../css/config.css') ?>
@@ -52,14 +54,13 @@ foreach(array_keys(General::INHERITANCE_KEY) as $key){
<?= WebUtil::printJS('../e_lib/jquery-3.3.1.min.js') ?>
<?= WebUtil::printJS('../e_lib/bootstrap.bundle.min.js') ?>
<?= WebUtil::printJS('js/common.js') ?>
<?= WebUtil::printJS('js/inheritPoint.js') ?>
<script>
var items = <?=Json::encode($items)?>;
var helpText = <?=Json::encode($pointHelpText)?>;
</script>
</head>
<body onload="formStart()">
<body>
<table style='width:1000px;margin:auto;' class='tb_layout bg0'>
<tr>
@@ -126,6 +127,9 @@ foreach(array_keys(General::INHERITANCE_KEY) as $key){
<?php endforeach; ?>
</div>
</div>
<div id="app"></div>
<?= WebUtil::printJS('js/inheritPoint.js') ?>
</body>
</html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -37,4 +37,4 @@ function formStart() {
}
}
window.formStart = formStart;
formStart();
+6
View File
@@ -0,0 +1,6 @@
/* eslint-disable */
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
+1 -2
View File
@@ -38,8 +38,7 @@
"sass-loader": "^12.1.0",
"style-loader": "^3.2.1",
"typescript": "^4.3.5",
"vue-loader": "^15.9.8",
"vue-style-loader": "^4.1.3",
"vue-loader": "^16.5.0",
"webpack": "^5.49.0",
"webpack-cli": "^4.7.2"
},
+36
View File
@@ -103,6 +103,42 @@ class WebUtil
return $decoded;
}
public static function preloadCSS(string $path){
$upath = \phpUri::parse($path);
$path = $upath->join('');
if(!$upath->scheme && file_exists($upath->path)){
$mtime = filemtime($upath->path);
if($upath->query){
$tail = '&'.$mtime;
}
else{
$tail = '?'.$mtime;
}
}
else{
$tail = '';
}
return "<link href='{$path}{$tail}' rel='preload' as='style'>\n";
}
public static function preloadJS(string $path){
$upath = \phpUri::parse($path);
$path = $upath->join('');
if(!$upath->scheme && file_exists($upath->path)){
$mtime = filemtime($upath->path);
if($upath->query){
$tail = '&'.$mtime;
}
else{
$tail = '?'.$mtime;
}
}
else{
$tail = '';
}
return "<link href='{$path}{$tail}' rel='preload' as='script'>\n";
}
public static function printJS(string $path){
//async, defer 옵션 고려
$upath = \phpUri::parse($path);