mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-11-03 12:42:07 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			546 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			546 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
  <section class="van-doc-demo-section" :class="demoName">
 | 
						|
    <slot />
 | 
						|
  </section>
 | 
						|
</template>
 | 
						|
 | 
						|
<script>
 | 
						|
import { decamelize } from '../../common';
 | 
						|
 | 
						|
export default {
 | 
						|
  name: 'DemoSection',
 | 
						|
 | 
						|
  computed: {
 | 
						|
    demoName() {
 | 
						|
      const { meta } = this.$route || {};
 | 
						|
      if (meta && meta.name) {
 | 
						|
        return `demo-${decamelize(meta.name)}`;
 | 
						|
      }
 | 
						|
 | 
						|
      return '';
 | 
						|
    },
 | 
						|
  },
 | 
						|
};
 | 
						|
</script>
 | 
						|
 | 
						|
<style lang="less">
 | 
						|
.van-doc-demo-section {
 | 
						|
  box-sizing: border-box;
 | 
						|
  min-height: calc(100vh - 56px);
 | 
						|
  padding-bottom: 20px;
 | 
						|
}
 | 
						|
</style>
 |