更新记录
0.0.2(2025-05-26)
下载此版本
- 修复同时设置 lackList optionalList 前者会覆盖后者的问题
0.0.1(2025-03-14)
下载此版本
整理更新
平台兼容性
uni-app(4.19)
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
√ |
√ |
√ |
√ |
- |
- |
- |
- |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
√ |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x(4.25)
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
- |
- |
- |
- |
- |
- |
其他
示例用法
<template>
<div>
<pan-date-range-selection ref="panDateRangeSelectionRef" @selectSuccess="selectSuccess" @onError="onError" />
</div>
</template>
<script>
export default {
data() {
return {
};
},
onLoad() {
setTimeout(() => {
// 参数是以下方式注入的
this.$refs.panDateRangeSelectionRef.init({
monthNum:3,
// fixedSelectDate: 2, //固定只能选择住一晚,既2天,传入2,不可少于2;
// upperLimit: 30 //最多选择3天,包含当天
// optionalNum:20,//多少天后不可选
// optionalDate:"2025-04-26",//最晚可选时间
// lackList: [
// "2025-03-24",
// "2025-03-25",
// "2025-03-26",
// "2025-03-27",
// "2025-03-30",
// "2025-03-31",
// "2025-04-01",
// "2025-04-02",
// "2025-04-06",
// "2025-04-07",
// "2025-04-08",
// "2025-04-10",
// "2025-04-11"
// ] ,//缺/不可选的日期
// optionalList:[
// "2025-03-24",
// "2025-03-25",
// "2025-03-26",
// "2025-03-27",
// "2025-03-30",
// "2025-03-31",
// "2025-04-01",
// "2025-04-02",
// "2025-04-06",
// "2025-04-07",
// "2025-04-08",
// "2025-04-10",
// "2025-04-11"
// ],//可选的日期,与lackList相反
})
}, 500)
},
methods: {
selectSuccess(e){
console.log(e)
},
onError(e){
console.log(e)
}
}
};
</script>
方法 (Methods)
init(Obj)