af-mobile-client-vue3 1.2.23 → 1.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -171,7 +171,7 @@ async function loadFormConfig(): Promise<void> {
|
|
|
171
171
|
getConfigByName(props.configName!, (result) => {
|
|
172
172
|
if (result) {
|
|
173
173
|
// 如果有 paramLogicName,自动请求并赋值
|
|
174
|
-
if (result.paramLogicName && !props.formData) {
|
|
174
|
+
if (result.paramLogicName && (!props.formData || (props.formData && Object.keys(props.formData).length === 0))) {
|
|
175
175
|
let logicParam = props.paramLogicNameParam
|
|
176
176
|
if (typeof logicParam === 'string') {
|
|
177
177
|
try {
|
|
@@ -220,11 +220,9 @@ async function initWithGroupFormItems() {
|
|
|
220
220
|
|
|
221
221
|
// 设置表单配置
|
|
222
222
|
function setupFormConfig(config: GroupFormItems) {
|
|
223
|
-
console.log('>>>> config: ', JSON.stringify(config))
|
|
224
223
|
formConfig.value = config
|
|
225
224
|
myServiceName.value = props.serviceName || ''
|
|
226
225
|
formGroupName.value = config.groupName || 'default'
|
|
227
|
-
console.log('>>>> props.formData: ', props.formData)
|
|
228
226
|
form.value = props.formData || {}
|
|
229
227
|
|
|
230
228
|
// 清理并重新设置验证规则
|
|
@@ -724,7 +724,7 @@ function onTreeSelectFinish(value) {
|
|
|
724
724
|
}
|
|
725
725
|
|
|
726
726
|
function emitFunc(func, data) {
|
|
727
|
-
emits('xFormItemEmitFunc', func, data, data?.model ?
|
|
727
|
+
emits('xFormItemEmitFunc', func, data, data?.model ? form[data.model] : form)
|
|
728
728
|
}
|
|
729
729
|
</script>
|
|
730
730
|
|