@antify/ui-module 1.1.3 → 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
package/dist/module.mjs
CHANGED
|
@@ -172,8 +172,8 @@ const tailwindcss = {
|
|
|
172
172
|
"../ui-module/src/**/*.{vue,js,ts,jsx,tsx}",
|
|
173
173
|
// For project dev
|
|
174
174
|
"./app.vue",
|
|
175
|
-
"./components
|
|
176
|
-
"./pages
|
|
175
|
+
"./components/**/*.{vue,js,ts,jsx,tsx}",
|
|
176
|
+
"./pages/**/*.{vue,js,ts,jsx,tsx}",
|
|
177
177
|
// If this config is used in a project
|
|
178
178
|
"./node_modules/@antify/*/dist/**/*.{js,vue,ts}",
|
|
179
179
|
"./node_modules/@antify/*/src/**/*.{js,vue,ts}"
|
|
@@ -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 =
|
|
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
|
|
|
@@ -170,8 +170,8 @@ export default {
|
|
|
170
170
|
"../ui-module/src/**/*.{vue,js,ts,jsx,tsx}",
|
|
171
171
|
// For project dev
|
|
172
172
|
"./app.vue",
|
|
173
|
-
"./components
|
|
174
|
-
"./pages
|
|
173
|
+
"./components/**/*.{vue,js,ts,jsx,tsx}",
|
|
174
|
+
"./pages/**/*.{vue,js,ts,jsx,tsx}",
|
|
175
175
|
// If this config is used in a project
|
|
176
176
|
"./node_modules/@antify/*/dist/**/*.{js,vue,ts}",
|
|
177
177
|
"./node_modules/@antify/*/src/**/*.{js,vue,ts}"
|
package/package.json
CHANGED
|
@@ -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 =
|
|
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
|
|