chore: 合并远程 dev 分支代码
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
export type { NewsType, Reply, ReplyType } from './components/types';
|
||||
export { createEmptyReply } from './components/types';
|
||||
export * from './types';
|
||||
|
||||
export { default as WxReplySelect } from './main.vue';
|
||||
export { default as WxReply } from './wx-reply.vue';
|
||||
|
||||
@@ -10,11 +10,9 @@ import { useAccessStore } from '@vben/stores';
|
||||
|
||||
import { Button, Col, message, Modal, Row, Upload } from 'ant-design-vue';
|
||||
|
||||
import { WxMaterialSelect } from '#/views/mp/components/wx-material-select';
|
||||
import { WxMaterialSelect } from '#/views/mp/components';
|
||||
import { UploadType, useBeforeUpload } from '#/views/mp/hooks/useUpload';
|
||||
|
||||
// TODO @dylan:文件名的大小写
|
||||
|
||||
defineOptions({ name: 'TabImage' });
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -110,7 +108,7 @@ function selectMaterial(item: any) {
|
||||
<Row class="ope-row" justify="center">
|
||||
<Button danger shape="circle" @click="onDelete">
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:delete" />
|
||||
<IconifyIcon icon="lucide:trash-2" />
|
||||
</template>
|
||||
</Button>
|
||||
</Row>
|
||||
@@ -123,7 +121,7 @@ function selectMaterial(item: any) {
|
||||
<Button type="primary" @click="showDialog = true">
|
||||
素材库选择
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:check-circle" />
|
||||
<IconifyIcon icon="lucide:circle-check" />
|
||||
</template>
|
||||
</Button>
|
||||
<Modal
|
||||
@@ -154,7 +152,7 @@ function selectMaterial(item: any) {
|
||||
<Button type="primary">
|
||||
上传图片
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:upload" />
|
||||
<IconifyIcon icon="lucide:upload" />
|
||||
</template>
|
||||
</Button>
|
||||
</Upload>
|
||||
@@ -18,11 +18,9 @@ import {
|
||||
Upload,
|
||||
} from 'ant-design-vue';
|
||||
|
||||
import { WxMaterialSelect } from '#/views/mp/components/wx-material-select';
|
||||
import { WxMaterialSelect } from '#/views/mp/components';
|
||||
import { UploadType, useBeforeUpload } from '#/views/mp/hooks/useUpload';
|
||||
|
||||
// TODO @dylan:文件名的大小写
|
||||
|
||||
defineOptions({ name: 'TabMusic' });
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -116,7 +114,7 @@ function selectMaterial(item: any) {
|
||||
/>
|
||||
<IconifyIcon
|
||||
v-else
|
||||
icon="mdi:plus"
|
||||
icon="lucide:plus"
|
||||
:size="40"
|
||||
class="text-gray-400"
|
||||
/>
|
||||
@@ -7,12 +7,9 @@ import { IconifyIcon } from '@vben/icons';
|
||||
|
||||
import { Button, Col, Modal, Row } from 'ant-design-vue';
|
||||
|
||||
import { WxMaterialSelect } from '#/views/mp/components/wx-material-select';
|
||||
import { WxNews } from '#/views/mp/components/wx-news';
|
||||
import { WxMaterialSelect, WxNews } from '#/views/mp/components';
|
||||
|
||||
import { NewsType } from './types';
|
||||
|
||||
// TODO @dylan:文件名的大小写
|
||||
import { NewsType } from '../constants';
|
||||
|
||||
defineOptions({ name: 'TabNews' });
|
||||
|
||||
@@ -53,7 +50,7 @@ function onDelete() {
|
||||
<Col class="ope-row">
|
||||
<Button danger shape="circle" @click="onDelete">
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:delete" />
|
||||
<IconifyIcon icon="lucide:trash-2" />
|
||||
</template>
|
||||
</Button>
|
||||
</Col>
|
||||
@@ -70,7 +67,7 @@ function onDelete() {
|
||||
: '选择草稿箱图文'
|
||||
}}
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:check-circle" />
|
||||
<IconifyIcon icon="lucide:circle-check" />
|
||||
</template>
|
||||
</Button>
|
||||
</Col>
|
||||
@@ -3,8 +3,6 @@ import { computed } from 'vue';
|
||||
|
||||
import { Textarea } from 'ant-design-vue';
|
||||
|
||||
// TODO @dylan:文件名的大小写
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue?: null | string;
|
||||
}>();
|
||||
@@ -18,12 +18,9 @@ import {
|
||||
Upload,
|
||||
} from 'ant-design-vue';
|
||||
|
||||
import { WxMaterialSelect } from '#/views/mp/components/wx-material-select';
|
||||
import { WxVideoPlayer } from '#/views/mp/components/wx-video-play';
|
||||
import { WxMaterialSelect, WxVideoPlayer } from '#/views/mp/components';
|
||||
import { UploadType, useBeforeUpload } from '#/views/mp/hooks/useUpload';
|
||||
|
||||
// TODO @dylan:文件名的大小写
|
||||
|
||||
defineOptions({ name: 'TabVideo' });
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -143,7 +140,7 @@ function selectMaterial(item: any) {
|
||||
<Button type="primary" @click="showDialog = true">
|
||||
素材库选择
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:check-circle" />
|
||||
<IconifyIcon icon="lucide:circle-check" />
|
||||
</template>
|
||||
</Button>
|
||||
<Modal
|
||||
@@ -174,7 +171,7 @@ function selectMaterial(item: any) {
|
||||
<Button type="primary">
|
||||
新建视频
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:upload" />
|
||||
<IconifyIcon icon="lucide:upload" />
|
||||
</template>
|
||||
</Button>
|
||||
</Upload>
|
||||
@@ -10,12 +10,9 @@ import { useAccessStore } from '@vben/stores';
|
||||
|
||||
import { Button, Col, message, Modal, Row, Upload } from 'ant-design-vue';
|
||||
|
||||
import { WxMaterialSelect } from '#/views/mp/components/wx-material-select';
|
||||
import { WxVoicePlayer } from '#/views/mp/components/wx-voice-play';
|
||||
import { WxMaterialSelect, WxVoicePlayer } from '#/views/mp/components';
|
||||
import { UploadType, useBeforeUpload } from '#/views/mp/hooks/useUpload';
|
||||
|
||||
// TODO @dylan:文件名的大小写
|
||||
|
||||
defineOptions({ name: 'TabVoice' });
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -112,7 +109,7 @@ function selectMaterial(item: Reply) {
|
||||
<Row class="ope-row" justify="center">
|
||||
<Button danger shape="circle" @click="onDelete">
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:delete" />
|
||||
<IconifyIcon icon="lucide:trash-2" />
|
||||
</template>
|
||||
</Button>
|
||||
</Row>
|
||||
@@ -124,7 +121,7 @@ function selectMaterial(item: Reply) {
|
||||
<Button type="primary" @click="showDialog = true">
|
||||
素材库选择
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:check-circle" />
|
||||
<IconifyIcon icon="lucide:circle-check" />
|
||||
</template>
|
||||
</Button>
|
||||
<Modal
|
||||
@@ -155,7 +152,7 @@ function selectMaterial(item: Reply) {
|
||||
<Button type="primary">
|
||||
点击上传
|
||||
<template #icon>
|
||||
<IconifyIcon icon="mdi:upload" />
|
||||
<IconifyIcon icon="lucide:upload" />
|
||||
</template>
|
||||
</Button>
|
||||
</Upload>
|
||||
@@ -1,15 +1,8 @@
|
||||
import type { Ref } from 'vue';
|
||||
|
||||
import { unref } from 'vue';
|
||||
import type { ReplyType } from '../constants';
|
||||
|
||||
export enum ReplyType {
|
||||
Image = 'image',
|
||||
Music = 'music',
|
||||
News = 'news',
|
||||
Text = 'text',
|
||||
Video = 'video',
|
||||
Voice = 'voice',
|
||||
}
|
||||
import { unref } from 'vue';
|
||||
|
||||
export interface Reply {
|
||||
accountId: number;
|
||||
@@ -28,13 +21,8 @@ export interface Reply {
|
||||
url?: null | string;
|
||||
}
|
||||
|
||||
export enum NewsType {
|
||||
Draft = '2',
|
||||
Published = '1',
|
||||
}
|
||||
|
||||
/** 利用旧的reply[accountId, type]初始化新的Reply */
|
||||
export const createEmptyReply = (old: Ref<Reply> | Reply): Reply => {
|
||||
export function createEmptyReply(old: Ref<Reply> | Reply): Reply {
|
||||
return {
|
||||
accountId: unref(old).accountId,
|
||||
articles: [],
|
||||
@@ -51,4 +39,4 @@ export const createEmptyReply = (old: Ref<Reply> | Reply): Reply => {
|
||||
type: unref(old).type,
|
||||
url: null,
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
④ 支持发送【视频】消息时,支持新建视频
|
||||
-->
|
||||
<script lang="ts" setup>
|
||||
import type { Reply } from './components/types';
|
||||
import type { Reply } from './types';
|
||||
|
||||
import { computed, ref, unref, watch } from 'vue';
|
||||
|
||||
@@ -16,13 +16,14 @@ import { IconifyIcon } from '@vben/icons';
|
||||
|
||||
import { Row, Tabs } from 'ant-design-vue';
|
||||
|
||||
import TabImage from './components/TabImage.vue';
|
||||
import TabMusic from './components/TabMusic.vue';
|
||||
import TabNews from './components/TabNews.vue';
|
||||
import TabText from './components/TabText.vue';
|
||||
import TabVideo from './components/TabVideo.vue';
|
||||
import TabVoice from './components/TabVoice.vue';
|
||||
import { createEmptyReply, NewsType, ReplyType } from './components/types';
|
||||
import { NewsType, ReplyType } from '../constants';
|
||||
import TabImage from './tab-image.vue';
|
||||
import TabMusic from './tab-music.vue';
|
||||
import TabNews from './tab-news.vue';
|
||||
import TabText from './tab-text.vue';
|
||||
import TabVideo from './tab-video.vue';
|
||||
import TabVoice from './tab-voice.vue';
|
||||
import { createEmptyReply } from './types';
|
||||
|
||||
defineOptions({ name: 'WxReplySelect' });
|
||||
|
||||
@@ -88,7 +89,7 @@ defineExpose({
|
||||
<Tabs.TabPane :key="ReplyType.Text">
|
||||
<template #tab>
|
||||
<Row align="middle">
|
||||
<IconifyIcon icon="mdi:text" class="mr-1" />
|
||||
<IconifyIcon icon="lucide:file-text" class="mr-1" />
|
||||
文本
|
||||
</Row>
|
||||
</template>
|
||||
@@ -99,7 +100,7 @@ defineExpose({
|
||||
<Tabs.TabPane :key="ReplyType.Image">
|
||||
<template #tab>
|
||||
<Row align="middle">
|
||||
<IconifyIcon icon="mdi:image" class="mr-1" />
|
||||
<IconifyIcon icon="lucide:image" class="mr-1" />
|
||||
图片
|
||||
</Row>
|
||||
</template>
|
||||
@@ -110,7 +111,7 @@ defineExpose({
|
||||
<Tabs.TabPane :key="ReplyType.Voice">
|
||||
<template #tab>
|
||||
<Row align="middle">
|
||||
<IconifyIcon icon="mdi:microphone" class="mr-1" />
|
||||
<IconifyIcon icon="lucide:mic" class="mr-1" />
|
||||
语音
|
||||
</Row>
|
||||
</template>
|
||||
@@ -121,7 +122,7 @@ defineExpose({
|
||||
<Tabs.TabPane :key="ReplyType.Video">
|
||||
<template #tab>
|
||||
<Row align="middle">
|
||||
<IconifyIcon icon="mdi:video" class="mr-1" />
|
||||
<IconifyIcon icon="lucide:video" class="mr-1" />
|
||||
视频
|
||||
</Row>
|
||||
</template>
|
||||
@@ -132,7 +133,7 @@ defineExpose({
|
||||
<Tabs.TabPane :key="ReplyType.News">
|
||||
<template #tab>
|
||||
<Row align="middle">
|
||||
<IconifyIcon icon="mdi:newspaper" class="mr-1" />
|
||||
<IconifyIcon icon="lucide:newspaper" class="mr-1" />
|
||||
图文
|
||||
</Row>
|
||||
</template>
|
||||
@@ -143,7 +144,7 @@ defineExpose({
|
||||
<Tabs.TabPane :key="ReplyType.Music">
|
||||
<template #tab>
|
||||
<Row align="middle">
|
||||
<IconifyIcon icon="mdi:music" class="mr-1" />
|
||||
<IconifyIcon icon="lucide:music" class="mr-1" />
|
||||
音乐
|
||||
</Row>
|
||||
</template>
|
||||
Reference in New Issue
Block a user