feat: 布局调整&卡片组件调整

This commit is contained in:
baiqi 2023-07-26 19:04:36 +08:00 committed by fit2-zhao
parent bf3eb37148
commit f428fda5dc
4 changed files with 26 additions and 21 deletions

View File

@ -452,20 +452,21 @@
/** 滚动条 **/ /** 滚动条 **/
.arco-scrollbar-track-direction-horizontal { .arco-scrollbar-track-direction-horizontal {
height: 8px; margin-bottom: 4px;
height: 6px;
.arco-scrollbar-thumb-bar { .arco-scrollbar-thumb-bar {
@apply m-0; @apply m-0;
height: 8px; height: 6px;
background-color: var(--color-text-input-border); background-color: var(--color-text-input-border);
} }
} }
.arco-scrollbar-track-direction-vertical { .arco-scrollbar-track-direction-vertical {
width: 8px; width: 6px;
.arco-scrollbar-thumb-bar { .arco-scrollbar-thumb-bar {
@apply m-0; @apply m-0;
width: 8px; width: 6px;
background-color: var(--color-text-input-border); background-color: var(--color-text-input-border);
} }
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<a-form ref="formRef" :model="form" layout="vertical"> <a-form ref="formRef" :model="form" layout="vertical">
<div class="mb-[16px] overflow-y-auto rounded-[4px] bg-[var(--color-fill-1)] p-[12px]"> <div class="mb-[16px] min-w-[732px] overflow-y-auto rounded-[4px] bg-[var(--color-fill-1)] p-[12px]">
<a-scrollbar class="overflow-y-auto" :style="{ 'max-height': props.maxHeight }"> <a-scrollbar class="overflow-y-auto" :style="{ 'max-height': props.maxHeight }">
<div class="flex flex-wrap items-start justify-between gap-[8px]"> <div class="flex flex-wrap items-start justify-between gap-[8px]">
<template v-for="(item, i) of form.list" :key="`form-item-${i}`"> <template v-for="(item, i) of form.list" :key="`form-item-${i}`">

View File

@ -1,6 +1,6 @@
<template> <template>
<a-spin class="block h-full" :loading="props.loading" :size="28"> <a-spin class="block h-full" :loading="props.loading" :size="28">
<div class="relative h-full pr-[10px]"> <div class="ms-card relative h-full pr-[10px]">
<div v-if="!simple" class="card-header"> <div v-if="!simple" class="card-header">
<div class="back-btn" @click="back"><icon-arrow-left /></div> <div class="back-btn" @click="back"><icon-arrow-left /></div>
<div class="text-[var(--color-text-000)]">{{ props.title }}</div> <div class="text-[var(--color-text-000)]">{{ props.title }}</div>
@ -11,6 +11,7 @@
class="pr-[10px]" class="pr-[10px]"
:style="{ :style="{
overflowY: 'auto', overflowY: 'auto',
minWidth: 1000,
height: `calc(100vh - ${256 + specialHeight}px)`, height: `calc(100vh - ${256 + specialHeight}px)`,
}" }"
> >
@ -39,8 +40,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useI18n } from '@/hooks/useI18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useI18n } from '@/hooks/useI18n';
const props = withDefaults( const props = withDefaults(
defineProps< defineProps<
@ -78,20 +79,25 @@
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.card-header { .ms-card {
@apply flex items-center; .card-header {
.back-btn { @apply flex items-center;
@apply flex cursor-pointer items-center rounded-full; .back-btn {
@apply flex cursor-pointer items-center rounded-full;
margin-right: 8px; margin-right: 8px;
width: 20px; width: 20px;
height: 20px; height: 20px;
border: 1px solid #ffffff; border: 1px solid #ffffff;
background: linear-gradient(90deg, rgb(var(--primary-9)) 3.36%, #ffffff 100%); background: linear-gradient(90deg, rgb(var(--primary-9)) 3.36%, #ffffff 100%);
box-shadow: 0 0 7px rgb(15 0 78 / 9%); box-shadow: 0 0 7px rgb(15 0 78 / 9%);
.arco-icon { .arco-icon {
color: rgb(var(--primary-5)); color: rgb(var(--primary-5));
}
} }
} }
:deep(.arco-scrollbar-track-direction-vertical) {
right: -10px;
}
} }
</style> </style>

View File

@ -38,7 +38,6 @@
<a-scrollbar <a-scrollbar
:style="{ :style="{
overflow: 'auto', overflow: 'auto',
width: `calc(100vw - ${menuWidth}px)`,
height: 'calc(100vh - 64px)', height: 'calc(100vh - 64px)',
}" }"
> >
@ -170,7 +169,6 @@
transition: padding 0.2s cubic-bezier(0.34, 0.69, 0.1, 1); transition: padding 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
.arco-layout-content { .arco-layout-content {
padding: 16px 16px 16px 0; padding: 16px 16px 16px 0;
min-width: 1000px;
min-height: 500px; min-height: 500px;
} }
} }