mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
(Vue Renderer) use setup script + remove any changes as baselines to pass UI tests.
This commit is contained in:
parent
e1dd6bdb7c
commit
f9d82f1511
@ -37,6 +37,6 @@ export const LoggedIn: Story = {
|
|||||||
|
|
||||||
export const LoggedOut: Story = {
|
export const LoggedOut: Story = {
|
||||||
args: {
|
args: {
|
||||||
user: undefined,
|
user: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
import './header.css';
|
import './header.css';
|
||||||
import MyButton from './Button.vue';
|
import MyButton from './Button.vue';
|
||||||
|
|
||||||
defineProps<{ user: { name: string } }>();
|
defineProps<{ user: { name: string } | null }>();
|
||||||
|
|
||||||
defineEmits<{
|
defineEmits<{
|
||||||
(event: 'createAccount'): void;
|
(event: 'createAccount'): void;
|
||||||
|
@ -55,13 +55,13 @@ import MyHeader from './Header.vue';
|
|||||||
|
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const user = ref<{ name: string } | undefined>(undefined)
|
const user = ref<{ name: string } | null>(null)
|
||||||
|
|
||||||
const onLogin = () => {
|
const onLogin = () => {
|
||||||
user.value = { name: 'Jane Doe' };
|
user.value = { name: 'Jane Doe' };
|
||||||
};
|
};
|
||||||
const onLogout = () => {
|
const onLogout = () => {
|
||||||
user.value = undefined;
|
user.value = null;
|
||||||
};
|
};
|
||||||
const onCreateAccount = () => {
|
const onCreateAccount = () => {
|
||||||
user.value = { name: 'Jane Doe' };
|
user.value = { name: 'Jane Doe' };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user