mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-05 17:47:36 +08:00
fix: setup 迁移完成 v1
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user