diff --git a/src/components/CodemirrorEditor/CssEditor.vue b/src/components/CodemirrorEditor/CssEditor.vue index 9922e4c..1cdf761 100644 --- a/src/components/CodemirrorEditor/CssEditor.vue +++ b/src/components/CodemirrorEditor/CssEditor.vue @@ -20,6 +20,10 @@ function handleTabsEdit(targetName, action) { } else if (action === `remove`) { const tabs = store.cssContentConfig.tabs + if (tabs.length === 1) { + ElMessage.warning(`至少保留一个方案`) + return + } let activeName = store.cssContentConfig.active if (activeName === targetName) { tabs.forEach((tab, index) => {