Skip to content

Commit

Permalink
feat: enhance styles
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Apr 28, 2023
1 parent fec6f6a commit a9064e5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/form/src/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ export default {
.schema-item {
position: relative;
padding: 0.5rem 1rem;
border-bottom: 1px solid var(--el-border-color);
border-bottom: 1px solid var(--el-border-color-light);
transition: var(--color-transition);
&:first-child, :not(.schema-item):not(.k-schema-group) + & {
border-top: 1px solid var(--el-border-color);
border-top: 1px solid var(--el-border-color-light);
}
& + h2 {
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/extensions/group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<script lang="ts" setup>
import { PropType, ref, watch, WatchStopHandle } from 'vue'
import { getFallback, isObjectSchema, Schema } from './utils'
import { getFallback, isObjectSchema, Schema } from '../utils'
import SchemaBase from '../base.vue'
import SchemaHeader from '../header.vue'
Expand Down
18 changes: 16 additions & 2 deletions packages/form/src/primitive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
</template>

<template v-else>
<k-file-picker v-if="schema.meta.role === 'path'" v-model="value"></k-file-picker>
<el-color-picker v-else-if="schema.meta.role === 'color'" v-model="value" show-alpha></el-color-picker>
<el-color-picker v-if="schema.meta.role === 'color'" v-model="value" show-alpha></el-color-picker>
<el-time-picker v-else-if="schema.meta.role === 'time'" v-model="date"></el-time-picker>
<el-date-picker v-else-if="['date', 'datetime'].includes(schema.meta.role)" :type="schema.meta.role" v-model="date"></el-date-picker>
<el-input v-else v-model="value" :disabled="disabled" :class="{ nullable }"
Expand Down Expand Up @@ -112,8 +111,23 @@ function onClickExternal(value: string) {
}
.el-switch.nullable {
.el-switch__core {
background-color: transparent;
border: 1px solid var(--el-border-color);
}
.el-switch__action {
left: 11px;
width: 16px;
border-radius: 0;
height: 1px;
background-color: var(--el-border-color);
}
&:hover {
.el-switch__core {
border-color: var(--el-color-primary);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/schema.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default defineComponent({
.k-schema-group {
position: relative;
padding-left: 1rem;
border-bottom: 1px solid var(--el-border-color);
border-bottom: 1px solid var(--el-border-color-light);
&:empty {
border-bottom: none;
Expand Down

0 comments on commit a9064e5

Please sign in to comment.