wl-design-mobile 0.8.19 → 0.8.21

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 (101) hide show
  1. package/README.md +6 -6
  2. package/api/doc.js +25 -25
  3. package/api/x1.js +56 -56
  4. package/btn/components/lambo-info-btn.vue +123 -123
  5. package/btn/components/lambo-primary-btn.vue +117 -117
  6. package/btn/components/lambo-text-btn.vue +116 -116
  7. package/btn/lambo-btn-divide.vue +35 -120
  8. package/btn/lambo-btn-group.vue +46 -46
  9. package/btn/lambo-btn-split-line.vue +41 -41
  10. package/btn/lambo-btn.vue +68 -68
  11. package/btn/lambo-extend-btn.vue +121 -121
  12. package/btn/lambo-icon-btn.vue +82 -82
  13. package/card-item/card-row-icon.vue +71 -71
  14. package/card-item/filtrate-row.vue +73 -73
  15. package/card-item/lambo-card-footer.vue +40 -40
  16. package/card-item/lambo-card-head.vue +66 -66
  17. package/card-item/lambo-card-row.vue +59 -59
  18. package/collapse/lambo-collapse.vue +93 -93
  19. package/config/config.js +14 -14
  20. package/detail/lambo-detail-grid.vue +58 -58
  21. package/detail/lambo-detail-row.vue +59 -59
  22. package/doc/file/compoents/lambo-file-list.vue +42 -42
  23. package/doc/file/compoents/lambo-file-row.vue +77 -77
  24. package/doc/file/lambo-file-upload-collapse.vue +107 -107
  25. package/doc/file-type/file-type.js +286 -286
  26. package/doc/img/comonents/lambo-img-grid.vue +109 -109
  27. package/doc/img/lambo-img-upload-collapse.vue +107 -107
  28. package/doc/img/styles/css/index.css +3 -3
  29. package/edit/list/Lambo-edit-list.vue +87 -87
  30. package/edit/list/lambo-edit-card-group.vue +100 -100
  31. package/edit/list/styles/css/index.css +39 -39
  32. package/edit/select/lambo-edit-date-range.vue +147 -147
  33. package/edit/select/lambo-edit-date-time.vue +122 -122
  34. package/edit/select/lambo-edit-date.vue +120 -120
  35. package/edit/select/lambo-edit-input-textarea.vue +91 -91
  36. package/edit/select/lambo-edit-input.vue +91 -91
  37. package/edit/select/lambo-edit-multi-select.vue +168 -168
  38. package/edit/select/lambo-edit-search-single-select.vue +186 -186
  39. package/edit/select/lambo-edit-single-select.vue +162 -162
  40. package/edit/select/styles/css/index.css +133 -133
  41. package/flow/approval/flow-approval.vue +552 -552
  42. package/flow/comps/flow-attachment-list.vue +230 -230
  43. package/flow/comps/flow-attachment-modal.vue +194 -194
  44. package/flow/comps/flow-copy-users.vue +358 -358
  45. package/flow/comps/flow-node-card.vue +150 -150
  46. package/flow/comps/flow-node-header.vue +172 -172
  47. package/flow/comps/flow-util.js +156 -156
  48. package/flow/comps/icons/approved.svg +11 -11
  49. package/flow/comps/icons/canceled.svg +11 -11
  50. package/flow/comps/icons/rejected.svg +11 -11
  51. package/flow/comps/icons/underway.svg +11 -11
  52. package/flow/detail/flow-detail.vue +467 -467
  53. package/flow/index.js +51 -51
  54. package/flow/lambo-flow-detail.vue +912 -912
  55. package/flow/lambo-flow-edit.vue +15 -15
  56. package/flow/submit/flow-submit.vue +383 -383
  57. package/icon/lambo-required-red-star.vue +47 -47
  58. package/icon/lambo-vector-icon.vue +71 -71
  59. package/list/lambo-list.vue +412 -413
  60. package/nav/lambo-top-nav.vue +81 -81
  61. package/order/comps/icons/approved.svg +10 -10
  62. package/order/comps/icons/underway.svg +10 -10
  63. package/order/comps/order-attachment-list.vue +228 -228
  64. package/order/comps/order-attachment-modal.vue +194 -194
  65. package/order/comps/order-node-card.vue +126 -126
  66. package/order/comps/order-node-header.vue +133 -133
  67. package/order/comps/order-util.js +132 -132
  68. package/order/detail/order-detail.vue +432 -432
  69. package/order/handle/order-handle.vue +517 -517
  70. package/order/index.js +33 -33
  71. package/package.json +38 -37
  72. package/search/lambo-date-range-page.vue +196 -196
  73. package/search/lambo-date-range.vue +111 -111
  74. package/search/lambo-date.vue +105 -105
  75. package/search/lambo-input.vue +74 -74
  76. package/search/lambo-multi-select.vue +129 -129
  77. package/search/lambo-org-select-page.vue +109 -109
  78. package/search/lambo-search-box.vue +61 -61
  79. package/search/lambo-search-single-select.vue +152 -152
  80. package/search/lambo-single-select.vue +123 -123
  81. package/search/lambo-week-date-select.vue +521 -521
  82. package/search/styles/css/index.css +138 -138
  83. package/styles/base.less +77 -77
  84. package/styles/components/btn.less +7 -7
  85. package/styles/components/search.less +33 -33
  86. package/styles/components/tag.less +181 -181
  87. package/styles/index.less +4 -4
  88. package/table/lambo-ag-table.vue +227 -227
  89. package/tag/lambo-tag.vue +23 -23
  90. package/title/lambo-title1.vue +151 -151
  91. package/title/lambo-title2.vue +37 -37
  92. package/title/lambo-title3.vue +77 -77
  93. package/util/assist.js +43 -43
  94. package/util/axios/cacheconf.js +19 -19
  95. package/util/axios/index.js +11 -11
  96. package/util/axios/interceptors.js +101 -101
  97. package/util/bus.js +4 -4
  98. package/util/jssdk-sczy.js +104 -104
  99. package/util/jssdk.js +608 -565
  100. package/util/math.js +76 -76
  101. package/util/token.js +36 -36
@@ -1,286 +1,286 @@
1
- /**
2
- * 通用文件类型工具
3
- * 提供文件类型识别、图标路径获取等功能
4
- */
5
-
6
- /**
7
- * 获取文件扩展名
8
- * @param {string} fileName - 文件名
9
- * @returns {string} 小写扩展名(含点号)
10
- */
11
- export function getFileExt(fileName) {
12
- if (!fileName) return ''
13
- const lastDot = fileName.lastIndexOf('.')
14
- return lastDot >= 0 ? fileName.substring(lastDot).toLowerCase() : ''
15
- }
16
-
17
- /**
18
- * 获取文件类型分类
19
- * 支持的类型:document, spreadsheet, presentation, pdf, image, audio, video, archive, code, text, design, default
20
- * @param {string} fileName - 文件名
21
- * @returns {string} 文件类型分类
22
- */
23
- export function getFileType(fileName) {
24
- const ext = getFileExt(fileName)
25
- const typeMap = {
26
- // 文档
27
- '.doc': 'document',
28
- '.docx': 'document',
29
- '.pages': 'document',
30
- '.rtf': 'document',
31
- '.odt': 'document',
32
- // 表格
33
- '.xls': 'spreadsheet',
34
- '.xlsx': 'spreadsheet',
35
- '.numbers': 'spreadsheet',
36
- '.csv': 'spreadsheet',
37
- '.ods': 'spreadsheet',
38
- // 演示
39
- '.ppt': 'presentation',
40
- '.pptx': 'presentation',
41
- '.key': 'presentation',
42
- '.odp': 'presentation',
43
- // PDF
44
- '.pdf': 'pdf',
45
- // 图片
46
- '.jpg': 'image',
47
- '.jpeg': 'image',
48
- '.png': 'image',
49
- '.gif': 'image',
50
- '.bmp': 'image',
51
- '.webp': 'image',
52
- '.svg': 'image',
53
- '.tiff': 'image',
54
- '.ico': 'image',
55
- // 音频
56
- '.mp3': 'audio',
57
- '.wav': 'audio',
58
- '.flac': 'audio',
59
- '.aac': 'audio',
60
- '.ogg': 'audio',
61
- '.m4a': 'audio',
62
- '.wma': 'audio',
63
- // 视频
64
- '.mp4': 'video',
65
- '.avi': 'video',
66
- '.mov': 'video',
67
- '.wmv': 'video',
68
- '.flv': 'video',
69
- '.mkv': 'video',
70
- '.webm': 'video',
71
- '.m4v': 'video',
72
- // 压缩包
73
- '.zip': 'archive',
74
- '.rar': 'archive',
75
- '.7z': 'archive',
76
- '.tar': 'archive',
77
- '.gz': 'archive',
78
- '.bz2': 'archive',
79
- '.xz': 'archive',
80
- // 代码
81
- '.js': 'code',
82
- '.ts': 'code',
83
- '.jsx': 'code',
84
- '.tsx': 'code',
85
- '.html': 'code',
86
- '.css': 'code',
87
- '.scss': 'code',
88
- '.less': 'code',
89
- '.java': 'code',
90
- '.py': 'code',
91
- '.go': 'code',
92
- '.c': 'code',
93
- '.cpp': 'code',
94
- '.h': 'code',
95
- '.php': 'code',
96
- '.rb': 'code',
97
- '.swift': 'code',
98
- '.kt': 'code',
99
- '.rs': 'code',
100
- '.vue': 'code',
101
- '.json': 'code',
102
- '.xml': 'code',
103
- '.jsp': 'code',
104
- // 文本
105
- '.txt': 'text',
106
- '.md': 'text',
107
- '.log': 'text',
108
- // 设计
109
- '.psd': 'design',
110
- '.ai': 'design',
111
- '.fig': 'design',
112
- '.sketch': 'design',
113
- '.xd': 'design',
114
- // 电子书
115
- '.epub': 'ebook',
116
- '.mobi': 'ebook',
117
- '.azw': 'ebook',
118
- // 安装包
119
- '.msi': 'installer',
120
- '.exe': 'installer',
121
- '.dmg': 'installer',
122
- '.pkg': 'installer',
123
- '.deb': 'installer',
124
- '.rpm': 'installer',
125
- // 原始文件
126
- '.raw': 'raw',
127
- '.cr2': 'raw',
128
- '.nef': 'raw',
129
- '.arw': 'raw'
130
- }
131
- return typeMap[ext] || 'default'
132
- }
133
-
134
- /**
135
- * 获取文件图标类型(用于匹配图标文件名)
136
- * @param {string} fileName - 文件名
137
- * @returns {string} 图标类型标识
138
- */
139
- export function getFileIconType(fileName) {
140
- const ext = getFileExt(fileName)
141
- const iconMap = {
142
- // 文档
143
- '.doc': 'word',
144
- '.docx': 'word',
145
- // 表格
146
- '.xls': 'excel',
147
- '.xlsx': 'excel',
148
- // 演示
149
- '.ppt': 'ppt',
150
- '.pptx': 'ppt',
151
- // PDF
152
- '.pdf': 'pdf',
153
- // 图片
154
- '.jpg': 'png',
155
- '.jpeg': 'png',
156
- '.png': 'png',
157
- '.gif': 'gif',
158
- '.bmp': 'png',
159
- '.webp': 'png',
160
- // 音频
161
- '.mp3': 'mp3',
162
- '.wav': 'mp3',
163
- // 视频
164
- '.mp4': 'avi',
165
- '.avi': 'avi',
166
- '.mov': 'avi',
167
- '.flv': 'flv',
168
- // 压缩包
169
- '.zip': 'rar',
170
- '.rar': 'rar',
171
- '.7z': 'rar',
172
- '.tar': 'rar',
173
- '.gz': 'rar',
174
- // 代码
175
- '.js': 'js',
176
- '.java': 'java',
177
- '.jsp': 'jsp',
178
- '.html': 'html',
179
- // 文本
180
- '.txt': 'txt',
181
- // 设计
182
- '.ai': 'ai',
183
- '.psd': 'psd',
184
- // 电子书
185
- '.epub': 'epub',
186
- // 安装包
187
- '.msi': 'msi',
188
- // 原始文件
189
- '.raw': 'raw'
190
- }
191
- return iconMap[ext] || 'default'
192
- }
193
-
194
- /**
195
- * 获取文件图标路径
196
- * @param {string} fileName - 文件名
197
- * @returns {string} 图标资源路径
198
- */
199
- export function getFileIconPath(fileName) {
200
- const iconType = getFileIconType(fileName)
201
- try {
202
- return require(`./icons/icon-file-${iconType}.svg`)
203
- } catch (e) {
204
- return require(`./icons/icon-file-default.svg`)
205
- }
206
- }
207
-
208
- /**
209
- * 格式化文件大小
210
- * @param {number} size - 文件大小(字节)
211
- * @returns {string} 格式化后的大小字符串
212
- */
213
- export function formatFileSize(size) {
214
- if (!size) return '-'
215
- if (size < 1024) return size + ' B'
216
- if (size < 1024 * 1024) return (size / 1024).toFixed(2) + ' KB'
217
- if (size < 1024 * 1024 * 1024) return (size / (1024 * 1024)).toFixed(2) + ' MB'
218
- return (size / (1024 * 1024 * 1024)).toFixed(2) + ' GB'
219
- }
220
-
221
- /**
222
- * 判断是否是图片文件
223
- * @param {string} fileName - 文件名
224
- * @returns {boolean}
225
- */
226
- export function isImageFile(fileName) {
227
- return getFileType(fileName) === 'image'
228
- }
229
-
230
- /**
231
- * 判断是否是视频文件
232
- * @param {string} fileName - 文件名
233
- * @returns {boolean}
234
- */
235
- export function isVideoFile(fileName) {
236
- return getFileType(fileName) === 'video'
237
- }
238
-
239
- /**
240
- * 判断是否是可预览的文件类型
241
- * @param {string} fileName - 文件名
242
- * @returns {boolean}
243
- */
244
- export function isPreviewable(fileName) {
245
- const type = getFileType(fileName)
246
- return ['image', 'pdf', 'video'].includes(type)
247
- }
248
-
249
- /**
250
- * 获取文件类型的中文名称
251
- * @param {string} fileName - 文件名
252
- * @returns {string} 类型名称
253
- */
254
- export function getFileTypeName(fileName) {
255
- const type = getFileType(fileName)
256
- const nameMap = {
257
- document: '文档',
258
- spreadsheet: '表格',
259
- presentation: '演示文稿',
260
- pdf: 'PDF',
261
- image: '图片',
262
- audio: '音频',
263
- video: '视频',
264
- archive: '压缩包',
265
- code: '代码',
266
- text: '文本',
267
- design: '设计文件',
268
- ebook: '电子书',
269
- installer: '安装包',
270
- raw: '原始文件',
271
- default: '文件'
272
- }
273
- return nameMap[type] || nameMap.default
274
- }
275
-
276
- export default {
277
- getFileExt,
278
- getFileType,
279
- getFileIconType,
280
- getFileIconPath,
281
- formatFileSize,
282
- isImageFile,
283
- isVideoFile,
284
- isPreviewable,
285
- getFileTypeName
286
- }
1
+ /**
2
+ * 通用文件类型工具
3
+ * 提供文件类型识别、图标路径获取等功能
4
+ */
5
+
6
+ /**
7
+ * 获取文件扩展名
8
+ * @param {string} fileName - 文件名
9
+ * @returns {string} 小写扩展名(含点号)
10
+ */
11
+ export function getFileExt(fileName) {
12
+ if (!fileName) return ''
13
+ const lastDot = fileName.lastIndexOf('.')
14
+ return lastDot >= 0 ? fileName.substring(lastDot).toLowerCase() : ''
15
+ }
16
+
17
+ /**
18
+ * 获取文件类型分类
19
+ * 支持的类型:document, spreadsheet, presentation, pdf, image, audio, video, archive, code, text, design, default
20
+ * @param {string} fileName - 文件名
21
+ * @returns {string} 文件类型分类
22
+ */
23
+ export function getFileType(fileName) {
24
+ const ext = getFileExt(fileName)
25
+ const typeMap = {
26
+ // 文档
27
+ '.doc': 'document',
28
+ '.docx': 'document',
29
+ '.pages': 'document',
30
+ '.rtf': 'document',
31
+ '.odt': 'document',
32
+ // 表格
33
+ '.xls': 'spreadsheet',
34
+ '.xlsx': 'spreadsheet',
35
+ '.numbers': 'spreadsheet',
36
+ '.csv': 'spreadsheet',
37
+ '.ods': 'spreadsheet',
38
+ // 演示
39
+ '.ppt': 'presentation',
40
+ '.pptx': 'presentation',
41
+ '.key': 'presentation',
42
+ '.odp': 'presentation',
43
+ // PDF
44
+ '.pdf': 'pdf',
45
+ // 图片
46
+ '.jpg': 'image',
47
+ '.jpeg': 'image',
48
+ '.png': 'image',
49
+ '.gif': 'image',
50
+ '.bmp': 'image',
51
+ '.webp': 'image',
52
+ '.svg': 'image',
53
+ '.tiff': 'image',
54
+ '.ico': 'image',
55
+ // 音频
56
+ '.mp3': 'audio',
57
+ '.wav': 'audio',
58
+ '.flac': 'audio',
59
+ '.aac': 'audio',
60
+ '.ogg': 'audio',
61
+ '.m4a': 'audio',
62
+ '.wma': 'audio',
63
+ // 视频
64
+ '.mp4': 'video',
65
+ '.avi': 'video',
66
+ '.mov': 'video',
67
+ '.wmv': 'video',
68
+ '.flv': 'video',
69
+ '.mkv': 'video',
70
+ '.webm': 'video',
71
+ '.m4v': 'video',
72
+ // 压缩包
73
+ '.zip': 'archive',
74
+ '.rar': 'archive',
75
+ '.7z': 'archive',
76
+ '.tar': 'archive',
77
+ '.gz': 'archive',
78
+ '.bz2': 'archive',
79
+ '.xz': 'archive',
80
+ // 代码
81
+ '.js': 'code',
82
+ '.ts': 'code',
83
+ '.jsx': 'code',
84
+ '.tsx': 'code',
85
+ '.html': 'code',
86
+ '.css': 'code',
87
+ '.scss': 'code',
88
+ '.less': 'code',
89
+ '.java': 'code',
90
+ '.py': 'code',
91
+ '.go': 'code',
92
+ '.c': 'code',
93
+ '.cpp': 'code',
94
+ '.h': 'code',
95
+ '.php': 'code',
96
+ '.rb': 'code',
97
+ '.swift': 'code',
98
+ '.kt': 'code',
99
+ '.rs': 'code',
100
+ '.vue': 'code',
101
+ '.json': 'code',
102
+ '.xml': 'code',
103
+ '.jsp': 'code',
104
+ // 文本
105
+ '.txt': 'text',
106
+ '.md': 'text',
107
+ '.log': 'text',
108
+ // 设计
109
+ '.psd': 'design',
110
+ '.ai': 'design',
111
+ '.fig': 'design',
112
+ '.sketch': 'design',
113
+ '.xd': 'design',
114
+ // 电子书
115
+ '.epub': 'ebook',
116
+ '.mobi': 'ebook',
117
+ '.azw': 'ebook',
118
+ // 安装包
119
+ '.msi': 'installer',
120
+ '.exe': 'installer',
121
+ '.dmg': 'installer',
122
+ '.pkg': 'installer',
123
+ '.deb': 'installer',
124
+ '.rpm': 'installer',
125
+ // 原始文件
126
+ '.raw': 'raw',
127
+ '.cr2': 'raw',
128
+ '.nef': 'raw',
129
+ '.arw': 'raw'
130
+ }
131
+ return typeMap[ext] || 'default'
132
+ }
133
+
134
+ /**
135
+ * 获取文件图标类型(用于匹配图标文件名)
136
+ * @param {string} fileName - 文件名
137
+ * @returns {string} 图标类型标识
138
+ */
139
+ export function getFileIconType(fileName) {
140
+ const ext = getFileExt(fileName)
141
+ const iconMap = {
142
+ // 文档
143
+ '.doc': 'word',
144
+ '.docx': 'word',
145
+ // 表格
146
+ '.xls': 'excel',
147
+ '.xlsx': 'excel',
148
+ // 演示
149
+ '.ppt': 'ppt',
150
+ '.pptx': 'ppt',
151
+ // PDF
152
+ '.pdf': 'pdf',
153
+ // 图片
154
+ '.jpg': 'png',
155
+ '.jpeg': 'png',
156
+ '.png': 'png',
157
+ '.gif': 'gif',
158
+ '.bmp': 'png',
159
+ '.webp': 'png',
160
+ // 音频
161
+ '.mp3': 'mp3',
162
+ '.wav': 'mp3',
163
+ // 视频
164
+ '.mp4': 'avi',
165
+ '.avi': 'avi',
166
+ '.mov': 'avi',
167
+ '.flv': 'flv',
168
+ // 压缩包
169
+ '.zip': 'rar',
170
+ '.rar': 'rar',
171
+ '.7z': 'rar',
172
+ '.tar': 'rar',
173
+ '.gz': 'rar',
174
+ // 代码
175
+ '.js': 'js',
176
+ '.java': 'java',
177
+ '.jsp': 'jsp',
178
+ '.html': 'html',
179
+ // 文本
180
+ '.txt': 'txt',
181
+ // 设计
182
+ '.ai': 'ai',
183
+ '.psd': 'psd',
184
+ // 电子书
185
+ '.epub': 'epub',
186
+ // 安装包
187
+ '.msi': 'msi',
188
+ // 原始文件
189
+ '.raw': 'raw'
190
+ }
191
+ return iconMap[ext] || 'default'
192
+ }
193
+
194
+ /**
195
+ * 获取文件图标路径
196
+ * @param {string} fileName - 文件名
197
+ * @returns {string} 图标资源路径
198
+ */
199
+ export function getFileIconPath(fileName) {
200
+ const iconType = getFileIconType(fileName)
201
+ try {
202
+ return require(`./icons/icon-file-${iconType}.svg`)
203
+ } catch (e) {
204
+ return require(`./icons/icon-file-default.svg`)
205
+ }
206
+ }
207
+
208
+ /**
209
+ * 格式化文件大小
210
+ * @param {number} size - 文件大小(字节)
211
+ * @returns {string} 格式化后的大小字符串
212
+ */
213
+ export function formatFileSize(size) {
214
+ if (!size) return '-'
215
+ if (size < 1024) return size + ' B'
216
+ if (size < 1024 * 1024) return (size / 1024).toFixed(2) + ' KB'
217
+ if (size < 1024 * 1024 * 1024) return (size / (1024 * 1024)).toFixed(2) + ' MB'
218
+ return (size / (1024 * 1024 * 1024)).toFixed(2) + ' GB'
219
+ }
220
+
221
+ /**
222
+ * 判断是否是图片文件
223
+ * @param {string} fileName - 文件名
224
+ * @returns {boolean}
225
+ */
226
+ export function isImageFile(fileName) {
227
+ return getFileType(fileName) === 'image'
228
+ }
229
+
230
+ /**
231
+ * 判断是否是视频文件
232
+ * @param {string} fileName - 文件名
233
+ * @returns {boolean}
234
+ */
235
+ export function isVideoFile(fileName) {
236
+ return getFileType(fileName) === 'video'
237
+ }
238
+
239
+ /**
240
+ * 判断是否是可预览的文件类型
241
+ * @param {string} fileName - 文件名
242
+ * @returns {boolean}
243
+ */
244
+ export function isPreviewable(fileName) {
245
+ const type = getFileType(fileName)
246
+ return ['image', 'pdf', 'video'].includes(type)
247
+ }
248
+
249
+ /**
250
+ * 获取文件类型的中文名称
251
+ * @param {string} fileName - 文件名
252
+ * @returns {string} 类型名称
253
+ */
254
+ export function getFileTypeName(fileName) {
255
+ const type = getFileType(fileName)
256
+ const nameMap = {
257
+ document: '文档',
258
+ spreadsheet: '表格',
259
+ presentation: '演示文稿',
260
+ pdf: 'PDF',
261
+ image: '图片',
262
+ audio: '音频',
263
+ video: '视频',
264
+ archive: '压缩包',
265
+ code: '代码',
266
+ text: '文本',
267
+ design: '设计文件',
268
+ ebook: '电子书',
269
+ installer: '安装包',
270
+ raw: '原始文件',
271
+ default: '文件'
272
+ }
273
+ return nameMap[type] || nameMap.default
274
+ }
275
+
276
+ export default {
277
+ getFileExt,
278
+ getFileType,
279
+ getFileIconType,
280
+ getFileIconPath,
281
+ formatFileSize,
282
+ isImageFile,
283
+ isVideoFile,
284
+ isPreviewable,
285
+ getFileTypeName
286
+ }