From 0598bc7921a9e20a61086063eec9ec1a33d77097 Mon Sep 17 00:00:00 2001
From: 07akioni <07akioni2@gmail.com>
Date: Fri, 27 Sep 2019 22:28:25 +0800
Subject: [PATCH] doc(popover): refactor popover doc pages
---
demo/debugComponents/popoverDebug.vue | 6 +
.../components/popover/enUS/basic.md | 11 ++
.../components/popover/enUS/delay.md | 11 ++
.../components/popover/enUS/event.md | 78 ++++++++++
.../components/popover/enUS/index.md | 11 ++
.../components/popover/enUS/noArrow.md | 11 ++
.../components/popover/enUS/placement.md | 139 ++++++++++++++++++
.../components/popover/enUS/rawContent.md | 22 +++
.../components/popover/enUS/trigger.md | 47 ++++++
.../components/popover/enUS/width.md | 11 ++
.../components/popover/index.entry | 0
.../components/popover/zhCN/index.md | 0
.../components/tagDemo/basicUsage.demo.vue | 70 ---------
.../components/tagDemo/index.vue | 32 ----
demo/header.vue | 8 +-
demo/init.js | 10 +-
package.json | 2 +-
17 files changed, 359 insertions(+), 110 deletions(-)
create mode 100644 demo/documentation/components/popover/enUS/basic.md
create mode 100644 demo/documentation/components/popover/enUS/delay.md
create mode 100644 demo/documentation/components/popover/enUS/event.md
create mode 100644 demo/documentation/components/popover/enUS/index.md
create mode 100644 demo/documentation/components/popover/enUS/noArrow.md
create mode 100644 demo/documentation/components/popover/enUS/placement.md
create mode 100644 demo/documentation/components/popover/enUS/rawContent.md
create mode 100644 demo/documentation/components/popover/enUS/trigger.md
create mode 100644 demo/documentation/components/popover/enUS/width.md
create mode 100644 demo/documentation/components/popover/index.entry
create mode 100644 demo/documentation/components/popover/zhCN/index.md
delete mode 100644 demo/documentation/components/tagDemo/basicUsage.demo.vue
delete mode 100644 demo/documentation/components/tagDemo/index.vue
diff --git a/demo/debugComponents/popoverDebug.vue b/demo/debugComponents/popoverDebug.vue
index 2231c485f..2bcf85be6 100644
--- a/demo/debugComponents/popoverDebug.vue
+++ b/demo/debugComponents/popoverDebug.vue
@@ -20,6 +20,12 @@
Out Out Out
+
+
+ LongLongLongLong
+
+ LongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLong
+
diff --git a/demo/documentation/components/popover/enUS/basic.md b/demo/documentation/components/popover/enUS/basic.md
new file mode 100644
index 000000000..9a4003f5b
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/basic.md
@@ -0,0 +1,11 @@
+# Basic
+```html
+
+
+
+ hover
+
+
+ Light My Fire
+
+```
\ No newline at end of file
diff --git a/demo/documentation/components/popover/enUS/delay.md b/demo/documentation/components/popover/enUS/delay.md
new file mode 100644
index 000000000..7772cda77
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/delay.md
@@ -0,0 +1,11 @@
+# Delay
+```html
+
+
+
+ hover
+
+
+ Light My Fire
+
+```
diff --git a/demo/documentation/components/popover/enUS/event.md b/demo/documentation/components/popover/enUS/event.md
new file mode 100644
index 000000000..b9064c0b2
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/event.md
@@ -0,0 +1,78 @@
+# Event
+```html
+
+
+
+ California Girls(Hover)
+
+
+
+ I wish they all could be California girls
+
+
+
+
+
+ California Girls(Click)
+
+
+
+ I wish they all could be California girls
+
+
+
+
+
+ California Girls(Manual)
+
+
+
+ I wish they all could be California girls
+
+
+```
+
+```js
+export default {
+ data() {
+ return {
+ showPopover: false
+ };
+ },
+ methods: {
+ handleShow() {
+ this.$NMessage.success("show popover");
+ },
+ handleHide() {
+ this.$NMessage.success("hide popover");
+ }
+ }
+};
+```
+
+```css
+.n-button {
+ margin: 0 12px 8px 0;
+}
+```
\ No newline at end of file
diff --git a/demo/documentation/components/popover/enUS/index.md b/demo/documentation/components/popover/enUS/index.md
new file mode 100644
index 000000000..e4c54dac9
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/index.md
@@ -0,0 +1,11 @@
+# Popover
+```demo
+basic
+delay
+no-arrow
+trigger
+event
+placement
+raw-content
+width
+```
\ No newline at end of file
diff --git a/demo/documentation/components/popover/enUS/noArrow.md b/demo/documentation/components/popover/enUS/noArrow.md
new file mode 100644
index 000000000..9815afd92
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/noArrow.md
@@ -0,0 +1,11 @@
+# No Arrow
+```html
+
+
+
+ hover
+
+
+ Light My Fire
+
+```
\ No newline at end of file
diff --git a/demo/documentation/components/popover/enUS/placement.md b/demo/documentation/components/popover/enUS/placement.md
new file mode 100644
index 000000000..129034825
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/placement.md
@@ -0,0 +1,139 @@
+# Placement
+```html
+
+
+
+
+ Top Start
+
+
+
+ Oops!
+
+
+
+
+
+ Top
+
+
+
+ Oops!
+
+
+
+
+
+ Top End
+
+
+
+ Oops!
+
+
+
+
+
+ Left Start
+
+
+
+ Oops!
+
+
+
+
+
+ Left
+
+
+
+ Oops!
+
+
+
+
+
+ Left End
+
+
+
+ Oops!
+
+
+
+
+
+ Right Start
+
+
+
+ Oops!
+
+
+
+
+
+ Right
+
+
+
+ Oops!
+
+
+
+
+
+ Right End
+
+
+
+ Oops!
+
+
+
+
+
+ Bottom Start
+
+
+
+ Oops!
+
+
+
+
+
+ Bottom
+
+
+
+ Oops!
+
+
+
+
+
+ Bottom End
+
+
+
+ Oops!
+
+
+
+```
+
+```css
+.popover-grid {
+ display: grid;
+ grid-template-columns: auto auto auto auto auto;
+ grid-gap: 12px;
+ justify-content: center;
+ align-items: center;
+}
+
+.large-text {
+ font-size: 48px;
+}
+```
\ No newline at end of file
diff --git a/demo/documentation/components/popover/enUS/rawContent.md b/demo/documentation/components/popover/enUS/rawContent.md
new file mode 100644
index 000000000..573d2006a
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/rawContent.md
@@ -0,0 +1,22 @@
+# Raw Content
+```html
+
+
+
+ hover
+
+
+
+ Who kicks a hole in the sky so the heaven cry over me.
+
+
+```
+```js
+export default {
+ data() {
+ return {}
+ }
+}
+```
\ No newline at end of file
diff --git a/demo/documentation/components/popover/enUS/trigger.md b/demo/documentation/components/popover/enUS/trigger.md
new file mode 100644
index 000000000..fbc0d48fa
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/trigger.md
@@ -0,0 +1,47 @@
+# Trigger
+```html
+
+
+
+ California Girls(Hover)
+
+
+
+ I wish they all could be California girls
+
+
+
+
+
+ California Girls(Manual)
+
+
+
+ I wish they all could be California girls
+
+
+
+
+
+ California Girls(Click)
+
+
+
+ I wish they all could be California girls
+
+
+```
+```js
+export default {
+ data() {
+ return {
+ showPopover: false
+ };
+ }
+};
+```
+```css
+.n-button {
+ margin: 0 12px 8px 0;
+}
+```
\ No newline at end of file
diff --git a/demo/documentation/components/popover/enUS/width.md b/demo/documentation/components/popover/enUS/width.md
new file mode 100644
index 000000000..fdb9cde4e
--- /dev/null
+++ b/demo/documentation/components/popover/enUS/width.md
@@ -0,0 +1,11 @@
+# Width
+```html
+
+
+
+ hover
+
+
+ Light My Fire
+
+```
\ No newline at end of file
diff --git a/demo/documentation/components/popover/index.entry b/demo/documentation/components/popover/index.entry
new file mode 100644
index 000000000..e69de29bb
diff --git a/demo/documentation/components/popover/zhCN/index.md b/demo/documentation/components/popover/zhCN/index.md
new file mode 100644
index 000000000..e69de29bb
diff --git a/demo/documentation/components/tagDemo/basicUsage.demo.vue b/demo/documentation/components/tagDemo/basicUsage.demo.vue
deleted file mode 100644
index 6c609717b..000000000
--- a/demo/documentation/components/tagDemo/basicUsage.demo.vue
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-
- Real Love
-
- Yes It Is
-
-
- I'm Down
-
-
- Yesterday
-
-
- I'm Looking Through You
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demo/documentation/components/tagDemo/index.vue b/demo/documentation/components/tagDemo/index.vue
deleted file mode 100644
index fa6c8f775..000000000
--- a/demo/documentation/components/tagDemo/index.vue
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
diff --git a/demo/header.vue b/demo/header.vue
index b886e2a77..f99d420d0 100644
--- a/demo/header.vue
+++ b/demo/header.vue
@@ -19,9 +19,10 @@
@@ -78,6 +79,9 @@ export default {
}
},
methods: {
+ handleThemeChange (theme) {
+ this.NApp.$parent.theme = theme
+ },
handleLangInput (lang) {
this.$emit('lang-change', lang)
}
@@ -88,7 +92,7 @@ export default {