docs_vue2/one/templates/page.etpl
2022-06-14 09:05:00 +08:00

43 lines
1.4 KiB
Plaintext

<template>
<article ref="article" class="content ${style}"><!-- if: ${toc} -->
<one-toc :items="toc"/><!-- /if -->
${content | raw}
</article>
</template><!-- if: ${boilerplate} -->
<script>
import { htmlAttrs } from '~/common/i18n'<!-- for: ${components} as ${component} -->
import ${component} from '~/components/${component}'<!-- /for --><!-- for: ${demos} as ${demo}, ${index} -->
import Demo${index} from '${demo.src}'<!-- /for --><!-- if: ${demos.length} -->
import OneDemo from '~/components/OneDemo'<!-- /if --><!-- if: ${path} -->
import OneEditLink from '~/components/OneEditLink'<!-- /if --><!-- if: ${toc} -->
import OneToc from '~/components/OneToc'<!-- /if --><!-- if: ${alert} -->
import { VeuiAlert } from 'veui'<!-- /if -->
export default {
components: {
<!-- for: ${components} as ${component}, ${index} -->${component},
<!-- /for --><!-- for: ${demos} as ${demo}, ${index} -->'${demo.name}': Demo${index},
<!-- /for --><!-- if: ${demos.length} -->OneDemo,<!-- /if --><!-- if: ${alert} -->
VeuiAlert,<!-- /if --><!-- if: ${toc} -->
OneToc,<!-- /if --><!-- if: ${path} -->
OneEditLink,<!-- /if -->
},
mixins: [htmlAttrs]<!-- if: ${toc} -->,
data () {
return {
toc: ${toc | raw}
}
}<!-- /if -->
}
</script><!-- else -->
<script>
import { htmlAttrs } from '~/common/i18n'
export default {<!-- if: ${layout} -->
layout: '${layout}',
<!-- /if -->
mixins: [htmlAttrs]
}
</script><!-- /else -->