This commit is contained in:
kron
2025-07-30 09:55:15 +08:00
parent e073f3eb0f
commit e963c52e3a
13 changed files with 655 additions and 50 deletions

View File

@@ -11,12 +11,16 @@ const props = defineProps({
},
onExpand: {
type: Function,
default: null,
default: () => {},
},
onSelect: {
type: Function,
default: () => {},
},
noArrow: {
type: Boolean,
default: false,
},
});
const bowTypes = [
{
@@ -95,7 +99,13 @@ const onMeterChange = (e) => {
</script>
<template>
<view class="container" :style="{ maxHeight: expand ? '500px' : '50px' }">
<view
class="container"
:style="{
maxHeight: expand ? '500px' : '50px',
marginTop: noArrow ? '0' : '10px',
}"
>
<view @click="() => onExpand(itemIndex, !expand)">
<text :style="{ opacity: expand ? 1 : 0 }">{{
itemIndex !== 3 ? itemTexts[itemIndex] : "选择组"
@@ -126,6 +136,7 @@ const onMeterChange = (e) => {
</block>
<button hover-class="none">
<image
v-if="!noArrow"
src="../static/arrow-grey.png"
mode="widthFix"
:style="{ transform: expand ? 'rotateX(180deg)' : 'rotateX(0deg)' }"
@@ -218,9 +229,8 @@ const onMeterChange = (e) => {
<style scoped>
.container {
width: calc(100vw - 40px);
width: calc(100% - 20px);
background-color: #fff;
margin-top: 10px;
border-radius: 10px;
padding: 0 10px;
font-size: 14px;