Ver código fonte

vhs - form init tmp save

abpcoder 4 semanas atrás
pai
commit
fc22c6cdb8

+ 12 - 8
src/pagesOther/components/ie-bottom-buttons/ie-bottom-buttons.vue

@@ -1,9 +1,13 @@
 <template>
-    <view v-if="left||right" class="flex gap-30" :class="containerClass">
-        <uv-button v-if="left" :text="left" :type="leftType" :icon="leftIcon" :icon-color="leftType" plain
-                   v-bind="buttonStyle" @click="$emit('left')"/>
-        <uv-button v-if="right" :text="right" :type="rightType" :icon="rightIcon" icon-color="white"
-                   :loading="loading" v-bind="buttonStyle" @click="$emit('right')"/>
+    <view v-if="left||right" class="flex gap-30 p-30" :class="containerClass">
+        <view v-if="left" class="flex-1">
+            <uv-button :text="left" :type="leftType" :icon="leftIcon" :icon-color="leftType" plain
+                       v-bind="buttonStyle" @click="$emit('left')"/>
+        </view>
+        <view v-if="right" class="flex-1">
+            <uv-button v-if="right" :text="right" :type="rightType" :icon="rightIcon" icon-color="white"
+                       :loading="loading" v-bind="buttonStyle" @click="$emit('right')"/>
+        </view>
     </view>
 </template>
 
@@ -27,11 +31,11 @@ const single = computed(() => !props.left || !props.right)
 const buttonStyle = computed(() => ({
     customStyle: {
         height: '44px',
+        width: '100%'
     },
-    shape: 'circle',
-    class: single.value ? '!w-1/2' : '!flex-1'
+    shape: 'circle'
 }))
-const containerClass = computed(() => single.value ? 'fx-cen-cen' : 'fx-bet-cen')
+const containerClass = computed(() => single.value ? 'justify-center items-center' : 'justify-between items-center')
 </script>
 
 <style scoped>

+ 11 - 16
src/pagesOther/components/ie-condition-dropdown/ie-condition-dropdown-popup.vue

@@ -1,17 +1,20 @@
 <template>
     <uv-popup ref="popup" mode="top" :safe-area-inset-bottom="false" :offset-top="relTop" @change="handleChange">
         <scroll-view scroll-y style="max-height: 35vh;">
-            <view class="w-screen px-30 py-10 box-border" @touchmove.stop>
+            <view class="w-screen px-30 py-10 box-border ie-condition-group" @touchmove.stop>
                 <uv-checkbox-group v-if="multiple" v-model="model[config.key]" placement="column" icon-placement="right">
-                    <uv-checkbox v-for="i in list" :name="getValue(i)" :label="getLabel(i)"/>
+                    <uv-checkbox v-for="i in list" :name="getValue(i)" :label="getLabel(i)" custom-style="padding-top: 20rpx;
+            padding-bottom: 20rpx;
+            border-bottom: 0.5px solid var(--border);"/>
                 </uv-checkbox-group>
                 <uv-radio-group v-else v-model="model[config.key]" placement="column" icon-placement="right">
-                    <uv-radio v-for="i in list" :name="getValue(i)" :label="getLabel(i)"/>
+                    <uv-radio v-for="i in list" :name="getValue(i)" :label="getLabel(i)" custom-style="padding-top: 20rpx;
+            padding-bottom: 20rpx;
+            border-bottom: 0.5px solid var(--border);"/>
                 </uv-radio-group>
             </view>
         </scroll-view>
-        <ie-bottom-buttons left-type="primary" left="重置" :right="right" class="p-30"
-                           @left="handleReset" @right="handleConfirm"/>
+        <ie-bottom-buttons left-type="primary" left="重置" :right="right" @left="handleReset" @right="handleConfirm"/>
     </uv-popup>
 </template>
 
@@ -58,7 +61,8 @@ const {bottom: baseBottom} = useElementBounding(bottom)
 const relTop = computed(() => baseBottom.value - baseTop.value - 1)
 // #endif
 // #ifdef MP-WEIXIN
-const refTop = ref(44 - 1)
+// TODO:小程序兼容性问题
+const refTop = ref(0)
 // #endif
 
 const handleReset = () => {
@@ -117,14 +121,5 @@ const getValue = (item) => config.value.keyValue ? item[config.value.keyValue] :
 defineExpose({open, close, show, condition})
 </script>
 
-<style scoped lang="scss">
-::v-deep(.uv-checkbox-group),
-::v-deep(.uv-radio-group) {
-    .uv-checkbox-label--right,
-    .uv-radio-label--right {
-        padding-top: 20rpx;
-        padding-bottom: 20rpx;
-        border-bottom: 0.5px solid var(--border-color);
-    }
-}
+<style lang="scss">
 </style>

+ 2 - 0
src/pagesOther/components/ie-condition-dropdown/ie-condition-dropdown.vue

@@ -37,7 +37,9 @@ useProvideConditionDropdownPopup(popup, bottom, container)
 onMounted(() => {
     const instance = getCurrentInstance()
     const swiper = findAncestorComponentByName(instance, 'Swiper')
+    // #ifdef H5
     container.value = swiper || document.getElementById('app')
+    // #endif
 })
 
 defineExpose({terminate: () => popup.value.close(), getShow: () => popup.value.show})

+ 0 - 1
src/pagesOther/components/ie-condition/useSearchModelInjection.js

@@ -34,7 +34,6 @@ export const useProvideSearchModel = function (configs, queryParams, formRef = n
         reset // 重置搜索条件状态
     }
     provideLocal(key, options)
-    window.searchModel = options
     return options
 }
 

+ 4 - 0
src/uni_modules/uv-button/components/uv-button/props.js

@@ -158,6 +158,10 @@ export default {
 			type: [Object,String],
 			default: ''
 		},
+		customClass: {
+			type: String,
+			default: ''
+		},
 		...uni.$uv?.props?.button
 	}
 }

+ 1 - 0
src/uni_modules/uv-button/components/uv-button/uv-button.vue

@@ -2,6 +2,7 @@
 	<view 
 		class="uv-button-wrapper"
 		:style="[btnWrapperStyle]"
+        :class="customClass"
 	>
     <!-- #ifndef APP-NVUE -->
 		<!-- #ifdef MP -->