Skip to content
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

feat(progress): [progress] The progress example is added to adapt to the new specifications and additional features. #2315

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { ref } from 'vue'
import { Progress as TinyProgress, Button as TinyButton } from '@opentiny/vue'

const percentageText = ref(60)
const testInside = ref(true)
const testInside = ref(false)
const showTest = ref(true)

function formatText() {
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/progress/format-text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
return {
showTest: true,
percentageText: 60,
testInside: true
testInside: false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<template>
<tiny-button @click="add">增加</tiny-button>
<tiny-progress type="circle" :percentage="percentage" status="exception" :width="150"></tiny-progress>
<tiny-progress type="dashboard" :percentage="percentage" :color="customColors" :width="300"> </tiny-progress>
<tiny-progress type="circle" :percentage="percentage" status="exception" :width="124"></tiny-progress>
<tiny-progress type="dashboard" :percentage="percentage" status="success" :color="customColors" :width="124">
</tiny-progress>
</template>

<script setup lang="jsx">
import { ref } from 'vue'
import { Progress as TinyProgress, Button as TinyButton } from '@opentiny/vue'

const percentage = ref(10)
const percentage = ref(50)
const customColors = ref([
{ color: '#f56c6c', percentage: 20 },
{ color: '#e6a23c', percentage: 40 },
Expand Down
7 changes: 4 additions & 3 deletions examples/sites/demos/pc/app/progress/progress-type-circle.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<template>
<div>
<tiny-button @click="add">增加</tiny-button>
<tiny-progress type="circle" :percentage="percentage" status="exception" :width="150"></tiny-progress>
<tiny-progress type="dashboard" :percentage="percentage" :color="customColors" :width="300"> </tiny-progress>
<tiny-progress type="circle" :percentage="percentage" status="exception" :width="124"></tiny-progress>
<tiny-progress type="dashboard" :percentage="percentage" status="success" :color="customColors" :width="124">
</tiny-progress>
</div>
</template>

Expand All @@ -16,7 +17,7 @@ export default {
},
data() {
return {
percentage: 10,
percentage: 50,
customColors: [
{ color: '#f56c6c', percentage: 20 },
{ color: '#e6a23c', percentage: 40 },
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/progress/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// warning状态横向条已完成背景色
--tv-Progress-bg-color-warning: var(--tv-color-warn-bg, #ff8800);
// exception状态横向条已完成背景色
--tv-Progress-bg-color-exception: #c7000b;
--tv-Progress-bg-color-exception: var(--tv-color-error-bg, #f23030);

/** 横向条右侧文字场景 */
// 横向条右侧文字左外边距
Expand Down
Loading