|
@ -48,7 +48,8 @@ |
|
|
:sortable="headerItem?.tableForm?.sortable || ''" |
|
|
:sortable="headerItem?.tableForm?.sortable || ''" |
|
|
:width="headerItem?.tableForm?.width || '200'" |
|
|
:width="headerItem?.tableForm?.width || '200'" |
|
|
:min-width="headerItem?.tableForm?.minWidth || 'auto'"> |
|
|
:min-width="headerItem?.tableForm?.minWidth || 'auto'"> |
|
|
<el-form ref="TableBaseForm_Ref" |
|
|
<el-form |
|
|
|
|
|
ref="TableBaseForm_Ref" |
|
|
:model="row" |
|
|
:model="row" |
|
|
style="width: 100%;" |
|
|
style="width: 100%;" |
|
|
:rules="tableFormRules" |
|
|
:rules="tableFormRules" |
|
@ -357,20 +358,23 @@ const itemIsDisabled = (colum, row) => { |
|
|
return Boolean(colum.tableForm?.disabled) || Boolean(row.disabled) || Boolean(row['disabled_' + colum.field]) |
|
|
return Boolean(colum.tableForm?.disabled) || Boolean(row.disabled) || Boolean(row['disabled_' + colum.field]) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// const { t } = useI18n() // 国际化 |
|
|
|
|
|
// const message = useMessage() // 消息弹窗 |
|
|
|
|
|
|
|
|
const TableBaseComponents_Ref = ref() |
|
|
const TableBaseComponents_Ref = ref() |
|
|
const TableBaseForm_Ref = ref() |
|
|
const TableBaseForm_Ref = ref() |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 验证表单是否符合rules |
|
|
* 验证表单是否符合rules |
|
|
* @param {*} success 如果验证【成功】走的方法 |
|
|
* @param {*} success 如果验证【成功】走的方法 |
|
|
* @param {*} error 如果验证【不成功】走的方法 |
|
|
* @param {*} error 如果验证【不成功】走的方法 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
const validateForm = async () => { |
|
|
const validateForm = () => { |
|
|
let _lists = TableBaseForm_Ref.value.map(v => v.validate()) |
|
|
let _lists = TableBaseForm_Ref.value?.map(v => v.validate()) |
|
|
return Promise.all(_lists).then(res => { |
|
|
return Promise.all(_lists).then(() => { |
|
|
return true |
|
|
return true |
|
|
}).catch(err => { |
|
|
}).catch(() => { |
|
|
return false |
|
|
return false |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -389,6 +393,7 @@ const inpuFocus = (headerItem)=>{ |
|
|
emit('inpuFocus') |
|
|
emit('inpuFocus') |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// setup 语法糖 抛出方法 |
|
|
// setup 语法糖 抛出方法 |
|
|
defineExpose({ |
|
|
defineExpose({ |
|
|
TableBaseComponents_Ref, |
|
|
TableBaseComponents_Ref, |
|
|