chore(admin-ui): add css cache busting by filemtime
This commit is contained in:
@@ -4,9 +4,16 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>@yield('title', 'SaaSShop 总台管理')</title>
|
||||
<link rel="stylesheet" href="/css/admin-theme.css">
|
||||
<link rel="stylesheet" href="/css/admin-base.css">
|
||||
<link rel="stylesheet" href="/css/admin-components.css">
|
||||
@php
|
||||
// 资产缓存护栏:避免浏览器缓存导致“样式已修复但页面仍旧错位”的体感。
|
||||
// 说明:使用 filemtime 作为版本号,不引入构建链;文件更新即自动换 query。
|
||||
$cssVerTheme = @filemtime(public_path('css/admin-theme.css')) ?: time();
|
||||
$cssVerBase = @filemtime(public_path('css/admin-base.css')) ?: time();
|
||||
$cssVerComponents = @filemtime(public_path('css/admin-components.css')) ?: time();
|
||||
@endphp
|
||||
<link rel="stylesheet" href="/css/admin-theme.css?v={{ $cssVerTheme }}">
|
||||
<link rel="stylesheet" href="/css/admin-base.css?v={{ $cssVerBase }}">
|
||||
<link rel="stylesheet" href="/css/admin-components.css?v={{ $cssVerComponents }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layout layout-topnav">
|
||||
|
||||
Reference in New Issue
Block a user