|
@@ -65,7 +65,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 确认按钮 -->
|
|
<!-- 确认按钮 -->
|
|
|
- <view class="footer">
|
|
|
|
|
|
|
+ <view class="footer adfacjb">
|
|
|
|
|
+ <button class="reset-btn" @click="handleReset">重置</button>
|
|
|
<button class="confirm-btn" @click="handleConfirm">确定</button>
|
|
<button class="confirm-btn" @click="handleConfirm">确定</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -75,7 +76,7 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, watch, computed, onMounted, getCurrentInstance } from 'vue';
|
|
import { ref, watch, computed, onMounted, getCurrentInstance } from 'vue';
|
|
|
const { proxy } = getCurrentInstance()
|
|
const { proxy } = getCurrentInstance()
|
|
|
-const emit = defineEmits(['update:show', 'confirm']);
|
|
|
|
|
|
|
+const emit = defineEmits(['update:show', 'confirm', 'reset']);
|
|
|
|
|
|
|
|
const hotCities = ['武汉','南京','郑州','杭州','上海','苏州','厦门','深圳','北京','广州','长沙','成都'];
|
|
const hotCities = ['武汉','南京','郑州','杭州','上海','苏州','厦门','深圳','北京','广州','长沙','成都'];
|
|
|
const cityData = ref([])
|
|
const cityData = ref([])
|
|
@@ -100,6 +101,14 @@ const handleConfirm = () => {
|
|
|
emit('confirm', result);
|
|
emit('confirm', result);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+// 重置区域选择并清除外层页面的区域筛选
|
|
|
|
|
+const handleReset = () => {
|
|
|
|
|
+ pickerValue.value = [0, 0, 0];
|
|
|
|
|
+ cities.value = provinces.value[0]?.children || [];
|
|
|
|
|
+ areas.value = cities.value[0]?.children || [];
|
|
|
|
|
+ emit('reset');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
// picker-view 滚动时触发
|
|
// picker-view 滚动时触发
|
|
|
const handlePickerChange = (e) => {
|
|
const handlePickerChange = (e) => {
|
|
|
const newPickerValue = e.detail.value;
|
|
const newPickerValue = e.detail.value;
|
|
@@ -313,9 +322,9 @@ onMounted(()=>{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.footer {
|
|
.footer {
|
|
|
- padding: 64rpx 147rpx 40rpx;
|
|
|
|
|
|
|
+ padding: 64rpx 24rpx 40rpx;
|
|
|
|
|
+ .reset-btn,
|
|
|
.confirm-btn {
|
|
.confirm-btn {
|
|
|
- width: 100%;
|
|
|
|
|
height: 80rpx;
|
|
height: 80rpx;
|
|
|
line-height: 88rpx;
|
|
line-height: 88rpx;
|
|
|
background: #B7F358;
|
|
background: #B7F358;
|
|
@@ -331,5 +340,13 @@ onMounted(()=>{
|
|
|
border: none;
|
|
border: none;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .reset-btn {
|
|
|
|
|
+ width: 222rpx;
|
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
|
+ border: 1rpx solid #252525;
|
|
|
|
|
+ }
|
|
|
|
|
+ .confirm-btn {
|
|
|
|
|
+ width: calc(100% - 252rpx);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|