@antify/ui-module 1.1.4 → 1.1.5

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.
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "ui-module",
3
3
  "configKey": "uiModule",
4
- "version": "1.1.4"
4
+ "version": "1.1.5"
5
5
  }
@@ -1,12 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import AntField from './Elements/AntField.vue';
3
- import { useVModel } from '@vueuse/core';
4
3
  import { computed, type Ref } from 'vue';
5
4
  import { FieldValidator } from '@antify/validate';
6
5
  import AntSkeleton from '../AntSkeleton.vue';
7
6
  import { InputColorType, Size } from '../../enums';
8
7
 
9
- const emits = defineEmits([ 'update:modelValue' ]);
8
+ const emits = defineEmits([ 'update:modelValue', 'input' ]);
10
9
  const props = withDefaults(defineProps<{
11
10
  modelValue: boolean;
12
11
  label?: string;
@@ -23,7 +22,13 @@ const props = withDefaults(defineProps<{
23
22
  colorType: InputColorType.base
24
23
  });
25
24
 
26
- const _value = useVModel(props, 'modelValue', emits);
25
+ const _value = computed({
26
+ get: () => props.modelValue,
27
+ set: (value: boolean) => {
28
+ emits('update:modelValue', value)
29
+ emits('input', value)
30
+ }
31
+ });
27
32
  const hasAction = computed(() => (!props.skeleton && !props.readonly && !props.disabled))
28
33
  const _colorType: Ref<InputColorType> = computed(() => props.validator?.hasErrors() ? InputColorType.danger : props.colorType);
29
34
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antify/ui-module",
3
3
  "private": false,
4
- "version": "1.1.4",
4
+ "version": "1.1.5",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "exports": {
@@ -1,12 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import AntField from './Elements/AntField.vue';
3
- import { useVModel } from '@vueuse/core';
4
3
  import { computed, type Ref } from 'vue';
5
4
  import { FieldValidator } from '@antify/validate';
6
5
  import AntSkeleton from '../AntSkeleton.vue';
7
6
  import { InputColorType, Size } from '../../enums';
8
7
 
9
- const emits = defineEmits([ 'update:modelValue' ]);
8
+ const emits = defineEmits([ 'update:modelValue', 'input' ]);
10
9
  const props = withDefaults(defineProps<{
11
10
  modelValue: boolean;
12
11
  label?: string;
@@ -23,7 +22,13 @@ const props = withDefaults(defineProps<{
23
22
  colorType: InputColorType.base
24
23
  });
25
24
 
26
- const _value = useVModel(props, 'modelValue', emits);
25
+ const _value = computed({
26
+ get: () => props.modelValue,
27
+ set: (value: boolean) => {
28
+ emits('update:modelValue', value)
29
+ emits('input', value)
30
+ }
31
+ });
27
32
  const hasAction = computed(() => (!props.skeleton && !props.readonly && !props.disabled))
28
33
  const _colorType: Ref<InputColorType> = computed(() => props.validator?.hasErrors() ? InputColorType.danger : props.colorType);
29
34