fix: 预览前台改用<a>标签避免弹窗拦截
- window.open 被浏览器弹窗拦截器阻止 - 改为 <a href="/" target="_blank"> 确保所有浏览器正常工作
This commit is contained in:
@@ -60,9 +60,11 @@
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="6">
|
||||
<el-button class="action-btn" @click="() => window.open('/', '_blank')">
|
||||
<a href="/" target="_blank" class="action-btn-link">
|
||||
<el-button class="action-btn">
|
||||
<el-icon><View /></el-icon> 预览前台
|
||||
</el-button>
|
||||
</a>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -137,6 +139,7 @@ onMounted(async () => {
|
||||
.stat-item .num { display: block; font-size: 36px; font-weight: 700; color: #6366f1; margin-bottom: 8px; }
|
||||
.stat-item .label { color: #888; font-size: 14px; }
|
||||
.action-btn { width: 100%; }
|
||||
.action-btn-link { display: block; text-decoration: none; }
|
||||
.table-wrap { overflow-x: auto; }
|
||||
.dashboard-loading { padding: 20px; }
|
||||
.chart-container {
|
||||
|
||||
Reference in New Issue
Block a user