diff --git a/src/components/mCountCard/index.vue b/src/components/mCountCard/index.vue index 3988658..1aa4ea7 100644 --- a/src/components/mCountCard/index.vue +++ b/src/components/mCountCard/index.vue @@ -37,14 +37,14 @@ const props = defineProps({ info: { type: Object, default: () => { - return { - icon: "", - zh: "", - en: "", - value: 0, - unit: "", - decimals: 0, - } + return { + icon: "xiaoshoujine", + zh: "2023年销售金额", + en: "Sales amount in 2023", + value: 9500, + unit: "万元", + decimals: 0, + } }, }, }) diff --git a/src/components/mCountTo/vue-countTo.vue b/src/components/mCountTo/vue-countTo.vue index beb9944..86f7dbd 100644 --- a/src/components/mCountTo/vue-countTo.vue +++ b/src/components/mCountTo/vue-countTo.vue @@ -12,10 +12,10 @@ export default { required: false, default: 0, }, - endVal: { - type: Number, - required: false, - default: 0, + endVal: { + type: Number, + required: false, + default: 2017, }, duration: { type: Number, diff --git a/src/components/mSvglineAnimation/index.vue b/src/components/mSvglineAnimation/index.vue index 82999bd..15203b0 100644 --- a/src/components/mSvglineAnimation/index.vue +++ b/src/components/mSvglineAnimation/index.vue @@ -37,11 +37,9 @@ * @property {Number} begin 路径开始的位置 * @property {Number} dir 路径移动方向 [0,1]-正向 [1,0]-反向 * @property {Number} strokeWidth 路径的粗细 - * @property {String} color 路径的颜色 - */ -let svgLineUid = 0 - -export default { + * @property {String} color 路径的颜色 + */ +export default { name: "SvglineAnimation", props: { width: { @@ -80,15 +78,20 @@ export default { type: Number, default: 4, }, - }, - data() { - const uid = ++svgLineUid - return { - maskId: "svgline-" + uid, - radialGradientId: "radialGradient-" + uid, - } - }, -} + }, + data() { + let uid = 1 + return { + maskId: "svgline-" + uid, + radialGradientId: "radialGradient-" + uid, + } + }, + mounted() { + let uid = this._.uid + this.maskId = "svgline-" + uid + this.radialGradientId = "radialGradient-" + uid + }, +}