refactor(progress): use cssr, wip

This commit is contained in:
07akioni 2020-06-29 00:11:12 +08:00
parent 6f4642f3c6
commit 4315dbdb36
6 changed files with 55 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/* istanbul ignore file */
import Progress from './src/main.vue'
import Progress from './src/Progress.vue'
Progress.install = function (Vue) {
Vue.component(Progress.name, Progress)

View File

View File

@ -0,0 +1,27 @@
import create from '../_utils/create-component-base'
export default create({
getDerivedVariables ({ derived }) {
return {
railColor: derived.railOverlayBackgroundColor,
default: {
fillColor: derived.infoColor
},
info: {
fillColor: derived.infoColor
},
success: {
fillColor: derived.successColor
},
warning: {
fillColor: derived.warningColor
},
error: {
fillColor: derived.errorColor
},
insideIndicatorTextColor: derived.secondaryTextOverlayColor,
outsideIndicatorTextColor: 'rgb(0, 0, 0)',
processingLineBackgroundImage: 'linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)'
}
}
})

View File

@ -0,0 +1,27 @@
import create from '../_utils/create-component-base'
export default create({
getDerivedVariables ({ derived }) {
return {
railColor: derived.railOverlayBackgroundColor,
default: {
fillColor: derived.infoColor
},
info: {
fillColor: derived.infoColor
},
success: {
fillColor: derived.successColor
},
warning: {
fillColor: derived.warningColor
},
error: {
fillColor: derived.errorColor
},
insideIndicatorTextColor: derived.secondaryTextOverlayColor,
outsideIndicatorTextColor: 'rgb(255, 255, 255)',
processingLineBackgroundImage: 'linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)'
}
}
})