-
Notifications
You must be signed in to change notification settings - Fork 291
fix(statistic): 优化文档 ts问题 插槽 不居中问题 暂时隐藏showGroupSeparator属性 #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ed2c6da
fix(color-picker): '优化palette拖拽效果
ErKeLost 54a4ba5
Merge branch 'dev' of github.com:DevCloudFE/vue-devui into dev
ErKeLost b2a1cf1
docs(colorpicker, statistic, ripple): '优化文档 '
ErKeLost 0abdf40
Merge branch 'dev' of github.com:DevCloudFE/vue-devui into dev
ErKeLost bdad7fe
Merge branch 'dev' of github.com:DevCloudFE/vue-devui into dev
ErKeLost f89e85c
fix(statistic): 修复插槽样式问题 ts格式暂时移除showgroup属性
ErKeLost 378b07a
Merge branch 'dev' of github.com:DevCloudFE/vue-devui into dev
ErKeLost 0836b89
docs(statistic): 修复文档显示错误
ErKeLost File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -14,14 +14,14 @@ | |
<d-col :span="12"> | ||
<d-statistic | ||
title="Users Sales" | ||
:value="5201314" | ||
style="position: absolute"> | ||
</d-statistic> | ||
|
||
group-separator="," | ||
:value="5201314" /> | ||
</d-col> | ||
<d-col :span="12"> | ||
<d-statistic title="Account Weekly Sales (CNY)" :value="999999" | ||
/> | ||
<d-statistic | ||
title="Account Weekly Sales (CNY)" | ||
group-separator="." | ||
:value="999999" /> | ||
</d-col> | ||
</d-cow> | ||
</template> | ||
|
@@ -39,13 +39,7 @@ | |
<d-row :gutter="16"> | ||
<d-col :span="12"> | ||
<d-card> | ||
<d-statistic | ||
title="Growth Rate" | ||
:value="68.28" | ||
:precision="3" | ||
suffix="%" | ||
:content-style="{ color: '#3f8600' }" | ||
> | ||
<d-statistic title="Growth Rate" :value="68.28" :precision="3" suffix="%"> | ||
<template #prefix> | ||
<d-icon name="experice-new" /> | ||
</template> | ||
|
@@ -54,13 +48,7 @@ | |
</d-col> | ||
<d-col :span="12"> | ||
<d-card> | ||
<d-statistic | ||
title="Decline Rate" | ||
:value="38.3" | ||
suffix="%" | ||
class="demo-class" | ||
:content-style="{ color: '#cf1322' }" | ||
> | ||
<d-statistic title="Decline Rate" :value="38.3" suffix="%"> | ||
<template #prefix> | ||
<d-icon name="bold" /> | ||
</template> | ||
|
@@ -87,30 +75,28 @@ | |
title="Animation Growth Rate" | ||
:value="88.265" | ||
suffix="%" | ||
:content-style="{ color: '#3f8600' }" | ||
:value-from="0" | ||
:start="start" | ||
:animation-duration="5000" | ||
animation | ||
> | ||
</d-statistic> | ||
></d-statistic> | ||
</d-card> | ||
</d-col> | ||
<d-col :span="12"> | ||
<d-card> | ||
<d-statistic | ||
title="Animation Decline Rate" | ||
value="53.333" | ||
:precision="0" | ||
suffix="%" | ||
class="demo-class" | ||
:content-style="{ color: '#cf1322' }" | ||
value="53" | ||
:precision="3" | ||
:value-from="0" | ||
:start="controlStart" | ||
animation | ||
> | ||
<template #suffix> | ||
<span>%</span> | ||
<d-button @click="controlStart = true">Start</d-button> | ||
</template> | ||
</d-statistic> | ||
<d-button @click="controlStart = true">Start</d-button> | ||
</d-card> | ||
</d-col> | ||
</d-row> | ||
|
@@ -120,10 +106,10 @@ export default { | |
data() { | ||
return { | ||
start: true, | ||
controlStart: false, | ||
}; | ||
}, | ||
}; | ||
controlStart: false | ||
} | ||
} | ||
} | ||
</script> | ||
``` | ||
|
||
|
@@ -144,9 +130,7 @@ export default { | |
:showGroupSeparator="true" | ||
style="margin-right: 50px" | ||
> | ||
<template #suffix> | ||
% | ||
</template> | ||
<template #suffix>%</template> | ||
</d-statistic> | ||
</d-col> | ||
<d-col :span="12"> | ||
|
@@ -162,23 +146,58 @@ export default { | |
|
||
::: | ||
|
||
### 自定义样式 | ||
|
||
<<<<<<< HEAD | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 嗯嗯 不好意思 |
||
提供自定义属性方便添加样式 | ||
:::demo | ||
|
||
```vue | ||
<template> | ||
<d-row :gutter="16"> | ||
<d-col :span="12"> | ||
<d-statistic | ||
title="Custom Style" | ||
:value="88" | ||
:content-style="{ color: '#fba' }" | ||
:title-style="{ color: '#abf' }" | ||
> | ||
<template #suffix>%</template> | ||
</d-statistic> | ||
</d-col> | ||
<d-col :span="12"> | ||
<d-statistic | ||
title="Scale" | ||
:value="5000" | ||
group-separator="." | ||
:precision="3" | ||
prefix="$" | ||
:content-style="{ fontSize: '30px', color: 'red'}" | ||
> | ||
</d-col> | ||
</d-row> | ||
</template> | ||
``` | ||
|
||
::: | ||
|
||
### d-statistic | ||
|
||
| 参数 | 类型 | 默认 | 说明 | | ||
| :---: | :---: | :---: | :---: | | ||
| title | `string \| v-slot` | - | 数值的标题 | | ||
| extra | `string \| v-slot` | - | 额外内容 | | ||
| value | `number \| string` | - | 数值内容 | | ||
| group-separator | `string` | - | 设置千分位标识符 | | ||
| precision | `number` | - | 设置数值精度 | | ||
| suffix | `string \| v-slot` | - | 设置数值的后缀 | | ||
| prefix | `string \| v-slot` | - | 设置数值的前缀 | | ||
| title-style | `style` | - | 标题样式 | | ||
| content-style | `style` | - | 内容样式 | | ||
| animation-duration | `number` | 2000 | 动画持续时间 | | ||
| delay | `number` | 0 | 延迟进行动画时间 | | ||
| value-from | `number` | 0 | 动画初始值 | | ||
| animation | `boolean` | false | 是否开启动画 | | ||
| easing | `string` | quartOut | 数字动画效果 | | ||
| start | `boolean` | false | 是否开始动画 | | ||
| 参数 | 类型 | 默认 | 说明 | | ||
| :----------------: | :----------------: | :------: | :--------------: | | ||
| title | `string \| v-slot` | - | 数值的标题 | | ||
| extra | `string \| v-slot` | - | 额外内容 | | ||
| value | `number \| string` | - | 数值内容 | | ||
| group-separator | `string` | - | 设置千分位标识符 | | ||
| precision | `number` | - | 设置数值精度 | | ||
| suffix | `string \| v-slot` | - | 设置数值的后缀 | | ||
| prefix | `string \| v-slot` | - | 设置数值的前缀 | | ||
| title-style | `style` | - | 标题样式 | | ||
| content-style | `style` | - | 内容样式 | | ||
| animation-duration | `number` | 2000 | 动画持续时间 | | ||
| delay | `number` | 0 | 延迟进行动画时间 | | ||
| value-from | `number` | 0 | 动画初始值 | | ||
| animation | `boolean` | false | 是否开启动画 | | ||
| easing | `string` | quartOut | 数字动画效果 | | ||
| start | `boolean` | false | 是否开始动画 | | ||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.