fix: setup 迁移完成 v1

This commit is contained in:
Tim
2025-08-14 10:27:01 +08:00
parent 902fce5174
commit 655e8f2a65
33 changed files with 289 additions and 393 deletions

View File

@@ -11,29 +11,20 @@
</BasePopup>
</template>
<script>
<script setup>
import BasePopup from '~/components/BasePopup.vue'
import { useRouter } from 'vue-router'
export default {
name: 'ActivityPopup',
components: { BasePopup },
props: {
visible: { type: Boolean, default: false },
icon: String,
text: String,
},
emits: ['close'],
setup(props, { emit }) {
const router = useRouter()
const gotoActivity = () => {
emit('close')
router.push('/activities')
}
const close = () => emit('close')
return { gotoActivity, close }
},
const props = defineProps({
visible: { type: Boolean, default: false },
icon: String,
text: String,
})
const emit = defineEmits(['close'])
const gotoActivity = async () => {
emit('close')
await navigateTo('/activities', { replace: true })
}
const close = () => emit('close')
</script>
<style scoped>