|
@@ -697,6 +697,13 @@ export default {
|
|
|
if (this.formData && this.formData.categoryId != null && this.formData.categoryId !== '') {
|
|
|
this.formData.categoryId = String(this.formData.categoryId);
|
|
|
}
|
|
|
+ // 修复首次加载下拉无数据:同步更新表单配置中分类列的dicData,触发Avue响应式渲染
|
|
|
+ if (this.formOption && Array.isArray(this.formOption.column)) {
|
|
|
+ const idx = this.formOption.column.findIndex(col => col && col.prop === 'categoryId');
|
|
|
+ if (idx !== -1) {
|
|
|
+ this.$set(this.formOption.column[idx], 'dicData', this.categoryOptions.slice());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('加载分类选项失败:', error);
|