style(api): 统一代码格式化规范
- 调整 import 语句格式,统一空格和引号风格 - 修复函数参数跨行时的格式对齐问题 - 清理多余空行和注释中的空白字符 - 统一对象属性结尾逗号的使用规范 - 规范化字符串拼接和模板语法的格式 - 优化长参数列表的换行和缩进格式
This commit is contained in:
@@ -63,11 +63,7 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="style" name="style">
|
||||
<a-input
|
||||
allow-clear
|
||||
placeholder="style"
|
||||
v-model:value="form.style"
|
||||
/>
|
||||
<a-input allow-clear placeholder="style" v-model:value="form.style" />
|
||||
</a-form-item>
|
||||
<a-form-item label="名称" name="value">
|
||||
<a-input
|
||||
@@ -114,7 +110,10 @@
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
import { Form, message } from 'ant-design-vue';
|
||||
import { assignObject, uuid } from 'ele-admin-pro';
|
||||
import { addCmsWebsiteField, updateCmsWebsiteField } from '@/api/cms/cmsWebsiteField';
|
||||
import {
|
||||
addCmsWebsiteField,
|
||||
updateCmsWebsiteField
|
||||
} from '@/api/cms/cmsWebsiteField';
|
||||
import { CmsWebsiteField } from '@/api/cms/cmsWebsiteField/model';
|
||||
import { useThemeStore } from '@/store/modules/theme';
|
||||
import { storeToRefs } from 'pinia';
|
||||
@@ -218,7 +217,9 @@
|
||||
const formData = {
|
||||
...form
|
||||
};
|
||||
const saveOrUpdate = isUpdate.value ? updateCmsWebsiteField : addCmsWebsiteField;
|
||||
const saveOrUpdate = isUpdate.value
|
||||
? updateCmsWebsiteField
|
||||
: addCmsWebsiteField;
|
||||
saveOrUpdate(formData)
|
||||
.then((msg) => {
|
||||
loading.value = false;
|
||||
@@ -241,12 +242,12 @@
|
||||
images.value = [];
|
||||
if (props.data) {
|
||||
assignObject(form, props.data);
|
||||
if(props.data.image){
|
||||
if (props.data.image) {
|
||||
images.value.push({
|
||||
uid: uuid(),
|
||||
url: props.data.image,
|
||||
status: 'done'
|
||||
})
|
||||
});
|
||||
}
|
||||
isUpdate.value = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user