mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 16:11:33 +08:00
31 lines
581 B
Plaintext
31 lines
581 B
Plaintext
```md
|
|
<!-- Page.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import Page from './Page.vue';
|
|
|
|
<Meta title="Page" component={Page} />
|
|
|
|
export const Template = (args) => ({
|
|
components: { Page },
|
|
setup() {
|
|
return { args };
|
|
},
|
|
template: `
|
|
<page v-bind="args">
|
|
<template v-slot:footer>
|
|
<footer v-if="args.footer" v-html="args.footer" />
|
|
</template>
|
|
</page>
|
|
`,
|
|
});
|
|
|
|
<Story
|
|
name="CustomFooter"
|
|
args={{
|
|
footer: '<a href="https://storybook.js.org/">Built with Storybook</a>',
|
|
}}>
|
|
{Template.bind({})}
|
|
</Story>
|
|
``` |