From 7f1917a894b3eae6757deb8412e67b2f1a00c4af Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Sun, 29 Sep 2019 19:07:16 +0800 Subject: [PATCH] feat(switch): light theme --- .../components/switch/enUS/basic.md | 19 +++ .../components/switch/enUS/event.md | 21 ++++ .../components/switch/enUS/index.md | 5 + .../components/switch/index.entry | 0 .../components/switch/zhCN/index.md | 0 .../components/switchDemo/basicUsage.demo.vue | 35 ------ .../switchDemo/changeEvent.demo.vue | 37 ------ .../components/switchDemo/index.vue | 35 ------ demo/init.js | 2 +- demo/utils/ComponentDemo.vue | 9 +- packages/common/Switch/src/main.vue | 7 +- packages/common/Tooltip/src/main.vue | 4 + styles/Switch.scss | 117 ++++++++++-------- styles/themes/dark/components/Switch.scss | 13 ++ styles/themes/dark/index.scss | 2 + styles/themes/light/components/Switch.scss | 13 ++ styles/themes/light/index.scss | 2 + 17 files changed, 161 insertions(+), 160 deletions(-) create mode 100644 demo/documentation/components/switch/enUS/basic.md create mode 100644 demo/documentation/components/switch/enUS/event.md create mode 100644 demo/documentation/components/switch/enUS/index.md create mode 100644 demo/documentation/components/switch/index.entry create mode 100644 demo/documentation/components/switch/zhCN/index.md delete mode 100644 demo/documentation/components/switchDemo/basicUsage.demo.vue delete mode 100644 demo/documentation/components/switchDemo/changeEvent.demo.vue delete mode 100644 demo/documentation/components/switchDemo/index.vue create mode 100644 styles/themes/dark/components/Switch.scss create mode 100644 styles/themes/light/components/Switch.scss diff --git a/demo/documentation/components/switch/enUS/basic.md b/demo/documentation/components/switch/enUS/basic.md new file mode 100644 index 000000000..1ae930152 --- /dev/null +++ b/demo/documentation/components/switch/enUS/basic.md @@ -0,0 +1,19 @@ +# Basic +```html + + +``` +```js +export default { + data () { + return { + active: false + } + } +} +``` \ No newline at end of file diff --git a/demo/documentation/components/switch/enUS/event.md b/demo/documentation/components/switch/enUS/event.md new file mode 100644 index 000000000..7f71a5cc4 --- /dev/null +++ b/demo/documentation/components/switch/enUS/event.md @@ -0,0 +1,21 @@ +# Event +```html + +``` +```js +export default { + data () { + return { + active: false + } + }, + methods: { + handleChange (value) { + this.$NMessage.info(`Change Event: ${value}`) + } + } +} +``` \ No newline at end of file diff --git a/demo/documentation/components/switch/enUS/index.md b/demo/documentation/components/switch/enUS/index.md new file mode 100644 index 000000000..f77e82252 --- /dev/null +++ b/demo/documentation/components/switch/enUS/index.md @@ -0,0 +1,5 @@ +# Switch +```demo +basic +event +``` \ No newline at end of file diff --git a/demo/documentation/components/switch/index.entry b/demo/documentation/components/switch/index.entry new file mode 100644 index 000000000..e69de29bb diff --git a/demo/documentation/components/switch/zhCN/index.md b/demo/documentation/components/switch/zhCN/index.md new file mode 100644 index 000000000..e69de29bb diff --git a/demo/documentation/components/switchDemo/basicUsage.demo.vue b/demo/documentation/components/switchDemo/basicUsage.demo.vue deleted file mode 100644 index 280e0d40d..000000000 --- a/demo/documentation/components/switchDemo/basicUsage.demo.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/demo/documentation/components/switchDemo/changeEvent.demo.vue b/demo/documentation/components/switchDemo/changeEvent.demo.vue deleted file mode 100644 index 6090db1e1..000000000 --- a/demo/documentation/components/switchDemo/changeEvent.demo.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/demo/documentation/components/switchDemo/index.vue b/demo/documentation/components/switchDemo/index.vue deleted file mode 100644 index bfee58bbf..000000000 --- a/demo/documentation/components/switchDemo/index.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/demo/init.js b/demo/init.js index abfe4e71c..3d487e0e2 100644 --- a/demo/init.js +++ b/demo/init.js @@ -15,7 +15,7 @@ import gradientTextDemo from './documentation/components/gradientTextDemo' import iconDemo from './documentation/components/iconDemo' import checkboxDemo from './documentation/components/checkboxDemo' import buttonDemo from './documentation/components/buttonDemo' -import switchDemo from './documentation/components/switchDemo' +import switchDemo from './documentation/components/switch' import tableDemo from './documentation/components/tableDemo' import inputDemo from './documentation/components/inputDemo' import selectDemo from './documentation/components/selectDemo' diff --git a/demo/utils/ComponentDemo.vue b/demo/utils/ComponentDemo.vue index 0ef2e36df..c245f2271 100644 --- a/demo/utils/ComponentDemo.vue +++ b/demo/utils/ComponentDemo.vue @@ -26,6 +26,7 @@ :delay="300" :placement="'top'" :arrow="true" + :controller="controller" >