Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
owen
2024-01-05 15:26:41 +08:00
64 changed files with 1121 additions and 569 deletions

View File

@@ -197,7 +197,7 @@ defineOptions({ name: 'ProductSpuBasicInfoForm' })
const ruleConfig: RuleConfig[] = [
{
name: 'stock',
rule: (arg) => arg >= 1,
rule: (arg) => arg >= 0,
message: '商品库存必须大于等于 1 '
},
{
@@ -213,7 +213,7 @@ const ruleConfig: RuleConfig[] = [
{
name: 'costPrice',
rule: (arg) => arg >= 0.01,
message: '商品成本价格必须大于等于 0.01 元!!!'
message: '商品成本价格必须大于等于 0.00 元!!!'
}
]

View File

@@ -30,6 +30,7 @@ const getPageDetail = async (id: any) => {
formLoading.value = false
}
}
// 提交表单
const submitForm = async () => {
// 校验表单

View File

@@ -27,10 +27,11 @@
</DiyEditor>
</template>
<script setup lang="ts">
// TODO @疯狂:要不要建个 decorate 目录,然后挪进去,改成 index.vue这样可以更明确看到是个独立界面哈更好找
import * as DiyTemplateApi from '@/api/mall/promotion/diy/template'
import * as DiyPageApi from '@/api/mall/promotion/diy/page'
import { useTagsViewStore } from '@/store/modules/tagsView'
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util'
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util' // 商城的 DIY 组件,在 DiyEditor 目录下
import { toNumber } from 'lodash-es'
/** 装修模板表单 */
@@ -51,7 +52,7 @@ const formData = ref<DiyTemplateApi.DiyTemplatePropertyVO>()
const formRef = ref() // 表单 Ref
// 当前编辑的属性
const currentFormData = ref<DiyTemplateApi.DiyTemplatePropertyVO | DiyPageApi.DiyPageVO>()
// 商城H5预览地址
// 商城 H5 预览地址
const previewUrl = ref('')
// 获取详情

View File

@@ -205,7 +205,7 @@ const handleUse = async (row: DiyTemplateApi.DiyTemplateVO) => {
// 使用模板的二次确认
await message.confirm(`是否使用模板“${row.name}”?`)
// 发起删除
await DiyTemplateApi.useDiyTemplate(row.id)
await DiyTemplateApi.useDiyTemplate(row.id!)
message.success('使用成功')
// 刷新列表
await getList()