From aa5765971e1506bb6373b3b72461c0e2109b8dac Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 7 Mar 2020 13:21:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=80=89=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/assets/styles/variables.less | 2 ++ src/renderer/components/material/Btn.vue | 2 +- src/renderer/components/material/FlowBtn.vue | 2 +- src/renderer/components/material/Input.vue | 2 +- .../components/material/ListButtons.vue | 2 +- .../components/material/SearchInput.vue | 2 +- .../components/material/Selection.vue | 36 +++++++++++++++---- 7 files changed, 36 insertions(+), 12 deletions(-) diff --git a/src/renderer/assets/styles/variables.less b/src/renderer/assets/styles/variables.less index 2c526a9f..b33da89b 100644 --- a/src/renderer/assets/styles/variables.less +++ b/src/renderer/assets/styles/variables.less @@ -578,3 +578,5 @@ @radius-progress-border: 5px; @transition-theme: .4s ease; + +@form-radius: 3px; diff --git a/src/renderer/components/material/Btn.vue b/src/renderer/components/material/Btn.vue index 45811c1a..f464d7bd 100644 --- a/src/renderer/components/material/Btn.vue +++ b/src/renderer/components/material/Btn.vue @@ -24,7 +24,7 @@ export default { .btn { display: inline-block; border: none; - border-radius: 3px; + border-radius: @form-radius; cursor: pointer; padding: 8px 15px; color: @color-btn; diff --git a/src/renderer/components/material/FlowBtn.vue b/src/renderer/components/material/FlowBtn.vue index 65d6b28c..56a270a3 100644 --- a/src/renderer/components/material/FlowBtn.vue +++ b/src/renderer/components/material/FlowBtn.vue @@ -78,7 +78,7 @@ export default { button { background-color: transparent; border: none; - border-radius: 3px; + border-radius: @form-radius; margin-right: 5px; cursor: pointer; padding: 4px 7px; diff --git a/src/renderer/components/material/Input.vue b/src/renderer/components/material/Input.vue index 80102493..478e12e2 100644 --- a/src/renderer/components/material/Input.vue +++ b/src/renderer/components/material/Input.vue @@ -49,7 +49,7 @@ export default { .input { display: inline-block; border: none; - border-radius: 3px; + border-radius: @form-radius; padding: 7px 8px; color: @color-btn; outline: none; diff --git a/src/renderer/components/material/ListButtons.vue b/src/renderer/components/material/ListButtons.vue index 62c68346..baf9e72f 100644 --- a/src/renderer/components/material/ListButtons.vue +++ b/src/renderer/components/material/ListButtons.vue @@ -91,7 +91,7 @@ export default { button { background-color: transparent; border: none; - border-radius: 3px; + border-radius: @form-radius; margin-right: 5px; cursor: pointer; padding: 4px 7px; diff --git a/src/renderer/components/material/SearchInput.vue b/src/renderer/components/material/SearchInput.vue index cbfa3ccd..c9e19cd0 100644 --- a/src/renderer/components/material/SearchInput.vue +++ b/src/renderer/components/material/SearchInput.vue @@ -133,7 +133,7 @@ export default { @import '../../assets/styles/layout.less'; .search { - border-radius: 3px; + border-radius: @form-radius; transition: box-shadow .4s ease, background-color @transition-theme; display: flex; flex-flow: column nowrap; diff --git a/src/renderer/components/material/Selection.vue b/src/renderer/components/material/Selection.vue index 8cf08817..49b1e282 100644 --- a/src/renderer/components/material/Selection.vue +++ b/src/renderer/components/material/Selection.vue @@ -2,7 +2,7 @@ div(:class="[$style.select, show ? $style.active : '']") div(:class="$style.label" ref="dom_btn" @click="handleShow") {{label}} ul(:class="$style.list") - li(v-for="item in list" @click="handleClick(item)" :title="itemName ? item[itemName] : item") {{itemName ? item[itemName] : item}} + li(v-for="item in list" :class="(itemKey ? item[itemKey] : item) == value ? $style.active : null" @click="handleClick(item)" :title="itemName ? item[itemName] : item") {{itemName ? item[itemName] : item}}