-
Notifications
You must be signed in to change notification settings - Fork 838
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(trend-arrow): split demo (#2796)
Showing
20 changed files
with
254 additions
and
496 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
packages/nutui-taro-demo/src/exhibition/pages/trendarrow/basic.vue
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 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow :rate="1" /> | ||
<nut-trend-arrow :rate="-0.2535" /> | ||
</nut-cell> | ||
</template> |
13 changes: 13 additions & 0 deletions
13
packages/nutui-taro-demo/src/exhibition/pages/trendarrow/color.vue
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,13 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow :rate="10.2365" rise-color="rgb(73,143,242)" /> | ||
<nut-trend-arrow :rate="-0.2535" show-sign drop-color="rgb(255, 190, 13)" /> | ||
<nut-trend-arrow | ||
:sync-text-color="false" | ||
show-sign | ||
:rate="-0.2535" | ||
text-color="rgb(39,197,48)" | ||
drop-color="rgb(255, 190, 13)" | ||
/> | ||
</nut-cell> | ||
</template> |
6 changes: 6 additions & 0 deletions
6
packages/nutui-taro-demo/src/exhibition/pages/trendarrow/digits.vue
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 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow :digits="1" :rate="10.2365" /> | ||
<nut-trend-arrow :digits="3" :rate="-0.2535" /> | ||
</nut-cell> | ||
</template> |
17 changes: 17 additions & 0 deletions
17
packages/nutui-taro-demo/src/exhibition/pages/trendarrow/icon.vue
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,17 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow :rate="10.2365"> | ||
<template #up-icon> | ||
<Success color="blue" width="18" height="18" /> | ||
</template> | ||
</nut-trend-arrow> | ||
<nut-trend-arrow :rate="-10.2365"> | ||
<template #down-icon> | ||
<Failure color="red" /> | ||
</template> | ||
</nut-trend-arrow> | ||
</nut-cell> | ||
</template> | ||
<script setup lang="ts"> | ||
import { Success, Failure } from '@nutui/icons-vue-taro'; | ||
</script> |
111 changes: 51 additions & 60 deletions
111
packages/nutui-taro-demo/src/exhibition/pages/trendarrow/index.vue
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
6 changes: 6 additions & 0 deletions
6
packages/nutui-taro-demo/src/exhibition/pages/trendarrow/left.vue
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 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow arrow-left :rate="0.2535" /> | ||
<nut-trend-arrow arrow-left :rate="-0.2535" /> | ||
</nut-cell> | ||
</template> |
6 changes: 6 additions & 0 deletions
6
packages/nutui-taro-demo/src/exhibition/pages/trendarrow/sign.vue
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 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow show-sign :rate="1" /> | ||
<nut-trend-arrow show-sign :rate="-0.2535" /> | ||
</nut-cell> | ||
</template> |
6 changes: 6 additions & 0 deletions
6
packages/nutui-taro-demo/src/exhibition/pages/trendarrow/zero.vue
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 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow show-sign :rate="0" /> | ||
<nut-trend-arrow show-sign show-zero :rate="0" /> | ||
</nut-cell> | ||
</template> |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow :rate="1" /> | ||
<nut-trend-arrow :rate="-0.2535" /> | ||
</nut-cell> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow :rate="10.2365" rise-color="rgb(73,143,242)" /> | ||
<nut-trend-arrow :rate="-0.2535" show-sign drop-color="rgb(255, 190, 13)" /> | ||
<nut-trend-arrow | ||
:sync-text-color="false" | ||
show-sign | ||
:rate="-0.2535" | ||
text-color="rgb(39,197,48)" | ||
drop-color="rgb(255, 190, 13)" | ||
/> | ||
</nut-cell> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow :digits="1" :rate="10.2365" /> | ||
<nut-trend-arrow :digits="3" :rate="-0.2535" /> | ||
</nut-cell> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<nut-cell> | ||
<nut-trend-arrow :rate="10.2365"> | ||
<template #up-icon> | ||
<Success color="blue" width="18" height="18" /> | ||
</template> | ||
</nut-trend-arrow> | ||
<nut-trend-arrow :rate="-10.2365"> | ||
<template #down-icon> | ||
<Failure color="red" /> | ||
</template> | ||
</nut-trend-arrow> | ||
</nut-cell> | ||
</template> | ||
<script setup lang="ts"> | ||
import { Success, Failure } from '@nutui/icons-vue'; | ||
</script> |
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,62 @@ | ||
<template> | ||
<Demo class="trend-arrow-demo"> | ||
<h2>{{ t('basic') }}</h2> | ||
<Basic /> | ||
|
||
<h2>{{ t('digits') }}</h2> | ||
<Digits /> | ||
|
||
<h2>{{ t('left') }}</h2> | ||
<Left /> | ||
|
||
<h2>{{ t('sign') }}</h2> | ||
<Sign /> | ||
|
||
<h2>{{ t('zero') }}</h2> | ||
<Zero /> | ||
|
||
<h2>{{ t('color') }}</h2> | ||
<Color /> | ||
|
||
<h2>{{ t('icon') }}</h2> | ||
<IconDemo /> | ||
</Demo> | ||
</template> | ||
<script setup lang="ts"> | ||
import { useTranslate } from '@/sites/utils'; | ||
import Basic from './basic.vue'; | ||
import Digits from './digits.vue'; | ||
import Left from './left.vue'; | ||
import Sign from './sign.vue'; | ||
import Zero from './zero.vue'; | ||
import Color from './color.vue'; | ||
import IconDemo from './icon.vue'; | ||
const t = useTranslate({ | ||
'zh-CN': { | ||
basic: '基础用法', | ||
digits: '指定小数位', | ||
left: '箭头在前面', | ||
sign: '显示正负号', | ||
zero: '是否展示0', | ||
color: '自定义颜色', | ||
icon: '自定义图标' | ||
}, | ||
'en-US': { | ||
basic: 'Basic Usage', | ||
digits: 'Specify decimal places', | ||
left: 'Arrow ahead', | ||
sign: 'show sign', | ||
zero: 'Whether to show 0', | ||
color: 'Custom color', | ||
icon: 'Custom icon' | ||
} | ||
}); | ||
</script> | ||
<style lang="scss"> | ||
.trend-arrow-demo { | ||
.nut-trend-arrow { | ||
margin-right: 10px; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.