@tmagic/form 1.1.6 → 1.2.0-beta.1

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.
@@ -3113,34 +3113,23 @@ const _sfc_main$6 = defineComponent({
3113
3113
  return options2;
3114
3114
  };
3115
3115
  if (typeof props.config.options === "function") {
3116
- watch(
3117
- () => mForm?.values,
3118
- () => {
3119
- typeof props.config.options === "function" && Promise.resolve(
3120
- props.config.options(mForm, {
3121
- model: props.model,
3122
- prop: props.prop,
3123
- formValues: mForm?.values,
3124
- formValue: mForm?.values,
3125
- config: props.config
3126
- })
3127
- ).then((data) => {
3128
- options.value = data;
3129
- });
3130
- },
3131
- {
3132
- deep: true,
3133
- immediate: true
3134
- }
3135
- );
3116
+ watchEffect(() => {
3117
+ typeof props.config.options === "function" && Promise.resolve(
3118
+ props.config.options(mForm, {
3119
+ model: props.model,
3120
+ prop: props.prop,
3121
+ formValues: mForm?.values,
3122
+ formValue: mForm?.values,
3123
+ config: props.config
3124
+ })
3125
+ ).then((data) => {
3126
+ options.value = data;
3127
+ });
3128
+ });
3136
3129
  } else if (Array.isArray(props.config.options)) {
3137
- watch(
3138
- () => props.config.options,
3139
- () => {
3140
- options.value = props.config.options;
3141
- },
3142
- { immediate: true }
3143
- );
3130
+ watchEffect(() => {
3131
+ options.value = props.config.options;
3132
+ });
3144
3133
  } else if (props.config.option) {
3145
3134
  onBeforeMount(() => {
3146
3135
  if (!props.model)