商品评论:
1.移除scores,由后端自动计算
2.SPU、SKU选择组件,放到SPU组件目录下
(cherry picked from commit 15971b6feb
)
This commit is contained in:
parent
b55b9966d6
commit
9f4751b1d7
@ -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() // 消息弹窗
|
||||||
|
@ -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({
|
@ -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() // 消息弹窗
|
Loading…
Reference in New Issue
Block a user