This commit is contained in:
dap
2025-03-01 15:22:35 +08:00
28 changed files with 1431 additions and 63 deletions

View File

@@ -93,9 +93,9 @@ export class FormApi {
return this.state;
}
async getValues() {
async getValues<T = Recordable<any>>() {
const form = await this.getForm();
return form.values ? this.handleRangeTimeValue(form.values) : {};
return (form.values ? this.handleRangeTimeValue(form.values) : {}) as T;
}
async isFieldValid(fieldName: string) {

View File

@@ -38,6 +38,7 @@ export class DrawerApi {
const defaultState: DrawerState = {
class: '',
closable: true,
closeIconPlacement: 'right',
closeOnClickModal: true,
closeOnPressEscape: true,
confirmLoading: false,

View File

@@ -55,6 +55,7 @@ const {
cancelText,
class: drawerClass,
closable,
closeIconPlacement,
closeOnClickModal,
closeOnPressEscape,
confirmLoading,

View File

@@ -3,8 +3,8 @@ import type { BreadcrumbProps } from './types';
import { useForwardPropsEmits } from 'radix-vue';
import Breadcrumb from './breadcrumb.vue';
import BreadcrumbBackground from './breadcrumb-background.vue';
import Breadcrumb from './breadcrumb.vue';
interface Props extends BreadcrumbProps {
class?: any;
@@ -17,6 +17,23 @@ const emit = defineEmits<{ select: [string] }>();
const forward = useForwardPropsEmits(props, emit);
</script>
<template>
<Breadcrumb v-if="styleType === 'normal'" v-bind="forward" />
<BreadcrumbBackground v-if="styleType === 'background'" v-bind="forward" />
<Breadcrumb
v-if="styleType === 'normal'"
v-bind="forward"
class="vben-breadcrumb"
/>
<BreadcrumbBackground
v-if="styleType === 'background'"
v-bind="forward"
class="vben-breadcrumb"
/>
</template>
<style lang="scss" scoped>
/** 修复全局引入Antd时ol和ul的默认样式会被修改的问题 */
.vben-breadcrumb {
:deep(ol),
:deep(ul) {
margin-bottom: 0;
}
}
</style>