cr vc-upload and vc-progress
parent
08aef845d1
commit
d112e2d9a2
|
@ -20,9 +20,8 @@ Vue.use(ref, { name: 'ant-ref' });
|
||||||
|
|
||||||
const Circle = {
|
const Circle = {
|
||||||
props: initDefaultProps(circlePropTypes, circleDefaultProps),
|
props: initDefaultProps(circlePropTypes, circleDefaultProps),
|
||||||
data() {
|
created() {
|
||||||
this.paths = {};
|
this.paths = {};
|
||||||
return {};
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getPathStyles(offset, percent, strokeColor, strokeWidth, gapDegree = 0, gapPosition) {
|
getPathStyles(offset, percent, strokeColor, strokeWidth, gapDegree = 0, gapPosition) {
|
||||||
|
|
|
@ -8,9 +8,8 @@ Vue.use(ref, { name: 'ant-ref' });
|
||||||
|
|
||||||
const Line = {
|
const Line = {
|
||||||
props: initDefaultProps(propTypes, defaultProps),
|
props: initDefaultProps(propTypes, defaultProps),
|
||||||
data() {
|
created() {
|
||||||
this.paths = {};
|
this.paths = {};
|
||||||
return {};
|
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
@ -67,6 +66,7 @@ const Line = {
|
||||||
stackPtg += ptg;
|
stackPtg += ptg;
|
||||||
|
|
||||||
const pathProps = {
|
const pathProps = {
|
||||||
|
key: index,
|
||||||
attrs: {
|
attrs: {
|
||||||
d: pathString,
|
d: pathString,
|
||||||
'stroke-linecap': strokeLinecap,
|
'stroke-linecap': strokeLinecap,
|
||||||
|
|
|
@ -2,29 +2,27 @@ function enhancer(Component) {
|
||||||
return {
|
return {
|
||||||
mixins: [Component],
|
mixins: [Component],
|
||||||
updated() {
|
updated() {
|
||||||
this.$nextTick(() => {
|
const now = Date.now();
|
||||||
const now = Date.now();
|
let updated = false;
|
||||||
let updated = false;
|
|
||||||
|
|
||||||
Object.keys(this.paths).forEach(key => {
|
Object.keys(this.paths).forEach(key => {
|
||||||
const path = this.paths[key];
|
const path = this.paths[key];
|
||||||
|
|
||||||
if (!path) {
|
if (!path) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
updated = true;
|
updated = true;
|
||||||
const pathStyle = path.style;
|
const pathStyle = path.style;
|
||||||
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
|
pathStyle.transitionDuration = '.3s, .3s, .3s, .06s';
|
||||||
|
|
||||||
if (this.prevTimeStamp && now - this.prevTimeStamp < 100) {
|
if (this.prevTimeStamp && now - this.prevTimeStamp < 100) {
|
||||||
pathStyle.transitionDuration = '0s, 0s';
|
pathStyle.transitionDuration = '0s, 0s';
|
||||||
}
|
|
||||||
});
|
|
||||||
if (updated) {
|
|
||||||
this.prevTimeStamp = Date.now();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (updated) {
|
||||||
|
this.prevTimeStamp = Date.now();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ const IframeUploader = {
|
||||||
name:
|
name:
|
||||||
target.value &&
|
target.value &&
|
||||||
target.value.substring(target.value.lastIndexOf('\\') + 1, target.value.length),
|
target.value.substring(target.value.lastIndexOf('\\') + 1, target.value.length),
|
||||||
});;
|
});
|
||||||
this.startUpload();
|
this.startUpload();
|
||||||
const { $props: props } = this;
|
const { $props: props } = this;
|
||||||
if (!props.beforeUpload) {
|
if (!props.beforeUpload) {
|
||||||
|
|
Loading…
Reference in New Issue