Skip to content

Commit

Permalink
chore: update type
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu committed Apr 8, 2024
1 parent 169973a commit e5a8a47
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/packages/__VUE/countup/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
>
<view
v-for="(val, index) of num_total_len"
:ref="(el) => setRef(el)"
:ref="(el: any) => setRef(el)"
:key="val"
class="nut-countup__number-item"
:style="{
Expand Down
8 changes: 4 additions & 4 deletions src/packages/__VUE/numberkeyboard/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
{ 'nut-key--lock': item.type == 'lock' },
{ 'nut-key--delete': item.type == 'delete' }
]"
@touchstart="(event) => onTouchstart(item, event)"
@touchmove="(event) => onTouchMove(event)"
@touchstart="(event: TouchEvent) => onTouchstart(item, event)"
@touchmove="(event: TouchEvent) => onTouchMove(event)"
@touchend="onTouchEnd"
>
<template v-if="item.type == 'number' || item.type == 'custom'">{{ item.id }}</template>
Expand All @@ -56,8 +56,8 @@
<div class="nut-key__wrapper">
<div
:class="['nut-key', { active: clickKeyIndex == 'delete' }]"
@touchstart="(event) => onTouchstart({ id: 'delete', type: 'delete' }, event)"
@touchmove="(event) => onTouchMove(event)"
@touchstart="(event: TouchEvent) => onTouchstart({ id: 'delete', type: 'delete' }, event)"
@touchmove="(event: TouchEvent) => onTouchMove(event)"
@touchend="onTouchEnd"
>
<img
Expand Down
10 changes: 5 additions & 5 deletions src/packages/__VUE/numberkeyboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
{ 'nut-key--lock': item.type == 'lock' },
{ 'nut-key--delete': item.type == 'delete' }
]"
@touchstart="(event) => onTouchstart(item, event)"
@touchmove="(event) => onTouchMove(event)"
@touchend="(event) => onTouchEnd(event)"
@touchstart="(event: TouchEvent) => onTouchstart(item, event)"
@touchmove="(event: TouchEvent) => onTouchMove(event)"
@touchend="(event: TouchEvent) => onTouchEnd(event)"
>
<template v-if="item.type == 'number' || item.type == 'custom'">{{ item.id }}</template>
<img
Expand All @@ -55,8 +55,8 @@
<div class="nut-key__wrapper">
<div
:class="['nut-key', { active: clickKeyIndex == 'delete' }]"
@touchstart="(event) => onTouchstart({ id: 'delete', type: 'delete' }, event)"
@touchmove="(event) => onTouchMove(event)"
@touchstart="(event: TouchEvent) => onTouchstart({ id: 'delete', type: 'delete' }, event)"
@touchmove="(event: TouchEvent) => onTouchMove(event)"
@touchend="onTouchEnd"
>
<img
Expand Down
8 changes: 4 additions & 4 deletions src/packages/__VUE/range/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
:aria-valuemax="+max"
aria-orientation="horizontal"
@touchstart="
(e) => {
(e: TouchEvent) => {
if (typeof index === 'number') {
// 实时更新当前拖动的按钮索引
buttonIndex = index
Expand All @@ -38,7 +38,7 @@
@touchmove="onTouchMove"
@touchend="onTouchEnd"
@touchcancel="onTouchEnd"
@click="(e) => e.stopPropagation()"
@click="(e: Event) => e.stopPropagation()"
>
<slot v-if="$slots.button" name="button"></slot>
<view v-else class="nut-range-button" :style="buttonStyle">
Expand All @@ -57,14 +57,14 @@
aria-orientation="horizontal"
:catch-move="true"
@touchstart="
(e) => {
(e: TouchEvent) => {
onTouchStart(e)
}
"
@touchmove="onTouchMove"
@touchend="onTouchEnd"
@touchcancel="onTouchEnd"
@click="(e) => e.stopPropagation()"
@click="(e: Event) => e.stopPropagation()"
>
<slot v-if="$slots.button" name="button"></slot>
<view v-else class="nut-range-button" :style="buttonStyle">
Expand Down
8 changes: 4 additions & 4 deletions src/packages/__VUE/range/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
:aria-valuemax="+max"
aria-orientation="horizontal"
@touchstart.stop.prevent="
(e) => {
(e: TouchEvent) => {
if (typeof index === 'number') {
// 实时更新当前拖动的按钮索引
buttonIndex = index
Expand All @@ -35,7 +35,7 @@
@touchmove.stop.prevent="onTouchMove"
@touchend.stop.prevent="onTouchEnd"
@touchcancel.stop.prevent="onTouchEnd"
@click="(e) => e.stopPropagation()"
@click="(e: Event) => e.stopPropagation()"
>
<slot v-if="$slots.button" name="button"></slot>
<view v-else class="nut-range-button" :style="buttonStyle">
Expand All @@ -53,14 +53,14 @@
:aria-valuemax="+max"
aria-orientation="horizontal"
@touchstart.stop.prevent="
(e) => {
(e: TouchEvent) => {
onTouchStart(e)
}
"
@touchmove.stop.prevent="onTouchMove"
@touchend.stop.prevent="onTouchEnd"
@touchcancel.stop.prevent="onTouchEnd"
@click="(e) => e.stopPropagation()"
@click="(e: Event) => e.stopPropagation()"
>
<slot v-if="$slots.button" name="button"></slot>
<view v-else class="nut-range-button" :style="buttonStyle">
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/tabs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<view
v-for="(item, index) in titles"
:key="item.paneKey"
:ref="(e) => setTabItemRef(e as HTMLElement, index)"
:ref="(e: any) => setTabItemRef(e as HTMLElement, index)"
class="nut-tabs__titles-item"
:style="titleStyle"
:class="{
Expand Down

0 comments on commit e5a8a47

Please sign in to comment.