This commit is contained in:
dap
2024-10-17 13:36:03 +08:00
54 changed files with 357 additions and 319 deletions

View File

@@ -1,7 +1,8 @@
import './design-tokens';
import './css/global.css';
import './css/transition.css';
import './css/nprogress.css';
import './css/ui.css';
import './design-tokens';
export {};

View File

@@ -93,7 +93,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
"mode": "dark",
"radius": "0.5",
"semiDarkHeader": false,
"semiDarkSidebar": true,
"semiDarkSidebar": false,
},
"transition": {
"enable": true,

View File

@@ -82,7 +82,6 @@ const defaultPreferences: Preferences = {
showIcon: true,
showMaximize: true,
showMore: true,
styleType: 'chrome',
},
theme: {
@@ -94,7 +93,7 @@ const defaultPreferences: Preferences = {
mode: 'auto',
radius: '0.5',
semiDarkHeader: false,
semiDarkSidebar: true,
semiDarkSidebar: false,
},
transition: {
enable: true,

View File

@@ -18,7 +18,7 @@ function updateCSSVariables(preferences: Preferences) {
const theme = preferences?.theme ?? {};
const { builtinType, colorPrimary, mode, radius } = theme;
const { builtinType, mode, radius } = theme;
// html 设置 dark 类
if (Reflect.has(theme, 'mode')) {
@@ -58,7 +58,7 @@ function updateCSSVariables(preferences: Preferences) {
Reflect.has(theme, 'colorSuccess') ||
Reflect.has(theme, 'colorWarning')
) {
preferences.theme.colorPrimary = builtinTypeColorPrimary || colorPrimary;
// preferences.theme.colorPrimary = builtinTypeColorPrimary || colorPrimary;
updateMainColorVariables(preferences);
}

View File

@@ -83,6 +83,9 @@ watch(
"
:style="queryFormStyle"
>
<!-- 重置按钮前 -->
<slot name="reset-before"></slot>
<component
:is="COMPONENT_MAP.DefaultButton"
v-if="resetButtonOptions.show"
@@ -94,6 +97,9 @@ watch(
{{ resetButtonOptions.content }}
</component>
<!-- 提交按钮前 -->
<slot name="submit-before"></slot>
<component
:is="COMPONENT_MAP.PrimaryButton"
v-if="submitButtonOptions.show"
@@ -104,6 +110,9 @@ watch(
{{ submitButtonOptions.content }}
</component>
<!-- 展开按钮前 -->
<slot name="expand-before"></slot>
<VbenExpandableArrow
v-if="rootProps.showCollapseButton"
v-model:model-value="collapsed"
@@ -111,5 +120,8 @@ watch(
>
<span>{{ collapsed ? $t('expand') : $t('collapse') }}</span>
</VbenExpandableArrow>
<!-- 展开按钮后 -->
<slot name="expand-after"></slot>
</div>
</template>

View File

@@ -58,7 +58,20 @@ const handleUpdateCollapsed = (value: boolean) => {
v-if="forward.showDefaultActions"
:model-value="state.collapsed"
@update:model-value="handleUpdateCollapsed"
/>
>
<template #reset-before="resetSlotProps">
<slot name="reset-before" v-bind="resetSlotProps"></slot>
</template>
<template #submit-before="submitSlotProps">
<slot name="submit-before" v-bind="submitSlotProps"></slot>
</template>
<template #expand-before="expandBeforeSlotProps">
<slot name="expand-before" v-bind="expandBeforeSlotProps"></slot>
</template>
<template #expand-after="expandAfterSlotProps">
<slot name="expand-after" v-bind="expandAfterSlotProps"></slot>
</template>
</FormActions>
</slot>
</template>
</Form>