From 9326746fe7812bbc78f8c7b11157fec617350edb Mon Sep 17 00:00:00 2001 From: AceDataCloud Date: Sat, 11 Mar 2023 11:21:57 +0800 Subject: [PATCH] add reactive style --- src/assets/scss/_common.scss | 1 + src/components/api/Form.vue | 4 ++++ src/components/console/Navigator.vue | 2 +- src/layouts/Document.vue | 7 +++++++ src/pages/document/Detail.vue | 28 ++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/assets/scss/_common.scss b/src/assets/scss/_common.scss index aa40508d..bbac867d 100644 --- a/src/assets/scss/_common.scss +++ b/src/assets/scss/_common.scss @@ -33,6 +33,7 @@ body { .el-input { .el-input__wrapper { border-radius: 10px; + width: 100%; } } diff --git a/src/components/api/Form.vue b/src/components/api/Form.vue index 6f411e6d..6abed57c 100644 --- a/src/components/api/Form.vue +++ b/src/components/api/Form.vue @@ -54,6 +54,7 @@ :clearable="true" :filterable="true" :allow-create="true" + class="w-full" :placeholder="$t('common.title.placeholderOfSelect')" > @@ -81,6 +83,7 @@ v-else-if="item?.type === 'boolean'" v-model="value[itemKey?.toString()]" clearable + class="w-full" :placeholder="$t('common.title.placeholderOfSelect')" > @@ -92,6 +95,7 @@ :clearable="true" :filterable="true" :allow-create="true" + class="w-full" :placeholder="$t('common.title.placeholderOfInput')" > diff --git a/src/components/console/Navigator.vue b/src/components/console/Navigator.vue index c2ddcda8..98122927 100644 --- a/src/components/console/Navigator.vue +++ b/src/components/console/Navigator.vue @@ -105,7 +105,7 @@ export default defineComponent({ name: link.name }); } else if (link.href) { - window.location.href = link.href; + window.open(link.href, '_blank'); } } } diff --git a/src/layouts/Document.vue b/src/layouts/Document.vue index 83ebf0b3..ceee511c 100644 --- a/src/layouts/Document.vue +++ b/src/layouts/Document.vue @@ -51,6 +51,8 @@ export default { } .main { + max-width: 2000px; + margin: auto; .left { float: left; width: 280px; @@ -58,5 +60,10 @@ export default { padding: 30px; box-shadow: 1px 0 0 #eee; } + @media (max-width: 999px) { + .left { + display: none; + } + } } diff --git a/src/pages/document/Detail.vue b/src/pages/document/Detail.vue index 3156ba5e..a8b0e862 100644 --- a/src/pages/document/Detail.vue +++ b/src/pages/document/Detail.vue @@ -140,4 +140,32 @@ export default defineComponent({ padding: 30px; box-shadow: -1px 0 0 #eee; } + +@media (max-width: 1400px) { + .center { + width: calc(100% - 620px); + } + .right { + width: 340px; + } +} + +@media (max-width: 1399px) and (min-width: 1000px) { + .center { + width: calc(100% - 280px); + } + .right { + display: none; + } +} + +@media (max-width: 999px) { + .center { + width: 100%; + } + + .right { + display: none; + } +}