升级uni-ui到最新版本1.4.27

This commit is contained in:
RuoYi
2023-07-12 09:42:10 +08:00
parent 296b15acbe
commit c27a8aa129
70 changed files with 1900 additions and 1578 deletions

View File

@@ -1,3 +1,12 @@
## 1.1.22023-04-11
- 修复 更改 modelValue 报错的 bug
- 修复 v-for 未使用 key 值控制台 warning
## 1.1.12023-02-21
- 修复代码合并时引发 value 属性为空时不渲染数据的问题
## 1.1.02023-02-15
- 修复 localdata 不支持动态更新的bug
## 1.0.92023-02-15
- 修复 localdata 不支持动态更新的bug
## 1.0.82022-09-16
- 可以使用 uni-scss 控制主题色
## 1.0.72022-07-06

View File

@@ -75,7 +75,7 @@
*/
export default {
name: 'UniDataPicker',
emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue'],
emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue','inputclick'],
mixins: [dataPicker],
components: {
DataPickerView
@@ -131,9 +131,16 @@
this.load();
})
},
watch: {
localdata: {
handler() {
this.load()
},
deep: true
},
},
methods: {
clear() {
this.modelValue = null;
this._dispatchEvent([]);
},
onPropsChange() {
@@ -148,10 +155,6 @@
return;
}
if (!this.hasValue) {
return;
}
// 回显本地数据
if (this.isLocalData) {
this.loadData();
@@ -184,6 +187,7 @@
},
handleInput() {
if (this.readonly) {
this.$emit('inputclick')
return
}
this.show()
@@ -544,4 +548,4 @@
}
/* #endif */
</style>
</style>

View File

@@ -2,25 +2,27 @@
<view class="uni-data-pickerview">
<scroll-view v-if="!isCloudDataList" class="selected-area" scroll-x="true">
<view class="selected-list">
<template v-for="(item,index) in selected">
<view class="selected-item"
:class="{'selected-item-active':index==selectedIndex}"
v-if="item.text" @click="handleSelect(index)">
<text>{{item.text}}</text>
<view
class="selected-item"
v-for="(item,index) in selected"
:key="index"
:class="{
'selected-item-active':index == selectedIndex
}"
@click="handleSelect(index)"
>
<text>{{item.text || ''}}</text>
</view>
</template>
</view>
</scroll-view>
<view class="tab-c">
<template v-for="(child, i) in dataList">
<scroll-view class="list" :key="i" v-if="i==selectedIndex" :scroll-y="true">
<view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in child"
@click="handleNodeClick(item, i, j)">
<text class="item-text">{{item[map.text]}}</text>
<view class="check" v-if="selected.length > i && item[map.value] == selected[i].value"></view>
</view>
</scroll-view>
</template>
<scroll-view class="list" :scroll-y="true">
<view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in dataList[selectedIndex]" :key="j"
@click="handleNodeClick(item, selectedIndex, j)">
<text class="item-text">{{item[map.text]}}</text>
<view class="check" v-if="selected.length > selectedIndex && item[map.value] == selected[selectedIndex].value"></view>
</view>
</scroll-view>
<view class="loading-cover" v-if="loading">
<uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
@@ -164,8 +166,8 @@
}
</script>
<style lang="scss">
$uni-primary: #007aff !default;
<style lang="scss">
$uni-primary: #007aff !default;
.uni-data-pickerview {
flex: 1;
@@ -318,4 +320,4 @@
/* #endif */
transform: rotate(45deg);
}
</style>
</style>

View File

@@ -1,7 +1,7 @@
{
"id": "uni-data-picker",
"displayName": "uni-data-picker 数据驱动的picker选择器",
"version": "1.0.8",
"version": "1.1.2",
"description": "单列、多列级联选择器,常用于省市区城市选择、公司部门选择、多级分类等场景",
"keywords": [
"uni-ui",