refactor:基于 lint 处理排版

This commit is contained in:
YunaiV
2025-04-22 22:10:33 +08:00
parent 3fe36fd823
commit fb785894b6
322 changed files with 4781 additions and 2093 deletions

View File

@@ -201,7 +201,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
}
/** 列表的字段 */
export function useGridColumns<T = SystemOAuth2ClientApi.SystemOAuth2Client>(
export function useGridColumns<T = SystemOAuth2ClientApi.OAuth2Client>(
onActionClick: OnActionClickFn<T>,
): VxeTableGridOptions['columns'] {
return [

View File

@@ -37,12 +37,12 @@ function onCreate() {
}
/** 编辑 OAuth2 客户端 */
function onEdit(row: SystemOAuth2ClientApi.SystemOAuth2Client) {
function onEdit(row: SystemOAuth2ClientApi.OAuth2Client) {
formModalApi.setData(row).open();
}
/** 删除 OAuth2 客户端 */
async function onDelete(row: SystemOAuth2ClientApi.SystemOAuth2Client) {
async function onDelete(row: SystemOAuth2ClientApi.OAuth2Client) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.name]),
duration: 0,
@@ -64,7 +64,7 @@ async function onDelete(row: SystemOAuth2ClientApi.SystemOAuth2Client) {
function onActionClick({
code,
row,
}: OnActionClickParams<SystemOAuth2ClientApi.SystemOAuth2Client>) {
}: OnActionClickParams<SystemOAuth2ClientApi.OAuth2Client>) {
switch (code) {
case 'delete': {
onDelete(row);
@@ -103,7 +103,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
refresh: { code: 'query' },
search: true,
},
} as VxeTableGridOptions<SystemOAuth2ClientApi.SystemOAuth2Client>,
} as VxeTableGridOptions<SystemOAuth2ClientApi.OAuth2Client>,
});
</script>

View File

@@ -18,7 +18,7 @@ import { $t } from '#/locales';
import { useFormSchema } from '../data';
const emit = defineEmits(['success']);
const formData = ref<SystemOAuth2ClientApi.SystemOAuth2Client>();
const formData = ref<SystemOAuth2ClientApi.OAuth2Client>();
const getTitle = computed(() => {
return formData.value?.id
? $t('ui.actionTitle.edit', [' OAuth2.0 客户端'])
@@ -43,7 +43,7 @@ const [Modal, modalApi] = useVbenModal({
modalApi.lock();
// 提交表单
const data =
(await formApi.getValues()) as SystemOAuth2ClientApi.SystemOAuth2Client;
(await formApi.getValues()) as SystemOAuth2ClientApi.OAuth2Client;
try {
await (formData.value?.id
? updateOAuth2Client(data)
@@ -64,7 +64,7 @@ const [Modal, modalApi] = useVbenModal({
return;
}
// 加载数据
const data = modalApi.getData<SystemOAuth2ClientApi.SystemOAuth2Client>();
const data = modalApi.getData<SystemOAuth2ClientApi.OAuth2Client>();
if (!data || !data.id) {
return;
}

View File

@@ -40,7 +40,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
}
/** 列表的字段 */
export function useGridColumns<T = SystemOAuth2TokenApi.SystemOAuth2Token>(
export function useGridColumns<T = SystemOAuth2TokenApi.OAuth2Token>(
onActionClick: OnActionClickFn<T>,
): VxeTableGridOptions['columns'] {
return [

View File

@@ -25,7 +25,7 @@ function onRefresh() {
}
/** 删除 OAuth2 令牌 */
async function onDelete(row: SystemOAuth2TokenApi.SystemOAuth2Token) {
async function onDelete(row: SystemOAuth2TokenApi.OAuth2Token) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', ['令牌']),
duration: 0,
@@ -47,7 +47,7 @@ async function onDelete(row: SystemOAuth2TokenApi.SystemOAuth2Token) {
function onActionClick({
code,
row,
}: OnActionClickParams<SystemOAuth2TokenApi.SystemOAuth2Token>) {
}: OnActionClickParams<SystemOAuth2TokenApi.OAuth2Token>) {
switch (code) {
case 'delete': {
onDelete(row);
@@ -82,7 +82,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
refresh: { code: 'query' },
search: true,
},
} as VxeTableGridOptions<SystemOAuth2TokenApi.SystemOAuth2Token>,
} as VxeTableGridOptions<SystemOAuth2TokenApi.OAuth2Token>,
});
</script>