loading状态

This commit is contained in:
筱野
2025-10-05 12:48:00 +08:00
parent 177434c13a
commit 927d7cfb51

View File

@@ -98,7 +98,7 @@ const AiImportPopup: React.FC<AiImportPopupProps> = ({
if (Array.isArray(data) && data.length > 0) { if (Array.isArray(data) && data.length > 0) {
setPublishData(data) setPublishData(data)
initAiPopup() initAiPopup()
onClose() closePopupBefore()
Taro.navigateTo({ Taro.navigateTo({
url: '/publish_pages/publishBall/index?type=ai' url: '/publish_pages/publishBall/index?type=ai'
}) })
@@ -179,6 +179,11 @@ const AiImportPopup: React.FC<AiImportPopupProps> = ({
if (onManualPublish) { if (onManualPublish) {
onManualPublish() onManualPublish()
} }
closePopupBefore()
}
const closePopupBefore = () => {
initLoading()
onClose() onClose()
} }
@@ -190,7 +195,7 @@ const AiImportPopup: React.FC<AiImportPopupProps> = ({
position="bottom" position="bottom"
round={true} round={true}
closeable={false} closeable={false}
onClose={onClose} onClose={closePopupBefore}
className={styles.aiImportPopup} className={styles.aiImportPopup}
style={{ paddingBottom: isKeyboardVisible ? `${keyboardHeight}px` : undefined }} style={{ paddingBottom: isKeyboardVisible ? `${keyboardHeight}px` : undefined }}
> >
@@ -201,7 +206,7 @@ const AiImportPopup: React.FC<AiImportPopupProps> = ({
<Image src={images.ICON_IMPORTANT_BLACK} className={styles.lightningIcon} /> <Image src={images.ICON_IMPORTANT_BLACK} className={styles.lightningIcon} />
<Text className={styles.title}></Text> <Text className={styles.title}></Text>
</View> </View>
<View className={styles.closeButton} onClick={onClose}> <View className={styles.closeButton} onClick={closePopupBefore}>
<Image src={images.ICON_CLOSE} className={styles.lightningIcon} /> <Image src={images.ICON_CLOSE} className={styles.lightningIcon} />
</View> </View>
</View> </View>