diff --git a/es/components/extraFile/forUrl/web.js b/es/components/extraFile/forUrl/web.js index b86f541d2..ca7b7051c 100644 --- a/es/components/extraFile/forUrl/web.js +++ b/es/components/extraFile/forUrl/web.js @@ -20,7 +20,7 @@ export default function render(props) { previewImg
- {methods && methods.map((ele) => (
{ + {methods && methods.map((ele) => (
{ chooseMethod(ele); }}> {t(ele)} diff --git a/es/components/extraFile/gallery/web.js b/es/components/extraFile/gallery/web.js index 476ab27c5..6bcc79166 100644 --- a/es/components/extraFile/gallery/web.js +++ b/es/components/extraFile/gallery/web.js @@ -7,7 +7,7 @@ export default function render(props) { const imageViewerMultiRef = useRef(null); return (<> - {files?.map((ele, index) => ( { + {files?.map((ele, index) => ( { setVisible(true); imageViewerMultiRef.current.swipeTo(index); } : undefined}/>))} diff --git a/es/components/extraFile/gallery/web.pc.js b/es/components/extraFile/gallery/web.pc.js index 24124a352..0343b4d0d 100644 --- a/es/components/extraFile/gallery/web.pc.js +++ b/es/components/extraFile/gallery/web.pc.js @@ -8,7 +8,7 @@ export default function render(props) { onChange: (current, prev) => { }, }}> - {files?.map((ele) => ( ( - {GenderOptions.map(ele => {ele.label})} + {GenderOptions.map(ele => {ele.label})} } diff --git a/es/components/passport/web.pc.d.ts b/es/components/passport/web.pc.d.ts index a541a9bdc..432795fd2 100644 --- a/es/components/passport/web.pc.d.ts +++ b/es/components/passport/web.pc.d.ts @@ -16,5 +16,5 @@ export default function render(props: WebComponentProps void; + myConfirm: (ids: string[]) => Promise; }>): React.JSX.Element; diff --git a/es/components/subwayLine/picker/web.js b/es/components/subwayLine/picker/web.js index 8a28bde0a..6e58d1743 100644 --- a/es/components/subwayLine/picker/web.js +++ b/es/components/subwayLine/picker/web.js @@ -18,7 +18,7 @@ export default function render(props) { label: ele.name, children: ( {stations?.map((ele) => { - return ( { + return ( { setCheckedList(e.target.value, e.target.checked); }} checked={stationIds .concat(selectIds || []) diff --git a/es/components/user/authenticate/web.pc.js b/es/components/user/authenticate/web.pc.js index c1c46d862..ae5d8a225 100644 --- a/es/components/user/authenticate/web.pc.js +++ b/es/components/user/authenticate/web.pc.js @@ -26,7 +26,7 @@ export default function Render(props) { }); }} value={idCardType}> {idCardTypeArr.map((ele, index) => { - return {ele.label}; + return {ele.label}; })} diff --git a/es/components/user/info/web.js b/es/components/user/info/web.js index e5b3e832e..c8626e216 100644 --- a/es/components/user/info/web.js +++ b/es/components/user/info/web.js @@ -36,7 +36,7 @@ export default function render(props) { cancelEdit(); }}> - {genderOptions.map((ele) => ( + {genderOptions.map((ele) => ( {ele.label} ))} diff --git a/es/components/userEntityGrant/claim/ubPicker/web.js b/es/components/userEntityGrant/claim/ubPicker/web.js index 00fb67e81..047ca438c 100644 --- a/es/components/userEntityGrant/claim/ubPicker/web.js +++ b/es/components/userEntityGrant/claim/ubPicker/web.js @@ -14,7 +14,7 @@ export default function Render(props) { : (
{t('pickRow', { entity: t(`${entity}:name`) })} onPickRows(val)}> - {rows.map((row) => ( + {rows.map((row) => ( {row.value} ))} @@ -22,7 +22,7 @@ export default function Render(props) { const Relation = (
onPickRelations(val)}> - {relations.map((relation) => ( + {relations.map((relation) => ( {t(`${entity}:r.${relation.name}`)} ))} diff --git a/es/components/userEntityGrant/claim/ubPicker/web.pc.js b/es/components/userEntityGrant/claim/ubPicker/web.pc.js index 81453d548..545dd49d2 100644 --- a/es/components/userEntityGrant/claim/ubPicker/web.pc.js +++ b/es/components/userEntityGrant/claim/ubPicker/web.pc.js @@ -17,7 +17,7 @@ export default function Render(props) { {t('pickRow', { entity: t(`${entity}:name`) })} onPickRows(val)}> - {rows.map((row) => ({row.value}))} + {rows.map((row) => ({row.value}))} ); const Relation = (<> @@ -26,14 +26,14 @@ export default function Render(props) { {rule !== 'single' ? ( onPickRelations(val)}> - {relations.map((relation) => ( + {relations.map((relation) => ( {t(`${entity}:r.${relation.name}`)} ))} ) : ( { const val = e.target.value; onPickRelations([val]); }} value={pickedRelationIds?.[0] || undefined}> - {relations.map((relation) => ( + {relations.map((relation) => ( {t(`${entity}:r.${relation.name}`)} ))} )} diff --git a/es/components/userRelation/list/web.js b/es/components/userRelation/list/web.js index edb688634..ad8226950 100644 --- a/es/components/userRelation/list/web.js +++ b/es/components/userRelation/list/web.js @@ -25,16 +25,13 @@ export default function Render(props) { {users?.map((ele, index) => { - return () : ()} extra={ele.mobile || '--'} description={
) : ()} extra={ele.mobile || '--'} description={
- {ele.userRelation$user?.map((ele2, index2) => ( + {ele.userRelation$user?.map((ele2, index2) => ( {ele2.relation?.name - ? t(entity + - ':r.' + - ele2.relation - .name) + ? t(entity + ':r.' + ele2.relation.name) : ele2.relation?.display} ))}
} onClick={() => goUpdate(ele.id)}> diff --git a/es/components/userRelation/list/web.pc.js b/es/components/userRelation/list/web.pc.js index 8d48c6a74..aacb21959 100644 --- a/es/components/userRelation/list/web.pc.js +++ b/es/components/userRelation/list/web.pc.js @@ -49,11 +49,9 @@ export default function Render(props) { title: t('relations'), render: (value, record, index) => { return ( - {record.userRelation$user?.map((ele, index) => ( + {record.userRelation$user?.map((ele, index) => ( {ele.relation.name - ? t(entity + - ':r.' + - ele.relation.name) + ? t(entity + ':r.' + ele.relation.name) : ele.relation.display} ))} ); diff --git a/es/components/userRelation/upsert/byUserEntityGrant/web.js b/es/components/userRelation/upsert/byUserEntityGrant/web.js index 2b5557a4b..b0de636d5 100644 --- a/es/components/userRelation/upsert/byUserEntityGrant/web.js +++ b/es/components/userRelation/upsert/byUserEntityGrant/web.js @@ -24,9 +24,8 @@ export default function render(props) { update({ relationIds: val }); }}> - {relations?.map((ele) => ( - {ele.display || - t(`${relationEntity}:r.${ele.name}`)} + {relations?.map((ele) => ( + {ele.display || t(`${relationEntity}:r.${ele.name}`)} ))} @@ -36,7 +35,7 @@ export default function render(props) { rule: val, })}> - {rules.map((ele) => ( + {rules.map((ele) => ( {t(`userEntityGrant:v.rule.${ele}`)} ))} diff --git a/es/components/userRelation/upsert/byUserEntityGrant/web.pc.js b/es/components/userRelation/upsert/byUserEntityGrant/web.pc.js index 72de83583..c0cc92f23 100644 --- a/es/components/userRelation/upsert/byUserEntityGrant/web.pc.js +++ b/es/components/userRelation/upsert/byUserEntityGrant/web.pc.js @@ -24,8 +24,7 @@ export default function render(props) { update({ relationIds: val }); }} options={relations?.map((ele) => ({ value: ele.id, - label: ele.display || - relationEntity && t(`${relationEntity}:r.${ele.name}`), + label: ele.display || relationEntity && t(`${relationEntity}:r.${ele.name}`), }))}/> {relationIds?.length > 1 && ( diff --git a/es/components/userRelation/upsert/web.js b/es/components/userRelation/upsert/web.js index 6d90582ce..54d0f9b92 100644 --- a/es/components/userRelation/upsert/web.js +++ b/es/components/userRelation/upsert/web.js @@ -14,13 +14,13 @@ export default function Render(props) { const SubParts = enabled.map((ele) => { switch (ele) { case 'email': { - return
{t('not-implemented')}
; + return
{t('not-implemented')}
; } case 'mobile': { - return (); + return (); } case 'userEntityGrant': { - return (); + return (); } } }); diff --git a/es/components/userRelation/upsert/web.pc.js b/es/components/userRelation/upsert/web.pc.js index 3bf061084..9833842f3 100644 --- a/es/components/userRelation/upsert/web.pc.js +++ b/es/components/userRelation/upsert/web.pc.js @@ -14,13 +14,13 @@ export default function Render(props) { const SubParts = enabled.map((ele) => { switch (ele) { case 'email': { - return
{t('not-implemented')}
; + return
{t('not-implemented')}
; } case 'mobile': { - return (); + return (); } case 'userEntityGrant': { - return (); + return (); } } }); diff --git a/es/components/userWechatPublicTag/subscribedList/web.pc.js b/es/components/userWechatPublicTag/subscribedList/web.pc.js index 995026a22..3067cb0f8 100644 --- a/es/components/userWechatPublicTag/subscribedList/web.pc.js +++ b/es/components/userWechatPublicTag/subscribedList/web.pc.js @@ -42,7 +42,7 @@ export default function Render(props) { return (
{value && value.length > 0 ? value.map((ele) => { - return {ele.text}; + return {ele.text}; }) : '暂无标签'}
); @@ -136,7 +136,7 @@ export default function Render(props) { {user.tags && user.tags.length > 0 ? user.tags.map((tag) => { - return {tag.text}; + return {tag.text}; }) : '暂无标签'} diff --git a/es/components/wechatMaterialLibrary/web.pc.js b/es/components/wechatMaterialLibrary/web.pc.js index cc3d2eef3..f9d782e6c 100644 --- a/es/components/wechatMaterialLibrary/web.pc.js +++ b/es/components/wechatMaterialLibrary/web.pc.js @@ -112,7 +112,7 @@ export default function Render(props) { title: '封面图', render: (value, record, index) => { return (
- {record.content.news_item.map((ele) => (
))} + {record.content.news_item.map((ele, index) => (
))}
); } }, @@ -121,7 +121,7 @@ export default function Render(props) { title: '图文消息标题', render: (value, record, index) => { return (
- {record.content.news_item.map((ele) => (
{ele.title}
))} + {record.content.news_item.map((ele, index) => (
{ele.title}
))}
); } }, @@ -130,7 +130,7 @@ export default function Render(props) { title: '作者', render: (value, record, index) => { return (
- {record.content.news_item.map((ele) => (
{ele.author}
))} + {record.content.news_item.map((ele, index) => (
{ele.author}
))}
); } }, @@ -139,7 +139,7 @@ export default function Render(props) { title: '图文信息摘要', render: (value, record, index) => { return (
- {record.content.news_item.map((ele) => (
{ele.digest}
))} + {record.content.news_item.map((ele, index) => (
{ele.digest}
))}
); } }, diff --git a/es/components/wechatMenu/actionPhone/web.pc.js b/es/components/wechatMenu/actionPhone/web.pc.js index f21cc4c38..8292f1fb3 100644 --- a/es/components/wechatMenu/actionPhone/web.pc.js +++ b/es/components/wechatMenu/actionPhone/web.pc.js @@ -59,9 +59,9 @@ export default function Render(props) {
{config && config.button && config.button.length > 0 ? (
- {config.button.map((ele, index) => ( + {config.button.map((ele, index) => ( {config.button[index].sub_button.length > 0 ? (<> - {config.button[index].sub_button.map((ele, index2) => (
+ {config.button[index].sub_button.map((ele, index2) => (
Promise; getArticle: (article_id: string) => Promise; - getMaterialVideo: (mediaId: string) => { + getMaterialVideo: (mediaId: string) => Promise<{ url: string; media_id: string; - }; + }>; }>): React.JSX.Element; diff --git a/es/components/wechatMenu/preview/web.pc.js b/es/components/wechatMenu/preview/web.pc.js index 6a4ca78f4..0d5643eda 100644 --- a/es/components/wechatMenu/preview/web.pc.js +++ b/es/components/wechatMenu/preview/web.pc.js @@ -44,19 +44,23 @@ export default function Render(props) { return; } if (menu.subType === 'image' && menu.media_id) { - setSendMsg([...sendMsg, { type: 'image', content: await getMaterialImgAndVoice('image', menu.media_id) }]); + const result = await getMaterialImgAndVoice('image', menu.media_id); + setSendMsg([...sendMsg, { type: 'image', content: result }]); return; } if (menu.type === 'article_id' && menu.article_id) { - setSendMsg([...sendMsg, { type: 'article_id', content: await getArticle(menu.article_id) }]); + const result = await getArticle(menu.article_id); + setSendMsg([...sendMsg, { type: 'article_id', content: result }]); return; } if (menu.subType === 'voice' && menu.media_id) { - setSendMsg([...sendMsg, { type: 'voice', content: { url: await getMaterialImgAndVoice('voice', menu.media_id), media_id: menu.media_id } }]); + const result = await getMaterialImgAndVoice('voice', menu.media_id); + setSendMsg([...sendMsg, { type: 'voice', content: { url: result, media_id: menu.media_id } }]); return; } if (menu.subType === 'video' && menu.media_id) { - setSendMsg([...sendMsg, { type: 'video', content: { url: await getMaterialVideo(menu.media_id).url, media_id: menu.media_id } }]); + const result = await getMaterialVideo(menu.media_id); + setSendMsg([...sendMsg, { type: 'video', content: { url: result.url, media_id: menu.media_id } }]); return; } }; @@ -74,33 +78,34 @@ export default function Render(props) {
{(sendMsg && sendMsg.length > 0) && - sendMsg.map((ele) => { + sendMsg.map((ele, index) => { if (ele.type === 'text') { - return
+ return
; } else if (ele.type === 'image') { - return ; + return ; } else if (ele.type === 'article_id') { - return
+ return
; } else if (ele.type === 'voice') { - return
+ return ; } else if (ele.type === 'video') { - return
+ return ; } else if (ele.type === 'miniprogram') { - return
{ele.content}
; + return
{ele.content}
; } + return null; })}
@@ -116,7 +121,7 @@ export default function Render(props) { key: `${index * 10 + index2}`, }; }); - return + return
{ele.name}
@@ -124,7 +129,7 @@ export default function Render(props) { ; } else { - return
{ + return
{ menuAction(ele); }}>
{ele.name}
diff --git a/es/components/wechatMenu/selectArticle/web.pc.js b/es/components/wechatMenu/selectArticle/web.pc.js index 6bc3ecbde..f374d71ae 100644 --- a/es/components/wechatMenu/selectArticle/web.pc.js +++ b/es/components/wechatMenu/selectArticle/web.pc.js @@ -1,6 +1,5 @@ import React, { useState, useRef } from 'react'; -import { Button, Table, Space, Input, Popover, Select } from 'antd'; -const { TextArea } = Input; +import { Button, Table, Space, Popover, Select } from 'antd'; import Style from './web.module.less'; import dayjs from 'dayjs'; import ShowNews from '../showNews'; @@ -30,7 +29,7 @@ export default function Render(props) { }); return (