mirror of
				https://github.com/MarcZierle/photo-log-frontend.git
				synced 2025-10-31 17:34:57 +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> | <template> | ||||||
|  |   <n-config-provider :theme="null"> | ||||||
|  |     <n-message-provider> | ||||||
|   <div id="nav"> |   <div id="nav"> | ||||||
|     <router-link to="/">Startseite</router-link> | |     <router-link to="/">Startseite</router-link> | | ||||||
|     <router-link to="/about">Das sind wir</router-link> |     <router-link to="/about">Das sind wir</router-link> | ||||||
|   </div> |   </div> | ||||||
|   <router-view /> |   <router-view /> | ||||||
|  |   </n-message-provider> | ||||||
|  |   </n-config-provider> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
|  | <script> | ||||||
|  | import { defineComponent } from 'vue' | ||||||
|  | import {darkTheme} from 'naive-ui' | ||||||
|  | 
 | ||||||
|  | export default defineComponent({ | ||||||
|  |   setup() { | ||||||
|  |     return { darkTheme } | ||||||
|  |   } | ||||||
|  | }) | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| <style lang="scss"> | <style lang="scss"> | ||||||
| #app { | #app { | ||||||
|   font-family: Avenir, Helvetica, Arial, sans-serif; |   font-family: Avenir, Helvetica, Arial, sans-serif; | ||||||
|  | |||||||
| @ -5,30 +5,26 @@ | |||||||
|       Check me out, BOY! |       Check me out, BOY! | ||||||
|     </p> |     </p> | ||||||
| 
 | 
 | ||||||
|     <n-space vertical> |      | ||||||
|     <n-steps :current="status" :status="currentStatus"> |     <n-button type="primary" @click="showModal = true">Start Me up</n-button> | ||||||
|        <n-step |     <n-modal | ||||||
|         title="I Me Mine" |       v-model:show="showModal" | ||||||
|         description="All through the day, I me mine I me mine, I me mine" |       :mask-closable="false" | ||||||
|  |       preset="dialog" | ||||||
|  |       title="Dialog" | ||||||
|  |       content="Are you sure?" | ||||||
|  |       positive-text="Confirm" | ||||||
|  |       @positive-click="onPositiveClick" | ||||||
|  |       @negative-click="onNegativeClick" | ||||||
|  |       negative-text="Cancel" | ||||||
|     /> |     /> | ||||||
|       <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> |  | ||||||
|     </div> |     </div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
|  | import { useMessage } from 'naive-ui' | ||||||
|  | 
 | ||||||
| export default { | export default { | ||||||
|   name: "HelloWorld", |   name: "HelloWorld", | ||||||
|   props: { |   props: { | ||||||
| @ -36,9 +32,20 @@ export default { | |||||||
|   }, |   }, | ||||||
|   data() {  |   data() {  | ||||||
|     return { |     return { | ||||||
|       currentStatus: "error", |       message: useMessage(), | ||||||
|       status: 3 |       showModal: false | ||||||
|     } |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     onPositiveClick () { | ||||||
|  |         this.message.success('Submit') | ||||||
|  |         this.showModal = false | ||||||
|  |       }, | ||||||
|  |       onNegativeClick () { | ||||||
|  |         this.message.success('Cancel') | ||||||
|  |         this.showModalRef = false | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 MarcZierle
						MarcZierle