Skip to content

Commit

Permalink
feat(date-picker): [date-picker]Optimize case display and fix style i…
Browse files Browse the repository at this point in the history
…ssues
  • Loading branch information
Youyou-smiles committed Oct 24, 2024
1 parent 2d47f95 commit b8f097c
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ const value = ref('')

<style scoped>
.demo-date-picker-wrap {
width: 350px;
width: 280px;
}
</style>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/date-picker/align.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export default {

<style scoped>
.demo-date-picker-wrap {
width: 350px;
width: 280px;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const yearValue = ref('')

<style scoped lang="less">
.demo-date-picker-wrap {
width: 360px;
& > * {
margin-top: 12px;
}
Expand Down
1 change: 1 addition & 0 deletions examples/sites/demos/pc/app/date-picker/date-range.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default {

<style scoped lang="less">
.demo-date-picker-wrap {
width: 360px;
& > * {
margin-top: 12px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</tiny-col>
</tiny-row>
<tiny-row>
<tiny-col :span="12">
<tiny-col :span="6">
<label class="demo-date-picker-label">onPick:</label>
<tiny-date-picker v-model="valueOnPick" type="daterange" :picker-options="pickerOptions"></tiny-date-picker>
</tiny-col>
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/date-picker/events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</tiny-col>
</tiny-row>
<tiny-row>
<tiny-col :span="12">
<tiny-col :span="6">
<label class="demo-date-picker-label">onPick:</label>
<tiny-date-picker v-model="valueOnPick" type="daterange" :picker-options="pickerOptions"></tiny-date-picker>
</tiny-col>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<div style="width: 400px">
<div class="demo-date-picker">
<div class="title">插槽式:</div>
<tiny-date-picker v-model="value1" type="datetime">
<template #now>
Expand All @@ -9,7 +9,7 @@
</tiny-date-picker>
</div>

<div style="width: 400px">
<div class="demo-date-picker">
<div class="title">函数式:</div>
<tiny-date-picker v-model="value2" type="datetime" :now-click="nowClick"> </tiny-date-picker>
</div>
Expand Down Expand Up @@ -37,6 +37,9 @@ const now = () => {
</script>

<style scoped>
.demo-date-picker {
width: 280px;
}
.nowclass {
display: inline-flex;
height: 28px;
Expand Down
7 changes: 5 additions & 2 deletions examples/sites/demos/pc/app/date-picker/now.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<div style="width: 400px">
<div class="demo-date-picker">
<div class="title">插槽式:</div>
<tiny-date-picker v-model="value1" type="datetime">
<template #now>
Expand All @@ -9,7 +9,7 @@
</tiny-date-picker>
</div>

<div style="width: 400px">
<div class="demo-date-picker">
<div class="title">函数式:</div>
<tiny-date-picker v-model="value2" type="datetime" :now-click="nowClick"> </tiny-date-picker>
</div>
Expand Down Expand Up @@ -45,6 +45,9 @@ export default {
</script>

<style scoped>
.demo-date-picker {
width: 280px;
}
.nowclass {
display: inline-flex;
height: 28px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ function selectChange(tz) {
Modal.message({ message: `当前值为 ${tz.tz.name}`, status: 'info' })
}
</script>

<style scoped>
.demo-date-picker-wrap {
width: 280px;
}
</style>
4 changes: 3 additions & 1 deletion packages/theme/src/date-table/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@
div {
margin-left: 4px;
margin-right: 4px;
background-color: var(--tv-DateTable-td-bg-color-range-selected);
}

span {
Expand All @@ -242,6 +241,9 @@
background-color: var(--tv-DateTable-bg-color-current-select);
}
}
&.selected.in-range {
background-color: var(--tv-DateTable-td-bg-color-range-selected);
}

&.week {
font-size: 80%;
Expand Down

0 comments on commit b8f097c

Please sign in to comment.