123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- <input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索商品">
- </view>
- <view class="two">
- <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
- <view class="list-scroll-view">
- <view class="two_1">
- 商品筛选
- </view>
- <view class="two_2">
- <view class="list" v-for="(item,index) in list" :key="index">
- <image class="image" :src="item.url" mode=""></image>
- <view class="name">
- {{item.name}}
- </view>
- <view class="other">
- <view class="money">
- <text>¥</text>
- <text>{{item.money}}</text>
- </view>
- <view class="btn">
- <text class="iconfont icon-gouwuche"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- searchInfo: {},
- list: [ //商品列表
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- money: '10.00'
- },
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- money: '10.00'
- },
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- money: '10.00'
- },
- ]
- };
- },
- onShow: function() {},
- methods: {
- // 分页
- toPage(e) {
- },
- // 输入框
- toInput(e) {
- const that = this;
- that.$set(that.searchInfo, `name`, e.detail.value)
- }
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- .one {
- border-bottom: 1px solid var(--f85Color);
- padding: 2vw;
- input {
- padding: 2vw;
- background-color: var(--f1Color);
- font-size: var(--font14Size);
- border-radius: 5px;
- }
- }
- .two {
- position: relative;
- flex-grow: 1;
- .two_1 {}
- .two_2 {
- display: flex;
- flex-direction: row;
- .list {
- border: 1px solid #ff0000;
- .image {
- width: 100%;
- height: 10vw;
- }
- .name {
- font-size: 16px;
- margin: 0 0 1vw 0;
- }
- .other {}
- }
- }
- }
- }
- .scroll-view {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- .list-scroll-view {
- display: flex;
- flex-direction: column;
- }
- }
- </style>
|