wl-design-mobile 0.0.1 → 0.0.2
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/api/doc.js +25 -0
- package/api/x1.js +56 -0
- package/btn/lambo-big-button.vue +125 -121
- package/btn/lambo-button-group.vue +47 -47
- package/btn/lambo-medium-button.vue +123 -121
- package/btn/lambo-small-button-group.vue +31 -31
- package/btn/lambo-small-button-select.vue +53 -53
- package/btn/lambo-small-button.vue +123 -121
- package/card-item/card-row-icon.vue +0 -1
- package/card-item/filtrate-row.vue +1 -0
- package/collapse/lambo-collapse.vue +80 -80
- package/config/config.js +14 -0
- package/detail/lambo-detail-grid.vue +87 -57
- package/detail/lambo-detail-row.vue +59 -59
- package/doc/file/lambo-file-upload.vue +176 -179
- package/doc/file/styles/css/index.css +118 -118
- package/doc/img/lambo-img-upload.vue +109 -109
- package/edit/list/Lambo-edit-list.vue +90 -90
- package/edit/list/lambo-edit-card-group.vue +103 -103
- package/edit/select/lambo-edit-date-range.vue +135 -135
- package/edit/select/lambo-edit-date-time.vue +105 -0
- package/edit/select/lambo-edit-date.vue +108 -108
- package/edit/select/lambo-edit-input-textarea.vue +92 -92
- package/edit/select/lambo-edit-input.vue +92 -92
- package/edit/select/lambo-edit-multi-select.vue +160 -160
- package/edit/select/lambo-edit-single-select.vue +153 -153
- package/flow/lambo-flow-detail.vue +30 -30
- package/flow/lambo-flow-edit.vue +30 -30
- package/icon/lambo-required-red-star.vue +47 -47
- package/list/lambo-list.vue +1 -1
- package/nav/lambo-top-nav.vue +89 -89
- package/package.json +4 -2
- package/search/lambo-date-range-page.vue +191 -191
- package/search/lambo-date-range.vue +107 -107
- package/search/lambo-input.vue +74 -74
- package/search/lambo-multi-select.vue +125 -125
- package/search/lambo-org-select-page.vue +109 -109
- package/search/lambo-search-box.vue +55 -55
- package/search/lambo-single-select.vue +119 -119
- package/styles/base.less +75 -75
- package/styles/components/btn.less +7 -7
- package/styles/components/search.less +33 -33
- package/styles/components/tag.less +181 -181
- package/styles/index.less +4 -4
- package/tag/lambo-tag.vue +25 -0
- package/title/lambo-title1.vue +129 -129
- package/title/lambo-title2.vue +37 -37
- package/util/assist.js +43 -0
- package/util/axios/cacheconf.js +19 -0
- package/util/axios/index.js +11 -0
- package/util/axios/interceptors.js +101 -0
- package/util/bus.js +4 -0
- package/util/token.js +36 -0
|
@@ -1,57 +1,87 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="detail-grid">
|
|
3
|
-
<van-grid :border="false" :center="false" :column-num="columnNum" class="detail-grid-main">
|
|
4
|
-
<van-grid-item v-for="(row, index) in data" :key="index" class="detail-grid-box">
|
|
5
|
-
<div class="detail-grid-title">{{ row.title }}</div>
|
|
6
|
-
<div class="
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
</
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="detail-grid">
|
|
3
|
+
<van-grid :border="false" :center="false" :column-num="columnNum" class="detail-grid-main">
|
|
4
|
+
<van-grid-item v-for="(row, index) in data" :key="index" class="detail-grid-box">
|
|
5
|
+
<div class="detail-grid-title">{{ row.title }}</div>
|
|
6
|
+
<div :class="data[index].className">
|
|
7
|
+
{{ row.val }}
|
|
8
|
+
</div>
|
|
9
|
+
</van-grid-item>
|
|
10
|
+
</van-grid>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<script>
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'LamboDetailGrid',
|
|
17
|
+
props: {
|
|
18
|
+
data: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => [],
|
|
21
|
+
},
|
|
22
|
+
columnNum: {
|
|
23
|
+
type: [Number, String],
|
|
24
|
+
default: 2
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
created() {
|
|
28
|
+
console.log("LamboDetailGrid -- created -- data:", this.data)
|
|
29
|
+
this.initData()
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
initData() {
|
|
33
|
+
if (this.columnNum === '1' || this.columnNum === 1) {
|
|
34
|
+
this.data.forEach(item => { item.className = 'detail-grid-val' })
|
|
35
|
+
} else {
|
|
36
|
+
this.data.forEach((item, index) => {
|
|
37
|
+
const isLastItem = index === this.data.length - 1;
|
|
38
|
+
item.className = index % this.columnNum === 0
|
|
39
|
+
? (isLastItem ? 'detail-grid-val' : 'detail-grid-val-left')
|
|
40
|
+
: 'detail-grid-val-right';
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
<style scoped>
|
|
48
|
+
@import "../styles/index.less";
|
|
49
|
+
|
|
50
|
+
.detail-grid {
|
|
51
|
+
background-color: var(--scl-white-1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.detail-grid-main {
|
|
55
|
+
padding: 0 14px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.detail-grid-main /deep/ .van-grid-item__content {
|
|
59
|
+
padding: 12px 0 0 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
.detail-grid-title {
|
|
64
|
+
margin-bottom: 12px;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
font-family: Regular;
|
|
67
|
+
color: var(--scl-gray-2)
|
|
68
|
+
}
|
|
69
|
+
.detail-grid-val {
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
color: var(--scl-lucency-1);
|
|
72
|
+
background: var(--scl-white-4);
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
}
|
|
75
|
+
.detail-grid-val-left {
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
color: var(--scl-lucency-1);
|
|
78
|
+
background: var(--scl-white-4);
|
|
79
|
+
border-radius: 4px 0 0 4px;
|
|
80
|
+
}
|
|
81
|
+
.detail-grid-val-right {
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
color: var(--scl-lucency-1);
|
|
84
|
+
background: var(--scl-white-4);
|
|
85
|
+
border-radius: 0 4px 4px 0;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="detail-row-main">
|
|
3
|
-
<div class="detail-row-box" v-for="(item,index) in data" :key="index">
|
|
4
|
-
<div class="detail-row-title">{{ item.title }}</div>
|
|
5
|
-
<div class="detail-row-val">{{ item.val }}</div>
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
<script>
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
name: 'LamboDetailRow',
|
|
13
|
-
components: {},
|
|
14
|
-
props: {
|
|
15
|
-
data: {
|
|
16
|
-
type: Array,
|
|
17
|
-
default: []
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
data() {
|
|
21
|
-
return {}
|
|
22
|
-
},
|
|
23
|
-
methods: {},
|
|
24
|
-
created() {
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
mounted() {
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
</script>
|
|
32
|
-
<style scoped>
|
|
33
|
-
@import "../styles/index.less";
|
|
34
|
-
|
|
35
|
-
.detail-row-main {
|
|
36
|
-
background-color: var(--scl-white-1);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.detail-row-box {
|
|
40
|
-
height: 70px;
|
|
41
|
-
margin: 0 14px;
|
|
42
|
-
padding: 12px 0;
|
|
43
|
-
border-bottom: 1px solid var(--scl-white-2);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.detail-row-title {
|
|
47
|
-
height: 16px;
|
|
48
|
-
margin-bottom: 12px;
|
|
49
|
-
font-size: 12px;
|
|
50
|
-
font-family: Regular;
|
|
51
|
-
color: var(--scl-gray-2)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.detail-row-val {
|
|
55
|
-
height: 18px;
|
|
56
|
-
font-size: 14px;
|
|
57
|
-
color: var(--scl-lucency-1);
|
|
58
|
-
}
|
|
59
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="detail-row-main">
|
|
3
|
+
<div class="detail-row-box" v-for="(item,index) in data" :key="index">
|
|
4
|
+
<div class="detail-row-title">{{ item.title }}</div>
|
|
5
|
+
<div class="detail-row-val">{{ item.val }}</div>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
<script>
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: 'LamboDetailRow',
|
|
13
|
+
components: {},
|
|
14
|
+
props: {
|
|
15
|
+
data: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default: () => []
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {}
|
|
22
|
+
},
|
|
23
|
+
methods: {},
|
|
24
|
+
created() {
|
|
25
|
+
|
|
26
|
+
},
|
|
27
|
+
mounted() {
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
<style scoped>
|
|
33
|
+
@import "../styles/index.less";
|
|
34
|
+
|
|
35
|
+
.detail-row-main {
|
|
36
|
+
background-color: var(--scl-white-1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.detail-row-box {
|
|
40
|
+
height: 70px;
|
|
41
|
+
margin: 0 14px;
|
|
42
|
+
padding: 12px 0;
|
|
43
|
+
border-bottom: 1px solid var(--scl-white-2);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.detail-row-title {
|
|
47
|
+
height: 16px;
|
|
48
|
+
margin-bottom: 12px;
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
font-family: Regular;
|
|
51
|
+
color: var(--scl-gray-2)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.detail-row-val {
|
|
55
|
+
height: 18px;
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
color: var(--scl-lucency-1);
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -1,179 +1,176 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="fileUplodaContainer">
|
|
4
|
-
<div class="setUploader">
|
|
5
|
-
<div class="fileUplodaTitle"><p>{{ title }}</p></div>
|
|
6
|
-
<van-uploader v-model="fileList" :after-read="afterRead" :before-read="beforeRead" accept="*">
|
|
7
|
-
<van-button :icon="fileImg" type="primary"></van-button>
|
|
8
|
-
</van-uploader>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
<script>
|
|
14
|
-
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
this.resultFileList
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
case '
|
|
110
|
-
case '
|
|
111
|
-
case '
|
|
112
|
-
case '
|
|
113
|
-
case '
|
|
114
|
-
case '
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
case '
|
|
120
|
-
case '
|
|
121
|
-
case '
|
|
122
|
-
case '
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
case '
|
|
128
|
-
case '
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
case '
|
|
140
|
-
case '
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
case '
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
case '
|
|
154
|
-
case '
|
|
155
|
-
case '
|
|
156
|
-
case '
|
|
157
|
-
case '
|
|
158
|
-
case '
|
|
159
|
-
case '
|
|
160
|
-
case '
|
|
161
|
-
case '
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="fileUplodaContainer">
|
|
4
|
+
<div class="setUploader">
|
|
5
|
+
<div class="fileUplodaTitle"><p>{{ title }}</p></div>
|
|
6
|
+
<van-uploader v-model="fileList" :after-read="afterRead" :before-read="beforeRead" accept="*">
|
|
7
|
+
<van-button :icon="fileImg" type="primary"></van-button>
|
|
8
|
+
</van-uploader>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<script>
|
|
14
|
+
import fileImg from '../../assets/icon/fileImg.png';
|
|
15
|
+
import {axios} from "../../util/axios/index";
|
|
16
|
+
import {fileUploadUrl} from "../../api/doc";
|
|
17
|
+
import {Toast} from "vant";
|
|
18
|
+
import excelIcon from "../../assets/img/doc/excel.png";
|
|
19
|
+
import mp3Icon from "../../assets/img/doc/mp3.png";
|
|
20
|
+
import otherIcon from "../../assets/img/doc/other.png";
|
|
21
|
+
import pdfIcon from "../../assets/img/doc/pdf.png";
|
|
22
|
+
import pptIcon from "../../assets/img/doc/ppt.png";
|
|
23
|
+
import txtIcon from "../../assets/img/doc/txt.png";
|
|
24
|
+
import videoIcon from "../../assets/img/doc/video.png";
|
|
25
|
+
import wordIcon from "../../assets/img/doc/word.png";
|
|
26
|
+
import zipIcon from "../../assets/img/doc/zip.png";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: 'LamboFileUpload',
|
|
30
|
+
components: {},
|
|
31
|
+
props: {
|
|
32
|
+
title: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ' '
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
fileImg: fileImg,
|
|
40
|
+
fileList: [],
|
|
41
|
+
resultFileList: []
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
afterRead(files, detail) {
|
|
46
|
+
console.log(files, detail);
|
|
47
|
+
let file = files.file;
|
|
48
|
+
let formData = new FormData();
|
|
49
|
+
formData.append('file', file);
|
|
50
|
+
axios.post(fileUploadUrl, formData, {}).then(response => {
|
|
51
|
+
if (response && response.code == "1") {
|
|
52
|
+
let fileData = response.data;
|
|
53
|
+
if (fileData && fileData.length > 0) {
|
|
54
|
+
let file1 = fileData[0]
|
|
55
|
+
if (file1 && file1.fileId) {
|
|
56
|
+
let resFile = fileData[0]
|
|
57
|
+
let fileName = resFile.fileName || ''
|
|
58
|
+
let suffix = ''
|
|
59
|
+
if (fileName.indexOf(".") > -1) {
|
|
60
|
+
suffix = fileName.split('.')[1]
|
|
61
|
+
}
|
|
62
|
+
this.updateFileIcon(suffix);
|
|
63
|
+
let item = {
|
|
64
|
+
fileId: resFile.fileId,
|
|
65
|
+
lastModified: file.lastModified,
|
|
66
|
+
fileName: fileName,
|
|
67
|
+
fileSuffix: suffix
|
|
68
|
+
}
|
|
69
|
+
this.resultFileList.push(item)
|
|
70
|
+
Toast.success('上传文件成功');
|
|
71
|
+
this.$emit("onSuccess", this.resultFileList);
|
|
72
|
+
} else {
|
|
73
|
+
Toast.fail("上传文件为空,上传失败")
|
|
74
|
+
this.$emit("on-failed", null);
|
|
75
|
+
}
|
|
76
|
+
} else {
|
|
77
|
+
Toast.fail("上传文件为空,上传失败")
|
|
78
|
+
this.$emit("on-failed", null);
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
Toast.fail("上传失败,请联系管理员")
|
|
82
|
+
this.$emit("on-failed", null);
|
|
83
|
+
}
|
|
84
|
+
}).catch((e) => {
|
|
85
|
+
Toast.fail("文件上传异常!");
|
|
86
|
+
console.error("文件上传异常:", e)
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
beforeRead(file) {
|
|
90
|
+
let fileName = file.name;
|
|
91
|
+
let type = fileName.substring(fileName.lastIndexOf('.') + 1);
|
|
92
|
+
const fileList = ['mp4', 'm3u8', 'rmvb', 'avi', 'swf', '3gp', 'mkv', 'flv',
|
|
93
|
+
'mp3', 'wav', 'wma', 'ogg', 'aac', 'flac',
|
|
94
|
+
'doc', 'pages', 'epub', 'docx', 'pdf', 'txt', 'numbers', 'csv', 'xls', 'xlsx',
|
|
95
|
+
'keynote', 'ppt', 'pptx', 'zip',
|
|
96
|
+
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'tif', 'psd', 'webp', 'svg', 'raw'
|
|
97
|
+
];
|
|
98
|
+
let result = fileList.includes(type.toLowerCase());
|
|
99
|
+
if (!result) {
|
|
100
|
+
Toast.fail("文件类型不支持!(请选择'mp4', 'm3u8', 'rmvb', 'avi', 'swf', '3gp', 'mkv', 'flv','mp3', 'wav', 'wma', 'ogg', 'aac', 'flac','doc', 'pages', 'epub', 'docx', 'pdf', 'txt', 'numbers', 'csv', 'xls', 'xlsx','keynote', 'ppt', 'pptx', 'zip','jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'tif', 'psd', 'webp', 'svg', 'raw')")
|
|
101
|
+
}
|
|
102
|
+
return result;
|
|
103
|
+
},
|
|
104
|
+
updateFileIcon(suffix) {
|
|
105
|
+
const fileIcons = document.querySelectorAll('.van-uploader__file-icon');
|
|
106
|
+
switch (suffix) {
|
|
107
|
+
case 'mp4':
|
|
108
|
+
case 'm3u8':
|
|
109
|
+
case 'rmvb':
|
|
110
|
+
case 'avi':
|
|
111
|
+
case 'swf':
|
|
112
|
+
case '3gp':
|
|
113
|
+
case 'mkv':
|
|
114
|
+
case 'flv':
|
|
115
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + videoIcon + '")';
|
|
116
|
+
break;
|
|
117
|
+
case 'mp3':
|
|
118
|
+
case 'wav':
|
|
119
|
+
case 'wma':
|
|
120
|
+
case 'ogg':
|
|
121
|
+
case 'aac':
|
|
122
|
+
case 'flac':
|
|
123
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + mp3Icon + '")';
|
|
124
|
+
break;
|
|
125
|
+
case 'doc':
|
|
126
|
+
case 'pages':
|
|
127
|
+
case 'epub':
|
|
128
|
+
case 'docx':
|
|
129
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + wordIcon + '")';
|
|
130
|
+
break;
|
|
131
|
+
case 'pdf':
|
|
132
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + pdfIcon + '")';
|
|
133
|
+
break;
|
|
134
|
+
case 'txt':
|
|
135
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + txtIcon + '")';
|
|
136
|
+
break;
|
|
137
|
+
case 'numbers':
|
|
138
|
+
case 'csv':
|
|
139
|
+
case 'xls':
|
|
140
|
+
case 'xlsx':
|
|
141
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + excelIcon + '")';
|
|
142
|
+
break;
|
|
143
|
+
case 'keynote':
|
|
144
|
+
case 'ppt':
|
|
145
|
+
case 'pptx':
|
|
146
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + pptIcon + '")';
|
|
147
|
+
break;
|
|
148
|
+
case 'zip':
|
|
149
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + zipIcon + '")';
|
|
150
|
+
break;
|
|
151
|
+
case 'jpg':
|
|
152
|
+
case 'jpeg':
|
|
153
|
+
case 'png':
|
|
154
|
+
case 'gif':
|
|
155
|
+
case 'bmp':
|
|
156
|
+
case 'tiff':
|
|
157
|
+
case 'tif':
|
|
158
|
+
case 'psd':
|
|
159
|
+
case 'webp':
|
|
160
|
+
case 'svg':
|
|
161
|
+
case 'raw':
|
|
162
|
+
// fileIcons[fileIcons.length - 1].style.content = 'url("' + photoIcon + '")';
|
|
163
|
+
break;
|
|
164
|
+
default:
|
|
165
|
+
fileIcons[fileIcons.length - 1].style.content = 'url("' + otherIcon + '")';
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
</script>
|
|
172
|
+
<style scoped>
|
|
173
|
+
@import "../../styles/index.less";
|
|
174
|
+
@import './styles/css/index.css';
|
|
175
|
+
|
|
176
|
+
</style>
|