review:【mall】营销相关

This commit is contained in:
YunaiV
2025-12-29 08:17:35 +08:00
parent 029b2ffaab
commit 06f1ae1a66
12 changed files with 29 additions and 17 deletions

View File

@@ -43,6 +43,7 @@ const [Modal, modalApi] = useVbenModal({
if (isOpen) {
// 打开时,进行 loading 加载。后续 CropperImage 组件加载完毕,会自动关闭 loading通过 handleReady
modalLoading(true);
// TODO @puhui999这里比 ele 多了,是符合预期的哇?
const img = new Image();
img.src = src.value;
img.addEventListener('load', () => {

View File

@@ -121,7 +121,7 @@ const apiSelectRule = [
field: 'data',
title: '请求参数 JSON 格式',
props: {
autoSize: true,
autoSize: true, // 特殊ele 里是 autosizeantd 里是 autoSize
type: 'textarea',
placeholder: '{"type": 1}',
},
@@ -155,7 +155,7 @@ const apiSelectRule = [
info: `data 为接口返回值,需要写一个匿名函数解析返回值为选择器 options 列表
(data: any)=>{ label: string; value: any }[]`,
props: {
autoSize: true,
autoSize: true, // 特殊ele 里是 autosizeantd 里是 autoSize
rows: { minRows: 2, maxRows: 6 },
type: 'textarea',
placeholder: `

View File

@@ -39,7 +39,7 @@ export function useDictSelectRule() {
title: label,
info: '',
$required: false,
modelField: 'value',
modelField: 'value', // 特殊ele 里是 model-valueantd 里是 value
};
},
props(_: any, { t }: any) {

View File

@@ -83,6 +83,7 @@ defineExpose({
class="duration-400 absolute inset-0 flex cursor-pointer items-center justify-center rounded-full bg-black bg-opacity-40 opacity-0 transition-opacity group-hover:opacity-100"
:style="getImageWrapperStyle"
>
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-avatar.vue 里的 Icon -->
<span
:style="{
...getImageWrapperStyle,

View File

@@ -112,6 +112,7 @@ async function handleOk() {
</script>
<template>
<!-- TODO @puhui999antd 版本里是 2/3 宽度两边要对齐么 -->
<Modal
v-bind="$attrs"
:confirm-text="$t('ui.cropper.okText')"
@@ -119,10 +120,13 @@ async function handleOk() {
:title="$t('ui.cropper.modalTitle')"
class="w-[800px]"
>
<!-- TODO @puhui999antd 版本有个 h-96两边要对齐么 -->
<div class="flex">
<!-- 左侧区域 -->
<!-- TODO @puhui999antd 版本是 h-full w-3/5 两边要对齐么 -->
<div class="h-[340px] w-[55%]">
<!-- 裁剪器容器 -->
<!-- TODO @puhui999antd class 简单一点看看要不要对齐 -->
<div
class="h-[300px] bg-[#eee]"
style="
@@ -158,6 +162,7 @@ async function handleOk() {
</div>
<!-- 工具栏 -->
<!-- TODO @puhui999antd mt-4看看两边要不要对齐 -->
<div class="mt-2.5 flex items-center justify-between">
<ElUpload
:before-upload="handleBeforeUpload"
@@ -169,6 +174,7 @@ async function handleOk() {
placement="bottom"
>
<ElButton size="small" type="primary">
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-modal.vue 里的 Icon -->
<template #icon>
<div class="flex items-center justify-center">
<span class="icon-[ant-design--upload-outlined]"></span>
@@ -186,6 +192,7 @@ async function handleOk() {
@click="handlerToolbar('reset')"
>
<template #icon>
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-modal.vue 里的 Icon -->
<div class="flex items-center justify-center">
<span class="icon-[ant-design--reload-outlined]"></span>
</div>
@@ -204,6 +211,7 @@ async function handleOk() {
>
<template #icon>
<div class="flex items-center justify-center">
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-modal.vue 里的 Icon -->
<span
class="icon-[ant-design--rotate-left-outlined]"
></span>
@@ -222,6 +230,7 @@ async function handleOk() {
@click="handlerToolbar('rotate', 45)"
>
<template #icon>
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-modal.vue 里的 Icon -->
<div class="flex items-center justify-center">
<span
class="icon-[ant-design--rotate-right-outlined]"
@@ -241,6 +250,7 @@ async function handleOk() {
@click="handlerToolbar('scaleX')"
>
<template #icon>
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-modal.vue 里的 Icon -->
<div class="flex items-center justify-center">
<span class="icon-[vaadin--arrows-long-h]"></span>
</div>
@@ -258,6 +268,7 @@ async function handleOk() {
@click="handlerToolbar('scaleY')"
>
<template #icon>
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-modal.vue 里的 Icon -->
<div class="flex items-center justify-center">
<span class="icon-[vaadin--arrows-long-v]"></span>
</div>
@@ -275,6 +286,7 @@ async function handleOk() {
@click="handlerToolbar('zoom', 0.1)"
>
<template #icon>
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-modal.vue 里的 Icon -->
<div class="flex items-center justify-center">
<span class="icon-[ant-design--zoom-in-outlined]"></span>
</div>
@@ -292,6 +304,7 @@ async function handleOk() {
@click="handlerToolbar('zoom', -0.1)"
>
<template #icon>
<!-- TODO @puhui999可以改成类似 /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/components/cropper/cropper-modal.vue 里的 Icon -->
<div class="flex items-center justify-center">
<span class="icon-[ant-design--zoom-out-outlined]"></span>
</div>

View File

@@ -121,7 +121,7 @@ const apiSelectRule = [
field: 'data',
title: '请求参数 JSON 格式',
props: {
autosize: true,
autosize: true, // 特殊ele 里是 autosizeantd 里是 autoSize
type: 'textarea',
placeholder: '{"type": 1}',
},
@@ -155,7 +155,7 @@ const apiSelectRule = [
info: `data 为接口返回值,需要写一个匿名函数解析返回值为选择器 options 列表
(data: any)=>{ label: string; value: any }[]`,
props: {
autosize: true,
autosize: true, // 特殊ele 里是 autosizeantd 里是 autoSize
rows: { minRows: 2, maxRows: 6 },
type: 'textarea',
placeholder: `

View File

@@ -39,7 +39,7 @@ export function useDictSelectRule() {
title: label,
info: '',
$required: false,
modelField: 'model-value',
modelField: 'model-value', // 特殊ele 里是 model-valueantd 里是 value
};
},
props(_: any, { t }: any) {

View File

@@ -197,7 +197,7 @@ async function handleSubmit(values: Recordable<any>) {
await smsResetPassword({ mobile, code, password });
ElMessage.success($t('authentication.resetPasswordSuccess'));
// 重置成功后跳转到首页
router.push('/');
await router.push('/');
} catch (error) {
console.error('重置密码失败:', error);
} finally {

View File

@@ -23,11 +23,7 @@ const emit = defineEmits<{
const [Form, formApi] = useVbenForm({
commonConfig: {
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 80,
labelWidth: 70,
},
schema: [
{
@@ -104,7 +100,7 @@ watch(
</script>
<template>
<div class="mt-16px md:w-full lg:w-1/2 2xl:w-2/5">
<div class="mt-4 md:w-full lg:w-1/2 2xl:w-2/5">
<Form />
</div>
</template>

View File

@@ -36,9 +36,9 @@ async function handelUpload({
const { httpRequest } = useUpload();
// 将 Blob 转换为 File
const fileObj = new File([file], filename, { type: file.type });
const res = await httpRequest(fileObj);
// 2. 更新用户头像httpRequest 返回 { url: string }
await updateUserProfile({ avatar: res.url });
const avatar = await httpRequest(fileObj);
// 2. 更新用户头像
await updateUserProfile({ avatar });
}
</script>

View File

@@ -100,7 +100,7 @@ async function handleSubmit(values: Recordable<any>) {
</script>
<template>
<div class="mt-[16px] md:w-full lg:w-1/2 2xl:w-2/5">
<div class="mt-4 md:w-full lg:w-1/2 2xl:w-2/5">
<Form />
</div>
</template>

View File

@@ -320,6 +320,7 @@ onMounted(async () => {
<ElCard class="h-full w-full" v-loading="formLoading">
<template #header>
<div class="flex items-center justify-between">
<!-- @puhui999idea 这边会有告警 -->
<ElTabs v-model="activeTabName" @tab-change="handleTabChange">
<ElTabPane label="基础设置" name="info" />
<ElTabPane label="价格库存" name="sku" />