mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-28 15:09:57 +00:00
style: 统一字符串引号为双引号并优化代码格式
将单引号字符串统一改为双引号 调整部分组件代码格式和样式 移除空行和冗余代码
This commit is contained in:
@@ -446,7 +446,7 @@ const formData = reactive<DeptForm>({
|
||||
code: undefined,
|
||||
order: 1,
|
||||
parent_id: undefined,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
@@ -512,7 +512,7 @@ const initialFormData: DeptForm = {
|
||||
name: undefined,
|
||||
order: 1,
|
||||
parent_id: undefined,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
};
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
<el-table-column label="状态" prop="status" min-width="100" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status === '0' ? 'success' : 'danger'">
|
||||
{{ scope.row.status === '0' ? "启用" : "停用" }}
|
||||
{{ scope.row.status === "0" ? "启用" : "停用" }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -456,7 +456,7 @@ const formData = reactive<DictDataForm>({
|
||||
css_class: "",
|
||||
list_class: undefined,
|
||||
is_default: false,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: "",
|
||||
dict_type_id: undefined,
|
||||
});
|
||||
@@ -539,7 +539,7 @@ const initialFormData: DictDataForm = {
|
||||
css_class: "",
|
||||
list_class: undefined,
|
||||
is_default: false,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: "",
|
||||
dict_type_id: props.dictTypeId,
|
||||
};
|
||||
@@ -583,7 +583,7 @@ async function handleOpenDialog(type: "create" | "update" | "detail", id?: numbe
|
||||
// 重置为初始值并确保状态默认开启
|
||||
Object.assign(formData, initialFormData);
|
||||
formData.dict_type = props.dictType;
|
||||
formData.status = '0';
|
||||
formData.status = "0";
|
||||
formData.id = undefined;
|
||||
}
|
||||
dialogVisible.visible = true;
|
||||
|
||||
@@ -468,7 +468,7 @@ const formData = reactive<DictForm>({
|
||||
id: undefined,
|
||||
dict_name: "",
|
||||
dict_type: "",
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
@@ -516,7 +516,6 @@ const currentDictLabel = ref("");
|
||||
// 添加字典类型ID变量
|
||||
const currentDictTypeId = ref(1);
|
||||
|
||||
|
||||
// 加载表格数据
|
||||
async function loadingData() {
|
||||
loading.value = true;
|
||||
@@ -552,7 +551,7 @@ const initialFormData: DictForm = {
|
||||
id: undefined,
|
||||
dict_name: "",
|
||||
dict_type: "",
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
};
|
||||
|
||||
|
||||
@@ -721,7 +721,7 @@ const formData = reactive<MenuForm>({
|
||||
title: "",
|
||||
params: undefined,
|
||||
affix: false,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
@@ -859,7 +859,7 @@ const initialFormData: MenuForm = {
|
||||
title: "",
|
||||
params: [] as { key: string; value: string }[],
|
||||
affix: false,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
};
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status === '0' ? 'success' : 'danger'">
|
||||
{{ scope.row.status === '0' ? "启用" : "停用" }}
|
||||
{{ scope.row.status === "0" ? "启用" : "停用" }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -530,7 +530,7 @@ const formData = reactive<NoticeForm>({
|
||||
notice_title: "",
|
||||
notice_type: "",
|
||||
notice_content: "",
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
@@ -608,7 +608,7 @@ const initialFormData: NoticeForm = {
|
||||
notice_title: "",
|
||||
notice_type: "",
|
||||
notice_content: "",
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
};
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status === '0' ? 'success' : 'danger'">
|
||||
{{ scope.row.status === '0' ? "启用" : "停用" }}
|
||||
{{ scope.row.status === "0" ? "启用" : "停用" }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -480,7 +480,7 @@ const formData = reactive<PositionForm>({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
order: 1,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
@@ -556,7 +556,7 @@ const initialFormData: PositionForm = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
order: 1,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
};
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status === '0' ? 'success' : 'danger'">
|
||||
{{ scope.row.status === '0' ? "启用" : "停用" }}
|
||||
{{ scope.row.status === "0" ? "启用" : "停用" }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -563,7 +563,7 @@ const formData = reactive<RoleForm>({
|
||||
name: undefined,
|
||||
order: 1,
|
||||
code: undefined,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
@@ -633,7 +633,7 @@ const initialFormData: RoleForm = {
|
||||
name: undefined,
|
||||
order: 1,
|
||||
code: undefined,
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<template #status="scope">
|
||||
<el-tag :type="scope.row[scope.prop] === '0' ? 'success' : 'danger'">
|
||||
{{ scope.row[scope.prop] === '0' ? "启用" : "停用" }}
|
||||
{{ scope.row[scope.prop] === "0" ? "启用" : "停用" }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</table-select>
|
||||
@@ -39,7 +39,7 @@ const selectConfig: ISelectConfig = {
|
||||
type: "select",
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
initialValue: '0',
|
||||
initialValue: "0",
|
||||
attrs: {
|
||||
placeholder: "全部",
|
||||
clearable: true,
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
<el-table-column label="状态" prop="status" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status === '0' ? 'success' : 'danger'">
|
||||
{{ scope.row.status === '0' ? "启用" : "停用" }}
|
||||
{{ scope.row.status === "0" ? "启用" : "停用" }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -641,7 +641,7 @@ const formData = reactive<UserForm>({
|
||||
email: undefined,
|
||||
mobile: undefined,
|
||||
is_superuser: false, //默认不是超管
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
@@ -790,7 +790,7 @@ const initialFormData: UserForm = {
|
||||
email: undefined,
|
||||
mobile: undefined,
|
||||
is_superuser: false, //默认不是超管
|
||||
status: '0',
|
||||
status: "0",
|
||||
description: undefined,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user