Skip to content

Commit d552790

Browse files
committed
fix: 解决格式化出现undefined的BUG,并增加了showAnimation属性
1 parent 2f991ed commit d552790

File tree

7 files changed

+9
-14
lines changed

7 files changed

+9
-14
lines changed

packages/devui-vue/devui/time-picker/src/components/popup-line/index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
height: 256px;
99
border-bottom: 1px solid $devui-dividing-line;
1010
display: flex;
11-
1211
.time-item {
1312
height: 100%;
1413
display: inline-block;

packages/devui-vue/devui/time-picker/src/components/popup-line/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export default defineComponent({
5353
timeListDom,
5454
)
5555

56-
5756
const setOutoTime = (time:string)=>{
5857
resetTimeValue(time)
5958
}

packages/devui-vue/devui/time-picker/src/components/time-popup/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
display: flex;
3131
justify-content: space-between;
3232
align-items: center;
33-
}
33+
}

packages/devui-vue/devui/time-picker/src/components/time-scroll/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,5 @@ export default defineComponent({
6060
</>
6161
)
6262
}
63-
6463
}
6564
})

packages/devui-vue/devui/time-picker/src/composables/use-time-picker.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export default function useTimePicker(
3737
const mouseInIputFun = ()=>{
3838
if(firsthandActiveTime.value == '00:00:00'){
3939

40-
4140
const vModelValueArr = value.split(':')
4241
const minTimeValueArr = minTime.split(':')
4342

@@ -48,13 +47,11 @@ export default function useTimePicker(
4847
if( vModeValue.value > minTime ){
4948
firsthandActiveTime.value = value
5049
setInputValue(vModelValueArr[0],vModelValueArr[1],vModelValueArr[2])
51-
5250
}else{
5351
firsthandActiveTime.value = minTime
5452
setInputValue(minTimeValueArr[0],minTimeValueArr[1],minTimeValueArr[2])
5553
}
5654
}
57-
5855
isActive.value = true
5956
showPopup.value = true
6057
}

packages/devui-vue/devui/time-picker/src/time-picker-types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,4 @@ export const timePickerProps = {
4040
}
4141
} as const;
4242

43-
4443
export type TimePickerProps = ExtractPropTypes<typeof timePickerProps>;

packages/devui-vue/docs/components/time-picker/index.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,29 +86,30 @@
8686
</div>
8787
<div>
8888
<h4 class='my-10'>mm:HH:ss</h4>
89-
<d-time-picker format='mm:HH:ss' v-model="vModelValues"/>
89+
<d-time-picker format='mm:HH:ss' v-model="vModelValueFirst"/>
9090
</div>
9191
<div>
9292
<h4 class='my-10'>hh:mm</h4>
93-
<d-time-picker format='hh:mm' v-model="vModelValues"/>
93+
<d-time-picker format='hh:mm'/>
9494
</div>
9595
<div>
9696
<h4 class='my-10'>MM:ss</h4>
97-
<d-time-picker format='MM:ss' v-model="vModelValues"/>
97+
<d-time-picker format='MM:ss'/>
9898
</div>
9999
</template>
100100
<script>
101101
import { ref,defineComponent,watch } from 'vue'
102102
export default defineComponent({
103103
setup(props,ctx){
104-
let vModelValues = ref('23:30:20')
104+
let vModelValueFirst = ref('23:10:20')
105+
105106
106-
watch(vModelValues,(newValue,oldValue)=>{
107+
watch(vModelValueFirst,(newValue,oldValue)=>{
107108
console.log(newValue,oldValue)
108109
})
109110
110111
return{
111-
vModelValues
112+
vModelValueFirst
112113
}
113114
}
114115
})
@@ -241,6 +242,7 @@ d-time-picker 参数
241242
|minTime / min-time|string|'00:00:00'|可选,限制最小可选时间|[格式化](#时间区间限制)|
242243
|maxTime / max-time|string|'23:59:59'|可选,限制最大可选时间|[格式化](#时间区间限制)|
243244
|customViewTemplate|TemplateRef|--|可选,自定义快捷设置时间或自定义操作区内容|[传入模板](#传入模板)|
245+
|showAnimation|boolean| true |可选,是否开启动画||
244246

245247
d-time-picker 事件
246248

0 commit comments

Comments
 (0)