web/seller/src/views/goods/goods-seller/goodsOperation.vue

57 lines
1.2 KiB
Vue
Raw Normal View History

2021-05-13 10:56:04 +08:00
<template>
<div class="goods-operation">
<div class="step-list">
2021-07-08 09:24:42 +08:00
<steps :current="activestep" style="height:60px;margin-top: 10px">
<step title="选择商品品类"/>
<step title="填写商品详情"/>
<step title="商品发布成功"/>
2021-05-13 10:56:04 +08:00
</steps>
</div>
2021-06-29 17:53:50 +08:00
<!-- 第一步 选择分类 -->
2021-07-08 09:24:42 +08:00
<first-step ref='first' v-show="activestep === 0"></first-step>
2021-06-29 17:53:50 +08:00
<!-- 第二步 商品详细信息 -->
2021-07-05 16:08:12 +08:00
<second-step ref='second' v-if="activestep === 1"></second-step>
2021-06-29 17:53:50 +08:00
<!-- 第三步 发布完成 -->
2021-07-05 16:08:12 +08:00
<third-step ref='third' v-if="activestep === 2"></third-step>
2021-06-29 17:53:50 +08:00
2021-05-13 10:56:04 +08:00
</div>
</template>
<script>
2021-06-29 17:53:50 +08:00
import firstStep from './goodsOperationFirst'
import secondStep from './goodsOperationSec'
import thirdStep from './goodsOperationThird'
2021-05-13 10:56:04 +08:00
export default {
name: "addGoods",
components: {
2021-06-29 17:53:50 +08:00
firstStep,
secondStep,
thirdStep
2021-05-13 10:56:04 +08:00
},
2021-05-13 10:56:04 +08:00
data() {
return {
/** 当前激活步骤*/
2021-07-08 09:24:42 +08:00
activestep: 0,
2021-05-13 10:56:04 +08:00
};
},
mounted() {
2021-07-05 16:08:12 +08:00
// 编辑商品、模板
if (this.$route.query.id || this.$route.query.draftId) {
2021-05-13 10:56:04 +08:00
this.activestep = 1;
2021-07-05 16:08:12 +08:00
} else {
this.activestep = 0
}
2021-07-05 16:08:12 +08:00
},
methods: {
2021-06-29 17:53:50 +08:00
2021-07-05 16:08:12 +08:00
}
2021-05-13 10:56:04 +08:00
};
</script>
<style lang="scss" scoped>
@import "./addGoods.scss";
</style>