vue2server7 7.0.20 → 7.0.21

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.
@@ -204,14 +204,18 @@ defineExpose({ validate, reset })
204
204
 
205
205
  // 同步外部值
206
206
  watch(
207
- () => isArrayMode.value ? props.modelValue : [props.start, props.end],
208
- (val) => {
209
- const newMin = val?.[0] != null ? String(val[0]) : ''
210
- const newMax = val?.[1] != null ? String(val[1]) : ''
207
+ () => ({
208
+ isArrayMode: isArrayMode.value,
209
+ min: isArrayMode.value ? props.modelValue?.[0] : props.start,
210
+ max: isArrayMode.value ? props.modelValue?.[1] : props.end
211
+ }),
212
+ ({ min, max }) => {
213
+ const newMin = min !== null && min !== undefined ? String(min) : ''
214
+ const newMax = max !== null && max !== undefined ? String(max) : ''
211
215
  if (newMin !== minDisplay.value) minDisplay.value = newMin
212
216
  if (newMax !== maxDisplay.value) maxDisplay.value = newMax
213
217
  },
214
- { immediate: true, deep: true }
218
+ { immediate: true }
215
219
  )
216
220
  </script>
217
221
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2server7",
3
- "version": "7.0.20",
3
+ "version": "7.0.21",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "nodemon --watch src --ext ts --exec \"ts-node src/app.ts\"",