mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
docs(components): [date-picker] better presentation (#10781)
This commit is contained in:
parent
31b5b92edd
commit
2e706e639d
@ -1,11 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-radio-group v-model="size" label="size control">
|
||||
<el-radio-button label="large">large</el-radio-button>
|
||||
<el-radio-button label="default">default</el-radio-button>
|
||||
<el-radio-button label="small">small</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-radio-group v-model="size" label="size control" size="small">
|
||||
<el-radio-button label="large">large</el-radio-button>
|
||||
<el-radio-button label="default">default</el-radio-button>
|
||||
<el-radio-button label="small">small</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div class="demo-date-picker">
|
||||
<div class="block">
|
||||
<span class="demonstration">Default</span>
|
||||
@ -37,7 +35,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const size = ref<'' | 'large' | 'small'>('')
|
||||
const size = ref<'default' | 'large' | 'small'>('default')
|
||||
|
||||
const value1 = ref('')
|
||||
const value2 = ref('')
|
||||
@ -72,6 +70,7 @@ const shortcuts = [
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.demo-date-picker {
|
||||
display: flex;
|
||||
@ -79,15 +78,18 @@ const shortcuts = [
|
||||
padding: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.demo-date-picker .block {
|
||||
padding: 30px 0;
|
||||
text-align: center;
|
||||
border-right: solid 1px var(--el-border-color);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.demo-date-picker .block:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.demo-date-picker .demonstration {
|
||||
display: block;
|
||||
color: var(--el-text-color-secondary);
|
||||
|
@ -1,11 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-radio-group v-model="size" label="size control">
|
||||
<el-radio-button label="large">large</el-radio-button>
|
||||
<el-radio-button label="default">default</el-radio-button>
|
||||
<el-radio-button label="small">small</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-radio-group v-model="size" label="size control" size="small">
|
||||
<el-radio-button label="large">large</el-radio-button>
|
||||
<el-radio-button label="default">default</el-radio-button>
|
||||
<el-radio-button label="small">small</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div class="demo-date-picker">
|
||||
<div class="block">
|
||||
<span class="demonstration">Default</span>
|
||||
@ -33,7 +31,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const size = ref<'' | 'large' | 'small'>('')
|
||||
const size = ref<'default' | 'large' | 'small'>('default')
|
||||
|
||||
const value1 = ref('')
|
||||
const value2 = ref('')
|
||||
@ -65,6 +63,7 @@ const disabledDate = (time: Date) => {
|
||||
return time.getTime() > Date.now()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.demo-date-picker {
|
||||
display: flex;
|
||||
@ -72,15 +71,18 @@ const disabledDate = (time: Date) => {
|
||||
padding: 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.demo-date-picker .block {
|
||||
padding: 30px 0;
|
||||
text-align: center;
|
||||
border-right: solid 1px var(--el-border-color);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.demo-date-picker .block:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.demo-date-picker .demonstration {
|
||||
display: block;
|
||||
color: var(--el-text-color-secondary);
|
||||
|
Loading…
Reference in New Issue
Block a user