From dbd3d31f8e1796edab0f62149d74d6eb4a37457f Mon Sep 17 00:00:00 2001 From: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com> Date: Fri, 13 Nov 2020 02:33:47 +0800 Subject: [PATCH] Refactor examples/* (#42) --- dev/serve.vue | 332 -------------------------------- examples/auto-play.vue | 42 ++++ examples/full-width.vue | 45 +++++ examples/item-customization.vue | 53 +++++ examples/left-right-slot.vue | 65 +++++++ examples/position-start.vue | 44 +++++ examples/responsive.vue | 50 +++++ {dev => examples}/serve.js | 0 examples/serve.vue | 92 +++++++++ examples/simple.vue | 40 ++++ package.json | 2 +- src/vue-horizontal-list.vue | 1 + 12 files changed, 433 insertions(+), 333 deletions(-) delete mode 100644 dev/serve.vue create mode 100644 examples/auto-play.vue create mode 100644 examples/full-width.vue create mode 100644 examples/item-customization.vue create mode 100644 examples/left-right-slot.vue create mode 100644 examples/position-start.vue create mode 100644 examples/responsive.vue rename {dev => examples}/serve.js (100%) create mode 100644 examples/serve.vue create mode 100644 examples/simple.vue diff --git a/dev/serve.vue b/dev/serve.vue deleted file mode 100644 index 38ac2af..0000000 --- a/dev/serve.vue +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - diff --git a/examples/auto-play.vue b/examples/auto-play.vue new file mode 100644 index 0000000..9acfc9d --- /dev/null +++ b/examples/auto-play.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/examples/full-width.vue b/examples/full-width.vue new file mode 100644 index 0000000..0453fcb --- /dev/null +++ b/examples/full-width.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/examples/item-customization.vue b/examples/item-customization.vue new file mode 100644 index 0000000..3ae35ad --- /dev/null +++ b/examples/item-customization.vue @@ -0,0 +1,53 @@ + + + + + + + diff --git a/examples/left-right-slot.vue b/examples/left-right-slot.vue new file mode 100644 index 0000000..de1af07 --- /dev/null +++ b/examples/left-right-slot.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/examples/position-start.vue b/examples/position-start.vue new file mode 100644 index 0000000..e88b827 --- /dev/null +++ b/examples/position-start.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/examples/responsive.vue b/examples/responsive.vue new file mode 100644 index 0000000..78c608b --- /dev/null +++ b/examples/responsive.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/dev/serve.js b/examples/serve.js similarity index 100% rename from dev/serve.js rename to examples/serve.js diff --git a/examples/serve.vue b/examples/serve.vue new file mode 100644 index 0000000..c683f3d --- /dev/null +++ b/examples/serve.vue @@ -0,0 +1,92 @@ + + + + + + + diff --git a/examples/simple.vue b/examples/simple.vue new file mode 100644 index 0000000..cf91489 --- /dev/null +++ b/examples/simple.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/package.json b/package.json index f0b3953..1647df9 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "src/**/*.vue" ], "scripts": { - "serve": "vue-cli-service serve dev/serve.js", + "serve": "vue-cli-service serve examples/serve.js", "build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js", "build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs", "build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es", diff --git a/src/vue-horizontal-list.vue b/src/vue-horizontal-list.vue index 29bc4d5..c8b63f1 100644 --- a/src/vue-horizontal-list.vue +++ b/src/vue-horizontal-list.vue @@ -162,6 +162,7 @@ export default { return { navigation: { start: options?.navigation?.start ?? 992, + // TODO(fuxing): Deprecate this in favor of navigation slot color: options?.navigation?.color ?? "#000", }, item: {