33 lines
1.0 KiB
Vue
33 lines
1.0 KiB
Vue
|
<!-- 规格 -->
|
||
|
<template>
|
||
|
<view class="jy-specifications p25">
|
||
|
<JyCommonHead title="商品管理" @back="sendCommodity">
|
||
|
<template v-slot:right>
|
||
|
<text @click="add">添加</text>
|
||
|
</template>
|
||
|
</JyCommonHead>
|
||
|
<view v-if="list.length > 0">
|
||
|
<JySpecificationsCard class="mt20" v-for="(item, index) in list" :key="index" :item="item">
|
||
|
</JySpecificationsCard>
|
||
|
</view>
|
||
|
</view>
|
||
|
<JyBottomBtn @click="postApi">确定</JyBottomBtn>
|
||
|
</template>
|
||
|
|
||
|
<script setup>
|
||
|
import { ref } from 'vue'
|
||
|
import JyCommonHead from '@/components/public/jy-common-head'
|
||
|
import JySpecificationsCard from './jy-specifications-card'
|
||
|
import { eventBus } from '@/components/public/event-bus.js'
|
||
|
import JyBottomBtn from '@/components/public/jy-bottom-button'
|
||
|
|
||
|
const list = ref([{}])
|
||
|
const sendCommodity = () => {
|
||
|
eventBus.emit('business-operator', list.value)
|
||
|
uni.navigateBack();
|
||
|
}
|
||
|
const add = () => {
|
||
|
list.value.push({})
|
||
|
}
|
||
|
</script>
|
||
|
<style scoped lang="scss"></style>
|