diff --git a/frontend/src/components/pure/ms-form-create/formCreate.vue b/frontend/src/components/pure/ms-form-create/formCreate.vue
index ed54aaef81..fc4c0293cd 100644
--- a/frontend/src/components/pure/ms-form-create/formCreate.vue
+++ b/frontend/src/components/pure/ms-form-create/formCreate.vue
@@ -1,6 +1,6 @@
();
- const innerApi = ref();
+ const emits = defineEmits<{
+ (e: 'mounted'): void;
+ (e: 'reload'): void;
+ (e: 'change', filed: string): void;
+ }>();
- const emits = defineEmits(['update:api', 'update:rule', 'mounted', 'reload', 'change']);
-
- const formApi = computed({
- get() {
- return props.api;
- },
- set(val) {
- emits('update:api', val);
- },
+ const formApi = defineModel('api', {
+ default: undefined,
});
- watch(
- () => formApi.value,
- (val) => {
- emits('update:api', val);
- },
- { deep: true }
- );
-
- const formRules = ref([]);
- watchEffect(() => {
- formRules.value = props.rule;
- formApi.value = props.api || innerApi.value;
+ const formRules = defineModel('rule', {
+ default: {},
});
- watch(
- () => props.rule,
- (val) => {
- formRules.value = val;
- formApi.value?.refresh();
- }
- );
watch(
() => formRules.value,
- (val) => {
- emits('update:rule', val);
- },
- {
- deep: true,
+ () => {
+ formApi.value?.refresh();
}
);
@@ -86,10 +59,9 @@
emits('reload');
}
- function handleChange(value: any) {
- formApi.value?.validateField(value);
- emits('update:api', formApi.value);
- emits('change', value, formApi.value);
+ function handleChange(filed: string) {
+ formApi.value?.validateField(filed);
+ emits('change', filed);
}
const options = {
resetBtn: false, // 不展示默认配置的重置和提交
diff --git a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/defectSync.vue b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/defectSync.vue
index 1de4029590..e89d40687d 100644
--- a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/defectSync.vue
+++ b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/defectSync.vue
@@ -33,7 +33,6 @@
v-model:api="fApi"
v-model:form-item="platformItem"
:form-rule="platformRules"
- @change="changeHandler"
@mounted="handleMounted"
/>
@@ -292,10 +291,6 @@
fApi.value?.setValue({ ...tempObj });
}
- function changeHandler(a: any, b: FormRuleItem) {
- fApi.value.validateField(b.field);
- fApi.value.refreshValidate();
- }
function handleMounted() {
setValue();
diff --git a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/relatedCase.vue b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/relatedCase.vue
index 55a3f2194f..03de6e4538 100644
--- a/frontend/src/views/project-management/projectAndPermission/menuManagement/components/relatedCase.vue
+++ b/frontend/src/views/project-management/projectAndPermission/menuManagement/components/relatedCase.vue
@@ -33,7 +33,6 @@
v-model:api="fApi"
v-model:form-item="platformItem"
:form-rule="platformRules"
- @change="changeHandler"
@mounted="handleMounted"
/>
@@ -220,11 +219,6 @@
fApi.value?.setValue({ ...tempObj });
}
- function changeHandler(a: string, formValue: Record) {
- fApi.value.validateField(formValue.field);
- fApi.value.refreshValidate();
- }
-
function handleMounted() {
setValue();
}
diff --git a/frontend/src/views/project-management/template/components/detail.vue b/frontend/src/views/project-management/template/components/detail.vue
index 68f6522b4a..0bf513de64 100644
--- a/frontend/src/views/project-management/template/components/detail.vue
+++ b/frontend/src/views/project-management/template/components/detail.vue
@@ -3,8 +3,6 @@
diff --git a/frontend/src/views/setting/organization/template/components/addTemplate.vue b/frontend/src/views/setting/organization/template/components/addTemplate.vue
index bf3bc409f9..fe6f26473a 100644
--- a/frontend/src/views/setting/organization/template/components/addTemplate.vue
+++ b/frontend/src/views/setting/organization/template/components/addTemplate.vue
@@ -132,7 +132,6 @@
v-model:rule="formItem.formRules"
:option="configOptions"
@click="activeHandler(index)"
- @change="(value, formApi) => changeHandler(value, formApi)"
/>
([]);
- const selectedIds = ref();
// 编辑更新已选择字段
const isEditField = ref(false);
@@ -634,6 +630,7 @@
selectData.value = getSelectData(customFields);
systemFieldData.value = systemFields;
} catch (error) {
+ // eslint-disable-next-line no-console
console.log(error);
} finally {
loading.value = false;
diff --git a/frontend/src/views/setting/organization/template/components/viewTemplate.vue b/frontend/src/views/setting/organization/template/components/viewTemplate.vue
index 04d2d98b68..26a7ed1fc7 100644
--- a/frontend/src/views/setting/organization/template/components/viewTemplate.vue
+++ b/frontend/src/views/setting/organization/template/components/viewTemplate.vue
@@ -127,7 +127,6 @@
width: 428px;
}
}
-
:deep(.arco-picker-disabled) {
border-color: var(--color-text-n8);
background: var(--color-text-n8);
@@ -136,11 +135,9 @@
background: var(--color-text-n8);
}
}
-
:deep(.arco-form-item-layout-vertical > .arco-form-item-label-col) {
overflow-wrap: break-word;
}
-
:deep(.arco-form-item-content) {
overflow-wrap: anywhere;
}