mali-applet-ui 1.0.73 → 1.0.74
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view v-if="isFromReadonly" class="ml-date-picker is-readonly">
|
|
3
3
|
<view class="ml-date-picker-readonly-content">{{ value }}</view>
|
|
4
4
|
</view>
|
|
5
|
-
<uni-datetime-picker v-else :class="className" v-model="selectVal" type="date" :start="minDate" :end="maxDate" :placeholder="placeholder" @change="changeEvent" :border="border"/>
|
|
5
|
+
<uni-datetime-picker v-else :class="className" v-model="selectVal" type="date" :start="minDate" :end="maxDate" :placeholder="placeholder" @change="changeEvent" :clearIcon="clearable" :border="border"/>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script>
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
17
17
|
type: Boolean,
|
|
18
18
|
default: false
|
|
19
19
|
},
|
|
20
|
+
clearable: Boolean,
|
|
20
21
|
minDate: [String, Number],
|
|
21
22
|
maxDate: [String, Number],
|
|
22
23
|
placeholder: {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</view>
|
|
31
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
|
-
<view>{{ item[useProps.label] || '' }}</view>
|
|
33
|
+
<view class="nowrap">{{ 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">
|
|
@@ -120,7 +120,7 @@ export default {
|
|
|
120
120
|
methods: {
|
|
121
121
|
async handleIntoChildren (item) {
|
|
122
122
|
const { lazyLoad, lazy } = this
|
|
123
|
-
if (lazy && lazyLoad && !item.isLeaf) {
|
|
123
|
+
if (!(item.children && item.children) && lazy && lazyLoad && !item.isLeaf) {
|
|
124
124
|
// this.lazyLoading = true
|
|
125
125
|
await lazyLoad(item)
|
|
126
126
|
// this.lazyLoading = false
|
|
@@ -129,6 +129,14 @@ export default {
|
|
|
129
129
|
this.cache.push(item)
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
|
+
async reloadLazy () {
|
|
133
|
+
const { lazyLoad, lazy, current } = this
|
|
134
|
+
if (lazy && lazyLoad) {
|
|
135
|
+
// this.lazyLoading = true
|
|
136
|
+
await lazyLoad(current)
|
|
137
|
+
// this.lazyLoading = false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
132
140
|
handleBack () {
|
|
133
141
|
const { cache } = this
|
|
134
142
|
cache.splice(cache.length - 1, 1)
|
|
@@ -311,6 +319,12 @@ export default {
|
|
|
311
319
|
|
|
312
320
|
.ml-tree-node__title {
|
|
313
321
|
flex: 1;
|
|
322
|
+
width: 0;
|
|
323
|
+
.nowrap {
|
|
324
|
+
white-space: nowrap;
|
|
325
|
+
overflow: hidden;
|
|
326
|
+
text-overflow: ellipsis;
|
|
327
|
+
}
|
|
314
328
|
|
|
315
329
|
&.back {
|
|
316
330
|
color: #6e6e6e;
|