diff --git a/packages/nutui-taro-demo/src/exhibition/pages/countdown/basic.vue b/packages/nutui-taro-demo/src/exhibition/pages/countdown/basic.vue new file mode 100644 index 0000000000..093d6cb920 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/countdown/basic.vue @@ -0,0 +1,8 @@ + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/countdown/control.vue b/packages/nutui-taro-demo/src/exhibition/pages/countdown/control.vue new file mode 100644 index 0000000000..3bfe55d856 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/countdown/control.vue @@ -0,0 +1,21 @@ + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/countdown/custom.vue b/packages/nutui-taro-demo/src/exhibition/pages/countdown/custom.vue new file mode 100644 index 0000000000..fadf5cebfe --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/countdown/custom.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/countdown/format.vue b/packages/nutui-taro-demo/src/exhibition/pages/countdown/format.vue new file mode 100644 index 0000000000..09c1c487de --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/countdown/format.vue @@ -0,0 +1,7 @@ + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/countdown/index.vue b/packages/nutui-taro-demo/src/exhibition/pages/countdown/index.vue index bdf0aafbfd..14cb181500 100644 --- a/packages/nutui-taro-demo/src/exhibition/pages/countdown/index.vue +++ b/packages/nutui-taro-demo/src/exhibition/pages/countdown/index.vue @@ -1,140 +1,50 @@ - - diff --git a/packages/nutui-taro-demo/src/exhibition/pages/countdown/millisecond.vue b/packages/nutui-taro-demo/src/exhibition/pages/countdown/millisecond.vue new file mode 100644 index 0000000000..6b39f87995 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/countdown/millisecond.vue @@ -0,0 +1,7 @@ + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/countdown/ref.vue b/packages/nutui-taro-demo/src/exhibition/pages/countdown/ref.vue new file mode 100644 index 0000000000..399ad65fbd --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/countdown/ref.vue @@ -0,0 +1,21 @@ + + diff --git a/src/packages/__VUE/countdown/demo.vue b/src/packages/__VUE/countdown/demo.vue deleted file mode 100644 index caaa0d076a..0000000000 --- a/src/packages/__VUE/countdown/demo.vue +++ /dev/null @@ -1,186 +0,0 @@ - - - - - diff --git a/src/packages/__VUE/countdown/demo/basic.vue b/src/packages/__VUE/countdown/demo/basic.vue new file mode 100644 index 0000000000..093d6cb920 --- /dev/null +++ b/src/packages/__VUE/countdown/demo/basic.vue @@ -0,0 +1,8 @@ + + + diff --git a/src/packages/__VUE/countdown/demo/control.vue b/src/packages/__VUE/countdown/demo/control.vue new file mode 100644 index 0000000000..3bfe55d856 --- /dev/null +++ b/src/packages/__VUE/countdown/demo/control.vue @@ -0,0 +1,21 @@ + + diff --git a/src/packages/__VUE/countdown/demo/custom.vue b/src/packages/__VUE/countdown/demo/custom.vue new file mode 100644 index 0000000000..fadf5cebfe --- /dev/null +++ b/src/packages/__VUE/countdown/demo/custom.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/packages/__VUE/countdown/demo/format.vue b/src/packages/__VUE/countdown/demo/format.vue new file mode 100644 index 0000000000..09c1c487de --- /dev/null +++ b/src/packages/__VUE/countdown/demo/format.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/packages/__VUE/countdown/demo/index.vue b/src/packages/__VUE/countdown/demo/index.vue new file mode 100644 index 0000000000..8964685801 --- /dev/null +++ b/src/packages/__VUE/countdown/demo/index.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/packages/__VUE/countdown/demo/millisecond.vue b/src/packages/__VUE/countdown/demo/millisecond.vue new file mode 100644 index 0000000000..6b39f87995 --- /dev/null +++ b/src/packages/__VUE/countdown/demo/millisecond.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/packages/__VUE/countdown/demo/ref.vue b/src/packages/__VUE/countdown/demo/ref.vue new file mode 100644 index 0000000000..399ad65fbd --- /dev/null +++ b/src/packages/__VUE/countdown/demo/ref.vue @@ -0,0 +1,21 @@ + + diff --git a/src/packages/__VUE/countdown/doc.en-US.md b/src/packages/__VUE/countdown/doc.en-US.md index 2e01800bbc..8a47870315 100644 --- a/src/packages/__VUE/countdown/doc.en-US.md +++ b/src/packages/__VUE/countdown/doc.en-US.md @@ -16,217 +16,31 @@ app.use(Countdown); ### Basic Usage -:::demo +> demo: countdown basic -```vue - - - -``` - -::: - -### 自定义格式 +### Format Different countdown display text can be realized by setting the `format` attribute. -:::demo - -```vue - - - -``` - -::: +> demo: countdown format ### Millisecond -:::demo - -```vue - - - -``` - -::: - -### Server Time Prevails - -:::demo - -```vue - - - -``` - -::: - -### End-Time of Asyn Update - -:::demo - -```vue - - - -``` - -::: +> demo: countdown millisecond ### Manual Control Paused and restarted the countdown with the `paused` attribute -:::demo - -```vue - - -``` - -::: +> demo: countdown control ### Custom Style -:::demo - -```vue - - - -``` +> demo: countdown custom -::: - -### Handle Control - -:::demo - -```vue - - -``` +### Ref Methods -::: +> demo: countdown ref ## API diff --git a/src/packages/__VUE/countdown/doc.md b/src/packages/__VUE/countdown/doc.md index 428174e3d5..70f3f387bf 100644 --- a/src/packages/__VUE/countdown/doc.md +++ b/src/packages/__VUE/countdown/doc.md @@ -16,219 +16,33 @@ app.use(Countdown); ### 基础用法 -:::demo - -```vue - - - -``` - -::: +> demo: countdown basic ### 自定义格式 通过设置 `format` 属性可实现不同的倒计时展示文本 -:::demo - -```vue - - - -``` - -::: +> demo: countdown format ### 毫秒级渲染 -:::demo - -```vue - - - -``` - -::: - -### 以服务端的时间为准 - -:::demo - -```vue - - - -``` - -::: - -### 异步更新结束时间 - -:::demo - -```vue - - - -``` - -::: +> demo: countdown millisecond ### 控制开始和暂停倒计时 通过 `paused` 属性实现倒计时的暂停和重启 -:::demo - -```vue - - -``` - -::: +> demo: countdown control ### 自定义展示样式 -:::demo - -```vue - - - -``` +> demo: countdown custom -::: - -### 手动控制 +### Ref 方法 通过 `ref` 获取到组件实例后,可以调用 `start`、`pause`、`reset` 方法。在使用手动控制时,通过 `time` 属性实现倒计时总时长,单位为毫秒。`start-time`、`end-time` 属性失效 -:::demo - -```vue - - -``` - -::: +> demo: countdown ref ## API diff --git a/src/packages/__VUE/countdown/doc.taro.md b/src/packages/__VUE/countdown/doc.taro.md index ca951c5b4f..7fbd90d6d8 100644 --- a/src/packages/__VUE/countdown/doc.taro.md +++ b/src/packages/__VUE/countdown/doc.taro.md @@ -16,219 +16,33 @@ app.use(Countdown); ### 基础用法 -:::demo - -```vue - - - -``` - -::: +> demo: countdown basic exhibition ### 自定义格式 通过设置 `format` 属性可实现不同的倒计时展示文本 -:::demo - -```vue - - - -``` - -::: +> demo: countdown format exhibition ### 毫秒级渲染 -:::demo - -```vue - - - -``` - -::: - -### 以服务端的时间为准 - -:::demo - -```vue - - - -``` - -::: - -### 异步更新结束时间 - -:::demo - -```vue - - - -``` - -::: +> demo: countdown millisecond exhibition ### 控制开始和暂停倒计时 通过 `paused` 属性实现倒计时的暂停和重启 -:::demo - -```vue - - -``` - -::: +> demo: countdown control exhibition ### 自定义展示样式 -:::demo - -```vue - - - -``` +> demo: countdown custom exhibition -::: - -### 手动控制 +### Ref 方法 通过 `ref` 获取到组件实例后,可以调用 `start`、`pause`、`reset` 方法。在使用手动控制时,通过 `time` 属性实现倒计时总时长,单位为毫秒。`start-time`、`end-time` 属性失效 -:::demo - -```vue - - -``` - -::: +> demo: countdown ref exhibition ## API