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,194 +1,194 @@
1
- <template>
2
- <van-popup :value="visible" position="center" round :style="{ width: modalWidth, maxWidth: '90%' }" @input="handleVisibleChange">
3
- <div class="modal-header">
4
- <span class="modal-title">{{ fileName }}</span>
5
- <van-icon name="cross" class="close-icon" @click="handleClose"></van-icon>
6
- </div>
7
- <div class="modal-content" v-show="visible">
8
- <!-- 图片预览 -->
9
- <div v-if="isImage" class="image-preview">
10
- <img :src="fileUrl" alt="图片预览" />
11
- </div>
12
- <!-- TXT 文本预览 -->
13
- <div v-else-if="fileType === 'txt'" class="text-preview">
14
- <pre>{{ textContent }}</pre>
15
- </div>
16
- <!-- 其他文件-->
17
- <div v-else class="preview-placeholder">
18
- <van-icon name="description" size="64" color="#ccc"></van-icon>
19
- <p>{{ fileName }}</p>
20
- </div>
21
- </div>
22
- <div class="modal-footer">
23
- <van-button type="default" size="small" @click="handleDownload">下载</van-button>
24
- <van-button type="primary" size="small" @click="handleClose">关闭</van-button>
25
- </div>
26
- </van-popup>
27
- </template>
28
-
29
- <script>
30
- export default {
31
- name: 'FlowAttachmentModal',
32
- props: {
33
- visible: {
34
- type: Boolean,
35
- default: false
36
- },
37
- fileUrl: {
38
- type: String,
39
- default: ''
40
- },
41
- fileName: {
42
- type: String,
43
- default: ''
44
- },
45
- modalWidth: {
46
- type: String,
47
- default: '320px'
48
- }
49
- },
50
- data() {
51
- return {
52
- textContent: '' // 存放 TXT 内容
53
- }
54
- },
55
- computed: {
56
- fileType() {
57
- if (!this.fileName) return ''
58
- return this.fileName.split('.').pop().toLowerCase()
59
- },
60
- isImage() {
61
- const imgTypes = ['jpg', 'jpeg', 'png', 'gif', 'webp']
62
- return imgTypes.includes(this.fileType)
63
- }
64
- },
65
- watch: {
66
- visible(val) {
67
- if (val) {
68
- this.loadPreview()
69
- }
70
- }
71
- },
72
- methods: {
73
- handleVisibleChange(val) {
74
- this.$emit('update:visible', val)
75
- },
76
- handleClose() {
77
- this.$emit('update:visible', false)
78
- },
79
- handleDownload() {
80
- if (!this.fileUrl) {
81
- this.$toast({ message: '文件地址不存在', position: 'middle' })
82
- return
83
- }
84
- let downloadFileName = this.fileName
85
- if (!downloadFileName) {
86
- downloadFileName = this.fileUrl.split('/').pop() || 'download'
87
- }
88
- const link = document.createElement('a')
89
- link.href = this.fileUrl
90
- link.download = downloadFileName
91
- document.body.appendChild(link)
92
- link.click()
93
- document.body.removeChild(link)
94
- },
95
-
96
- // 加载 TXT 预览
97
- async loadPreview() {
98
- if (this.fileType === 'txt') {
99
- try {
100
- const res = await fetch(this.fileUrl)
101
- this.textContent = await res.text()
102
- } catch (e) {
103
- this.textContent = '文本加载失败'
104
- }
105
- }
106
- }
107
- }
108
- }
109
- </script>
110
-
111
- <style scoped>
112
- .modal-header {
113
- display: flex;
114
- align-items: center;
115
- justify-content: space-between;
116
- padding: 16px;
117
- border-bottom: 1px solid #f0f0f0;
118
- }
119
-
120
- .modal-title {
121
- font-size: 16px;
122
- font-weight: 600;
123
- color: #323233;
124
- flex: 1;
125
- overflow: hidden;
126
- text-overflow: ellipsis;
127
- white-space: nowrap;
128
- }
129
-
130
- .close-icon {
131
- font-size: 20px;
132
- color: #c8c9cc;
133
- cursor: pointer;
134
- flex-shrink: 0;
135
- margin-left: 12px;
136
- }
137
-
138
- .close-icon:hover {
139
- color: #969799;
140
- }
141
-
142
- .modal-content {
143
- padding: 40px 20px;
144
- min-height: 200px;
145
- max-height: 70vh;
146
- overflow-y: auto;
147
- }
148
-
149
- .preview-placeholder {
150
- display: flex;
151
- flex-direction: column;
152
- align-items: center;
153
- justify-content: center;
154
- color: #969799;
155
- }
156
-
157
- .preview-placeholder p {
158
- margin-top: 12px;
159
- font-size: 14px;
160
- }
161
-
162
- .modal-footer {
163
- padding: 16px;
164
- border-top: 1px solid #f0f0f0;
165
- display: flex;
166
- justify-content: flex-end;
167
- gap: 12px;
168
- }
169
-
170
- /* 图片预览 */
171
- .image-preview {
172
- display: flex;
173
- align-items: center;
174
- justify-content: center;
175
- }
176
- .image-preview img {
177
- max-width: 100%;
178
- max-height: 60vh;
179
- object-fit: contain;
180
- border-radius: 4px;
181
- }
182
-
183
- /* TXT 预览 */
184
- .text-preview {
185
- padding: 10px;
186
- background: #f7f8fa;
187
- border-radius: 4px;
188
- max-height: 60vh;
189
- overflow-y: auto;
190
- white-space: pre-wrap;
191
- font-size: 14px;
192
- line-height: 1.6;
193
- }
194
- </style>
1
+ <template>
2
+ <van-popup :value="visible" position="center" round :style="{ width: modalWidth, maxWidth: '90%' }" @input="handleVisibleChange">
3
+ <div class="modal-header">
4
+ <span class="modal-title">{{ fileName }}</span>
5
+ <van-icon name="cross" class="close-icon" @click="handleClose"></van-icon>
6
+ </div>
7
+ <div class="modal-content" v-show="visible">
8
+ <!-- 图片预览 -->
9
+ <div v-if="isImage" class="image-preview">
10
+ <img :src="fileUrl" alt="图片预览" />
11
+ </div>
12
+ <!-- TXT 文本预览 -->
13
+ <div v-else-if="fileType === 'txt'" class="text-preview">
14
+ <pre>{{ textContent }}</pre>
15
+ </div>
16
+ <!-- 其他文件-->
17
+ <div v-else class="preview-placeholder">
18
+ <van-icon name="description" size="64" color="#ccc"></van-icon>
19
+ <p>{{ fileName }}</p>
20
+ </div>
21
+ </div>
22
+ <div class="modal-footer">
23
+ <van-button type="default" size="small" @click="handleDownload">下载</van-button>
24
+ <van-button type="primary" size="small" @click="handleClose">关闭</van-button>
25
+ </div>
26
+ </van-popup>
27
+ </template>
28
+
29
+ <script>
30
+ export default {
31
+ name: 'FlowAttachmentModal',
32
+ props: {
33
+ visible: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ fileUrl: {
38
+ type: String,
39
+ default: ''
40
+ },
41
+ fileName: {
42
+ type: String,
43
+ default: ''
44
+ },
45
+ modalWidth: {
46
+ type: String,
47
+ default: '320px'
48
+ }
49
+ },
50
+ data() {
51
+ return {
52
+ textContent: '' // 存放 TXT 内容
53
+ }
54
+ },
55
+ computed: {
56
+ fileType() {
57
+ if (!this.fileName) return ''
58
+ return this.fileName.split('.').pop().toLowerCase()
59
+ },
60
+ isImage() {
61
+ const imgTypes = ['jpg', 'jpeg', 'png', 'gif', 'webp']
62
+ return imgTypes.includes(this.fileType)
63
+ }
64
+ },
65
+ watch: {
66
+ visible(val) {
67
+ if (val) {
68
+ this.loadPreview()
69
+ }
70
+ }
71
+ },
72
+ methods: {
73
+ handleVisibleChange(val) {
74
+ this.$emit('update:visible', val)
75
+ },
76
+ handleClose() {
77
+ this.$emit('update:visible', false)
78
+ },
79
+ handleDownload() {
80
+ if (!this.fileUrl) {
81
+ this.$toast({ message: '文件地址不存在', position: 'middle' })
82
+ return
83
+ }
84
+ let downloadFileName = this.fileName
85
+ if (!downloadFileName) {
86
+ downloadFileName = this.fileUrl.split('/').pop() || 'download'
87
+ }
88
+ const link = document.createElement('a')
89
+ link.href = this.fileUrl
90
+ link.download = downloadFileName
91
+ document.body.appendChild(link)
92
+ link.click()
93
+ document.body.removeChild(link)
94
+ },
95
+
96
+ // 加载 TXT 预览
97
+ async loadPreview() {
98
+ if (this.fileType === 'txt') {
99
+ try {
100
+ const res = await fetch(this.fileUrl)
101
+ this.textContent = await res.text()
102
+ } catch (e) {
103
+ this.textContent = '文本加载失败'
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ </script>
110
+
111
+ <style scoped>
112
+ .modal-header {
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: space-between;
116
+ padding: 16px;
117
+ border-bottom: 1px solid #f0f0f0;
118
+ }
119
+
120
+ .modal-title {
121
+ font-size: 16px;
122
+ font-weight: 600;
123
+ color: #323233;
124
+ flex: 1;
125
+ overflow: hidden;
126
+ text-overflow: ellipsis;
127
+ white-space: nowrap;
128
+ }
129
+
130
+ .close-icon {
131
+ font-size: 20px;
132
+ color: #c8c9cc;
133
+ cursor: pointer;
134
+ flex-shrink: 0;
135
+ margin-left: 12px;
136
+ }
137
+
138
+ .close-icon:hover {
139
+ color: #969799;
140
+ }
141
+
142
+ .modal-content {
143
+ padding: 40px 20px;
144
+ min-height: 200px;
145
+ max-height: 70vh;
146
+ overflow-y: auto;
147
+ }
148
+
149
+ .preview-placeholder {
150
+ display: flex;
151
+ flex-direction: column;
152
+ align-items: center;
153
+ justify-content: center;
154
+ color: #969799;
155
+ }
156
+
157
+ .preview-placeholder p {
158
+ margin-top: 12px;
159
+ font-size: 14px;
160
+ }
161
+
162
+ .modal-footer {
163
+ padding: 16px;
164
+ border-top: 1px solid #f0f0f0;
165
+ display: flex;
166
+ justify-content: flex-end;
167
+ gap: 12px;
168
+ }
169
+
170
+ /* 图片预览 */
171
+ .image-preview {
172
+ display: flex;
173
+ align-items: center;
174
+ justify-content: center;
175
+ }
176
+ .image-preview img {
177
+ max-width: 100%;
178
+ max-height: 60vh;
179
+ object-fit: contain;
180
+ border-radius: 4px;
181
+ }
182
+
183
+ /* TXT 预览 */
184
+ .text-preview {
185
+ padding: 10px;
186
+ background: #f7f8fa;
187
+ border-radius: 4px;
188
+ max-height: 60vh;
189
+ overflow-y: auto;
190
+ white-space: pre-wrap;
191
+ font-size: 14px;
192
+ line-height: 1.6;
193
+ }
194
+ </style>