import { StoryFn, Meta } from '@storybook/vue3' import { ref } from 'vue' import VueSlider from '../../../lib' export default { title: 'props/data', parameters: { docs: { description: { component: ` - **Type**: \`Array | Array | Array | object\` - **Default**: \`undefined\` - **Usage**: Custom data. \`\`\`html \`\`\` The object type is actually a simplified writing of \`data & marks & tooltipFormatter\`. \`\`\`html \`\`\` `, }, }, }, } as Meta export const data: StoryFn = args => ({ components: { VueSlider }, setup() { const value1 = ref('D') const data1 = ['A', 'B', 'C', 'D', 'E', 'F', 'G'] const value2 = ref(2) const data2 = [ { value: 1, label: 'A' }, { value: 2, label: 'B' }, { value: 3, label: 'C' }, ] return { value1, data1, value2, data2 } }, template: `

:data="{{ data1 }}"

:data="{{ data2 }}"

`, }) data.storyName = 'data'