UI更新
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user