diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/custom.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/custom.vue new file mode 100644 index 0000000000..b45d073612 --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/custom.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/disabled.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/disabled.vue new file mode 100644 index 0000000000..bd583da14d --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/disabled.vue @@ -0,0 +1,33 @@ + + diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/index.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/index.vue index 51ea8238f8..37b16ca0b5 100644 --- a/packages/nutui-taro-demo/src/dentry/pages/calendar/index.vue +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/index.vue @@ -1,386 +1,76 @@ - - diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/multiple.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/multiple.vue new file mode 100644 index 0000000000..13ad2908d5 --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/multiple.vue @@ -0,0 +1,21 @@ + + diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/range-quick.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/range-quick.vue new file mode 100644 index 0000000000..0e19029e79 --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/range-quick.vue @@ -0,0 +1,26 @@ + + diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/range.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/range.vue new file mode 100644 index 0000000000..8f06c7b00c --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/range.vue @@ -0,0 +1,25 @@ + + diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/single-quick.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/single-quick.vue new file mode 100644 index 0000000000..8ea8612eee --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/single-quick.vue @@ -0,0 +1,21 @@ + + diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/single.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/single.vue new file mode 100644 index 0000000000..bf13226a8e --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/single.vue @@ -0,0 +1,20 @@ + + diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/tiled.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/tiled.vue new file mode 100644 index 0000000000..38c25d2a78 --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/tiled.vue @@ -0,0 +1,21 @@ + + diff --git a/packages/nutui-taro-demo/src/dentry/pages/calendar/week.vue b/packages/nutui-taro-demo/src/dentry/pages/calendar/week.vue new file mode 100644 index 0000000000..3271aa349c --- /dev/null +++ b/packages/nutui-taro-demo/src/dentry/pages/calendar/week.vue @@ -0,0 +1,22 @@ + + diff --git a/src/packages/__VUE/calendar/demo.vue b/src/packages/__VUE/calendar/demo.vue deleted file mode 100644 index 8fc1b46eba..0000000000 --- a/src/packages/__VUE/calendar/demo.vue +++ /dev/null @@ -1,514 +0,0 @@ - - - - - diff --git a/src/packages/__VUE/calendar/demo/custom.vue b/src/packages/__VUE/calendar/demo/custom.vue new file mode 100644 index 0000000000..b45d073612 --- /dev/null +++ b/src/packages/__VUE/calendar/demo/custom.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/packages/__VUE/calendar/demo/disabled.vue b/src/packages/__VUE/calendar/demo/disabled.vue new file mode 100644 index 0000000000..bd583da14d --- /dev/null +++ b/src/packages/__VUE/calendar/demo/disabled.vue @@ -0,0 +1,33 @@ + + diff --git a/src/packages/__VUE/calendar/demo/index.vue b/src/packages/__VUE/calendar/demo/index.vue new file mode 100644 index 0000000000..135161bfc8 --- /dev/null +++ b/src/packages/__VUE/calendar/demo/index.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/packages/__VUE/calendar/demo/multiple.vue b/src/packages/__VUE/calendar/demo/multiple.vue new file mode 100644 index 0000000000..13ad2908d5 --- /dev/null +++ b/src/packages/__VUE/calendar/demo/multiple.vue @@ -0,0 +1,21 @@ + + diff --git a/src/packages/__VUE/calendar/demo/range-quick.vue b/src/packages/__VUE/calendar/demo/range-quick.vue new file mode 100644 index 0000000000..0e19029e79 --- /dev/null +++ b/src/packages/__VUE/calendar/demo/range-quick.vue @@ -0,0 +1,26 @@ + + diff --git a/src/packages/__VUE/calendar/demo/range.vue b/src/packages/__VUE/calendar/demo/range.vue new file mode 100644 index 0000000000..8f06c7b00c --- /dev/null +++ b/src/packages/__VUE/calendar/demo/range.vue @@ -0,0 +1,25 @@ + + diff --git a/src/packages/__VUE/calendar/demo/single-quick.vue b/src/packages/__VUE/calendar/demo/single-quick.vue new file mode 100644 index 0000000000..8ea8612eee --- /dev/null +++ b/src/packages/__VUE/calendar/demo/single-quick.vue @@ -0,0 +1,21 @@ + + diff --git a/src/packages/__VUE/calendar/demo/single.vue b/src/packages/__VUE/calendar/demo/single.vue new file mode 100644 index 0000000000..bf13226a8e --- /dev/null +++ b/src/packages/__VUE/calendar/demo/single.vue @@ -0,0 +1,20 @@ + + diff --git a/src/packages/__VUE/calendar/demo/tiled.vue b/src/packages/__VUE/calendar/demo/tiled.vue new file mode 100644 index 0000000000..1efbc053e9 --- /dev/null +++ b/src/packages/__VUE/calendar/demo/tiled.vue @@ -0,0 +1,21 @@ + + diff --git a/src/packages/__VUE/calendar/demo/week.vue b/src/packages/__VUE/calendar/demo/week.vue new file mode 100644 index 0000000000..3271aa349c --- /dev/null +++ b/src/packages/__VUE/calendar/demo/week.vue @@ -0,0 +1,22 @@ + + diff --git a/src/packages/__VUE/calendar/doc.en-US.md b/src/packages/__VUE/calendar/doc.en-US.md index a0c3c76f5f..26c26c2ee2 100644 --- a/src/packages/__VUE/calendar/doc.en-US.md +++ b/src/packages/__VUE/calendar/doc.en-US.md @@ -14,694 +14,46 @@ const app = createApp(); app.use(Calendar); ``` -### Basic Usage - -:::demo - -```vue - - -``` +### Select Single Date -::: +> demo: calendar single ### Select Date Range -:::demo - -```vue - - - -``` - -::: +> demo: calendar range ### Select Multiple Date -:::demo - -```vue - - -``` - -::: +> demo: calendar multiple ### Select Week When set to week selection, the start and end dates of the week will be determined according to `first-day-of-week`. For example, when `first-day-of-week` is 0, the start date of a week is Sunday. In other cases, the start date of the week is Monday. -:::demo - -```vue - - - -``` -::: +> demo: calendar week ### Customize the disable date By configuring the `disabled-date` function callback, you can customize to disable certain dates from being selected. When the type is `range`, if this function is set, you need to filter out the disabled date after selecting the result -:::demo - -```html - - -``` - -::: - -### Quick Select Single Date - -:::demo - -```vue - - -``` - -::: - -### Quick Select Date Range - -:::demo - -```vue - - - -``` +> demo: calendar disabled -::: +### Quick Select Single -### Custom Button +> demo: calendar single-quick -:::demo - -```vue - - - - -``` - -::: - -### Custom Date Text - -:::demo - -```vue - - - -``` +### Quick Select Range -::: - -### Custom Footer v4.1.6 - -:::demo - -```vue - - - -``` +> demo: calendar range-quick -::: - -### Custom First Day Of Week - -:::demo - -```vue - - - -``` +### Custom Button -::: +> demo: calendar custom ### Tiled Display -:::demo - -```vue - - - -``` - -::: +> demo: calendar tiled ## API diff --git a/src/packages/__VUE/calendar/doc.md b/src/packages/__VUE/calendar/doc.md index 3152caadea..0afbf792d3 100644 --- a/src/packages/__VUE/calendar/doc.md +++ b/src/packages/__VUE/calendar/doc.md @@ -14,701 +14,47 @@ const app = createApp(); app.use(Calendar); ``` -### 基础用法 - -:::demo - -```vue - - -``` +### 选择单个日期 -::: +> demo: calendar single ### 选择日期区间 -:::demo - -```vue - - - -``` - -::: +> demo: calendar range ### 选择多个日期 -:::demo - -```vue - - -``` - -::: +> demo: calendar multiple ### 选择周 -当设置为周选择时,会根据`first-day-of-week` 判断周的起始与结束日期。如`first-day-of-week`为 0 时,一周的起始日期为星期日。其他情况时,一周的起始日期为星期一。 - -:::demo - -```vue - - - -``` +当设置为周选择时,会根据 `first-day-of-week` 判断周的起始与结束日期。如 `first-day-of-week` 为 0 时,一周的起始日期为星期日。其他情况时,一周的起始日期为星期一。 -::: +> demo: calendar week ### 自定义禁用日期 -通过配置`disabled-date`函数回调可实现自定义禁用某些日期为不可选中状态。 -当type类型为`日期区间(range)`时,若是设置了该函数,则需要在选中结果后,自行过滤掉禁用的日期 - -:::demo - -```html - - -``` +通过配置 `disabled-date` 函数回调可实现自定义禁用某些日期为不可选中状态。 -::: - -### 快捷选择-单选 - -:::demo - -```vue - - -``` +当 `type` 为 `range` 时,若是设置了该函数,则需要在选中结果后,自行过滤掉禁用的日期 -::: - -### 快捷选择-范围选择 - -:::demo - -```vue - - - -``` +> demo: calendar disabled -::: - -### 自定义日历按钮 - -:::demo - -```vue - - - - -``` +### 快捷选择-单个日期 -::: - -### 自定义时间文案 - -:::demo - -```vue - - - -``` +> demo: calendar single-quick -::: - -### 自定义底部区域 v4.1.6 - -:::demo - -```vue - - - -``` +### 快捷选择-日期范围 -::: - -### 自定义周起始日 - -:::demo - -```vue - - - -``` +> demo: calendar range-quick -::: +### 自定义日历 -### 平铺展示 +> demo: calendar custom -:::demo - -```vue - - - -``` +### 平铺展示 -::: +> demo: calendar tiled ## API diff --git a/src/packages/__VUE/calendar/doc.taro.md b/src/packages/__VUE/calendar/doc.taro.md index 84ca43bad3..2ba602679c 100644 --- a/src/packages/__VUE/calendar/doc.taro.md +++ b/src/packages/__VUE/calendar/doc.taro.md @@ -14,701 +14,47 @@ const app = createApp(); app.use(Calendar); ``` -### 基础用法 - -:::demo - -```vue - - -``` +### 选择单个日期 -::: +> demo: calendar single dentry ### 选择日期区间 -:::demo - -```vue - - - -``` - -::: +> demo: calendar range dentry ### 选择多个日期 -:::demo - -```vue - - -``` - -::: +> demo: calendar multiple dentry ### 选择周 -当设置为周选择时,会根据`first-day-of-week` 判断周的起始与结束日期。如`first-day-of-week`为 0 时,一周的起始日期为星期日。其他情况时,一周的起始日期为星期一。 - -:::demo - -```vue - - - -``` +当设置为周选择时,会根据 `first-day-of-week` 判断周的起始与结束日期。如 `first-day-of-week` 为 0 时,一周的起始日期为星期日。其他情况时,一周的起始日期为星期一。 -::: +> demo: calendar week dentry ### 自定义禁用日期 -通过配置`disabled-date`函数回调可实现自定义禁用某些日期为不可选中状态。 -当type类型为`日期区间(range)`时,若是设置了该函数,则需要在选中结果后,自行过滤掉禁用的日期 - -:::demo - -```html - - -``` +通过配置 `disabled-date` 函数回调可实现自定义禁用某些日期为不可选中状态。 -::: - -### 快捷选择-单选 - -:::demo - -```vue - - -``` +当 `type` 为 `range` 时,若是设置了该函数,则需要在选中结果后,自行过滤掉禁用的日期 -::: - -### 快捷选择-范围选择 - -:::demo - -```vue - - - -``` +> demo: calendar disabled dentry -::: - -### 自定义日历按钮 - -:::demo - -```vue - - - - -``` +### 快捷选择-单个日期 -::: - -### 自定义时间文案 - -:::demo - -```vue - - - -``` +> demo: calendar single-quick dentry -::: - -### 自定义底部区域 v4.1.6 - -:::demo - -```vue - - - -``` +### 快捷选择-日期范围 -::: - -### 自定义周起始日 - -:::demo - -```vue - - - -``` +> demo: calendar range-quick dentry -::: +### 自定义日历 -### 平铺展示 +> demo: calendar custom dentry -:::demo - -```vue - - - -``` +### 平铺展示 -::: +> demo: calendar tiled dentry ## API