mali-applet-ui 1.0.72 → 1.0.73
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-amount-text" :class="[className || '', status ? `ss-${status}` : '', {'is-underline': underline}]">
|
|
2
|
+
<view class="ml-amount-text" :class="[className || '', status ? `ss-${status}` : '', {'is-underline': underline}]" @tap="tapEvent">
|
|
3
3
|
<slot name="symbol">
|
|
4
4
|
<view v-if="symbol" class="amount-flag">¥</view>
|
|
5
5
|
</slot>
|
|
@@ -45,6 +45,12 @@ export default {
|
|
|
45
45
|
}
|
|
46
46
|
return toAmountString(this.value)
|
|
47
47
|
}
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
tapEvent () {
|
|
51
|
+
this.$emit('tap', {})
|
|
52
|
+
this.$emit('click', {})
|
|
53
|
+
}
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
56
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-dict-type" :class="[className || '', (status || showStatus) && selectStatus ? `ss-${selectStatus}` : '', {'is-underline': underline, 'is-border': border, 'is-round': round}]">
|
|
2
|
+
<view class="ml-dict-type" :class="[className || '', (status || showStatus) && selectStatus ? `ss-${selectStatus}` : '', {'is-underline': underline, 'is-border': border, 'is-round': round}]" @tap="tapEvent">
|
|
3
3
|
<view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-dict-type-left-icon">
|
|
4
4
|
<ml-icon :className="prefixIcon"></ml-icon>
|
|
5
5
|
</view>
|
|
@@ -56,6 +56,12 @@ export default {
|
|
|
56
56
|
optStatusField () {
|
|
57
57
|
return this.optOptions.status || 'status'
|
|
58
58
|
}
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
tapEvent () {
|
|
62
|
+
this.$emit('tap', {})
|
|
63
|
+
this.$emit('click', {})
|
|
64
|
+
}
|
|
59
65
|
}
|
|
60
66
|
}
|
|
61
67
|
</script>
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
@change="handleChangeCheckbox(item)"></ml-checkbox>
|
|
29
29
|
<ml-radio :value="checkIndex" :label="item[useProps.key]" v-else @change="handleChangeRadio"></ml-radio>
|
|
30
30
|
</view>
|
|
31
|
-
<MlTreeIcon @click="e => $emit('click-icon', 'prefix'
|
|
31
|
+
<MlTreeIcon @click="e => $emit('click-icon', item, 'prefix')" :info="getPrefixIcon(item)" :key="index"></MlTreeIcon>
|
|
32
32
|
<view class="ml-tree-node__title" @click="handleIntoChildren(item)">
|
|
33
33
|
<view>{{ item[useProps.label] || '' }}</view>
|
|
34
34
|
<view class="ml-tree-node__explain" v-if="item[useProps.explain]">{{ item[useProps.explain] }}</view>
|
|
35
35
|
</view>
|
|
36
36
|
<view class="ml-tree-node__extra">
|
|
37
|
-
<MlTreeIcon @click="e => $emit('click-icon', 'suffix'
|
|
38
|
-
<MlTreeIcon @click="handleIntoChildren(item)" v-if="item.children && item.children.length" :info="{ icon: 'arrow-right' }" :key="index"></MlTreeIcon>
|
|
37
|
+
<MlTreeIcon @click="e => $emit('click-icon', item, 'suffix')" :info="getSuffixIcon(item)" :key="index"></MlTreeIcon>
|
|
38
|
+
<MlTreeIcon @click="handleIntoChildren(item)" v-if="(item.children && item.children.length) || (lazy && !item.isLeaf)" :info="{ icon: 'arrow-right' }" :key="index"></MlTreeIcon>
|
|
39
39
|
</view>
|
|
40
40
|
</view>
|
|
41
41
|
</view>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
|
|
45
45
|
<script>
|
|
46
|
-
import MlTreeIcon from './ml-tree-icon'
|
|
46
|
+
import MlTreeIcon from './ml-tree-icon.vue'
|
|
47
47
|
import { findNodesByKeys, findTreeByKey } from './utils'
|
|
48
48
|
|
|
49
49
|
export default {
|
|
@@ -57,6 +57,8 @@ export default {
|
|
|
57
57
|
check: Boolean,
|
|
58
58
|
multiple: Boolean,
|
|
59
59
|
breadcrumb: Boolean,
|
|
60
|
+
lazy: Boolean,
|
|
61
|
+
lazyLoad: Function,
|
|
60
62
|
strictly: Boolean,
|
|
61
63
|
arbitrary: Boolean,
|
|
62
64
|
props: {
|
|
@@ -91,7 +93,8 @@ export default {
|
|
|
91
93
|
label: 'label',
|
|
92
94
|
children: 'children',
|
|
93
95
|
explain: 'explain',
|
|
94
|
-
user: 'user'
|
|
96
|
+
user: 'user',
|
|
97
|
+
isLeaf: 'isLeaf'
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
},
|
|
@@ -115,7 +118,13 @@ export default {
|
|
|
115
118
|
}
|
|
116
119
|
},
|
|
117
120
|
methods: {
|
|
118
|
-
handleIntoChildren (item) {
|
|
121
|
+
async handleIntoChildren (item) {
|
|
122
|
+
const { lazyLoad, lazy } = this
|
|
123
|
+
if (lazy && lazyLoad && !item.isLeaf) {
|
|
124
|
+
// this.lazyLoading = true
|
|
125
|
+
await lazyLoad(item)
|
|
126
|
+
// this.lazyLoading = false
|
|
127
|
+
}
|
|
119
128
|
if (item.children && item.children.length) {
|
|
120
129
|
this.cache.push(item)
|
|
121
130
|
}
|