@antify/ui 3.1.14 → 3.1.16

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.
@@ -22,7 +22,7 @@ const props = withDefaults(defineProps<{
22
22
  });
23
23
 
24
24
  const _toasts = computed(() => {
25
- if(props.position === CornerPosition.topLeft || props.position === CornerPosition.topRight) {
25
+ if(props.position === CornerPosition.topLeft || props.position === CornerPosition.topRight || props.position === CornerPosition.topCenter) {
26
26
  return props.toasts;
27
27
  }
28
28
 
@@ -62,7 +62,7 @@ const classes = computed(() => ({
62
62
  :title="toast.title"
63
63
  :state="toast.type"
64
64
  :icon="toast.hasIcon"
65
- @close="() => $emit('close', toast)"
65
+ @close="$emit('close', toast)"
66
66
  >
67
67
  <template
68
68
  v-if="toast.content"
@@ -122,7 +122,11 @@ const UseToaster = exports.UseToaster = {
122
122
  </AntButton>
123
123
  </AntFormGroup>
124
124
 
125
- <AntToaster v-bind="args" :toasts="toaster.getToasts()" />
125
+ <AntToaster
126
+ v-bind="args"
127
+ :toasts="toaster.getToasts()"
128
+ @close="(toast) => toaster.removeToast(toast)"
129
+ />
126
130
  `
127
131
  })
128
132
  };
@@ -130,7 +130,11 @@ export const UseToaster = {
130
130
  </AntButton>
131
131
  </AntFormGroup>
132
132
 
133
- <AntToaster v-bind="args" :toasts="toaster.getToasts()" />
133
+ <AntToaster
134
+ v-bind="args"
135
+ :toasts="toaster.getToasts()"
136
+ @close="(toast) => toaster.removeToast(toast)"
137
+ />
134
138
  `
135
139
  })
136
140
  };
@@ -48,7 +48,7 @@ const _active = computed<boolean>(() => {
48
48
  }
49
49
 
50
50
  if (typeof props.to === 'object' && props.to?.name !== undefined) {
51
- return route.name.startsWith(props.to.name);
51
+ return route.name === props.to.name;
52
52
  }
53
53
 
54
54
  return props.active;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antify/ui",
3
- "version": "3.1.14",
3
+ "version": "3.1.16",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {