plugin-ui-for-kzt 0.0.13 → 0.0.15
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/components/BaseButton/BaseButton.vue.d.ts +1 -1
- package/dist/components/BaseCalendar/BaseCalendar.vue.d.ts +1 -1
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +2 -2
- package/dist/components/BaseDropdown/BaseDropdown.vue.d.ts +1 -1
- package/dist/components/BaseInput/BaseInput.vue.d.ts +2 -2
- package/dist/components/BaseInputCalendar/BaseInputCalendar.vue.d.ts +2 -2
- package/dist/components/BaseInputCurrency/BaseInputCurrency.vue.d.ts +2 -2
- package/dist/components/BaseInputEmail/BaseInputEmail.vue.d.ts +2 -2
- package/dist/components/BaseInputPhone/BaseInputPhone.vue.d.ts +2 -2
- package/dist/components/BaseOpenedListItem/BaseOpenedListItem.vue.d.ts +1 -1
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +2 -2
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +1 -1
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +2 -2
- package/dist/components/BaseToggle/BaseToggle.vue.d.ts +2 -2
- package/dist/components/BaseTooltip/BaseTooltip.vue.d.ts +1 -1
- package/dist/icons/index.d.ts +2 -4
- package/dist/index.js +1 -1
- package/example/App.vue +244 -242
- package/package.json +1 -1
- package/src/components/BaseSelect/BaseSelect.vue +3 -3
- package/src/components/Modal/Modal.vue +14 -14
- package/src/icons/index.ts +14 -8
- package/src/plugins/modalPlugin.ts +1 -4
- package/src/store/modal.ts +0 -2
|
@@ -12,7 +12,6 @@ export default {
|
|
|
12
12
|
app.config.globalProperties.$modal = {
|
|
13
13
|
open(name: IModalType, options: IModalState) {
|
|
14
14
|
modalStore.openModal(name, options); // Открытие модалки через Pinia
|
|
15
|
-
console.log("Current modals:", modalStore.modals);
|
|
16
15
|
},
|
|
17
16
|
close(id: number) {
|
|
18
17
|
modalStore.closeModal(id); // Закрытие модалки через Pinia
|
|
@@ -29,9 +28,8 @@ export default {
|
|
|
29
28
|
(newModals) => {
|
|
30
29
|
// Очищаем контейнер
|
|
31
30
|
modalContainer.innerHTML = "";
|
|
32
|
-
|
|
33
31
|
// Обновляем data-атрибут и класс
|
|
34
|
-
if (newModals.length >
|
|
32
|
+
if (newModals.length > 0) {
|
|
35
33
|
modalContainer.classList.add("modal");
|
|
36
34
|
} else {
|
|
37
35
|
modalContainer.classList.remove("modal");
|
|
@@ -61,7 +59,6 @@ export default {
|
|
|
61
59
|
);
|
|
62
60
|
// ✅ Добавляем ОДИН обработчик клика по фону
|
|
63
61
|
modalContainer.addEventListener("click", (event) => {
|
|
64
|
-
console.log("click on background", modalStore.modals.length);
|
|
65
62
|
|
|
66
63
|
if (modalStore.modals.length > 0) {
|
|
67
64
|
const lastModal = modalStore.modals[modalStore.modals.length - 1];
|
package/src/store/modal.ts
CHANGED
|
@@ -12,10 +12,8 @@ export const useModalStore = defineStore('modal', {
|
|
|
12
12
|
name,
|
|
13
13
|
options,
|
|
14
14
|
});
|
|
15
|
-
console.log('Modal added:', this.modals);
|
|
16
15
|
},
|
|
17
16
|
closeModal(id: number) {
|
|
18
|
-
console.log('Modal removed:', this.modals);
|
|
19
17
|
this.modals = this.modals.filter((modal) => modal.id !== id);
|
|
20
18
|
},
|
|
21
19
|
},
|