From 6a820e5562d495a0391198f84f0be7c8de994e7b Mon Sep 17 00:00:00 2001 From: jinpeng Date: Thu, 1 Aug 2024 14:59:56 +0800 Subject: [PATCH 1/2] feat: add typing type --- lib/utils/control.ts | 2 +- lib/utils/index.ts | 2 +- lib/vue-slider-dot.tsx | 2 +- lib/vue-slider-mark.tsx | 2 +- lib/vue-slider.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/utils/control.ts b/lib/utils/control.ts index f0dec89..c71acd1 100644 --- a/lib/utils/control.ts +++ b/lib/utils/control.ts @@ -1,5 +1,5 @@ import Decimal from './decimal' -import { +import type { Value, Mark, MarkOption, diff --git a/lib/utils/index.ts b/lib/utils/index.ts index 32a5f0c..9c18cd7 100644 --- a/lib/utils/index.ts +++ b/lib/utils/index.ts @@ -1,4 +1,4 @@ -import { Direction } from '../typings' +import type { Direction } from '../typings' interface IPosObject { x: number diff --git a/lib/vue-slider-dot.tsx b/lib/vue-slider-dot.tsx index 692c7e7..9222ace 100644 --- a/lib/vue-slider-dot.tsx +++ b/lib/vue-slider-dot.tsx @@ -1,5 +1,5 @@ import { Component, Prop, Vue } from 'vue-property-decorator' -import { Value, Styles, Position, TooltipProp, TooltipFormatter } from './typings' +import type { Value, Styles, Position, TooltipProp, TooltipFormatter } from './typings' import './styles/dot.scss' diff --git a/lib/vue-slider-mark.tsx b/lib/vue-slider-mark.tsx index 94e4962..762da21 100644 --- a/lib/vue-slider-mark.tsx +++ b/lib/vue-slider-mark.tsx @@ -1,5 +1,5 @@ import { Component, Prop, Vue } from 'vue-property-decorator' -import { Mark, Styles } from './typings' +import type { Mark, Styles } from './typings' import './styles/mark.scss' diff --git a/lib/vue-slider.tsx b/lib/vue-slider.tsx index 87faac4..28f0ead 100644 --- a/lib/vue-slider.tsx +++ b/lib/vue-slider.tsx @@ -1,5 +1,5 @@ import { Component, Model, Prop, Watch, Vue } from 'vue-property-decorator' -import { +import type { Value, DataObject, Mark, From 2a11014272f4de8bcf48bc98386e4acc8d2d6bd6 Mon Sep 17 00:00:00 2001 From: jinpeng Date: Thu, 1 Aug 2024 15:05:15 +0800 Subject: [PATCH 2/2] feat: add StateMap import type --- lib/vue-slider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vue-slider.tsx b/lib/vue-slider.tsx index 28f0ead..aabf7fe 100644 --- a/lib/vue-slider.tsx +++ b/lib/vue-slider.tsx @@ -19,10 +19,10 @@ import type { import VueSliderDot from './vue-slider-dot' import VueSliderMark from './vue-slider-mark' -import { getSize, getPos, getKeyboardHandleFunc, HandleFunction } from './utils' +import { getSize, getPos, getKeyboardHandleFunc, type HandleFunction } from './utils' import Decimal from './utils/decimal' import Control, { ERROR_TYPE } from './utils/control' -import State, { StateMap } from './utils/state' +import State, { type StateMap } from './utils/state' import './styles/slider.scss'