mirror of
https://github.com/MarcZierle/photo-log-frontend.git
synced 2025-04-07 13:04:37 +00:00
add modal
This commit is contained in:
parent
b8297a4edd
commit
33f3b825bf
16
src/App.vue
16
src/App.vue
@ -1,11 +1,27 @@
|
||||
<template>
|
||||
<n-config-provider :theme="null">
|
||||
<n-message-provider>
|
||||
<div id="nav">
|
||||
<router-link to="/">Startseite</router-link> |
|
||||
<router-link to="/about">Das sind wir</router-link>
|
||||
</div>
|
||||
<router-view />
|
||||
</n-message-provider>
|
||||
</n-config-provider>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue'
|
||||
import {darkTheme} from 'naive-ui'
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
return { darkTheme }
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
|
@ -5,30 +5,26 @@
|
||||
Check me out, BOY!
|
||||
</p>
|
||||
|
||||
<n-space vertical>
|
||||
<n-steps :current="status" :status="currentStatus">
|
||||
<n-step
|
||||
title="I Me Mine"
|
||||
description="All through the day, I me mine I me mine, I me mine"
|
||||
/>
|
||||
<n-step
|
||||
title="Let It Be"
|
||||
description="When I find myself in times of trouble Mother Mary comes to me"
|
||||
/>
|
||||
<n-step
|
||||
title="Come Together"
|
||||
description="Here come old flat top He come grooving up slowly"
|
||||
/>
|
||||
<n-step
|
||||
title="Something"
|
||||
description="Something in the way she moves Attracts me like no other lover"
|
||||
/>
|
||||
</n-steps>
|
||||
</n-space>
|
||||
|
||||
<n-button type="primary" @click="showModal = true">Start Me up</n-button>
|
||||
<n-modal
|
||||
v-model:show="showModal"
|
||||
:mask-closable="false"
|
||||
preset="dialog"
|
||||
title="Dialog"
|
||||
content="Are you sure?"
|
||||
positive-text="Confirm"
|
||||
@positive-click="onPositiveClick"
|
||||
@negative-click="onNegativeClick"
|
||||
negative-text="Cancel"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { useMessage } from 'naive-ui'
|
||||
|
||||
export default {
|
||||
name: "HelloWorld",
|
||||
props: {
|
||||
@ -36,9 +32,20 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentStatus: "error",
|
||||
status: 3
|
||||
message: useMessage(),
|
||||
showModal: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onPositiveClick () {
|
||||
this.message.success('Submit')
|
||||
this.showModal = false
|
||||
},
|
||||
onNegativeClick () {
|
||||
this.message.success('Cancel')
|
||||
this.showModalRef = false
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user