Skip to content

Commit 22f5fe1

Browse files
committed
chore(rate): 修复eslint问题
1 parent 1ea8388 commit 22f5fe1

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

packages/devui-vue/devui/progress/src/progress-types.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
import { ExtractPropTypes } from 'vue';
22

3-
export interface SvgData {
3+
interface ISvgPath {
4+
stroke: string;
5+
strokeDasharray: string;
6+
strokeDashoffset: string;
7+
transition: string;
8+
}
9+
10+
export interface ISvgData {
411
pathString: string;
5-
trailPath: any;
6-
strokePath: any;
12+
trailPath: ISvgPath;
13+
strokePath: ISvgPath;
714
}
815

916
export const progressProps = {

packages/devui-vue/devui/progress/src/progress.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineComponent, reactive, toRefs, watch } from 'vue';
2-
import { ProgressProps, progressProps, SvgData } from './progress-types';
2+
import { ProgressProps, progressProps, ISvgData } from './progress-types';
33
import './progress.scss';
44

55
export default defineComponent({
@@ -8,7 +8,7 @@ export default defineComponent({
88
setup(props: ProgressProps) {
99
const { height, percentage, percentageText, barBgColor, isCircle, strokeWidth, showContent } = toRefs(props);
1010

11-
const data: SvgData = reactive({
11+
const data: ISvgData = reactive({
1212
pathString: '',
1313
trailPath: null,
1414
strokePath: null,

packages/devui-vue/devui/rate/src/rate.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export default defineComponent({
77
props: rateProps,
88
emits: ['change', 'update:modelValue'],
99
setup(props: RateProps, ctx) {
10-
const totalLevelArray = reactive<Record<string, any>[]>([]);
10+
const totalLevelArray = reactive<{
11+
width: string;
12+
}[]>([]);
1113
const chooseValue = ref(0);
1214

1315
// 根据mouseMove,mouseLeave,select等操作,改变颜色与是否选中
@@ -117,7 +119,9 @@ export default defineComponent({
117119
xmlns-xlink="http://www.w3.org/1999/xlink">
118120
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
119121
<g fill="#E3E5E9" id="Mask">
120-
<polygon points="8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"></polygon>
122+
<polygon points="8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 \
123+
1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 \
124+
12.1847656 9.71994835 12.3262379 14.3147912"></polygon>
121125
</g>
122126
</g>
123127
</svg>
@@ -148,7 +152,9 @@ export default defineComponent({
148152
xmlns-xlink="http://www.w3.org/1999/xlink">
149153
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
150154
<g id="Mask">
151-
<polygon points="8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"></polygon>
155+
<polygon points="8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 \
156+
6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 \
157+
12.1847656 9.71994835 12.3262379 14.3147912"></polygon>
152158
</g>
153159
</g>
154160
</svg>

0 commit comments

Comments
 (0)