review:【antd】【mp】components 组件

pull/259/MERGE
YunaiV 2025-11-09 17:30:37 +08:00
parent 229ead48f1
commit 9fc5c7561e
20 changed files with 25 additions and 49 deletions

View File

@ -131,6 +131,7 @@ function onUploadError(err: Error) {
支持 bmp/png/jpeg/jpg/gif 格式大小不超过 2M
</div>
</div>
<!-- TODO @hw是不是使用 vben 自带的 Modal 这样 ele 通用性更好点其它模块涉及到 Modal 也按照这个调整噢 -->
<Modal
title="选择图片"
v-model:open="showImageDialog"

View File

@ -1 +1,2 @@
// TODO @hw1要不统一在 web-antd/src/views/mp/modules 下,搞个 index.ts 去 import 所有2这个包名需要改成 componentns不是 modules 哈3wx 前缀都可以去掉;例如说 account-select.vue
export { default as WxAccountSelect } from './wx-account-select.vue';

View File

@ -10,6 +10,8 @@ import { message, Select, SelectOption } from 'ant-design-vue';
import { getSimpleAccountList } from '#/api/mp/account';
// TODO @hw yudao-ui-admin-vben-v5/apps/web-antd/src/views/mp/draft/index.vue
defineOptions({ name: 'WxAccountSelect' });
const props = defineProps<{

View File

@ -1,5 +1,5 @@
<!--
微信消息 - 定位TODO @Dhb52 目前未启用
微信消息 - 定位TODO @Dhb52 目前未启用TODO @芋艿需要测试下
-->
<script lang="ts" setup>
import { IconifyIcon } from '@vben/icons';
@ -23,6 +23,7 @@ const props = defineProps({
type: String,
},
qqMapKey: {
// TODO @
// QQ https://lbs.qq.com/service/staticV2/staticGuide/staticDoc
required: false,
type: String,

View File

@ -3,6 +3,7 @@ export enum NewsType {
Published = '1',
}
// TODO @hw应该要用到在 material-select.vue 里?
export enum MaterialType {
Image = 'image',
News = 'news',

View File

@ -30,18 +30,14 @@ const props = withDefaults(
const emit = defineEmits(['selectMaterial']);
//
const loading = ref(false);
//
const total = ref(0);
//
const list = ref<any[]>([]);
//
const loading = ref(false); //
const total = ref(0); //
const list = ref<any[]>([]); //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
accountId: props.accountId,
});
}); //
/** 选择素材 */
function selectMaterialFun(item: any) {
@ -103,6 +99,7 @@ async function getDraftPageFun() {
total.value = data.total;
}
// TODO @hw grid
onMounted(async () => {
getPage();
});
@ -234,6 +231,7 @@ onMounted(async () => {
</div>
</template>
<style lang="scss" scoped>
/** TODO @hwtindwind 风格 */
@media (width >= 992px) and (width <= 1300px) {
.waterfall {
column-count: 3;

View File

@ -18,6 +18,7 @@ const item = ref(props.item);
<div v-else-if="item.event === 'unsubscribe'">
<Tag color="error">取消关注</Tag>
</div>
<!-- @hw看看能不能处理下 linter 报错哈 -->
<div v-else-if="item.event === 'CLICK'">
<Tag>点击菜单</Tag>
{{ item.eventKey }}

View File

@ -18,11 +18,10 @@ const props = defineProps<{
user: PropsUser;
}>();
// 使 linter
const SendFrom = {
MpBot: 2,
User: 1,
} as const;
} as const; // 使 linter
type SendFromType = (typeof SendFrom)[keyof typeof SendFrom];
@ -72,6 +71,7 @@ const getNickname = (sendFrom: SendFromType) =>
<style lang="scss" scoped>
/* 因为 joolun 实现依赖 avue 组件,该页面使用了 comment.scss、card.scc */
/** TODO @hw这里有没办法重构掉哈。辛苦~~~ */
@import url('../comment.scss');
@import url('../card.scss');
</style>

View File

@ -83,5 +83,3 @@ const item = ref<any>(props.item);
</div>
</div>
</template>
<style scoped></style>

View File

@ -30,7 +30,6 @@ const props = defineProps({
},
});
//
const accountId = ref(-1); // IDuserId
const loading = ref(false); //
const hasMore = ref(true); //
@ -41,21 +40,19 @@ const queryParams = reactive({
accountId,
});
// 使""
const user: User = reactive({
nickname: '用户',
nickname: '用户', // 使""
avatar: profile,
accountId, //
});
// ========= =========
const sendLoading = ref(false); //
//
const reply = ref<Reply>({
type: ReplyType.Text,
accountId: -1,
articles: [],
});
}); //
const replySelectRef = ref<InstanceType<typeof WxReplySelect> | null>(null); // WxReplySelectref
const msgDivRef = ref<HTMLDivElement | null>(null); // ref

View File

@ -64,6 +64,7 @@ defineExpose({
</template>
<style lang="scss" scoped>
/** TODO @hw这里有没办法重构掉哈。辛苦~~~ */
/* 因为 joolun 实现依赖 avue 组件,该页面使用了 card.scss */
@import url('../wx-msg/card.scss');
</style>

View File

@ -63,6 +63,7 @@ defineExpose({
</template>
<style lang="scss" scoped>
/** TODO @hwtindwind 替代 */
.news-home {
width: 100%;
margin: auto;

View File

@ -21,8 +21,6 @@ const emit = defineEmits<{
(e: 'update:modelValue', v: Reply): void;
}>();
//
const UPLOAD_URL = `${import.meta.env.VITE_BASE_URL}/admin-api/mp/material/upload-temporary`;
const HEADERS = { Authorization: `Bearer ${useAccessStore().accessToken}` };
const reply = computed<Reply>({
@ -154,5 +152,3 @@ function selectMaterial(item: any) {
</Row>
</div>
</template>
<style lang="scss" scoped></style>

View File

@ -19,11 +19,8 @@ import {
} from 'ant-design-vue';
import { UploadType, useBeforeUpload } from '#/utils/useUpload';
// import { getAccessToken } from '@/utils/auth'
import { WxMaterialSelect } from '#/views/mp/modules/wx-material-select';
//
const props = defineProps<{
modelValue: Reply;
}>();
@ -32,8 +29,6 @@ const emit = defineEmits<{
(e: 'update:modelValue', v: Reply): void;
}>();
//
const UPLOAD_URL = `${import.meta.env.VITE_BASE_URL}/admin-api/mp/material/upload-temporary`;
const HEADERS = { Authorization: `Bearer ${useAccessStore().accessToken}` };
const reply = computed<Reply>({

View File

@ -83,5 +83,3 @@ function onDelete() {
</Row>
</div>
</template>
<style lang="scss" scoped></style>

View File

@ -31,8 +31,6 @@ const emit = defineEmits<{
(e: 'update:modelValue', v: Reply): void;
}>();
//
const UPLOAD_URL = `${import.meta.env.VITE_BASE_URL}/admin-api/mp/material/upload-temporary`;
const HEADERS = { Authorization: `Bearer ${useAccessStore().accessToken}` };
@ -197,5 +195,3 @@ function selectMaterial(item: any) {
</Row>
</div>
</template>
<style lang="scss" scoped></style>

View File

@ -14,8 +14,6 @@ import { UploadType, useBeforeUpload } from '#/utils/useUpload';
import { WxMaterialSelect } from '#/views/mp/modules/wx-material-select';
import { WxVoicePlayer } from '#/views/mp/modules/wx-voice-play';
//
const props = defineProps<{
modelValue: Reply;
}>();
@ -24,8 +22,6 @@ const emit = defineEmits<{
(e: 'update:modelValue', v: Reply): void;
}>();
//
const UPLOAD_URL = `${import.meta.env.VITE_BASE_URL}/admin-api/mp/material/upload-temporary`;
const HEADERS = { Authorization: `Bearer ${useAccessStore().accessToken}` };
const reply = computed<Reply>({
@ -153,5 +149,3 @@ function selectMaterial(item: Reply) {
</Row>
</div>
</template>
<style lang="scss" scoped></style>

View File

@ -42,10 +42,9 @@ const reply = computed<Reply>({
get: () => props.modelValue,
set: (val) => emit('update:modelValue', val),
});
// Reply
const tabCache = new Map<ReplyType, Reply>();
// reftabwatchreply
const currentTab = ref<ReplyType>(props.modelValue.type || ReplyType.Text);
const tabCache = new Map<ReplyType, Reply>(); // Reply
const currentTab = ref<ReplyType>(props.modelValue.type || ReplyType.Text); // ref tab watch reply
watch(
currentTab,
@ -136,5 +135,3 @@ defineExpose({
</Tabs.TabPane>
</Tabs>
</template>
<style lang="scss" scoped></style>

View File

@ -29,12 +29,9 @@ const props = defineProps({
},
});
// TODO @hw使 vben Modal ele Modal
const dialogVideo = ref(false);
// const handleEvent = (log) => {
// console.log('Basic player event', log)
// }
const playVideo = () => {
dialogVideo.value = true;
};

View File

@ -91,6 +91,7 @@ function amrStop() {
</div>
</template>
<style lang="scss" scoped>
/** TODO @hwtindwind 替代 */
.wx-voice-div {
display: flex;
align-items: center;