adata-ui 0.1.67 → 0.1.68
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/adata-ui.common.js +61 -47
- package/dist/adata-ui.common.js.map +1 -1
- package/dist/adata-ui.css +1 -1
- package/dist/adata-ui.umd.js +61 -47
- package/dist/adata-ui.umd.js.map +1 -1
- package/dist/adata-ui.umd.min.js +2 -2
- package/dist/adata-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/AButton.vue +3 -0
- package/src/components/Header/Header.vue +0 -1
- package/src/components/Header/Profile.vue +19 -7
- package/src/components/Table/ATable.vue +2 -2
package/package.json
CHANGED
|
@@ -90,14 +90,17 @@ export default {
|
|
|
90
90
|
|
|
91
91
|
&.size {
|
|
92
92
|
&_extra_sm {
|
|
93
|
+
height: 24px;
|
|
93
94
|
padding: 2px 16px;
|
|
94
95
|
line-height: 20px;
|
|
95
96
|
}
|
|
96
97
|
&_sm {
|
|
98
|
+
height: 32px;
|
|
97
99
|
padding: 6px 20px;
|
|
98
100
|
line-height: 20px;
|
|
99
101
|
}
|
|
100
102
|
&_md {
|
|
103
|
+
height: 40px;
|
|
101
104
|
padding: 8px 30px;
|
|
102
105
|
line-height: 24px;
|
|
103
106
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
fill="#2C3E50"></path>
|
|
18
18
|
</svg>
|
|
19
19
|
</div>
|
|
20
|
-
<a
|
|
20
|
+
<a @click.prevent="goAuth" class="sign" v-show="!isAuthenticated">
|
|
21
21
|
<svg width="18" height="18" fill="#25476AFF" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="desktop">
|
|
22
22
|
<path fill="#fff" d="M0 0h16v16H0z" stroke="none"></path>
|
|
23
23
|
<path d="M8 10l2-2.054L8.077 6" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
@@ -42,11 +42,12 @@
|
|
|
42
42
|
<div class="profile-menu__inner">
|
|
43
43
|
<div class="profile-menu__items" v-if="listDropDown.length">
|
|
44
44
|
<div v-for="(elem, index) in listDropDown" :key="index">
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
<a :href="elem[mode]" :class="elem.link ? 'profile-menu__balance-link': 'profile-menu__links'"
|
|
46
|
+
class="gray-text"
|
|
47
|
+
v-if="elem[mode]"
|
|
48
|
+
@click="preventLink(elem.disabled, $event)"
|
|
49
|
+
onclick="`return false`"
|
|
50
|
+
>
|
|
50
51
|
<div>
|
|
51
52
|
{{ elem.name }}
|
|
52
53
|
</div>
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
>
|
|
58
59
|
{{ elem.link }}
|
|
59
60
|
</span>
|
|
60
|
-
</
|
|
61
|
+
</a>
|
|
61
62
|
<div v-if="elem.children" @click="rotateItem(index)" class="gray-text profile-menu__item">
|
|
62
63
|
<div class="profile-menu__item__children">{{ elem.name }}
|
|
63
64
|
<span v-if="elem.children.length > 0">
|
|
@@ -303,6 +304,11 @@ export default {
|
|
|
303
304
|
logout() {
|
|
304
305
|
this.$emit("logout");
|
|
305
306
|
},
|
|
307
|
+
preventLink(disabled, e) {
|
|
308
|
+
if (disabled) {
|
|
309
|
+
e.preventDefault()
|
|
310
|
+
}
|
|
311
|
+
},
|
|
306
312
|
async showModal(url, name) {
|
|
307
313
|
if (name.includes('Текущий')) {
|
|
308
314
|
if(window.location.href.includes(url)) {
|
|
@@ -324,6 +330,12 @@ export default {
|
|
|
324
330
|
this.chosenElem = this.listDropDown[index];
|
|
325
331
|
this.$set(this.listDropDown[index], 'opened', !this.listDropDown[index].opened)
|
|
326
332
|
},
|
|
333
|
+
goAuth() {
|
|
334
|
+
const fullPath = encodeURIComponent(window.location.toString())
|
|
335
|
+
if (window) {
|
|
336
|
+
window.location.href = `${this.loginUrl}?url=${fullPath}`
|
|
337
|
+
}
|
|
338
|
+
}
|
|
327
339
|
}
|
|
328
340
|
};
|
|
329
341
|
</script>
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<th v-for="(col, i) in cols" :key="i">{{ col.name }}</th>
|
|
6
6
|
</tr>
|
|
7
7
|
</thead>
|
|
8
|
-
<tbody
|
|
9
|
-
<tr>
|
|
8
|
+
<tbody>
|
|
9
|
+
<tr v-for="(row, i) in rows" :key="i">
|
|
10
10
|
<td v-for="col in cols" :key="col.key" :data-label="`${col.name}`">
|
|
11
11
|
<slot :name="'key-' + col.key" :row="row">
|
|
12
12
|
{{ row[col.key] || defaultEmpty }}
|