diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 102a4d95..d6b18348 100755 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -131,6 +131,12 @@ module.exports = { "default-case-last": "off", "no-useless-constructor": "off", // private constructor() { } 你跟我说无用? "no-multiple-empty-lines": ["error", { max: 1, maxEOF: 0, maxBOF: 0 }], + "no-unused-expressions": ["error", { + allowShortCircuit: true, + allowTernary: true, + allowTaggedTemplates: true, + enforceForJSX: true, + }], "import/order": "off", // 与 VSCode 内置导入排序特性打架。 "import/first": "off", // 与 Vue 特性冲突。 "import/named": "off", // 与 TypeScript 特性冲突。 diff --git a/assets/styles/theme/_effects.scss b/assets/styles/theme/_effects.scss index cbb75e0e..c6ef9418 100755 --- a/assets/styles/theme/_effects.scss +++ b/assets/styles/theme/_effects.scss @@ -118,6 +118,12 @@ @mixin acrylic-background { background-color: c(acrylic-bg, 75%); } + +@mixin accent-ripple { + :deep(.ripple-circle) { + background-color: c(accent-ripple); + } +} // #endregion // #region 主要主题色 diff --git a/components/Accordion/AccordionItem.vue b/components/Accordion/AccordionItem.vue index a989233d..da94bc79 100755 --- a/components/Accordion/AccordionItem.vue +++ b/components/Accordion/AccordionItem.vue @@ -134,13 +134,11 @@ } html:not(.dark) & { + @include accent-ripple; + .right :deep(.soft-button) { --active: true; } - - :deep(.ripple-circle) { - background-color: c(accent-ripple); - } } } } diff --git a/components/Button.vue b/components/Button.vue index 90a377ae..8b764943 100755 --- a/components/Button.vue +++ b/components/Button.vue @@ -106,7 +106,7 @@ button[disabled] > & { background-color: c(accent-disabled) !important; box-shadow: none !important; - + html.dark & :is(.caption, .icon) { opacity: 0.4; } @@ -136,14 +136,11 @@ color: inherit; } } - + @container style(--appearance: secondary) { + @include accent-ripple; color: c(accent); - :deep(.ripple-circle) { - background-color: c(accent-ripple); - } - button:any-hover > &, button:active > & { background-color: c(accent-hover-overlay); @@ -161,7 +158,7 @@ @container style(--appearance: tertiary) { color: c(icon-color); - + button:any-hover > &, button:active > & { background-color: c(hover-overlay); @@ -237,7 +234,7 @@ button.icon-behind { --icon-behind: true; } - + .progress-bar:deep { position: absolute !important; bottom: 0; @@ -248,11 +245,11 @@ translate: -50%; background-color: transparent; } - + button:not([disabled]) & .line { background-color: white; } - + &.v-enter-from, &.v-leave-to { height: 0; diff --git a/components/CheckCard.vue b/components/CheckCard.vue index 20bd6928..383407c0 100644 --- a/components/CheckCard.vue +++ b/components/CheckCard.vue @@ -15,8 +15,9 @@