/
githubmirror
/
vuetify
Обзор
Документация
Войти
/
githubmirror
/
vuetify
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/docs/src/examples/v-hover/usage.vue
47 строк
1 KB
John Leider
chore: add vue/attributes-order eslint rule
29 фев 2024, 07:06
29 фев 2024, 07:06
65aff8f
Код
Авторство
О чём код?
<template> <ExamplesUsageExample v-model="model" :code="code" :name="name" :options="options" > <div> <v-hover v-bind="props"> <template v-slot:default="{ isHovering, props: hoverProps }"> <v-card v-bind="hoverProps" :color="isHovering ? 'primary' : undefined" text="Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi, ratione debitis quis est labore voluptatibus! Eaque cupiditate minima, at placeat totam, magni doloremque veniam neque porro libero rerum unde voluptatem!" title="Hover over me" ></v-card> </template> </v-hover> </div> </ExamplesUsageExample> </template> <script setup> const name = 'v-hover' const model = ref('default') const options = [] const props = computed(() => { return {} }) const slots = computed(() => { return ` <template v-slot:default="{ isHovering, props }"> <v-card v-bind="props" :color="isHovering ? 'primary' : undefined" title="Hover over me" text="..." ></v-card> </template> ` }) const code = computed(() => { return `<${name}${propsToString(props.value)}>${slots.value}</${name}>` }) </script>