adata-ui 0.3.41 → 0.3.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "0.3.41",
3
+ "version": "0.3.43",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -8,7 +8,7 @@
8
8
  <div class="bottom-navigation__title">Главная</div>
9
9
  </component>
10
10
  </li>
11
- <li>
11
+ <li id="services-btn">
12
12
  <a :class="{ 'bottom-navigation--active': openService }" @click="handleClick">
13
13
  <div class="bottom-navigation__icon">
14
14
  <a-nav-icon icon-name="service" class="ic-24"/>
@@ -91,11 +91,19 @@ export default {
91
91
  }
92
92
  }
93
93
  },
94
+ mounted() {
95
+ this.$nextTick(() => {
96
+ document.querySelectorAll('.bottom-navigation li').forEach((elem) => {
97
+ elem.addEventListener('click', () => {
98
+ if (elem.id !== 'services-btn') {
99
+ this.$emit("close")
100
+ }
101
+ })
102
+ })
103
+ })
104
+ },
94
105
  methods: {
95
106
  handleClick() {
96
- // this.$router.push({
97
- // hash: "service"
98
- // })
99
107
  this.$emit("click-menu")
100
108
  }
101
109
  }
@@ -140,4 +148,4 @@ export default {
140
148
  }
141
149
  }
142
150
  }
143
- </style>
151
+ </style>
@@ -25,7 +25,7 @@ export default {
25
25
  default: null,
26
26
  },
27
27
  value: {
28
- type: [Array, Number, String],
28
+ type: [Array, Number, String, Boolean],
29
29
  default: null,
30
30
  },
31
31
  label: {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="services" :class="{ 'services--active': openService }">
2
+ <div id="services-navs" class="services" :class="{ 'services--active': openService }">
3
3
  <div class="services__header">
4
4
  <svg width="78" height="24" viewBox="0 0 78 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
5
  <rect width="78" height="24" fill="white"/>
@@ -26,6 +26,7 @@
26
26
  :is="navs.links.length ? 'div': module === navs.module ? 'nuxt-link': 'a'"
27
27
  v-for="navs in navigations"
28
28
  :key="navs.icon"
29
+ :id="navs.module"
29
30
  class="service-card__item"
30
31
  :href="navs.links.length ? null: module === navs.module ? null: navs.url[mode]"
31
32
  :to="navs.links.length ? null: '/'"
@@ -166,44 +167,46 @@
166
167
  </div>
167
168
  </div>
168
169
 
169
- <div class="menu-mobile" :class="{ 'menu-mobile--show': showPanelMenu }">
170
- <div class="menu-mobile__header">
171
- <div class="menu-mobile__arrow" @click="goBack">
172
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
173
- <path d="M15 18L9 12L15 6" stroke="#2C3E50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
174
- </svg>
175
- </div>
176
- <div class="menu-mobile__title">
177
- <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
178
- <g clip-path="url(#clip0_5191_51862)">
179
- <path d="M12.3416 8.35498H12.2766C12.2488 8.70065 12.1805 9.04187 12.0732 9.37164L10.8032 13.3333H13.7899L12.5366 9.41164C12.4351 9.06712 12.3698 8.713 12.3416 8.35498Z" fill="#2C3E50"/>
180
- <path d="M20.5 2H4.5C3.96957 2 3.46086 2.21071 3.08579 2.58578C2.71071 2.96086 2.5 3.46957 2.5 4V20C2.5 20.5304 2.71071 21.0391 3.08579 21.4142C3.46086 21.7893 3.96957 22 4.5 22H20.5C21.0304 22 21.5391 21.7893 21.9142 21.4142C22.2893 21.0391 22.5 20.5304 22.5 20V4C22.5 3.46957 22.2893 2.96086 21.9142 2.58578C21.5391 2.21071 21.0304 2 20.5 2ZM15.2217 17.9417L14.3883 15.345H10.2383L9.41667 17.9417H6.57167L10.82 6.275H13.9367L18.0867 17.9417H15.2217Z" fill="#2C3E50"/>
181
- </g>
182
- <defs>
183
- <clipPath id="clip0_5191_51862">
184
- <rect width="24" height="24" fill="white" transform="translate(0.5)"/>
185
- </clipPath>
186
- </defs>
187
- </svg>
188
- <p>{{navigation.title}}</p>
189
- </div>
190
- <div class="ic-24"></div>
191
- </div>
192
- <ul class="navigations">
193
- <li v-for="link in navigation.links" :key="link.id">
194
- <component
195
- :is="module === navigation.module ? 'nuxt-link' : 'a' "
196
- :to="link.href"
197
- :href="module === navigation.module ? '': navigation.url[mode] + link.href"
198
- >
199
- <p>{{link.title}}</p>
170
+ <transition name="menu">
171
+ <div class="menu-mobile" v-show="showPanelMenu" :class="{ 'menu-mobile--show': showPanelMenu }">
172
+ <div class="menu-mobile__header">
173
+ <div class="menu-mobile__arrow" @click="goBack">
200
174
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
201
- <path d="M9 18L15 12L9 6" stroke="#2C3E50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
175
+ <path d="M15 18L9 12L15 6" stroke="#2C3E50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
202
176
  </svg>
203
- </component>
204
- </li>
205
- </ul>
206
- </div>
177
+ </div>
178
+ <div class="menu-mobile__title">
179
+ <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
180
+ <g clip-path="url(#clip0_5191_51862)">
181
+ <path d="M12.3416 8.35498H12.2766C12.2488 8.70065 12.1805 9.04187 12.0732 9.37164L10.8032 13.3333H13.7899L12.5366 9.41164C12.4351 9.06712 12.3698 8.713 12.3416 8.35498Z" fill="#2C3E50"/>
182
+ <path d="M20.5 2H4.5C3.96957 2 3.46086 2.21071 3.08579 2.58578C2.71071 2.96086 2.5 3.46957 2.5 4V20C2.5 20.5304 2.71071 21.0391 3.08579 21.4142C3.46086 21.7893 3.96957 22 4.5 22H20.5C21.0304 22 21.5391 21.7893 21.9142 21.4142C22.2893 21.0391 22.5 20.5304 22.5 20V4C22.5 3.46957 22.2893 2.96086 21.9142 2.58578C21.5391 2.21071 21.0304 2 20.5 2ZM15.2217 17.9417L14.3883 15.345H10.2383L9.41667 17.9417H6.57167L10.82 6.275H13.9367L18.0867 17.9417H15.2217Z" fill="#2C3E50"/>
183
+ </g>
184
+ <defs>
185
+ <clipPath id="clip0_5191_51862">
186
+ <rect width="24" height="24" fill="white" transform="translate(0.5)"/>
187
+ </clipPath>
188
+ </defs>
189
+ </svg>
190
+ <p>{{navigation.title}}</p>
191
+ </div>
192
+ <div class="ic-24"></div>
193
+ </div>
194
+ <ul class="navigations">
195
+ <li v-for="link in navigation.links" :key="link.id">
196
+ <component
197
+ :is="module === navigation.module ? 'nuxt-link' : 'a' "
198
+ :to="link.href"
199
+ :href="module === navigation.module ? '': navigation.url[mode] + link.href"
200
+ >
201
+ <p>{{link.title}}</p>
202
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
203
+ <path d="M9 18L15 12L9 6" stroke="#2C3E50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
204
+ </svg>
205
+ </component>
206
+ </li>
207
+ </ul>
208
+ </div>
209
+ </transition>
207
210
 
208
211
  </div>
209
212
  </template>
@@ -510,16 +513,18 @@ export default {
510
513
  watch: {
511
514
  openService(e) {
512
515
  if (e) {
516
+ const currentModule = this.navigations.some((nav) => nav.module === this.module)
517
+ if (currentModule) {
518
+ document.querySelector(`#services-navs #${this.module}`).click()
519
+ }
513
520
  document.body.style.overflowY = "hidden"
514
521
  } else {
515
522
  this.showPanelMenu = false
516
523
  document.body.style.overflowY = "auto"
517
524
  }
518
525
  },
519
- $route(e) {
520
- if (e.hash !== "#service") {
521
- this.$emit("hide-service")
522
- }
526
+ $route() {
527
+ this.$emit("hide-service")
523
528
  }
524
529
  },
525
530
  async created() {
@@ -591,7 +596,7 @@ export default {
591
596
  background: #fff;
592
597
  left: 0;
593
598
  width: 100%;
594
- transition: 0.4s ease-in-out;
599
+ transition: 0.3s ease;
595
600
  z-index: 1002;
596
601
 
597
602
  &__header {
@@ -625,7 +630,7 @@ export default {
625
630
  }
626
631
 
627
632
  &--active {
628
- bottom: 0px;
633
+ bottom: 0;
629
634
  }
630
635
 
631
636
  &__email {
@@ -646,15 +651,11 @@ export default {
646
651
 
647
652
  .menu-mobile {
648
653
  position: fixed;
649
- right: -100%;
654
+ right: 0;
650
655
  top: 0;
651
656
  height: calc(100% - 64px);
652
657
  width: 100%;
653
658
  background: linear-gradient(0deg, rgba(189, 199, 206, 0.2), rgba(189, 199, 206, 0.2)), #FFFFFF;
654
- transition: 0.4s ease;
655
- &--show {
656
- right: 0;
657
- }
658
659
  &__header {
659
660
  display: flex;
660
661
  justify-content: space-between;
@@ -764,4 +765,15 @@ export default {
764
765
  display: block;
765
766
  }
766
767
  }
768
+
769
+ .menu-enter-active {
770
+ transition: right 0.2s ease;
771
+ }
772
+ .menu-leave-active {
773
+ transition: right 0.4s ease;
774
+ }
775
+ .menu-enter,
776
+ .menu-leave-to {
777
+ right: -100% !important;
778
+ }
767
779
  </style>