refactor: mp comps
This commit is contained in:
@@ -11,7 +11,7 @@ import { useAccessStore } from '@vben/stores';
|
||||
import { Button, Image, message, Modal, Upload } from 'ant-design-vue';
|
||||
|
||||
import { UploadType, useBeforeUpload } from '#/utils/useUpload';
|
||||
import { WxMaterialSelect } from '#/views/mp/components/wx-material-select';
|
||||
import { WxMaterialSelect } from '#/views/mp/components';
|
||||
|
||||
const props = defineProps<{
|
||||
isFirst: boolean;
|
||||
@@ -53,8 +53,9 @@ function onMaterialSelected(item: any) {
|
||||
newsItem.value.thumbUrl = item.url;
|
||||
}
|
||||
// TODO @hw:注释都补充下哈;
|
||||
const onBeforeUpload = (file: UploadFile) =>
|
||||
useBeforeUpload(UploadType.Image, 2)(file as any);
|
||||
function onBeforeUpload(file: UploadFile) {
|
||||
return useBeforeUpload(UploadType.Image, 2)(file as any);
|
||||
}
|
||||
|
||||
// TODO @hw:注释都补充下哈;
|
||||
function onUploadChange(info: any) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type { Article } from './types';
|
||||
|
||||
import { WxNews } from '#/views/mp/components/wx-news';
|
||||
import { WxNews } from '#/views/mp/components';
|
||||
|
||||
defineOptions({ name: 'DraftTableCell' });
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ interface Article {
|
||||
updateTime: number;
|
||||
}
|
||||
|
||||
const createEmptyNewsItem = (): NewsItem => {
|
||||
function createEmptyNewsItem(): NewsItem {
|
||||
return {
|
||||
title: '',
|
||||
thumbMediaId: '',
|
||||
@@ -36,7 +36,7 @@ const createEmptyNewsItem = (): NewsItem => {
|
||||
onlyFansCanComment: 0,
|
||||
thumbUrl: '',
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export type { Article, NewsItem, NewsItemList };
|
||||
export { createEmptyNewsItem };
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { markRaw } from 'vue';
|
||||
|
||||
import { WxAccountSelect } from '#/views/mp/components/wx-account-select';
|
||||
import { WxAccountSelect } from '#/views/mp/components';
|
||||
|
||||
/** 获取表格列配置 */
|
||||
export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
|
||||
Reference in New Issue
Block a user