商品评论:

1.移除scores,由后端自动计算
2.SPU、SKU选择组件,放到SPU组件目录下
This commit is contained in:
owen 2023-08-26 13:09:14 +08:00
parent ec412f7a7f
commit 15971b6feb
3 changed files with 2 additions and 8 deletions

View File

@ -36,10 +36,6 @@
<el-form-item label="评论内容" prop="content"> <el-form-item label="评论内容" prop="content">
<el-input type="textarea" v-model="formData.content" /> <el-input type="textarea" v-model="formData.content" />
</el-form-item> </el-form-item>
<!-- TODO @疯狂formData.scores 是通过后端计算的哈不要前端传递 -->
<el-form-item label="评分星级" prop="scores">
<el-rate v-model="formData.scores" />
</el-form-item>
<el-form-item label="描述星级" prop="descriptionScores"> <el-form-item label="描述星级" prop="descriptionScores">
<el-rate v-model="formData.descriptionScores" /> <el-rate v-model="formData.descriptionScores" />
</el-form-item> </el-form-item>
@ -60,9 +56,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import * as CommentApi from '@/api/mall/product/comment' import * as CommentApi from '@/api/mall/product/comment'
import SpuTableSelect from '@/views/mall/product/comment/components/SpuTableSelect.vue' import SpuTableSelect from '@/views/mall/product/spu/components/SpuTableSelect.vue'
import * as ProductSpuApi from '@/api/mall/product/spu' import * as ProductSpuApi from '@/api/mall/product/spu'
import SkuTableSelect from '@/views/mall/product/comment/components/SkuTableSelect.vue' import SkuTableSelect from '@/views/mall/product/spu/components/SkuTableSelect.vue'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //

View File

@ -37,7 +37,6 @@ import { ElTable } from 'element-plus'
import * as ProductSpuApi from '@/api/mall/product/spu' import * as ProductSpuApi from '@/api/mall/product/spu'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
// TODO @ spu components
defineOptions({ name: 'SkuTableSelect' }) defineOptions({ name: 'SkuTableSelect' })
const props = defineProps({ const props = defineProps({

View File

@ -86,7 +86,6 @@ import { defaultProps, handleTree } from '@/utils/tree'
import * as ProductCategoryApi from '@/api/mall/product/category' import * as ProductCategoryApi from '@/api/mall/product/category'
import * as ProductSpuApi from '@/api/mall/product/spu' import * as ProductSpuApi from '@/api/mall/product/spu'
// TODO @ spu components
defineOptions({ name: 'SpuTableSelect' }) defineOptions({ name: 'SpuTableSelect' })
const message = useMessage() // const message = useMessage() //