@netang/quasar 0.0.20

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.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -0
  3. package/components/column-title/index.vue +32 -0
  4. package/components/dialog/components/index.js +6 -0
  5. package/components/dialog/components/move-to-tree/index.vue +150 -0
  6. package/components/dialog/index.vue +330 -0
  7. package/components/dialog-table/index.vue +92 -0
  8. package/components/dragger/index.vue +202 -0
  9. package/components/drawer/index.vue +262 -0
  10. package/components/field-date/index.vue +844 -0
  11. package/components/field-date/methods.js +100 -0
  12. package/components/field-table/index.vue +468 -0
  13. package/components/field-text/index.vue +167 -0
  14. package/components/field-tree/index.vue +435 -0
  15. package/components/input-number/index.vue +324 -0
  16. package/components/input-number/number.js +67 -0
  17. package/components/input-price-cent/index.vue +213 -0
  18. package/components/input-price-yuan/index.vue +179 -0
  19. package/components/layout/index.vue +119 -0
  20. package/components/list-menu/index.vue +137 -0
  21. package/components/list-menu-item/index.vue +79 -0
  22. package/components/power-data/index.vue +667 -0
  23. package/components/search/index.vue +176 -0
  24. package/components/search-item/index.vue +219 -0
  25. package/components/select/index.vue +71 -0
  26. package/components/select-filter/index.vue +75 -0
  27. package/components/table/index.vue +347 -0
  28. package/components/table-column-fixed/index.vue +68 -0
  29. package/components/table-pagination/index.vue +83 -0
  30. package/components/table-summary/index.vue +91 -0
  31. package/components/thumbnail/index.vue +87 -0
  32. package/components/toolbar/container.vue +31 -0
  33. package/components/toolbar/index.vue +405 -0
  34. package/components/uploader/index.vue +157 -0
  35. package/components/uploader-query/index.vue +731 -0
  36. package/package.json +21 -0
  37. package/sass/common.scss +165 -0
  38. package/sass/index.scss +14 -0
  39. package/sass/line.scss +39 -0
  40. package/sass/quasar/btn.scss +46 -0
  41. package/sass/quasar/common.scss +3 -0
  42. package/sass/quasar/dialog.scss +7 -0
  43. package/sass/quasar/drawer.scss +6 -0
  44. package/sass/quasar/field.scss +210 -0
  45. package/sass/quasar/loading.scss +6 -0
  46. package/sass/quasar/menu.scss +8 -0
  47. package/sass/quasar/table.scss +112 -0
  48. package/sass/quasar/toolbar.scss +22 -0
  49. package/store/index.js +32 -0
  50. package/utils/$area.js +387 -0
  51. package/utils/$auth.js +135 -0
  52. package/utils/$dialog.js +43 -0
  53. package/utils/$role.js +807 -0
  54. package/utils/$rule.js +17 -0
  55. package/utils/$search.js +336 -0
  56. package/utils/$table.js +802 -0
  57. package/utils/$tree.js +620 -0
  58. package/utils/$uploader.js +1029 -0
  59. package/utils/alert.js +10 -0
  60. package/utils/bus.js +6 -0
  61. package/utils/config.js +22 -0
  62. package/utils/confrim.js +11 -0
  63. package/utils/dict.js +44 -0
  64. package/utils/getData.js +61 -0
  65. package/utils/getFile.js +30 -0
  66. package/utils/getImage.js +136 -0
  67. package/utils/getTime.js +94 -0
  68. package/utils/http.js +251 -0
  69. package/utils/loading.js +13 -0
  70. package/utils/notify.js +13 -0
  71. package/utils/previewImage.js +8 -0
  72. package/utils/symbols.js +3 -0
  73. package/utils/timestamp.js +18 -0
  74. package/utils/toast.js +13 -0
  75. package/utils/uploader/aliyun.js +6 -0
  76. package/utils/uploader/local.js +8 -0
  77. package/utils/uploader/qiniu.js +311 -0
  78. package/utils/useAuth.js +26 -0
  79. package/utils/useRouter.js +36 -0
  80. package/utils/useUploader.js +58 -0
@@ -0,0 +1,731 @@
1
+ <template>
2
+ <div class="n-uploader-query">
3
+
4
+ <!-- 上传按钮 -->
5
+ <slot
6
+ name="button"
7
+ :size="currentSize"
8
+ v-if="$slots.button"
9
+ />
10
+ <div
11
+ class="n-uploader-query__button--button"
12
+ v-else-if="! noButton && currentButtonType === 'button'"
13
+ >
14
+ <q-btn
15
+ class="n-button-icon"
16
+ :label="buttonText || '上传'"
17
+ @click="uploader.chooseUpload"
18
+ color="primary"
19
+ outline
20
+ unelevated
21
+ v-bind="buttonProps"
22
+ />
23
+ </div>
24
+
25
+ <!-- 拖拽器 -->
26
+ <n-dragger
27
+ class="n-uploader-query__query row q-gutter-sm"
28
+ v-model="query"
29
+ :drag="currentDrag"
30
+ @update:model-value="uploader.updateValue"
31
+ v-slot="{ mousedown, fromIndex, dragStart, dragEnter, dragEnd }"
32
+ >
33
+ <!-- 上传图片队列 -->
34
+ <template v-if="type === 'image'">
35
+
36
+ <!-- 左边方块按钮 -->
37
+ <template v-if="! rightSquareButton">
38
+ <slot
39
+ name="square-button"
40
+ :size="currentSize"
41
+ :show="showSquareButton"
42
+ v-if="$slots['square-button']"
43
+ />
44
+ <div
45
+ class="n-uploader-query__button--square cursor-pointer"
46
+ :style="{
47
+ width: utils.px(currentSize),
48
+ height: utils.px(currentSize),
49
+ }"
50
+ @click="uploader.chooseUpload"
51
+ v-show="showSquareButton"
52
+ v-else-if="! noButton && currentButtonType === 'square'"
53
+ >
54
+ <q-icon
55
+ name="add"
56
+ :size="utils.px(currentSize / 2)"
57
+ />
58
+ <div class="n-uploader-query__button--square__text" v-if="buttonText">{{buttonText}}</div>
59
+ </div>
60
+ </template>
61
+
62
+ <!-- 单个图片 -->
63
+ <div
64
+ v-for="(fileItem, fileItemIndex) in query"
65
+ :key="`query-item-${fileItem.id}`"
66
+ class="n-uploader-query__item n-uploader-query__item--image"
67
+ :class="{
68
+ ghost: fileItemIndex === fromIndex,
69
+ }"
70
+ :draggable="currentDrag"
71
+ @mousedown.self="mousedown($event, fileItemIndex)"
72
+ @mouseup="dragEnd"
73
+ @dragstart="dragStart($event, fileItemIndex)"
74
+ @dragenter="dragEnter($event, fileItemIndex)"
75
+ @dragend="dragEnd"
76
+ >
77
+ <q-img
78
+ :src="getImage(fileItem)"
79
+ :spinner-size="utils.px(currentSize / 2)"
80
+ :width="utils.px(currentSize)"
81
+ :height="utils.px(currentSize)"
82
+ fit="fill"
83
+ >
84
+ <!-- 内容 -->
85
+ <div
86
+ class="n-uploader-query__item__inner absolute-full flex flex-center no-padding transparent"
87
+ :class="{
88
+ 'transparent': fileItem.status < UPLOAD_STATUS.success,
89
+ }"
90
+ v-if="fileItem.status !== UPLOAD_STATUS.success"
91
+ >
92
+ <!-- 如果上传失败 -->
93
+ <div
94
+ class="n-uploader-query__item__inner__msg n-uploader-query__item__inner__msg--error"
95
+ v-if="fileItem.status === UPLOAD_STATUS.fail"
96
+ >{{fileItem.msg}}</div>
97
+
98
+ <!-- 上传中前 -->
99
+ <q-circular-progress
100
+ indeterminate
101
+ rounded
102
+ :size="utils.px(currentSize / 1.5)"
103
+ :thickness="0.14"
104
+ color="white"
105
+ v-if="fileItem.status < UPLOAD_STATUS.uploading"
106
+ />
107
+
108
+ <!-- 上传中 -->
109
+ <q-circular-progress
110
+ :value="fileItem.progress"
111
+ :size="utils.px(currentSize / 1.5)"
112
+ :thickness="0.14"
113
+ color="white"
114
+ track-color="grey-5"
115
+ show-value
116
+ v-else-if="fileItem.status === UPLOAD_STATUS.uploading"
117
+ >
118
+ <q-icon
119
+ class="cursor-pointer"
120
+ name="pause"
121
+ :size="utils.px(currentSize / 3)"
122
+ @click="uploader.deleteFileItem(fileItem)"
123
+ />
124
+ </q-circular-progress>
125
+ </div>
126
+
127
+ <!-- 操作 -->
128
+ <div
129
+ class="n-uploader-query__item__settings transparent no-padding"
130
+ v-if="fileItem.status !== UPLOAD_STATUS.uploading"
131
+ >
132
+ <!-- 预览 -->
133
+ <q-icon
134
+ class="n-uploader-query__item__settings__icon cursor-pointer"
135
+ name="search"
136
+ size="xs"
137
+ title="预览"
138
+ @click="uploader.previewImage(fileItem)"
139
+ v-if="! noPreview"
140
+ />
141
+
142
+ <!-- 删除 -->
143
+ <q-icon
144
+ class="n-uploader-query__item__settings__icon cursor-pointer"
145
+ name="close"
146
+ size="xs"
147
+ title="删除"
148
+ @click="uploader.deleteFileItem(fileItem)"
149
+ v-if="! noDelete"
150
+ />
151
+ </div>
152
+ </q-img>
153
+ </div>
154
+
155
+ <!-- 右边方块按钮 -->
156
+ <template v-if="rightSquareButton">
157
+ <slot
158
+ name="square-button"
159
+ :size="currentSize"
160
+ :show="showSquareButton"
161
+ v-if="$slots['square-button']"
162
+ />
163
+ <div
164
+ class="n-uploader-query__button--square cursor-pointer"
165
+ :style="{
166
+ width: utils.px(currentSize),
167
+ height: utils.px(currentSize),
168
+ }"
169
+ @click="uploader.chooseUpload"
170
+ v-show="showSquareButton"
171
+ v-else-if="! noButton && currentButtonType === 'square'"
172
+ >
173
+ <q-icon
174
+ name="add"
175
+ :size="utils.px(currentSize / 2)"
176
+ />
177
+ <div class="n-uploader-query__button--square__text" v-if="buttonText">{{buttonText}}</div>
178
+ </div>
179
+ </template>
180
+ </template>
181
+
182
+ <!-- 上传文件队列 -->
183
+ <template v-else>
184
+
185
+ <!-- 单个文件 -->
186
+ <div
187
+ v-for="(fileItem, fileItemIndex) in query"
188
+ :key="`query-item-${fileItem.id}`"
189
+ class="n-uploader-query__item n-uploader-query__item--file"
190
+ :class="{
191
+ ghost: fileItemIndex === fromIndex,
192
+ }"
193
+ :style="{
194
+ height: utils.px(currentSize),
195
+ }"
196
+ :draggable="currentDrag"
197
+ @mousedown.self="mousedown($event, fileItemIndex)"
198
+ @mouseup="dragEnd"
199
+ @dragstart="dragStart($event, fileItemIndex)"
200
+ @dragenter="dragEnter($event, fileItemIndex)"
201
+ @dragend="dragEnd"
202
+ >
203
+ <!-- 图标 -->
204
+ <div
205
+ class="n-uploader-query__item__icon"
206
+ :style="{
207
+ width: utils.px(currentSize),
208
+ height: utils.px(currentSize),
209
+ }"
210
+ >
211
+ <!-- 上传中前 -->
212
+ <q-circular-progress
213
+ class="n-uploader-query__item__icon__icon"
214
+ indeterminate
215
+ rounded
216
+ :size="utils.px(currentSize / 1.8)"
217
+ :thickness="0.18"
218
+ v-if="fileItem.status < UPLOAD_STATUS.uploading"
219
+ />
220
+
221
+ <!-- 上传中 -->
222
+ <q-circular-progress
223
+ class="n-uploader-query__item__icon__icon"
224
+ :value="fileItem.progress"
225
+ :size="utils.px(currentSize / 1.8)"
226
+ :thickness="0.18"
227
+ show-value
228
+ v-else-if="fileItem.status === UPLOAD_STATUS.uploading"
229
+ >
230
+ <q-icon
231
+ class="cursor-pointer"
232
+ name="pause"
233
+ :size="utils.px(currentSize / 3)"
234
+ @click="uploader.deleteFileItem(fileItem)"
235
+ />
236
+ </q-circular-progress>
237
+
238
+ <!-- 文件图标 -->
239
+ <q-icon
240
+ class="n-uploader-query__item__icon__icon"
241
+ name="description"
242
+ :size="utils.px(currentSize / 1.5)"
243
+ v-else-if="type === 'file'"
244
+ />
245
+
246
+ <!-- 播放图标 -->
247
+ <q-icon
248
+ class="n-uploader-query__item__icon__icon cursor-pointer"
249
+ name="play_circle"
250
+ title="播放"
251
+ :size="utils.px(currentSize / 1.5)"
252
+ @click="uploader.play(fileItem)"
253
+ v-else
254
+ />
255
+ </div>
256
+
257
+ <!-- 信息 -->
258
+ <div class="n-uploader-query__item__info">
259
+ <!-- 标题 -->
260
+ <div class="n-uploader-query__item__info__title ellipsis">{{getFileName(fileItem)}}</div>
261
+ <!-- 错误提示 -->
262
+ <div class="n-uploader-query__item__info__msg--error" v-if="fileItem.status === UPLOAD_STATUS.fail">{{fileItem.msg}}</div>
263
+ </div>
264
+
265
+ <!-- 操作 -->
266
+ <div class="n-uploader-query__item__settings">
267
+
268
+ <template v-if="fileItem.status === UPLOAD_STATUS.success">
269
+
270
+ <!-- 复制地址 -->
271
+ <q-icon
272
+ class="n-uploader-query__item__settings__icon cursor-pointer"
273
+ name="content_copy"
274
+ color="white"
275
+ size="xs"
276
+ title="复制地址"
277
+ @click="uploader.copyUrl(fileItem)"
278
+ />
279
+
280
+ <!-- 修改 -->
281
+ <q-icon
282
+ class="n-uploader-query__item__settings__icon cursor-pointer"
283
+ name="edit"
284
+ color="white"
285
+ size="xs"
286
+ title="修改"
287
+ @click="uploader.previewImage(fileItem)"
288
+ v-if="! noEdit"
289
+ >
290
+ <q-popup-edit
291
+ :model-value="fileItem.title"
292
+ buttons
293
+ label-set="保存"
294
+ @save="uploader.editFileTitle($event, fileItem)"
295
+ v-slot="scope"
296
+ >
297
+ <q-input
298
+ v-model="scope.value"
299
+ dense
300
+ autofocus
301
+ counter
302
+ :maxlength="50"
303
+ @keyup.enter="scope.set"
304
+ >
305
+ <template v-slot:append>
306
+ <span class="text-subtitle2 text-weight-bold">.{{fileItem.ext}}</span>
307
+ </template>
308
+ </q-input>
309
+ </q-popup-edit>
310
+ </q-icon>
311
+ </template>
312
+
313
+ <!-- 删除 -->
314
+ <q-icon
315
+ class="n-uploader-query__item__settings__icon cursor-pointer"
316
+ name="close"
317
+ color="white"
318
+ size="xs"
319
+ title="删除"
320
+ @click="uploader.deleteFileItem(fileItem)"
321
+ v-if="! noDelete"
322
+ />
323
+ </div>
324
+ </div>
325
+ </template>
326
+ </n-dragger>
327
+ </div>
328
+ </template>
329
+
330
+ <script>
331
+ import { onMounted, computed, inject } from 'vue'
332
+ import { useQuasar } from 'quasar'
333
+
334
+ import {
335
+ // 上传状态
336
+ UPLOAD_STATUS,
337
+ } from '../../utils/useUploader'
338
+ import { NUploaderKey } from '../../utils/symbols'
339
+
340
+ export default {
341
+
342
+ /**
343
+ * 标识
344
+ */
345
+ name: 'NUploaderQuery',
346
+
347
+ /**
348
+ * 声明属性
349
+ */
350
+ props: {
351
+ // 按钮类型, 可选值 square button
352
+ buttonType: {
353
+ type: String,
354
+ validator: v => [ 'square', 'button' ].includes(v),
355
+ },
356
+ // 按钮文字
357
+ buttonText: String,
358
+ // 按钮声明属性
359
+ buttonProps: Object,
360
+ // 图片/按钮/文件 尺寸
361
+ size: Number,
362
+ // 是否开启拖拽
363
+ drag: {
364
+ type: Boolean,
365
+ default: true,
366
+ },
367
+ // 是否隐藏按钮
368
+ noButton: Boolean,
369
+ // 是否隐藏预览按钮
370
+ noPreview: Boolean,
371
+ // 是否隐藏修改按钮
372
+ noEdit: Boolean,
373
+ // 是否隐藏删除按钮
374
+ noDelete: Boolean,
375
+ // 自动显示方块按钮
376
+ autoShowSquareButton: Boolean,
377
+ // 方块按钮在右边显示
378
+ rightSquareButton: Boolean,
379
+ },
380
+
381
+ /**
382
+ * 声明事件
383
+ */
384
+ emits: [
385
+ 'update:modelValue',
386
+ ],
387
+
388
+ /**
389
+ * 组合式
390
+ */
391
+ setup(props) {
392
+
393
+ // ==========【数据】============================================================================================
394
+
395
+ // quasar 对象
396
+ const $q = useQuasar()
397
+
398
+ // ==========【注入】============================================================================================
399
+
400
+ // 获取布局注入数据
401
+ const {
402
+ // 声明属性
403
+ props: uploaderProps,
404
+ // 上传器
405
+ uploader,
406
+ // 文件队列
407
+ query,
408
+ } = inject(NUploaderKey)
409
+
410
+ // ==========【计算属性】=========================================================================================
411
+
412
+ /**
413
+ * 当前是否开启拖拽
414
+ */
415
+ const currentDrag = computed(function() {
416
+ return props.drag
417
+ && utils.isValidArray(query.value)
418
+ && query.value.length > 1
419
+ })
420
+
421
+ /**
422
+ * 当前按钮类型
423
+ */
424
+ const currentButtonType = computed(function () {
425
+ if (props.buttonType) {
426
+ return props.buttonType
427
+ }
428
+ return uploaderProps.type === 'image' ? 'square' : 'button'
429
+ })
430
+
431
+ /**
432
+ * 当前尺寸
433
+ */
434
+ const currentSize = computed(function () {
435
+ if (props.size) {
436
+ return props.size
437
+ }
438
+ return uploaderProps.type === 'image' ? 70 : 50
439
+ })
440
+
441
+ /**
442
+ * 是否显示方块按钮
443
+ */
444
+ const showSquareButton = computed(function () {
445
+ // 自动显示方块按钮 && 有上传文件限制数量
446
+ return props.autoShowSquareButton && uploaderProps.count > 0 ?
447
+ // 如果 上传文件列表数量 < 上传文件限制数量
448
+ query.value.length < uploaderProps.count
449
+ // 始终显示
450
+ : true
451
+ })
452
+
453
+ // ==========【方法】=============================================================================================
454
+
455
+ /**
456
+ * 获取图片地址
457
+ */
458
+ function getImage(fileItem) {
459
+ return _.has(fileItem, '__img') ?
460
+ fileItem.__img
461
+ : (
462
+ utils.isValidString(fileItem.hash) ?
463
+ utils.getImage(fileItem.hash, { w: $q.platform.is.mobile ? currentSize.value * 2 : currentSize.value })
464
+ : ''
465
+ )
466
+ }
467
+
468
+ /**
469
+ * 获取文件名称
470
+ */
471
+ function getFileName(fileItem) {
472
+ return fileItem.title + (_.get(fileItem, 'ext') ? '.' + fileItem.ext : '')
473
+ }
474
+
475
+ // ==========【生命周期】=========================================================================================
476
+
477
+ /**
478
+ * 实例被挂载后调用
479
+ */
480
+ onMounted( async function() {
481
+
482
+ })
483
+
484
+ // ==========【返回】=============================================================================================
485
+
486
+ return {
487
+ // 上传状态
488
+ UPLOAD_STATUS,
489
+ // 上传文件类型, 可选值 file image video audio
490
+ type: uploaderProps.type,
491
+ // 上传文件数量(0:不限)
492
+ count: uploaderProps.count,
493
+ // 上传文件队列
494
+ query,
495
+
496
+ // 当前是否开启拖拽
497
+ currentDrag,
498
+ // 当前按钮类型
499
+ currentButtonType,
500
+ // 当前尺寸
501
+ currentSize,
502
+ // 是否显示方块按钮
503
+ showSquareButton,
504
+
505
+ // 上传器
506
+ uploader,
507
+
508
+ // 获取图片地址
509
+ getImage,
510
+ // 获取文件名称
511
+ getFileName,
512
+ }
513
+ },
514
+ }
515
+ </script>
516
+
517
+ <style lang="scss">
518
+ @import "@/assets/sass/var.scss";
519
+
520
+ // 上传器队列
521
+ .n-uploader-query {
522
+
523
+ // 上传按钮
524
+ &__button {
525
+
526
+ // 方块
527
+ &--square {
528
+ display: inline-flex;
529
+ vertical-align: middle;
530
+ overflow: hidden;
531
+ border: 1px dashed rgba(var(--n-reverse-color-rgb), 0.2);
532
+ flex-direction: column;
533
+ justify-content: center;
534
+ align-items: center;
535
+ color: rgba(var(--n-reverse-color-rgb), 0.4);
536
+ border-radius: 4px;
537
+
538
+ &:hover {
539
+ border-color: $primary;
540
+ }
541
+
542
+ // 文字
543
+ &__text {
544
+ font-size: 12px;
545
+ }
546
+ }
547
+
548
+ // 按钮
549
+ &--button {
550
+ + .n-uploader-query__query {
551
+ margin-top: 0;
552
+ }
553
+ }
554
+ }
555
+
556
+ // 上传单个文件
557
+ &__item {
558
+ position: relative;
559
+
560
+ // 开启拖拽
561
+ &[draggable="true"] {
562
+ cursor: move;
563
+ }
564
+
565
+ // 当前拖拽占位元素
566
+ &.ghost {
567
+ &:after {
568
+ content: "";
569
+ position: absolute;
570
+ top: 0;
571
+ left: 0;
572
+ right: 0;
573
+ bottom: 0;
574
+ border: 2px dashed mix(#ffffff, $primary, 40%);
575
+ border-radius: 4px;
576
+ background-color: rgba(255, 255, 255, 0.75);
577
+ }
578
+
579
+ .n-uploader-query__item__inner,
580
+ .n-uploader-query__item__settings {
581
+ display: none;
582
+ }
583
+ }
584
+
585
+ &:hover {
586
+ .n-uploader-query__item__settings {
587
+ visibility: visible;
588
+ }
589
+ }
590
+
591
+ // 单个图片
592
+ &--image {
593
+ border-radius: 4px;
594
+ background-color: rgba(0,0,0,0.1);
595
+ overflow: hidden;
596
+ }
597
+
598
+ // 单个文件
599
+ &--file {
600
+ position: relative;
601
+ width: 300px;
602
+ display: flex;
603
+ flex-direction: row;
604
+ align-items: center;
605
+ border-radius: 4px;
606
+ color: rgba(var(--n-reverse-color-rgb), 0.8);
607
+ background-color: rgba(var(--n-reverse-color-rgb), 0.05);
608
+
609
+ // 图标
610
+ .n-uploader-query__item__icon {
611
+ position: relative;
612
+ display: flex;
613
+ align-items: center;
614
+ justify-content: center;
615
+ z-index: 1;
616
+
617
+ &__icon {
618
+ color: rgba(var(--n-reverse-color-rgb), 0.2);
619
+ }
620
+ }
621
+
622
+ // 信息
623
+ .n-uploader-query__item__info {
624
+ display: flex;
625
+ flex-direction: column;
626
+ line-height: 18px;
627
+
628
+ &__title {
629
+ max-width: 150px;
630
+ }
631
+
632
+ &__msg--error {
633
+ color: $negative;
634
+ }
635
+ }
636
+ }
637
+
638
+ //操作
639
+ &__settings {
640
+ position: absolute;
641
+ top: 5px;
642
+ right: 5px;
643
+ visibility: hidden;
644
+
645
+ &__icon {
646
+ background-color: rgba(0,0,0,0.5);
647
+ border-radius: 50%;
648
+ padding: 5px;
649
+
650
+ + .n-uploader-query__item__settings__icon {
651
+ margin-left: 4px;
652
+ }
653
+
654
+ &:hover {
655
+ background-color: rgba(0,0,0,0.8);
656
+ }
657
+ }
658
+ }
659
+
660
+ // 内容
661
+ &__inner {
662
+
663
+ &__msg {
664
+ margin: 3px;
665
+ padding: 2px 3px;
666
+ line-height: 18px;
667
+ font-size: 12px;
668
+ background-color: rgba(0,0,0,0.6);
669
+ border-radius: 6px;
670
+
671
+ &--error {
672
+ background-color: $warning;
673
+ }
674
+ }
675
+ }
676
+ }
677
+ }
678
+
679
+ @media (max-width: $breakpoint-xs-max){
680
+ // 上传器队列
681
+ .n-uploader-query {
682
+ // 上传单个文件
683
+ &__item {
684
+ // 单个文件
685
+ &--file {
686
+ width: 100%;
687
+ }
688
+ }
689
+
690
+ // 信息
691
+ .n-uploader-query__item__info {
692
+ &__title {
693
+ max-width: 200px;
694
+ }
695
+ }
696
+ }
697
+ }
698
+
699
+ /**
700
+ * 手机版
701
+ */
702
+ body.mobile {
703
+ // 上传器队列
704
+ .n-uploader-query {
705
+ // 上传单个文件
706
+ &__item {
707
+ &__settings {
708
+ visibility: visible;
709
+ }
710
+ }
711
+ }
712
+ }
713
+
714
+ /**
715
+ * 暗黑
716
+ */
717
+ .body--dark {
718
+ .n-uploader-query__item--file {
719
+ .n-uploader-query__item__settings {
720
+ // 图标
721
+ &__icon {
722
+ background-color: rgba(255,255,255, 0.1);
723
+
724
+ &:hover {
725
+ background-color: rgba(255,255,255, 0.2);
726
+ }
727
+ }
728
+ }
729
+ }
730
+ }
731
+ </style>