flex排列方式你没改啊 改一下就flex-direction: row;了
<template>
<view class="box" hover-class="boxHover">
<view class="inner" hover-class="innerHover" hover-stop-propagation>内部元素</view>
</view>
<scroll-view direction="horizontal" class="scrollView">
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
<view class="box">scroll子元素</view>
</scroll-view>
</template>
<script setup>
</script>
<style lang="scss">
.scrollView {
width: 80%;
height: 220px;
border: 1px solid red;
flex-direction: row;
.box {
width: 100px;
height: 100px;
background: green;
margin: 5px;
}
}
</style>