2021-12-29 16:44:43 +00:00
|
|
|
::: anchor
|
|
|
|
:::
|
|
|
|
|
2022-03-16 16:04:27 +00:00
|
|
|
|
|
|
|
::: title 基本介绍
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: describe 高级 Web 日历组件,完全开源无偿且颜值与功能兼备,足以应对日期相关的各种业务场景。
|
|
|
|
:::
|
|
|
|
|
2021-12-20 16:37:21 +00:00
|
|
|
::: title 基础使用
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
2022-03-16 16:04:27 +00:00
|
|
|
<lay-date-picker v-model="endTime"></lay-date-picker>
|
2021-12-20 16:37:21 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2022-03-15 14:44:07 +00:00
|
|
|
const endTime = ref("2022-03-04 17:35:00");
|
|
|
|
|
2021-12-20 16:37:21 +00:00
|
|
|
return {
|
2022-03-15 14:44:07 +00:00
|
|
|
endTime
|
2021-12-20 16:37:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
2022-01-12 06:19:06 +00:00
|
|
|
|
2022-03-20 06:54:36 +00:00
|
|
|
::: title 日期时间
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
2022-03-31 15:40:07 +00:00
|
|
|
<lay-date-picker type="datetime" v-model="endTime2"></lay-date-picker>
|
2022-03-20 06:54:36 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2022-03-31 15:40:07 +00:00
|
|
|
const endTime2 = ref("2022-03-04 17:35:00");
|
2022-03-20 06:54:36 +00:00
|
|
|
|
|
|
|
return {
|
2022-03-31 15:40:07 +00:00
|
|
|
endTime2
|
2022-03-20 06:54:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2022-03-29 09:28:14 +00:00
|
|
|
::: title 年份选择
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
2022-03-31 15:40:07 +00:00
|
|
|
<lay-date-picker type="year" v-model="endTime3"></lay-date-picker>
|
2022-03-29 09:28:14 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2022-03-31 15:40:07 +00:00
|
|
|
const endTime3 = ref("2022-03-04 17:35:00");
|
2022-03-29 09:28:14 +00:00
|
|
|
|
|
|
|
return {
|
2022-03-31 15:40:07 +00:00
|
|
|
endTime3
|
2022-03-29 09:28:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: title 月份选择
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
2022-03-31 15:40:07 +00:00
|
|
|
<lay-date-picker type="month" v-model="endTime4"></lay-date-picker>
|
2022-03-29 09:28:14 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2022-03-31 15:40:07 +00:00
|
|
|
const endTime4 = ref("2022-03-04 17:35:00");
|
2022-03-29 09:28:14 +00:00
|
|
|
|
|
|
|
return {
|
2022-03-31 15:40:07 +00:00
|
|
|
endTime4
|
2022-03-29 09:28:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2022-04-01 17:25:05 +00:00
|
|
|
::: title 时间选择
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-date-picker type="time" v-model="endTime4"></lay-date-picker>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const endTime4 = ref("2022-03-04 17:35:00");
|
|
|
|
|
|
|
|
return {
|
|
|
|
endTime4
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
2022-03-18 06:48:38 +00:00
|
|
|
|
2022-04-01 19:43:12 +00:00
|
|
|
::: title Date Picker 属性
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: table
|
|
|
|
|
|
|
|
| 属性 | 描述 | 类型 | 默认值 | 可选值 |
|
|
|
|
| ------------- | ------------------------------------------------------------ | -------------- | ------ | -------------- |
|
|
|
|
| v-model | 当前时间 | `string` | -- | — |
|
|
|
|
| type | 选择类型 | `string` | `date` | `date` `datetime` `year` `month` `time` |
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2022-03-18 06:48:38 +00:00
|
|
|
::: previousNext transfer
|
2022-01-12 06:19:06 +00:00
|
|
|
:::
|