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