@@ -21,6 +21,7 @@ const {
updateQrcodeValue,
updateCurrencyAmount,
updateSkillInfo,
+ resetSpecificStep,
} = useQrCodePopup()
const { open: openSelectListPopup, state: selectListState } = useSelectListPopup()
const { playmateInfo, userProfile } = useAuth()
@@ -131,6 +132,9 @@ watch(() => [state.visible, state.activeTab, state.skillId], ([visible, tab, ski
if (tab === 'general' && skillId) {
generateQrCode(1)
}
+ else if (tab === 'specific' && skillId) {
+ resetSpecificStep()
+ }
})
watch(() => state.specificStep, (step) => {
@@ -79,6 +79,10 @@ const switchTab = (tab: 'general' | 'specific') => {
+const resetSpecificStep = () => {
+ state.specificStep = 'form'
+}
+
const setSpecificQty = (value: number) => {
const next = value || 1
state.specificQty = next < 1 ? 1 : next
@@ -126,5 +130,6 @@ export const useQrCodePopup = () => {