From 6eca8e47510d96c897e592eb999f52828b4b5890 Mon Sep 17 00:00:00 2001 From: Pan Date: Thu, 20 Apr 2017 14:32:41 +0800 Subject: [PATCH] add --- package.json | 23 +-- src/components/Dropzone/index.vue | 21 ++- src/components/SplitPane/Pane.vue | 20 -- src/components/SplitPane/Resizer.vue | 48 +++-- src/components/SplitPane/SplitPane-backup.vue | 175 ------------------ src/components/SplitPane/index.js | 7 - .../SplitPane/{SplitPane.vue => index.vue} | 1 - src/components/twoDndList/index.vue | 43 +++-- src/mock/index.js | 13 +- src/router/index.js | 14 +- src/styles/index.scss | 7 + src/views/components/dndlist.vue | 21 ++- src/views/components/dropzone.vue | 28 +++ src/views/components/splitpane.vue | 62 +++++++ src/views/components/sticky.vue | 125 +++++++++++++ src/views/error/404.vue | 56 +----- src/views/excel/index.vue | 2 +- 17 files changed, 325 insertions(+), 341 deletions(-) delete mode 100644 src/components/SplitPane/SplitPane-backup.vue delete mode 100644 src/components/SplitPane/index.js rename src/components/SplitPane/{SplitPane.vue => index.vue} (98%) create mode 100644 src/views/components/dropzone.vue create mode 100644 src/views/components/splitpane.vue create mode 100644 src/views/components/sticky.vue diff --git a/package.json b/package.json index e7f159d3..77b29007 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ }, "devDependencies": { "autoprefixer": "6.7.2", + "axios-mock-adapter": "^1.8.1", "babel-core": "6.22.1", "babel-eslint": "7.1.1", "babel-loader": "6.2.10", @@ -47,11 +48,11 @@ "copy-webpack-plugin": "4.0.1", "css-loader": "0.26.1", "eslint": "3.14.1", + "eslint-config-airbnb-base": "11.0.1", "eslint-friendly-formatter": "2.0.7", + "eslint-import-resolver-webpack": "0.8.1", "eslint-loader": "1.6.1", "eslint-plugin-html": "2.0.0", - "eslint-config-airbnb-base": "11.0.1", - "eslint-import-resolver-webpack": "0.8.1", "eslint-plugin-import": "2.2.0", "eventsource-polyfill": "0.9.6", "express": "4.14.1", @@ -61,26 +62,26 @@ "function-bind": "1.1.0", "html-webpack-plugin": "2.28.0", "http-proxy-middleware": "0.17.3", - "webpack-bundle-analyzer": "2.2.1", - "semver": "5.3.0", + "node-sass": "3.7.0", "opn": "4.0.2", "optimize-css-assets-webpack-plugin": "1.3.0", "ora": "1.1.0", + "pushstate-server": "2.1.0", "rimraf": "2.6.0", + "sass-loader": "4.0.2", + "script-loader": "0.7.0", + "semver": "5.3.0", + "style-loader": "0.13.1", "url-loader": "0.5.7", "vue-loader": "11.3.4", "vue-style-loader": "2.0.0", "vue-template-compiler": "2.2.6", "webpack": "2.2.1", + "webpack-bundle-analyzer": "2.2.1", + "webpack-dashboard": "0.2.1", "webpack-dev-middleware": "1.10.0", "webpack-hot-middleware": "2.16.1", - "webpack-merge": "2.6.1", - "webpack-dashboard": "0.2.1", - "node-sass": "3.7.0", - "pushstate-server": "2.1.0", - "sass-loader": "4.0.2", - "script-loader": "0.7.0", - "style-loader": "0.13.1" + "webpack-merge": "2.6.1" }, "engines": { "node": ">= 4.0.0", diff --git a/src/components/Dropzone/index.vue b/src/components/Dropzone/index.vue index 977f5a2d..8527e76c 100644 --- a/src/components/Dropzone/index.vue +++ b/src/components/Dropzone/index.vue @@ -57,17 +57,20 @@ } }, accept: (file, done) => { - const token = this.$store.getters.token; - getToken(token).then(response => { - file.token = response.data.qiniu_token; - file.key = response.data.qiniu_key; - file.url = response.data.qiniu_url; - done(); - }) + /* 七牛*/ + // const token = this.$store.getters.token; + // getToken(token).then(response => { + // file.token = response.data.qiniu_token; + // file.key = response.data.qiniu_key; + // file.url = response.data.qiniu_url; + // done(); + // }) + done(); }, sending: (file, xhr, formData) => { - formData.append('token', file.token); - formData.append('key', file.key); + /* 七牛*/ + // formData.append('token', file.token); + // formData.append('key', file.key); vm.initOnce = false; } }); diff --git a/src/components/SplitPane/Pane.vue b/src/components/SplitPane/Pane.vue index 3e66659b..c6765df0 100644 --- a/src/components/SplitPane/Pane.vue +++ b/src/components/SplitPane/Pane.vue @@ -7,32 +7,12 @@ diff --git a/src/components/SplitPane/Resizer.vue b/src/components/SplitPane/Resizer.vue index b3bdba04..e6499c9b 100644 --- a/src/components/SplitPane/Resizer.vue +++ b/src/components/SplitPane/Resizer.vue @@ -1,6 +1,28 @@ + - diff --git a/src/components/SplitPane/SplitPane-backup.vue b/src/components/SplitPane/SplitPane-backup.vue deleted file mode 100644 index 8a4884d0..00000000 --- a/src/components/SplitPane/SplitPane-backup.vue +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/SplitPane/index.js b/src/components/SplitPane/index.js deleted file mode 100644 index 8e42e2bf..00000000 --- a/src/components/SplitPane/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import SplitPane from './a.vue'; -import Pane from './Pane.vue'; - -export { - SplitPane, - Pane -} diff --git a/src/components/SplitPane/SplitPane.vue b/src/components/SplitPane/index.vue similarity index 98% rename from src/components/SplitPane/SplitPane.vue rename to src/components/SplitPane/index.vue index df73ed88..3b4d62ec 100644 --- a/src/components/SplitPane/SplitPane.vue +++ b/src/components/SplitPane/index.vue @@ -66,7 +66,6 @@ mounted() { const element = this.$el; const elementOffset = element.getBoundingClientRect(); - console.log(elementOffset.height) // this.height = elementOffset.height+'px'; }, methods: { diff --git a/src/components/twoDndList/index.vue b/src/components/twoDndList/index.vue index 6a24f6e9..c7c3577e 100644 --- a/src/components/twoDndList/index.vue +++ b/src/components/twoDndList/index.vue @@ -1,30 +1,28 @@ diff --git a/src/views/components/dropzone.vue b/src/views/components/dropzone.vue new file mode 100644 index 00000000..f9c85d4e --- /dev/null +++ b/src/views/components/dropzone.vue @@ -0,0 +1,28 @@ + + + + diff --git a/src/views/components/splitpane.vue b/src/views/components/splitpane.vue new file mode 100644 index 00000000..47e193c0 --- /dev/null +++ b/src/views/components/splitpane.vue @@ -0,0 +1,62 @@ + + + + diff --git a/src/views/components/sticky.vue b/src/views/components/sticky.vue new file mode 100644 index 00000000..6e29d19f --- /dev/null +++ b/src/views/components/sticky.vue @@ -0,0 +1,125 @@ + + + + diff --git a/src/views/error/404.vue b/src/views/error/404.vue index d2b3ce3c..ecf964c4 100644 --- a/src/views/error/404.vue +++ b/src/views/error/404.vue @@ -1,61 +1,7 @@ - - diff --git a/src/views/excel/index.vue b/src/views/excel/index.vue index 3e93abb6..17a728fe 100644 --- a/src/views/excel/index.vue +++ b/src/views/excel/index.vue @@ -33,7 +33,7 @@