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 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: 基础组件demo。(wip #137) * feat: 基础件demo。 (feat #137) --------- Co-authored-by: sunHsl <sun20001016@gmail.com>
- Loading branch information
Showing
6 changed files
with
99 additions
and
5 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<script lang="ts" setup> | ||
import { Basic } from '@vben/demo' | ||
</script> | ||
<template> | ||
<Basic /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<script lang="ts" setup> | ||
const buttonColors = [ | ||
'default', | ||
'tertiary', | ||
'primary', | ||
'info', | ||
'success', | ||
'warning', | ||
'error', | ||
] | ||
const buttonTypes = [ | ||
{ | ||
type: '基础按钮', | ||
value: '', | ||
}, | ||
{ | ||
type: '圆角按钮', | ||
value: 'round', | ||
}, | ||
{ | ||
type: '次要按钮', | ||
value: 'secondary', | ||
}, | ||
{ | ||
type: '次次要按钮', | ||
value: 'tertiary', | ||
}, | ||
{ | ||
type: '次次次要按钮', | ||
value: 'quaternary', | ||
}, | ||
{ | ||
type: '虚线按钮', | ||
value: 'dashed', | ||
}, | ||
{ | ||
type: '透明背景', | ||
value: 'ghost', | ||
}, | ||
] | ||
</script> | ||
|
||
<template> | ||
<div class="p-2 h-full"> | ||
<VbenCard> | ||
<h2>基础组件</h2> | ||
<p> | ||
基础组件依赖于Naive-UI,组件库已有的基础组件,项目中不会再次进行demo展示(二次封装组件除外)。 | ||
<VbenButton | ||
text | ||
tag="a" | ||
href="https://www.naiveui.com/zh-CN/os-theme/components/button" | ||
target="_blank" | ||
type="primary" | ||
> | ||
Naive-UI | ||
</VbenButton> | ||
</p> | ||
</VbenCard> | ||
<VbenCard class="mt-3"> | ||
<div v-for="buttonType in buttonTypes" :key="buttonType.value"> | ||
<h3>{{ buttonType.type }}</h3> | ||
<VbenButton | ||
class="mx-2" | ||
v-for="buttonColor in buttonColors" | ||
:[buttonType.value]="buttonType.value" | ||
:key="buttonColor" | ||
:type="buttonColor" | ||
>{{ buttonColor }}</VbenButton | ||
> | ||
</div> | ||
</VbenCard> | ||
</div> | ||
</template> | ||
|
||
<style lang="less" scoped></style> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ export default { | |
analysis: '分析页', | ||
}, | ||
demo: { | ||
basic: '基础组件', | ||
demo: '组件', | ||
card: '卡片', | ||
form: '表单', | ||
|
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