fix: formItem formItemProps 调研关联性
This commit is contained in:
@@ -45,10 +45,12 @@
|
||||
field: 'formula',
|
||||
component: 'NsTextarea',
|
||||
defaultValue: '(A+B)*2',
|
||||
style: { width: '450px' },
|
||||
formItemProps: {
|
||||
wrapperCol: { span: 24 },
|
||||
},
|
||||
componentProps: {
|
||||
placeholder: '请输入',
|
||||
autosize: {
|
||||
autoSize: {
|
||||
minRows: 6,
|
||||
maxRows: 6,
|
||||
},
|
||||
@@ -70,11 +72,13 @@
|
||||
label: '',
|
||||
field: 'NsBasicTable',
|
||||
component: 'NsBasicTable',
|
||||
formItemProps: {
|
||||
wrapperCol: { span: 24 },
|
||||
},
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
placeholder: '请输入',
|
||||
dataSource: mockDataSource.value,
|
||||
style: { width: '450px' },
|
||||
pagination: false,
|
||||
rowKey: (record) => record.groupName,
|
||||
columns: [
|
||||
|
@@ -87,11 +87,13 @@
|
||||
label: '',
|
||||
field: 'NsBasicTable',
|
||||
component: 'NsBasicTable',
|
||||
formItemProps: {
|
||||
wrapperCol: { span: 24 },
|
||||
},
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
placeholder: '请输入',
|
||||
dataSource: mockDataSource.value,
|
||||
style: { width: '450px' },
|
||||
rowSelection: { type: 'radio' },
|
||||
pagination: false,
|
||||
rowKey: (record) => record.groupName,
|
||||
|
@@ -293,9 +293,13 @@
|
||||
},
|
||||
onValidateChange: (text: Object | undefined) => {
|
||||
if (isUndefined(text)) text = {};
|
||||
console.error(text, 'onValidateChange');
|
||||
|
||||
validateRef.value = text;
|
||||
},
|
||||
};
|
||||
console.log(on, 'checkON');
|
||||
|
||||
return {
|
||||
...propsData,
|
||||
...on,
|
||||
|
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import type { UnwrapRef, Ref } from 'vue';
|
||||
import { unref, nextTick, toRaw } from 'vue';
|
||||
import { get, isArray, isNil, isUndefined, isPlainObject, forEach, isFunction } from 'lodash-es';
|
||||
@@ -173,7 +171,9 @@ export function useFormModel({ schemas, formModel, formElRef, emit }: useFormMod
|
||||
//select allowClear时值被设为undefined
|
||||
unref(formModel)[key] = value;
|
||||
}
|
||||
validateFields([key]).catch(() => {});
|
||||
validateFields([key]).catch((err) => {
|
||||
console.error(`${key}:`, err);
|
||||
});
|
||||
// console.log('formModel', key, value, formModel.value);
|
||||
// if (fieldRules(key)) {
|
||||
// console.log('getNamePath', getNamePath.value);
|
||||
|
Reference in New Issue
Block a user