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