diff --git a/src/assets/style/_base.scss b/src/assets/style/_base.scss index a49fe3c06a67a916de8b8c84f2f1407190742ec0..cfbef46b261d75c9a2ce7bfbb1f555ae5d8d913d 100644 --- a/src/assets/style/_base.scss +++ b/src/assets/style/_base.scss @@ -530,3 +530,93 @@ textarea:-ms-input-placeholder { page-break-before: avoid; } } + +//间距 +$size-map: ( + -2: -2px, + 4: 4px, + 5: 5px, + 8: 8px, + 10: 10px, + 12: 12px, + 15: 15px, + 16: 16px, + 20: 20px, + 24: 24px, + 25: 25px, + 30: 30px, + 32: 32px, + 40: 40px, + 50: 50px, + 80: 80px, + 140: 140px +); + +@each $name in map-keys($size-map) { + $value: map-get($size-map, $name); + + .mt-#{$name} { + margin-top: $value; + } + + .mr-#{$name} { + margin-right: $value; + } + + .mb-#{$name} { + margin-bottom: $value; + } + + .ml-#{$name} { + margin-left: $value; + } + + .margin-#{$name} { + margin: $value; + } + + .pt-#{$name} { + padding-top: $value !important; + } + + .pr-#{$name} { + padding-right: $value; + } + + .pb-#{$name} { + padding-bottom: $value; + } + + .pl-#{$name} { + padding-left: $value; + } + + .pd-#{$name} { + padding: $value; + } +} + +//字号 +$font-map: ( + 10: 10px, + 11: 11px, + 14: 14px, + 15: 15px, + 18: 18px, + 20: 20px, + 24: 24px, + 25: 25px, + 30: 30px, + 36: 36px, + 40: 40px, + 50: 50px, + 80: 80px, + 140: 140px +); +@each $size in map-keys($font-map) { + $value: map-get($font-map, $size); + + .font-#{$size} { + font-size: $value; + } +} diff --git a/src/layouts/components/NavBar/index.vue b/src/layouts/components/NavBar/index.vue index 0c89b4441a83743b3e2fd7fec11a5595b5980721..1c2c9357dc8d5c525f5c72bfd40eff8ae89c3773 100644 --- a/src/layouts/components/NavBar/index.vue +++ b/src/layouts/components/NavBar/index.vue @@ -14,27 +14,21 @@ :class="['font', index == fontIndex ? 'active' : '']" @click="changeFont(index)" > -