feat:【antd】【mp】mp 的代码评审(components)

This commit is contained in:
YunaiV
2025-11-20 21:09:02 +08:00
parent c39a445d77
commit 8d2da0a4d1
62 changed files with 631 additions and 583 deletions

View File

@@ -1,3 +1,5 @@
export { MaterialType, NewsType } from './types';
export { default } from './wx-material-select.vue';
// TODO @hw每个组件下的 index.ts 要不都删除,统一在 mp/components/index.ts 暴露就好了?

View File

@@ -1,3 +1,4 @@
// TODO @hw这里的枚举看看要不要统一
export enum NewsType {
Draft = '2',
Published = '1',

View File

@@ -1,8 +1,3 @@
<!--
- Copyright (C) 2018-2019
- All rights reserved, Designed By www.joolun.com
芋道源码
-->
<script lang="ts" setup>
import { onMounted, reactive, ref } from 'vue';
@@ -26,6 +21,9 @@ import VoicePlayer from '#/views/mp/components/wx-voice-play/wx-voice-play.vue';
import { NewsType } from './types';
// TODO @hw代码风格看看 antd 和 ele 是不是统一下;
/** 微信素材选择 */
defineOptions({ name: 'MaterialSelect' });
const props = withDefaults(
@@ -41,18 +39,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) {
@@ -288,6 +282,8 @@ onMounted(async () => {
}
}
/** TODO @dylan@hw看看有没适合 tindwind 的哈。 */
.waterfall {
column-gap: 10px;
width: 100%;