mali-applet-ui 1.1.28 → 1.1.30
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.
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-action-menu" @tap.stop="openAction">
|
|
3
|
+
<slot>
|
|
4
|
+
<view class="ml-action-menu-icon mlicon-menu"></view>
|
|
5
|
+
</slot>
|
|
6
|
+
</view>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'MlListItemMenu',
|
|
12
|
+
props: {
|
|
13
|
+
options: Array,
|
|
14
|
+
status: String,
|
|
15
|
+
params: Object
|
|
16
|
+
},
|
|
17
|
+
methods: {
|
|
18
|
+
openAction () {
|
|
19
|
+
uni.showActionSheet({
|
|
20
|
+
itemList: this.options.map(item => item.label),
|
|
21
|
+
// #ifdef MP-DINGTALK
|
|
22
|
+
cancelButtonText: '取消',
|
|
23
|
+
// #endif
|
|
24
|
+
success: (res) => {
|
|
25
|
+
const index = res.tapIndex
|
|
26
|
+
const item = this.options[index]
|
|
27
|
+
const value = item.value
|
|
28
|
+
this.$emit('change', { ...this.params, value, option: item })
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style lang="scss">
|
|
37
|
+
.ml-action-menu {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
.ml-action-menu-icon {
|
|
40
|
+
font-size: 36rpx;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|