Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump tailwindcss from 3.4.13 to 3.4.14 in the non-breaking-changes group #4650

Merged
merged 3 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions apps/web-antd/src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ async function loadThirdPartyMessage(lang: SupportedLanguagesType) {
async function loadDayjsLocale(lang: SupportedLanguagesType) {
let locale;
switch (lang) {
case 'zh-CN': {
locale = await import('dayjs/locale/zh-cn');
break;
}
case 'en-US': {
locale = await import('dayjs/locale/en');
break;
}
case 'zh-CN': {
locale = await import('dayjs/locale/zh-cn');
break;
}
// 默认使用英语
default: {
locale = await import('dayjs/locale/en');
Expand All @@ -71,14 +71,14 @@ async function loadDayjsLocale(lang: SupportedLanguagesType) {
*/
async function loadAntdLocale(lang: SupportedLanguagesType) {
switch (lang) {
case 'zh-CN': {
antdLocale.value = antdDefaultLocale;
break;
}
case 'en-US': {
antdLocale.value = antdEnLocale;
break;
}
case 'zh-CN': {
antdLocale.value = antdDefaultLocale;
break;
}
}
}

Expand Down
16 changes: 8 additions & 8 deletions apps/web-ele/src/locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ async function loadThirdPartyMessage(lang: SupportedLanguagesType) {
async function loadDayjsLocale(lang: SupportedLanguagesType) {
let locale;
switch (lang) {
case 'zh-CN': {
locale = await import('dayjs/locale/zh-cn');
break;
}
case 'en-US': {
locale = await import('dayjs/locale/en');
break;
}
case 'zh-CN': {
locale = await import('dayjs/locale/zh-cn');
break;
}
// 默认使用英语
default: {
locale = await import('dayjs/locale/en');
Expand All @@ -71,14 +71,14 @@ async function loadDayjsLocale(lang: SupportedLanguagesType) {
*/
async function loadElementLocale(lang: SupportedLanguagesType) {
switch (lang) {
case 'zh-CN': {
elementLocale.value = defaultLocale;
break;
}
case 'en-US': {
elementLocale.value = enLocale;
break;
}
case 'zh-CN': {
elementLocale.value = defaultLocale;
break;
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion docs/.vitepress/theme/styles/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@vben/styles';

import './variables.css';
import './base.css';
import '@vben/styles';
156 changes: 78 additions & 78 deletions docs/src/demos/vben-form/api/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,52 @@ function handleClick(
| 'updateSubmitButton',
) {
switch (action) {
case 'updateSchema': {
formApi.updateSchema([
{
componentProps: {
options: [
{
label: '选项1',
value: '1',
},
{
label: '选项2',
value: '2',
},
{
label: '选项3',
value: '3',
},
],
},
fieldName: 'fieldOptions',
},
]);
message.success('字段 `fieldOptions` 下拉选项更新成功。');
case 'batchAddSchema': {
formApi.setState((prev) => {
const currentSchema = prev?.schema ?? [];
const newSchema = [];
for (let i = 0; i < 2; i++) {
newSchema.push({
component: 'Input',
componentProps: {
placeholder: '请输入',
},
fieldName: `field${i}${Date.now()}`,
label: `field+`,
});
}
return {
schema: [...currentSchema, ...newSchema],
};
});
break;
}

case 'batchDeleteSchema': {
formApi.setState((prev) => {
const currentSchema = prev?.schema ?? [];
return {
schema: currentSchema.slice(0, -2),
};
});
break;
}
case 'disabled': {
formApi.setState({ commonConfig: { disabled: true } });
break;
}
case 'hiddenAction': {
formApi.setState({ showDefaultActions: false });
break;
}
case 'hiddenResetButton': {
formApi.setState({ resetButtonOptions: { show: false } });
break;
}
case 'hiddenSubmitButton': {
formApi.setState({ submitButtonOptions: { show: false } });
break;
}
case 'labelWidth': {
formApi.setState({
commonConfig: {
Expand All @@ -115,6 +135,10 @@ function handleClick(
});
break;
}
case 'resetDisabled': {
formApi.setState({ commonConfig: { disabled: false } });
break;
}
case 'resetLabelWidth': {
formApi.setState({
commonConfig: {
Expand All @@ -123,83 +147,59 @@ function handleClick(
});
break;
}
case 'disabled': {
formApi.setState({ commonConfig: { disabled: true } });
break;
}
case 'resetDisabled': {
formApi.setState({ commonConfig: { disabled: false } });
break;
}
case 'hiddenAction': {
formApi.setState({ showDefaultActions: false });
break;
}
case 'showAction': {
formApi.setState({ showDefaultActions: true });
break;
}
case 'hiddenResetButton': {
formApi.setState({ resetButtonOptions: { show: false } });
break;
}
case 'showResetButton': {
formApi.setState({ resetButtonOptions: { show: true } });
break;
}
case 'hiddenSubmitButton': {
formApi.setState({ submitButtonOptions: { show: false } });
break;
}
case 'showSubmitButton': {
formApi.setState({ submitButtonOptions: { show: true } });
break;
}
case 'updateResetButton': {
formApi.setState({
resetButtonOptions: { disabled: true },
});
break;
}
case 'updateSubmitButton': {
formApi.setState({
submitButtonOptions: { loading: true },
});
break;
}
case 'updateActionAlign': {
formApi.setState({
// 可以自行调整class
actionWrapperClass: 'text-center',
});
break;
}
case 'batchAddSchema': {
formApi.setState((prev) => {
const currentSchema = prev?.schema ?? [];
const newSchema = [];
for (let i = 0; i < 2; i++) {
newSchema.push({
component: 'Input',
componentProps: {
placeholder: '请输入',
},
fieldName: `field${i}${Date.now()}`,
label: `field+`,
});
}
return {
schema: [...currentSchema, ...newSchema],
};
case 'updateResetButton': {
formApi.setState({
resetButtonOptions: { disabled: true },
});
break;
}
case 'batchDeleteSchema': {
formApi.setState((prev) => {
const currentSchema = prev?.schema ?? [];
return {
schema: currentSchema.slice(0, -2),
};
case 'updateSchema': {
formApi.updateSchema([
{
componentProps: {
options: [
{
label: '选项1',
value: '1',
},
{
label: '选项2',
value: '2',
},
{
label: '选项3',
value: '3',
},
],
},
fieldName: 'fieldOptions',
},
]);
message.success('字段 `fieldOptions` 下拉选项更新成功。');
break;
}
case 'updateSubmitButton': {
formApi.setState({
submitButtonOptions: { loading: true },
});
break;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/@core/base/design/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 {};
8 changes: 4 additions & 4 deletions packages/effects/access/src/accessible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ async function generateRoutes(

let resultRoutes: RouteRecordRaw[] = routes;
switch (mode) {
case 'backend': {
resultRoutes = await generateRoutesByBackend(options);
break;
}
case 'frontend': {
resultRoutes = await generateRoutesByFrontend(
routes,
Expand All @@ -54,10 +58,6 @@ async function generateRoutes(
);
break;
}
case 'backend': {
resultRoutes = await generateRoutesByBackend(options);
break;
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,30 @@ const builtinThemePresets = computed(() => {

function typeView(name: BuiltinThemeType) {
switch (name) {
case 'custom': {
return $t('preferences.theme.builtin.custom');
}
case 'deep-blue': {
return $t('preferences.theme.builtin.deepBlue');
}
case 'deep-green': {
return $t('preferences.theme.builtin.deepGreen');
}
case 'default': {
return $t('preferences.theme.builtin.default');
}
case 'violet': {
return $t('preferences.theme.builtin.violet');
case 'gray': {
return $t('preferences.theme.builtin.gray');
}
case 'green': {
return $t('preferences.theme.builtin.green');
}

case 'neutral': {
return $t('preferences.theme.builtin.neutral');
}
case 'orange': {
return $t('preferences.theme.builtin.orange');
}
case 'pink': {
return $t('preferences.theme.builtin.pink');
Expand All @@ -46,37 +65,18 @@ function typeView(name: BuiltinThemeType) {
case 'sky-blue': {
return $t('preferences.theme.builtin.skyBlue');
}
case 'deep-blue': {
return $t('preferences.theme.builtin.deepBlue');
}

case 'green': {
return $t('preferences.theme.builtin.green');
}
case 'deep-green': {
return $t('preferences.theme.builtin.deepGreen');
case 'slate': {
return $t('preferences.theme.builtin.slate');
}
case 'orange': {
return $t('preferences.theme.builtin.orange');
case 'violet': {
return $t('preferences.theme.builtin.violet');
}
case 'yellow': {
return $t('preferences.theme.builtin.yellow');
}
case 'zinc': {
return $t('preferences.theme.builtin.zinc');
}
case 'neutral': {
return $t('preferences.theme.builtin.neutral');
}
case 'slate': {
return $t('preferences.theme.builtin.slate');
}
case 'gray': {
return $t('preferences.theme.builtin.gray');
}
case 'custom': {
return $t('preferences.theme.builtin.custom');
}
}
}

Expand Down
Loading