mirror of
				https://github.com/scinote-eln/scinote-web.git
				synced 2025-10-25 21:47:03 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			492 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			492 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| export default {
 | |
|   mounted() {
 | |
|     if (!this.startHidden) {
 | |
|       $(this.$refs.modal).modal('show');
 | |
|     }
 | |
| 
 | |
|     this.$refs.input?.focus();
 | |
|     $(this.$refs.modal).on('hidden.bs.modal', () => {
 | |
|       this.$emit('close');
 | |
|     });
 | |
|   },
 | |
|   beforeUnmount() {
 | |
|     $(this.$refs.modal).modal('hide');
 | |
|   },
 | |
|   methods: {
 | |
|     close() {
 | |
|       this.$emit('close');
 | |
|       $(this.$refs.modal).modal('hide');
 | |
|     },
 | |
|     open() {
 | |
|       this.$emit('open');
 | |
|       $(this.$refs.modal).modal('show');
 | |
|     }
 | |
|   }
 | |
| };
 |