@teammodlr/ui-kit 2.1.24 → 2.1.26
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/lib/components/button/Button.vue.d.ts +1 -1
- package/lib/components/dialog/Dialog.vue.d.ts +1 -1
- package/lib/components/input/Input.vue.d.ts +1 -1
- package/lib/components/messageprovider/MessageProvider.vue.d.ts +0 -10
- package/lib/components/radio/Radio.vue.d.ts +1 -1
- package/lib/components/select/Select.vue.d.ts +1 -1
- package/lib/components/tag/Tag.vue.d.ts +1 -1
- package/lib/components/textarea/Textarea.vue.d.ts +2 -2
- package/lib/index.cjs.js +8 -12
- package/lib/index.es.js +2341 -2448
- package/package.json +1 -1
- package/src/components/messageprovider/MessageProvider.vue +6 -12
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<Teleport
|
|
2
|
+
<slot />
|
|
3
|
+
<template v-if="messageList.length > 0">
|
|
4
|
+
<Teleport to="body">
|
|
5
5
|
<transition
|
|
6
6
|
type="animation"
|
|
7
7
|
:enter-active-class="modalScale.enterActive"
|
|
@@ -64,10 +64,6 @@ export default defineComponent({
|
|
|
64
64
|
MMessage
|
|
65
65
|
},
|
|
66
66
|
props: {
|
|
67
|
-
teleportTo: {
|
|
68
|
-
type: String,
|
|
69
|
-
default: 'body'
|
|
70
|
-
},
|
|
71
67
|
placement: {
|
|
72
68
|
type: String as PropType<MessagePlacement>,
|
|
73
69
|
default: 'top'
|
|
@@ -78,7 +74,6 @@ export default defineComponent({
|
|
|
78
74
|
}
|
|
79
75
|
},
|
|
80
76
|
setup(props, { slots }) {
|
|
81
|
-
const isServer = useIsServer();
|
|
82
77
|
const messageListRef = ref<PrivateMessageReactive[]>([]);
|
|
83
78
|
const messageRefs = ref<Record<string, PrivateMessageRef>>({});
|
|
84
79
|
const api: MessageApiInjection = {
|
|
@@ -104,13 +99,13 @@ export default defineComponent({
|
|
|
104
99
|
};
|
|
105
100
|
|
|
106
101
|
provide('m-message', api);
|
|
107
|
-
|
|
108
102
|
function create(
|
|
109
103
|
content: ContentType,
|
|
110
104
|
options: MessageOptions & { type: MessageType }
|
|
111
105
|
): MessageReactive {
|
|
112
|
-
const
|
|
113
|
-
|
|
106
|
+
const key = Math.random()
|
|
107
|
+
.toString(16)
|
|
108
|
+
.slice(2, 2 + 12);
|
|
114
109
|
const messageReactive = reactive({
|
|
115
110
|
...options,
|
|
116
111
|
content,
|
|
@@ -150,7 +145,6 @@ export default defineComponent({
|
|
|
150
145
|
{
|
|
151
146
|
messageRefs,
|
|
152
147
|
messageList: messageListRef,
|
|
153
|
-
isServer,
|
|
154
148
|
onInternalAfterLeave,
|
|
155
149
|
classes,
|
|
156
150
|
modalScale
|