28 lines
		
	
	
		
			392 B
		
	
	
	
		
			Vue
		
	
	
	
		
		
			
		
	
	
			28 lines
		
	
	
		
			392 B
		
	
	
	
		
			Vue
		
	
	
	
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								import {getSize} from "@/utils/tools";
							 | 
						||
| 
								 | 
							
								export default {
							 | 
						||
| 
								 | 
							
								  name: "Split",
							 | 
						||
| 
								 | 
							
								  props: {
							 | 
						||
| 
								 | 
							
								    height: {
							 | 
						||
| 
								 | 
							
								      type: [Number, String],
							 | 
						||
| 
								 | 
							
								      default: 0
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								  },
							 | 
						||
| 
								 | 
							
								  computed: {
							 | 
						||
| 
								 | 
							
								    sh () {
							 | 
						||
| 
								 | 
							
								      return getSize(this.height)
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<template>
							 | 
						||
| 
								 | 
							
								  <div class="split" :style="{ height: sh }"></div>
							 | 
						||
| 
								 | 
							
								</template>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<style scoped lang="less">
							 | 
						||
| 
								 | 
							
								  .split {
							 | 
						||
| 
								 | 
							
								    width: 100%;
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								</style>
							 |