diff --git a/packages/nutui-taro-demo/src/exhibition/pages/popover/basic.vue b/packages/nutui-taro-demo/src/exhibition/pages/popover/basic.vue new file mode 100644 index 0000000000..8f89dd3063 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/popover/basic.vue @@ -0,0 +1,39 @@ + + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/popover/color.vue b/packages/nutui-taro-demo/src/exhibition/pages/popover/color.vue new file mode 100644 index 0000000000..1590a3b293 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/popover/color.vue @@ -0,0 +1,31 @@ + + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/popover/content.vue b/packages/nutui-taro-demo/src/exhibition/pages/popover/content.vue new file mode 100644 index 0000000000..eba44dfc3d --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/popover/content.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/popover/index.vue b/packages/nutui-taro-demo/src/exhibition/pages/popover/index.vue index b8885b6eb8..93e4062953 100644 --- a/packages/nutui-taro-demo/src/exhibition/pages/popover/index.vue +++ b/packages/nutui-taro-demo/src/exhibition/pages/popover/index.vue @@ -1,325 +1,49 @@ - diff --git a/packages/nutui-taro-demo/src/exhibition/pages/popover/option.vue b/packages/nutui-taro-demo/src/exhibition/pages/popover/option.vue new file mode 100644 index 0000000000..bac730ee87 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/popover/option.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/popover/position.vue b/packages/nutui-taro-demo/src/exhibition/pages/popover/position.vue new file mode 100644 index 0000000000..636504c4bb --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/popover/position.vue @@ -0,0 +1,87 @@ + + + + + + + diff --git a/packages/nutui-taro-demo/src/exhibition/pages/popover/target.vue b/packages/nutui-taro-demo/src/exhibition/pages/popover/target.vue new file mode 100644 index 0000000000..8f1e36d395 --- /dev/null +++ b/packages/nutui-taro-demo/src/exhibition/pages/popover/target.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/packages/__VUE/popover/demo.vue b/src/packages/__VUE/popover/demo.vue deleted file mode 100644 index bf3ea74979..0000000000 --- a/src/packages/__VUE/popover/demo.vue +++ /dev/null @@ -1,352 +0,0 @@ - - - diff --git a/src/packages/__VUE/popover/demo/basic.vue b/src/packages/__VUE/popover/demo/basic.vue new file mode 100644 index 0000000000..8f89dd3063 --- /dev/null +++ b/src/packages/__VUE/popover/demo/basic.vue @@ -0,0 +1,39 @@ + + + + diff --git a/src/packages/__VUE/popover/demo/color.vue b/src/packages/__VUE/popover/demo/color.vue new file mode 100644 index 0000000000..1590a3b293 --- /dev/null +++ b/src/packages/__VUE/popover/demo/color.vue @@ -0,0 +1,31 @@ + + + + diff --git a/src/packages/__VUE/popover/demo/content.vue b/src/packages/__VUE/popover/demo/content.vue new file mode 100644 index 0000000000..eba44dfc3d --- /dev/null +++ b/src/packages/__VUE/popover/demo/content.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/src/packages/__VUE/popover/demo/index.vue b/src/packages/__VUE/popover/demo/index.vue new file mode 100644 index 0000000000..0e26e69b5f --- /dev/null +++ b/src/packages/__VUE/popover/demo/index.vue @@ -0,0 +1,49 @@ + + diff --git a/src/packages/__VUE/popover/demo/option.vue b/src/packages/__VUE/popover/demo/option.vue new file mode 100644 index 0000000000..bac730ee87 --- /dev/null +++ b/src/packages/__VUE/popover/demo/option.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/src/packages/__VUE/popover/demo/position.vue b/src/packages/__VUE/popover/demo/position.vue new file mode 100644 index 0000000000..636504c4bb --- /dev/null +++ b/src/packages/__VUE/popover/demo/position.vue @@ -0,0 +1,87 @@ + + + + + + + diff --git a/src/packages/__VUE/popover/demo/target.vue b/src/packages/__VUE/popover/demo/target.vue new file mode 100644 index 0000000000..8f1e36d395 --- /dev/null +++ b/src/packages/__VUE/popover/demo/target.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/packages/__VUE/popover/doc.en-US.md b/src/packages/__VUE/popover/doc.en-US.md index 007982f18f..9d74324549 100644 --- a/src/packages/__VUE/popover/doc.en-US.md +++ b/src/packages/__VUE/popover/doc.en-US.md @@ -18,212 +18,21 @@ app.use(Popover); Popover supports both light and dark styles. The default is light style. Set the `theme` property to `dark` to switch to dark style. -:::demo - -```vue - - - - -``` - -::: +> demo: popover basic ### Option Configuration In the list array, an option can be disabled via the `disabled` field. -:::demo - -```vue - - - - - -``` - -::: +> demo: popover option ### Custom Content Customize the content in the slot named content. -:::demo - -```vue - - - - - -``` - -::: +> demo: popover content -### Placement +### Position Use the location property to control where the bubble pops up. optional value @@ -242,185 +51,17 @@ bottom-start # Bottom left bottom-end # Bottom right ``` -:::demo - -```vue - - - - - -``` - -::: +> demo: popover position -### custom target +### Custom Target Popover provides the 'targetId' attribute to match the target element by adding the corresponding id value to the target element -:::demo - -```vue - - - - -``` - -::: +> demo: popover target ### Custom Color -:::demo - -```vue - - - - -``` - -::: +> demo: popover color ## API diff --git a/src/packages/__VUE/popover/doc.md b/src/packages/__VUE/popover/doc.md index 8a8793942c..bb6df8d7d9 100644 --- a/src/packages/__VUE/popover/doc.md +++ b/src/packages/__VUE/popover/doc.md @@ -18,209 +18,19 @@ app.use(Popover); Popover 支持明朗和暗黑两种风格,默认为明朗风格,将 `theme` 属性设置为 `dark` 可切换为暗黑风格。 -:::demo - -```vue - - - - -``` - -::: +> demo: popover basic ### 选项配置 在 list 数组中,可以通过 disabled 字段来禁用某个选项。 -:::demo - -```vue - - - - - -``` - -::: +> demo: popover option ### 自定义内容 在名为 content 插槽中自定义内容。 -:::demo - -```vue - - - - - -``` - -::: +> demo: popover content ### 位置自定义 @@ -241,185 +51,19 @@ bottom-start # 底部左侧位置 bottom-end # 底部右侧位置 ``` -:::demo - -```vue - - - - - -``` - -::: +> demo: popover position ### 自定义目标元素 Popover 提供了 `targetId` 属性,用于匹配目标元素,在目标元素上添加对应的 id 值即可 -:::demo - -```vue - - - - -``` - -::: +> demo: popover target ### 自定义颜色 -Popopver 提供了 2 种主题色,同样可以通过 `bgColor` 属性改变背景色 - -:::demo - -```vue - - - - -``` +Popopver 提供了 2 种主题色,同样可以通过 `bg-color` 属性改变背景色 -::: +> demo: popover color ## API diff --git a/src/packages/__VUE/popover/doc.taro.md b/src/packages/__VUE/popover/doc.taro.md index a473572119..9e23f2b07f 100644 --- a/src/packages/__VUE/popover/doc.taro.md +++ b/src/packages/__VUE/popover/doc.taro.md @@ -18,209 +18,19 @@ app.use(Popover); Popover 支持明朗和暗黑两种风格,默认为明朗风格,将 `theme` 属性设置为 `dark` 可切换为暗黑风格。 -:::demo - -```vue - - - - -``` - -::: +> demo: popover basic exhibition ### 选项配置 在 list 数组中,可以通过 disabled 字段来禁用某个选项。 -:::demo - -```vue - - - - - -``` - -::: +> demo: popover option exhibition ### 自定义内容 在名为 content 插槽中自定义内容。 -:::demo - -```vue - - - - - -``` - -::: +> demo: popover content exhibition ### 位置自定义 @@ -241,186 +51,19 @@ bottom-start # 底部左侧位置 bottom-end # 底部右侧位置 ``` -:::demo - -```vue - - - - - -``` - -::: +> demo: popover position exhibition ### 自定义目标元素 Popover 提供了 `targetId` 属性,用于匹配目标元素,在目标元素上添加对应的 id 值即可 -:::demo - -```vue - - - - -``` - -::: +> demo: popover target exhibition ### 自定义颜色 -Popopver 提供了 2 种主题色,同样可以通过 `bgColor` 属性改变背景色 - -:::demo - -```vue - - - - -``` +Popopver 提供了 2 种主题色,同样可以通过 `bg-color` 属性改变背景色 -::: +> demo: popover color exhibition ## API