mali-applet-ui 0.2.92 → 0.2.94
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/components/ml-approval-record/ml-approval-record.vue +36 -14
- package/components/ml-cascader-picker/ml-cascader-picker.vue +8 -4
- package/components/ml-load-more/ml-load-more.vue +1 -0
- package/components/ml-province-city-picker/ml-province-city-picker.vue +8 -4
- package/components/ml-select-picker/ml-select-picker.vue +8 -4
- package/components/ml-tabs/ml-tabs.vue +2 -1
- package/components/ml-tooltip/ml-tooltip.vue +8 -1
- package/components/ml-tooltip-view/ml-tooltip-view.vue +10 -2
- package/components/ml-upload/ml-upload.vue +15 -5
- package/package.json +3 -2
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
<view class="ml-approval-record-header-title">审批记录</view>
|
|
5
5
|
</view>
|
|
6
6
|
<view class="ml-approval-record-body">
|
|
7
|
-
<view class="ml-approval-record-list" v-for="(group, gIndex) in
|
|
7
|
+
<view class="ml-approval-record-list" v-for="(group, gIndex) in flowItems" :key="gIndex">
|
|
8
8
|
<view class="ml-approval-record-flow-line"></view>
|
|
9
9
|
<view class="ml-approval-record-item">
|
|
10
10
|
<view class="ml-approval-record-item-title">{{ group.name }}</view>
|
|
11
11
|
</view>
|
|
12
12
|
<view class="ml-approval-record-users">
|
|
13
|
-
<view class="ml-approval-record-user-item" v-for="(item, uIndex) in group.
|
|
13
|
+
<view class="ml-approval-record-user-item" v-for="(item, uIndex) in group.userList" :key="uIndex">
|
|
14
14
|
<view class="ml-approval-record-user-item-info">
|
|
15
15
|
<view class="ml-approval-record-user-item-left">
|
|
16
|
-
<image class="ml-approval-record-user-picture"
|
|
16
|
+
<image class="ml-approval-record-user-picture" src="https://csgc.saas.ddqrcode.com/applet/business/image/portrait2.png" mode="scaleToFill"></image>
|
|
17
17
|
</view>
|
|
18
18
|
<view class="ml-approval-record-user-item-content">
|
|
19
19
|
<view class="ml-approval-record-user-item-top">
|
|
@@ -48,31 +48,53 @@ export default {
|
|
|
48
48
|
},
|
|
49
49
|
data () {
|
|
50
50
|
return {
|
|
51
|
+
flowItems: [],
|
|
52
|
+
approvalData: {
|
|
53
|
+
flowHandlers: [],
|
|
54
|
+
module: null,
|
|
55
|
+
flowSettingCode: null,
|
|
56
|
+
enableFlag: false
|
|
57
|
+
},
|
|
51
58
|
flowOptions: []
|
|
52
59
|
}
|
|
53
60
|
},
|
|
54
61
|
watch: {
|
|
55
62
|
code () {
|
|
56
|
-
this.
|
|
63
|
+
this.loadFlow()
|
|
57
64
|
}
|
|
58
65
|
},
|
|
59
66
|
created () {
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
67
|
+
this.approvalData.module = this.code
|
|
68
|
+
this.approvalData.flowSettingCode = this.code
|
|
69
|
+
this.updateFlowItems(this.options)
|
|
70
|
+
this.loadFlow()
|
|
62
71
|
},
|
|
63
72
|
methods: {
|
|
64
|
-
|
|
73
|
+
updateModel () {
|
|
74
|
+
this.$emit('input', this.approvalData)
|
|
75
|
+
},
|
|
76
|
+
updateFlowItems (list) {
|
|
77
|
+
this.flowItems = (list || []).map(item => {
|
|
78
|
+
item.f = []
|
|
79
|
+
return item
|
|
80
|
+
})
|
|
81
|
+
},
|
|
82
|
+
async loadFlow () {
|
|
83
|
+
await this.$nextTick()
|
|
65
84
|
if (!this.code) {
|
|
66
85
|
return
|
|
67
86
|
}
|
|
68
|
-
if (globalStore.approval && globalStore.approval.
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
Promise.resolve(
|
|
72
|
-
value: this.value,
|
|
87
|
+
if (globalStore.approval && globalStore.approval.select) {
|
|
88
|
+
const loadFlowMethod = globalStore.approval.select.loadFlow
|
|
89
|
+
if (loadFlowMethod) {
|
|
90
|
+
Promise.resolve(loadFlowMethod({
|
|
73
91
|
code: this.code
|
|
74
|
-
})).then(
|
|
75
|
-
this.
|
|
92
|
+
})).then(res => {
|
|
93
|
+
this.approvalData.enableFlag = res.enableFlag
|
|
94
|
+
this.approvalData.flowSettingCode = res.flowSettingCode
|
|
95
|
+
this.approvalData.module = res.module
|
|
96
|
+
this.updateFlowItems(res.flowItems)
|
|
97
|
+
this.updateModel()
|
|
76
98
|
})
|
|
77
99
|
}
|
|
78
100
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<view v-else class="ml-cascader-picker" :class="[className || '', {'is-border': border, 'is-clear': value.length}]">
|
|
6
6
|
<view class="ml-cascader-picker-warpper" @click="openPopup()">
|
|
7
7
|
<view class="ml-cascader-picker-text">
|
|
8
|
-
<
|
|
9
|
-
<
|
|
8
|
+
<view v-if="value.length" class="ml-cascader-picker-label">{{ selectLabel }}</view>
|
|
9
|
+
<view v-else class="ml-cascader-picker-placeholder">{{ placeholder }}</view>
|
|
10
10
|
</view>
|
|
11
11
|
<view v-if="clearable && value.length" class="ml-cascader-picker-clear-icon" @click.stop="clearEvent">
|
|
12
12
|
<ml-icon name="delete-filling"></ml-icon>
|
|
@@ -211,8 +211,12 @@ export default {
|
|
|
211
211
|
flex-grow: 1;
|
|
212
212
|
padding-right: 10rpx;
|
|
213
213
|
overflow: hidden;
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
.ml-cascader-picker-label,
|
|
215
|
+
.ml-cascader-picker-placeholder {
|
|
216
|
+
overflow: hidden;
|
|
217
|
+
text-overflow: ellipsis;
|
|
218
|
+
white-space: nowrap;
|
|
219
|
+
}
|
|
216
220
|
}
|
|
217
221
|
.ml-cascader-picker-clear-icon {
|
|
218
222
|
width: 60rpx;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<view v-else class="ml-province-city-picker" :class="[className || '', {'is-border': border, 'is-clear': (value ? (value.length || province) : province)}]">
|
|
6
6
|
<view class="ml-province-city-picker-warpper" @click="openPopup()">
|
|
7
7
|
<view class="ml-province-city-picker-text">
|
|
8
|
-
<
|
|
9
|
-
<
|
|
8
|
+
<view v-if="(value ? (value.length || province) : province)" class="ml-province-city-picker-label">{{ selectLabel }}</view>
|
|
9
|
+
<view v-else class="ml-province-city-picker-placeholder">{{ placeholder }}</view>
|
|
10
10
|
</view>
|
|
11
11
|
<view v-if="clearable && (value ? (value.length || province) : province)" class="ml-province-city-picker-clear-icon" @click.stop="clearEvent">
|
|
12
12
|
<ml-icon name="delete-filling"></ml-icon>
|
|
@@ -174,8 +174,12 @@ export default {
|
|
|
174
174
|
flex-grow: 1;
|
|
175
175
|
padding-right: 10rpx;
|
|
176
176
|
overflow: hidden;
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
.ml-province-city-picker-label,
|
|
178
|
+
.ml-province-city-picker-placeholder {
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
text-overflow: ellipsis;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
}
|
|
179
183
|
}
|
|
180
184
|
.ml-province-city-picker-clear-icon {
|
|
181
185
|
width: 60rpx;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<picker v-else class="ml-select-picker" mode="selector" :value="selectIndex" :style="{width: width || '100%'}" :range="optionList" :range-key="optLabelField" @change="changeEvent">
|
|
6
6
|
<view class="ml-select-picker-warpper" :class="[className || '', {'is-border': border, 'is-clear': value !== null}]">
|
|
7
7
|
<view class="ml-select-picker-text">
|
|
8
|
-
<
|
|
9
|
-
<
|
|
8
|
+
<view v-if="value !== null" class="ml-select-picker-label">{{ selectLabel }}</view>
|
|
9
|
+
<view v-else class="ml-select-picker-placeholder">{{ placeholder }}</view>
|
|
10
10
|
</view>
|
|
11
11
|
<view v-if="clearable && value !== null" class="ml-select-picker-clear-icon" @click.stop="clearEvent">
|
|
12
12
|
<ml-icon name="delete-filling"></ml-icon>
|
|
@@ -155,8 +155,12 @@ export default {
|
|
|
155
155
|
.ml-select-picker-text {
|
|
156
156
|
flex-grow: 1;
|
|
157
157
|
overflow: hidden;
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
.ml-select-picker-label,
|
|
159
|
+
.ml-select-picker-placeholder {
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
text-overflow: ellipsis;
|
|
162
|
+
white-space: nowrap;
|
|
163
|
+
}
|
|
160
164
|
}
|
|
161
165
|
.ml-select-picker-clear-icon {
|
|
162
166
|
width: 34rpx;
|
|
@@ -74,6 +74,7 @@ export default {
|
|
|
74
74
|
}
|
|
75
75
|
.ml-tabs-header {
|
|
76
76
|
background: #fff;
|
|
77
|
+
padding-bottom: 10rpx;
|
|
77
78
|
margin-bottom: 20rpx;
|
|
78
79
|
}
|
|
79
80
|
.ml-tabs-content {
|
|
@@ -85,7 +86,7 @@ export default {
|
|
|
85
86
|
.ml-tabs-nav-item {
|
|
86
87
|
position: relative;
|
|
87
88
|
display: inline-block;
|
|
88
|
-
padding: 10rpx
|
|
89
|
+
padding: 10rpx 10rpx 0 10rpx;
|
|
89
90
|
text-align: center;
|
|
90
91
|
.ml-tabs-nav-title {
|
|
91
92
|
position: relative;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<view class="ml-tooltip-content" @click="toggleVisible">
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</view>
|
|
6
|
-
<ml-tooltip-view v-if="showTip" :title="title" :placement="placement" position="absolute" :top="top" :left="left"></ml-tooltip-view>
|
|
6
|
+
<ml-tooltip-view v-if="showTip" :title="title" :placement="placement" position="absolute" :width="width" :top="top" :left="left"></ml-tooltip-view>
|
|
7
7
|
</view>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
@@ -16,6 +16,7 @@ export default {
|
|
|
16
16
|
props: {
|
|
17
17
|
value: Boolean,
|
|
18
18
|
title: String,
|
|
19
|
+
width: String,
|
|
19
20
|
placement: String,
|
|
20
21
|
trigger: String,
|
|
21
22
|
className: String
|
|
@@ -34,6 +35,7 @@ export default {
|
|
|
34
35
|
},
|
|
35
36
|
created () {
|
|
36
37
|
this.showTip = this.value
|
|
38
|
+
this.updateStyle()
|
|
37
39
|
},
|
|
38
40
|
methods: {
|
|
39
41
|
open () {
|
|
@@ -48,6 +50,11 @@ export default {
|
|
|
48
50
|
this.showTip = value
|
|
49
51
|
this.$emit('input', value)
|
|
50
52
|
},
|
|
53
|
+
updateStyle () {
|
|
54
|
+
if (this.placement === 'bottom') {
|
|
55
|
+
this.left = '-20rpx'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
51
58
|
toggleVisible () {
|
|
52
59
|
if (!this.trigger || ['tap', 'click'].includes(this.trigger)) {
|
|
53
60
|
if (this.showTip) {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<view class="ml-tooltip-view" :class="[className || '', `placement-${placement || 'bottom'}`]" :style="tipStyles">
|
|
3
3
|
<view class="ml-tooltip-warpper">
|
|
4
4
|
<view class="ml-tooltip-title">
|
|
5
|
-
<slow name="title">
|
|
5
|
+
<slow name="title">
|
|
6
|
+
<text>{{ title }}</text>
|
|
7
|
+
</slow>
|
|
6
8
|
</view>
|
|
7
9
|
<view class="ml-tooltip-arrows">
|
|
8
10
|
<ml-icon v-if="placement === 'bottom'" name="arrow-up-filling" />
|
|
@@ -19,6 +21,7 @@ export default {
|
|
|
19
21
|
name: 'MlTooltipView',
|
|
20
22
|
props: {
|
|
21
23
|
title: String,
|
|
24
|
+
width: String,
|
|
22
25
|
position: String,
|
|
23
26
|
top: String,
|
|
24
27
|
left: String,
|
|
@@ -34,7 +37,8 @@ export default {
|
|
|
34
37
|
const bottomSys = this.bottom ? `bottom: ${this.bottom};` : ''
|
|
35
38
|
const leftSys = this.left ? `left: ${this.left};` : ''
|
|
36
39
|
const rightSys = this.right ? `right: ${this.right};` : ''
|
|
37
|
-
|
|
40
|
+
const wSys = this.width ? `width: ${this.width};` : ''
|
|
41
|
+
return `${posSys}${topSys}${bottomSys}${leftSys}${rightSys}${wSys}`
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
}
|
|
@@ -43,6 +47,7 @@ export default {
|
|
|
43
47
|
<style lang="scss">
|
|
44
48
|
.ml-tooltip-view {
|
|
45
49
|
z-index: 900;
|
|
50
|
+
width: 300rpx;
|
|
46
51
|
.ml-tooltip-warpper {
|
|
47
52
|
position: relative;
|
|
48
53
|
display: inline-block;
|
|
@@ -53,6 +58,9 @@ export default {
|
|
|
53
58
|
border-radius: $ml-border-radius;
|
|
54
59
|
max-width: 80vw;
|
|
55
60
|
}
|
|
61
|
+
.ml-tooltip-title {
|
|
62
|
+
white-space: pre-wrap;
|
|
63
|
+
}
|
|
56
64
|
.ml-tooltip-arrows {
|
|
57
65
|
position: absolute;
|
|
58
66
|
color: rgba(0, 0, 0, 0.85);
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<view class="ml-upload-file-info">
|
|
40
40
|
<view class="ml-upload-file-name">{{ item[nameField] }}</view>
|
|
41
41
|
<view class="ml-upload-file-desc">
|
|
42
|
-
<ml-button v-if="previewTypes.includes(item[typeField])" status="primary" type="text" @click="previewDocs(item)">预览</ml-button>
|
|
42
|
+
<ml-button v-if="preview && previewTypes.includes(item[typeField])" status="primary" type="text" @click="previewDocs(item)">预览</ml-button>
|
|
43
43
|
<ml-button status="primary" type="text" @click="downloadEvent(item)">下载</ml-button>
|
|
44
44
|
</view>
|
|
45
45
|
</view>
|
|
@@ -70,6 +70,10 @@ export default {
|
|
|
70
70
|
type: Array,
|
|
71
71
|
default: () => ([])
|
|
72
72
|
},
|
|
73
|
+
preview: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: true
|
|
76
|
+
},
|
|
73
77
|
simpleValue: {
|
|
74
78
|
type: Boolean,
|
|
75
79
|
default: false
|
|
@@ -195,9 +199,9 @@ export default {
|
|
|
195
199
|
tempPath: this.getUrl(obj)
|
|
196
200
|
}
|
|
197
201
|
})
|
|
198
|
-
this.isUpdate = true
|
|
199
202
|
if (this.urlList && this.urlList.length) {
|
|
200
|
-
this
|
|
203
|
+
this.isUpdate = true
|
|
204
|
+
this.$emit('input', [...this.fileList])
|
|
201
205
|
}
|
|
202
206
|
} else {
|
|
203
207
|
this.fileList = (this.value || []).map(item => {
|
|
@@ -248,6 +252,9 @@ export default {
|
|
|
248
252
|
return urlRest.pathname.split('/').slice(-1)[0] || ''
|
|
249
253
|
},
|
|
250
254
|
previewImageEvent (item, index) {
|
|
255
|
+
if (!this.preview) {
|
|
256
|
+
return
|
|
257
|
+
}
|
|
251
258
|
if (this.previewStatus) {
|
|
252
259
|
return
|
|
253
260
|
}
|
|
@@ -354,7 +361,7 @@ export default {
|
|
|
354
361
|
}
|
|
355
362
|
})
|
|
356
363
|
},
|
|
357
|
-
|
|
364
|
+
choose () {
|
|
358
365
|
if (this.loading) {
|
|
359
366
|
return
|
|
360
367
|
}
|
|
@@ -394,7 +401,7 @@ export default {
|
|
|
394
401
|
}
|
|
395
402
|
})
|
|
396
403
|
).then(list => {
|
|
397
|
-
this.fileList.
|
|
404
|
+
this.fileList = [...this.fileList, ...list].slice(-this.limit)
|
|
398
405
|
this.isUpdate = true
|
|
399
406
|
this.updateModel()
|
|
400
407
|
this.loading = false
|
|
@@ -405,6 +412,9 @@ export default {
|
|
|
405
412
|
}).catch(e => {
|
|
406
413
|
console.log(e)
|
|
407
414
|
})
|
|
415
|
+
},
|
|
416
|
+
chooseEvent () {
|
|
417
|
+
this.choose()
|
|
408
418
|
}
|
|
409
419
|
}
|
|
410
420
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mali-applet-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.94",
|
|
4
4
|
"description": "码里云小程序组件库",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"release": "node script/release.js && npm publish"
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"vuex": "^4.0.2",
|
|
21
|
-
"xe-utils": "3.5.7"
|
|
21
|
+
"xe-utils": "3.5.7",
|
|
22
|
+
"dingtalk-design-miniapp": "^1.9.1"
|
|
22
23
|
},
|
|
23
24
|
"uni-app": {
|
|
24
25
|
"scripts": {
|