mediacube-ui 0.1.355 → 0.1.356
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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import defaultImage from '../../assets/img/no_user.png'
|
|
3
2
|
export default {
|
|
4
3
|
name: 'McAvatar',
|
|
5
4
|
functional: true,
|
|
@@ -10,7 +9,7 @@ export default {
|
|
|
10
9
|
*/
|
|
11
10
|
src: {
|
|
12
11
|
type: String,
|
|
13
|
-
default:
|
|
12
|
+
default: null,
|
|
14
13
|
},
|
|
15
14
|
/**
|
|
16
15
|
* Отложенная подгрузка
|
|
@@ -133,7 +132,7 @@ export default {
|
|
|
133
132
|
name: 'lazy',
|
|
134
133
|
value: {
|
|
135
134
|
src: props.src,
|
|
136
|
-
error:
|
|
135
|
+
error: 'error',
|
|
137
136
|
attempt: 1,
|
|
138
137
|
},
|
|
139
138
|
}
|
|
@@ -149,23 +148,67 @@ export default {
|
|
|
149
148
|
},
|
|
150
149
|
},
|
|
151
150
|
[
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
151
|
+
props?.src &&
|
|
152
|
+
h('img', {
|
|
153
|
+
class: 'mc-avatar__img',
|
|
154
|
+
attrs: {
|
|
155
|
+
alt: props.alt,
|
|
156
|
+
...(!props.lazy ? { src: props.src } : {}),
|
|
157
|
+
draggable: props.draggable,
|
|
158
|
+
},
|
|
159
|
+
directives,
|
|
160
|
+
key: props.src,
|
|
161
|
+
on: {
|
|
162
|
+
error(e) {
|
|
163
|
+
if (!e.target) return
|
|
164
|
+
e.target.style.display = 'none'
|
|
165
|
+
e.target.nextSibling.style.display = 'block'
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
}),
|
|
169
|
+
h(
|
|
170
|
+
'svg',
|
|
171
|
+
{
|
|
172
|
+
class: 'mc-avatar__img',
|
|
173
|
+
attrs: {
|
|
174
|
+
name: 'avatar-square',
|
|
175
|
+
color: 'main',
|
|
176
|
+
width: '104',
|
|
177
|
+
height: '104',
|
|
178
|
+
viewBox: '0 0 104 104',
|
|
179
|
+
fill: 'none',
|
|
180
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
181
|
+
},
|
|
182
|
+
style: {
|
|
183
|
+
display: props?.src ? 'none' : 'block',
|
|
165
184
|
},
|
|
166
185
|
},
|
|
167
|
-
|
|
168
|
-
|
|
186
|
+
[
|
|
187
|
+
h('rect', {
|
|
188
|
+
attrs: {
|
|
189
|
+
width: '104',
|
|
190
|
+
height: '104',
|
|
191
|
+
rx: '8',
|
|
192
|
+
fill: 'currentColor',
|
|
193
|
+
},
|
|
194
|
+
}),
|
|
195
|
+
h('path', {
|
|
196
|
+
attrs: {
|
|
197
|
+
d:
|
|
198
|
+
'M33.3078 40.2381C33.3078 29.9814 41.6764 21.6667 51.9997 21.6667C62.3229 21.6667 70.6916 29.9814 70.6916 40.2381V42.7143C70.6916 52.971 62.3229 61.2857 51.9997 61.2857C41.6764 61.2857 33.3078 52.971 33.3078 42.7143V40.2381Z',
|
|
199
|
+
fill: 'white',
|
|
200
|
+
},
|
|
201
|
+
}),
|
|
202
|
+
h('path', {
|
|
203
|
+
attrs: {
|
|
204
|
+
d:
|
|
205
|
+
'M86.6663 84.6684C78.021 93.8955 65.6887 99.6667 51.9997 99.6667C38.3107 99.6667 25.9783 93.8955 17.333 84.6684C24.1962 75.69 37.15 69.9524 51.9997 69.9524C66.8493 69.9524 79.8032 75.69 86.6663 84.6684Z',
|
|
206
|
+
fill: 'white',
|
|
207
|
+
},
|
|
208
|
+
}),
|
|
209
|
+
],
|
|
210
|
+
),
|
|
211
|
+
].filter(Boolean),
|
|
169
212
|
)
|
|
170
213
|
}
|
|
171
214
|
|
|
@@ -188,6 +231,7 @@ export default {
|
|
|
188
231
|
<style lang="scss">
|
|
189
232
|
@import '../../styles/mixins';
|
|
190
233
|
@import '../../tokens/durations';
|
|
234
|
+
|
|
191
235
|
$color-borders: $token-colors;
|
|
192
236
|
$dot-colors: $token-colors;
|
|
193
237
|
|
|
@@ -511,7 +511,7 @@ export default {
|
|
|
511
511
|
* Проверяем доступность выбора периода по досупной дате, если есть ограничения
|
|
512
512
|
* */
|
|
513
513
|
checkDisablePeriod(period) {
|
|
514
|
-
const [start] = this.selectPeriod(period)
|
|
514
|
+
const [start] = this.selectPeriod(period, true)
|
|
515
515
|
return this.disabledDate(start)
|
|
516
516
|
},
|
|
517
517
|
selectPeriod(key, isReturn = false) {
|