@dimailn/vuetify 2.7.2-alpha22 → 2.7.2-alpha23

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.
@@ -6,22 +6,19 @@ import { inject as RegistrableInject } from '../registrable'
6
6
  // Utilities
7
7
  import { deepEqual } from '../../util/helpers'
8
8
  import { consoleError } from '../../util/console'
9
- import mixins from '../../util/mixins'
9
+ import { defineComponent, PropType } from 'vue'
10
10
 
11
11
  // Types
12
- import { PropValidator } from 'vue/types/options'
13
12
  import { InputMessage, InputValidationRules } from 'vuetify/types'
14
13
 
15
- const baseMixins = mixins(
16
- Colorable,
17
- RegistrableInject<'form', any>('form'),
18
- Themeable,
19
- )
20
-
21
14
  /* @vue/component */
22
- export default baseMixins.extend({
15
+ export default defineComponent({
23
16
  name: 'validatable',
24
17
 
18
+ extends: RegistrableInject<'form', any>('form'),
19
+
20
+ mixins: [Colorable, Themeable],
21
+
25
22
  props: {
26
23
  disabled: {
27
24
  type: Boolean,
@@ -33,26 +30,26 @@ export default baseMixins.extend({
33
30
  default: 1,
34
31
  },
35
32
  errorMessages: {
36
- type: [String, Array],
33
+ type: [String, Array] as PropType<InputMessage | null>,
37
34
  default: () => [],
38
- } as PropValidator<InputMessage | null>,
35
+ },
39
36
  messages: {
40
- type: [String, Array],
37
+ type: [String, Array] as PropType<InputMessage | null>,
41
38
  default: () => [],
42
- } as PropValidator<InputMessage | null>,
39
+ },
43
40
  readonly: {
44
41
  type: Boolean,
45
42
  default: null,
46
43
  },
47
44
  rules: {
48
- type: Array,
45
+ type: Array as PropType<InputValidationRules>,
49
46
  default: () => [],
50
- } as PropValidator<InputValidationRules>,
47
+ },
51
48
  success: Boolean,
52
49
  successMessages: {
53
- type: [String, Array],
50
+ type: [String, Array] as PropType<InputMessage | null>,
54
51
  default: () => [],
55
- } as PropValidator<InputMessage | null>,
52
+ },
56
53
  validateOnBlur: Boolean,
57
54
  modelValue: { required: false },
58
55
  },
@@ -65,7 +62,7 @@ export default baseMixins.extend({
65
62
  hasInput: false,
66
63
  isFocused: false,
67
64
  isResetting: false,
68
- lazyValue: this.value,
65
+ lazyValue: this.modelValue ?? null,
69
66
  valid: false,
70
67
  }
71
68
  },
@@ -128,6 +125,7 @@ export default baseMixins.extend({
128
125
  this.lazyValue = val
129
126
 
130
127
  this.$emit('input', val)
128
+ this.$emit('update:modelValue', val)
131
129
  },
132
130
  },
133
131
  isDisabled (): boolean {