@afeefa/vue-app 0.0.179 → 0.0.180
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.180
|
package/package.json
CHANGED
package/src/components/AInfo.vue
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<v-alert
|
3
3
|
v-bind="$attrs"
|
4
|
+
:type="type"
|
4
5
|
:style="{display: inline ? 'inline-block' : 'block'}"
|
5
6
|
:class="['a-info', {xSmall}]"
|
6
7
|
dense
|
@@ -17,7 +18,7 @@
|
|
17
18
|
import { Component, Vue } from '@a-vue'
|
18
19
|
|
19
20
|
@Component({
|
20
|
-
props: [{inline: true, xSmall: false}]
|
21
|
+
props: [{inline: true, xSmall: false, type: 'info'}]
|
21
22
|
})
|
22
23
|
export default class AInfo extends Vue {
|
23
24
|
}
|
package/src/components/ATabs.vue
CHANGED
@@ -30,8 +30,6 @@ export default class ATabs extends Vue {
|
|
30
30
|
currentIndex = 0
|
31
31
|
|
32
32
|
mounted () {
|
33
|
-
console.log(this.$children)
|
34
|
-
|
35
33
|
this.titles = this.$children.map(c => c.title)
|
36
34
|
|
37
35
|
this.$children[this.currentIndex].show()
|
@@ -52,7 +50,7 @@ export default class ATabs extends Vue {
|
|
52
50
|
|
53
51
|
<style lang="scss" scoped>
|
54
52
|
.menuContainer {
|
55
|
-
border-bottom:
|
53
|
+
border-bottom: 3px solid #DDDDDD;
|
56
54
|
margin: 2rem 0;
|
57
55
|
|
58
56
|
&.first {
|
@@ -64,29 +62,26 @@ export default class ATabs extends Vue {
|
|
64
62
|
position: relative;
|
65
63
|
display: flex;
|
66
64
|
justify-content: center;
|
67
|
-
margin-bottom: -2px;
|
68
65
|
|
69
66
|
.label {
|
70
|
-
padding: .
|
71
|
-
border-bottom: 2px solid #EEEEEE;
|
72
|
-
// border-top-left-radius: 6px;
|
73
|
-
// border-top-right-radius: 6px;
|
67
|
+
padding: .5rem 1rem .7rem;
|
74
68
|
background: white;
|
75
69
|
cursor: pointer;
|
76
70
|
|
77
71
|
text-transform: uppercase;
|
78
72
|
letter-spacing: 5px;
|
79
|
-
color: #
|
73
|
+
color: #BBBBBB;
|
80
74
|
font-size: .8rem;
|
81
75
|
white-space: nowrap;
|
82
76
|
|
83
|
-
|
84
|
-
|
77
|
+
&:hover {
|
78
|
+
background: #F4F4F4;
|
79
|
+
color: #AAAAAA;
|
80
|
+
}
|
85
81
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
border-bottom: none;
|
82
|
+
&.selected {
|
83
|
+
background: #DDDDDD;
|
84
|
+
color: #666666;
|
90
85
|
}
|
91
86
|
}
|
92
87
|
}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
v-show="visible"
|
4
4
|
id="information-bar"
|
5
5
|
:class="{mobile, rail}"
|
6
|
+
:style="widthStyle"
|
6
7
|
>
|
7
8
|
<div :class="['toggleButton', {rail}]">
|
8
9
|
<v-app-bar-nav-icon
|
@@ -40,6 +41,7 @@ export default class InformationBar extends Vue {
|
|
40
41
|
visible = false
|
41
42
|
mobile = false
|
42
43
|
rail = false
|
44
|
+
width = 300
|
43
45
|
|
44
46
|
created () {
|
45
47
|
this.$events.on(SidebarEvent.STATUS, ({payload: {information, informationRailed, mobile}}) => {
|
@@ -69,15 +71,15 @@ export default class InformationBar extends Vue {
|
|
69
71
|
|
70
72
|
const elTop = document.createElement('div')
|
71
73
|
document.body.appendChild(elTop)
|
72
|
-
moveChildren(this
|
74
|
+
moveChildren(this.getTopContainer(), elTop)
|
73
75
|
|
74
76
|
const elBottom = document.createElement('div')
|
75
77
|
document.body.appendChild(elBottom)
|
76
|
-
moveChildren(this
|
78
|
+
moveChildren(this.getBottomContainer(), elBottom)
|
77
79
|
|
78
80
|
this.$nextTick(() => {
|
79
|
-
moveChildren(elTop,
|
80
|
-
moveChildren(elBottom,
|
81
|
+
moveChildren(elTop, this.getTopContainer())
|
82
|
+
moveChildren(elBottom, this.getBottomContainer())
|
81
83
|
this.$nextTick(() => {
|
82
84
|
this.$events.dispatch(new SidebarEvent(SidebarEvent.STATUS, new SidebarState(sidebarService)))
|
83
85
|
})
|
@@ -86,7 +88,8 @@ export default class InformationBar extends Vue {
|
|
86
88
|
|
87
89
|
@Watch('rail')
|
88
90
|
railChanged () {
|
89
|
-
|
91
|
+
const right = `calc(-${this.width}px - 3rem + 60px)`
|
92
|
+
this.$el.style.marginRight = this.rail ? right : 0
|
90
93
|
}
|
91
94
|
|
92
95
|
toggleRail () {
|
@@ -98,6 +101,7 @@ export default class InformationBar extends Vue {
|
|
98
101
|
const visible = this.hasSidebarItems()
|
99
102
|
|
100
103
|
if (visible && !old) {
|
104
|
+
this.width = this.getWidthFromItems()
|
101
105
|
sidebarService.setInformation(true)
|
102
106
|
}
|
103
107
|
|
@@ -110,6 +114,14 @@ export default class InformationBar extends Vue {
|
|
110
114
|
return this.$el.querySelector('#information-bar__children')
|
111
115
|
}
|
112
116
|
|
117
|
+
getTopContainer () {
|
118
|
+
return document.querySelector('#information-bar__children .top')
|
119
|
+
}
|
120
|
+
|
121
|
+
getBottomContainer () {
|
122
|
+
return document.querySelector('#information-bar__children .bottom')
|
123
|
+
}
|
124
|
+
|
113
125
|
hasSidebarItems () {
|
114
126
|
return !!(this.$el.querySelector('#information-bar__children .top').children.length +
|
115
127
|
this.$el.querySelector('#information-bar__children .bottom').children.length)
|
@@ -118,6 +130,33 @@ export default class InformationBar extends Vue {
|
|
118
130
|
hideSidebar () {
|
119
131
|
sidebarService.setInformation(false)
|
120
132
|
}
|
133
|
+
|
134
|
+
getWidthFromItems () {
|
135
|
+
let width = 0
|
136
|
+
|
137
|
+
Array.from(this.getTopContainer().children).forEach(c => {
|
138
|
+
if (c.style.width !== 'auto') {
|
139
|
+
const w = parseInt(c.style.width)
|
140
|
+
width = Math.max(width, w)
|
141
|
+
}
|
142
|
+
})
|
143
|
+
|
144
|
+
Array.from(this.getBottomContainer().children).forEach(c => {
|
145
|
+
if (c.style.width !== 'auto') {
|
146
|
+
const w = parseInt(c.style.width)
|
147
|
+
width = Math.max(width, w)
|
148
|
+
}
|
149
|
+
})
|
150
|
+
|
151
|
+
return width
|
152
|
+
}
|
153
|
+
|
154
|
+
get widthStyle () {
|
155
|
+
return {
|
156
|
+
flex: `0 0 calc(${this.width}px + 3rem)`,
|
157
|
+
width: `calc(${this.width}px + 3rem)`
|
158
|
+
}
|
159
|
+
}
|
121
160
|
}
|
122
161
|
</script>
|
123
162
|
|
@@ -126,8 +165,6 @@ export default class InformationBar extends Vue {
|
|
126
165
|
#information-bar {
|
127
166
|
position: relative;
|
128
167
|
|
129
|
-
flex: 0 0 300px;
|
130
|
-
width: 300px;
|
131
168
|
height: 100vh;
|
132
169
|
overflow-x: hidden;
|
133
170
|
overflow-y: auto;
|