给字段添加校验
This commit is contained in:
parent
c912eeeb85
commit
60998393c6
|
|
@ -1,7 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<scroll-view scroll-y class="pro-container box-border" :style="{backgroundImage: 'url('+config[brandName]?.src+')',height:`${config[brandName].height}rpx`}">
|
<scroll-view
|
||||||
|
scroll-y
|
||||||
|
class="pro-container box-border"
|
||||||
|
:style="{
|
||||||
|
backgroundImage: 'url(' + config[brandName]?.src + ')',
|
||||||
|
height: `${config[brandName]?.height}rpx`,
|
||||||
|
}"
|
||||||
|
>
|
||||||
<view class="pro-wrapper flex flex-wrap">
|
<view class="pro-wrapper flex flex-wrap">
|
||||||
<view v-for="(item,index) in products" :key="index" class="product-container">
|
<view
|
||||||
|
v-for="(item, index) in products"
|
||||||
|
:key="index"
|
||||||
|
class="product-container"
|
||||||
|
>
|
||||||
<ProductItem :detail="item" :index="index" />
|
<ProductItem :detail="item" :index="index" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -9,21 +20,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import ProductItem from './product-item'
|
import ProductItem from "./product-item";
|
||||||
import config from '../config'
|
import config from "../config";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
products: {
|
products: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true,
|
required: true,
|
||||||
default:() => ([])
|
default: () => [],
|
||||||
},
|
},
|
||||||
brandName: {
|
brandName: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
default:''
|
default: "",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue