...
 
Commits (3)
    https://gitcode.net/vk-uni/vk-uview-ui/-/commit/ecb3e6f6357b0d871f4c2ae27ade4b5f698e4286 【修复】u-picker在vue3的app环境下默认值无效的bug 2023-04-23T15:46:03+08:00 VK云桌面 370725567@qq.com https://gitcode.net/vk-uni/vk-uview-ui/-/commit/979e2cdd69873121b18689b67774edaead2bf4d7 【修复】`u-picker` 在vue3的App环境下默认值无效的bug 2023-04-23T18:19:11+08:00 VK云桌面 370725567@qq.com https://gitcode.net/vk-uni/vk-uview-ui/-/commit/4add775a7ebc5232a2f44d3577983ec7d5938e77 1.4.7 2023-04-24T09:31:07+08:00 VK 370725567@qq.com
## 1.4.7(2023-04-24)
* 【修复】`u-picker` 在vue3的App环境下默认值无效的bug
## 1.4.5(2022-12-05)
* 【修复】`u-row``u-col` 使用 `@click.stop` 会报错的问题,同时建议改用 `@click.native.stop` 来代替 `@click.stop`
## 1.4.4(2022-11-12)
......
......@@ -12,7 +12,7 @@
:blur="blur"
>
<view class="u-datetime-picker">
<view class="u-picker-header" @touchmove.stop.prevent="">
<view class="u-picker-header" @touchmove.stop.prevent="stop">
<view
class="u-btn-picker u-btn-picker--tips"
:style="{ color: cancelColor }"
......@@ -28,7 +28,7 @@
:style="{ color: moving ? cancelColor : confirmColor }"
hover-class="u-opacity"
:hover-stay-time="150"
@touchmove.stop=""
@touchmove.stop="stop"
@click.stop="getResult('confirm')"
>
{{ confirmText }}
......@@ -43,17 +43,17 @@
@pickstart="pickstart"
@pickend="pickend"
>
<picker-view-column v-if="!reset && params.province">
<picker-view-column v-if="showColumnCom && params.province">
<view class="u-column-item" v-for="(item, index) in provinces" :key="index">
<view class="u-line-1">{{ item.name }}</view>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.city">
<picker-view-column v-if="showColumnCom && params.city">
<view class="u-column-item" v-for="(item, index) in citys" :key="index">
<view class="u-line-1">{{ item.name }}</view>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.area">
<picker-view-column v-if="showColumnCom && params.area">
<view class="u-column-item" v-for="(item, index) in areas" :key="index">
<view class="u-line-1">{{ item.name }}</view>
</view>
......@@ -67,37 +67,37 @@
@pickstart="pickstart"
@pickend="pickend"
>
<picker-view-column v-if="!reset && params.year">
<picker-view-column v-if="showColumnCom && params.year">
<view class="u-column-item" v-for="(item, index) in years" :key="index">
{{ item }}
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.month">
<picker-view-column v-if="showColumnCom && params.month">
<view class="u-column-item" v-for="(item, index) in months" :key="index">
{{ formatNumber(item) }}
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.day">
<picker-view-column v-if="showColumnCom && params.day">
<view class="u-column-item" v-for="(item, index) in days" :key="index">
{{ formatNumber(item) }}
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.hour">
<picker-view-column v-if="showColumnCom && params.hour">
<view class="u-column-item" v-for="(item, index) in hours" :key="index">
{{ formatNumber(item) }}
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.minute">
<picker-view-column v-if="showColumnCom && params.minute">
<view class="u-column-item" v-for="(item, index) in minutes" :key="index">
{{ formatNumber(item) }}
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.second">
<picker-view-column v-if="showColumnCom && params.second">
<view class="u-column-item" v-for="(item, index) in seconds" :key="index">
{{ formatNumber(item) }}
<text class="u-text" v-if="showTimeTag"></text>
......@@ -112,7 +112,7 @@
@pickstart="pickstart"
@pickend="pickend"
>
<picker-view-column v-if="!reset">
<picker-view-column v-if="showColumnCom">
<view class="u-column-item" v-for="(item, index) in range" :key="index">
<view class="u-line-1">{{ getItemValue(item, "selector") }}</view>
</view>
......@@ -126,7 +126,7 @@
@pickstart="pickstart"
@pickend="pickend"
>
<picker-view-column v-if="!reset" v-for="(item, index) in range" :key="index">
<picker-view-column v-if="showColumnCom" v-for="(item, index) in range" :key="index">
<view class="u-column-item" v-for="(item1, index1) in item" :key="index1">
<view class="u-line-1">{{ getItemValue(item1, "multiSelector") }}</view>
</view>
......@@ -344,9 +344,8 @@ export default {
},
propsChange() {
// 引用这几个变量,是为了监听其变化
return `${this.mode}-${this.defaultTime}-${this.startYear}-${this.endYear}-${
this.defaultRegion
}-${this.areaCode}`;
let { mode, defaultTime, startYear, endYear, defaultRegion, areaCode, defaultSelector } = this;
return JSON.stringify({ mode, defaultTime, startYear, endYear, defaultRegion, areaCode, defaultSelector });
},
regionChange() {
// 引用这几个变量,是为了监听其变化
......@@ -358,6 +357,15 @@ export default {
uZIndex() {
// 如果用户有传递z-index值,优先使用
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
},
// 用来兼容小程序、App、h5
showColumnCom(){
// #ifdef MP
return !this.reset;
// #endif
// #ifndef MP
return true;
// #endif
}
},
watch: {
......@@ -385,7 +393,7 @@ export default {
}
this.popupValue = n;
}
},
}
},
methods: {
// 标识滑动开始,只有微信小程序才有这样的事件
......@@ -808,8 +816,10 @@ export default {
}
};
return res;
},
stop(){
}
}
};
</script>
......
......@@ -2,7 +2,7 @@
"id": "vk-uview-ui",
"name": "vk-uview-ui",
"displayName": "【开箱即用】uView Vue3 横空出世,继承uView1意志,再战江湖,风云再起!",
"version": "1.4.5",
"version": "1.4.7",
"description": "同时支持 Vue3.0 和 Vue2.0,你没看错,现在 uView 支持 Vue3.0 了!(不支持nvue,此版本为uView1.0的分支)",
"keywords": [
"vk-uview-ui",
......