mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
build: add files of vant-cli 2
This commit is contained in:
32
packages/vant-cli/site/mobile/components/DemoSection.vue
Normal file
32
packages/vant-cli/site/mobile/components/DemoSection.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<section class="van-doc-demo-section" :class="demoName">
|
||||
<slot />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import decamelize from 'decamelize';
|
||||
|
||||
export default {
|
||||
name: 'demo-section',
|
||||
|
||||
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: 100vh;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user