This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
107 additions
and
68 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,66 @@ | ||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
import { ref, reactive } from 'vue' | ||
const aSummary = ref("基础卡片") | ||
const aTitle = ref('琵琶行') | ||
const aContent = ref('别有幽愁暗恨生,此时无声胜有声.') | ||
const aTitle = ref<string>('基础卡片') | ||
const aContent = ref('别有幽愁暗恨生,此时无声胜有声.') | ||
let tabsType = ref<string>('line') | ||
const radioArr = reactive([{ value: 'line', label: 'line' }, { value: 'bar', label: 'bar' }, { value: 'card', label: 'card' }, { value: 'segment', label: 'segment' }]) | ||
function radioChange(e: Event) { | ||
tabsType.value = (e.target as HTMLInputElement).value | ||
return console.log('val ->', (e.target as HTMLInputElement).value); | ||
} | ||
function handleClose() { | ||
return | ||
} | ||
</script> | ||
|
||
<template> | ||
<div class="p-2"> | ||
<h3>{{ aSummary }}</h3> | ||
<VbenCard class="w-1/3" :title="aTitle"> {{ aContent }} </VbenCard> | ||
<div class="p-2 h-full grid grid-cols-12 gap-4"> | ||
|
||
<div class="col-start-1 col-span-6 "> | ||
<VbenCard :title="aTitle"> {{ aContent }} </VbenCard> | ||
</div> | ||
|
||
<div class="col-start-7 col-span-6 "> | ||
<VbenCard contentStyle="padding: 0"> | ||
<VbenTabs :type="tabsType" size="large" :tabsPadding="20" paneStyle="padding: 20px;"> | ||
<VbenTabPane name="tabs1"> | ||
这是一个Tabs卡片(👁️🐽👁️) | ||
<p> 你可以选择Tabs的类型: </p> | ||
<!-- TODO: VbenRadioGroup似乎有bug,点击后的样式无法正常显示 --> | ||
<!-- TODO: VbenRadioGroup tabsType设置默认值后不起作用 --> | ||
<VbenRadioGroup name="radio-group" :value="tabsType" :options="radioArr" | ||
@change="radioChange" /> | ||
</VbenTabPane> | ||
<VbenTabPane name="tabs2">我本将心向明月,奈何明月照沟渠.</VbenTabPane> | ||
</VbenTabs> | ||
</VbenCard> | ||
</div> | ||
|
||
<div class="col-start-1 col-span-3"> | ||
<VbenCard title="带封面的卡片" hoverable> | ||
<template #cover> | ||
<img src="@/assets/images/cover.png" alt="cover.png"> | ||
</template> | ||
样式丰富了许多,不是吗🥳 | ||
</VbenCard> | ||
</div> | ||
|
||
<div class="col-start-7 col-span-6"> | ||
<VbenCard title="提示" closable @close="handleClose"> | ||
有时候我们需要在插槽里定制一些丰富的交互🤔 | ||
<template #action> | ||
<VbenSpace> | ||
<VbenButton strong secondary type="tertiary">不用了</VbenButton> | ||
<VbenButton strong secondary type="primary">确定</VbenButton> | ||
</VbenSpace> | ||
</template> | ||
</VbenCard> | ||
</div> | ||
|
||
</div> | ||
</template> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters