diff --git a/README-en.md b/README-en.md
index 6198a8d..7c1ffca 100644
--- a/README-en.md
+++ b/README-en.md
@@ -15,32 +15,32 @@ You can configure OSS information through environmental variables, customize dom
## Table of Contents
-* [Feature](#feature)
-* [Links](#links)
-* [Install](#install)
-* [Config](#config)
-* [Dotenv](#dotenv)
-* [Contributing](#contributing)
-* [Contributors](#contributors)
-* [License](#license)
+- [Feature](#feature)
+- [Links](#links)
+- [Install](#install)
+- [Config](#config)
+- [Dotenv](#dotenv)
+- [Contributing](#contributing)
+- [Contributors](#contributors)
+- [License](#license)
## Feature
-* Pure front-end implementation, no need for backend cooperation
-* The upload function can be done with little oss configuration
-* Automatically compress pictures before uploading, and loading prompts during uploading, support picture display and deletion
-* With default styles and support customize
-* Can limit the size or the number of files to upload
-* Support paste screenshot to upload
-* Can drag and drop to upload
-* Can preivew img
+- Pure front-end implementation, no need for backend cooperation
+- The upload function can be done with little oss configuration
+- Automatically compress pictures before uploading, and loading prompts during uploading, support picture display and deletion
+- With default styles and support customize
+- Can limit the size or the number of files to upload
+- Support paste screenshot to upload
+- Can drag and drop to upload
+- Can preivew img
[⬆Back to Top](#table-of-contents)
## Links
-* [docs](https://FEMessage.github.io/upload-to-ali/)
-* [ali oss guide](docs/ali-oss-guide.md)
+- [docs](https://FEMessage.github.io/upload-to-ali/)
+- [ali oss guide](docs/ali-oss-guide.md)
[⬆ Back to Top](#table-of-contents)
@@ -89,10 +89,10 @@ OSS_CUSTOM_DOMAIN=cdn.xxx.com
For those who are interested in contributing to this project, such as:
-* report a bug
-* request new feature
-* fix a bug
-* implement a new feature
+- report a bug
+- request new feature
+- fix a bug
+- implement a new feature
Please refer to our [contributing guide](https://github.com/FEMessage/.github/blob/master/CONTRIBUTING.md).
diff --git a/README.md b/README.md
index 4d17845..408141b 100644
--- a/README.md
+++ b/README.md
@@ -15,32 +15,32 @@
## Table of Contents
-* [Feature](#feature)
-* [Links](#links)
-* [Install](#install)
-* [Config](#config)
-* [Dotenv](#dotenv)
-* [Contributing](#contributing)
-* [Contributors](#contributors)
-* [License](#license)
+- [Feature](#feature)
+- [Links](#links)
+- [Install](#install)
+- [Config](#config)
+- [Dotenv](#dotenv)
+- [Contributing](#contributing)
+- [Contributors](#contributors)
+- [License](#license)
## Feature
-* 纯前端实现,不需要后台配合
-* 只需配置 OSS 的基本信息,即可实现上传功能
-* 上传前自动压缩图片,上传过程中有 loading 提示,支持图片显示及删除
-* 可拓展自定义 loading 和默认上传样式
-* 可限制上传文件大小和上传文件数量
-* 可截图粘贴上传
-* 可拖拽上传
-* 可预览图片
+- 纯前端实现,不需要后台配合
+- 只需配置 OSS 的基本信息,即可实现上传功能
+- 上传前自动压缩图片,上传过程中有 loading 提示,支持图片显示及删除
+- 可拓展自定义 loading 和默认上传样式
+- 可限制上传文件大小和上传文件数量
+- 可截图粘贴上传
+- 可拖拽上传
+- 可预览图片
[⬆ Back to Top](#table-of-contents)
## Links
-* [docs](https://FEMessage.github.io/upload-to-ali/)
-* [ali oss guide](docs/ali-oss-guide.md)
+- [docs](https://FEMessage.github.io/upload-to-ali/)
+- [ali oss guide](docs/ali-oss-guide.md)
[⬆ Back to Top](#table-of-contents)
@@ -102,10 +102,10 @@ OSS_CUSTOM_DOMAIN=cdn.xxx.com
For those who are interested in contributing to this project, such as:
-* report a bug
-* request new feature
-* fix a bug
-* implement a new feature
+- report a bug
+- request new feature
+- fix a bug
+- implement a new feature
Please refer to our [contributing guide](https://github.com/FEMessage/.github/blob/master/CONTRIBUTING.md).
diff --git a/less b/less
new file mode 100644
index 0000000..e69de29
diff --git a/package.json b/package.json
index e206746..e4b6379 100644
--- a/package.json
+++ b/package.json
@@ -8,8 +8,15 @@
"type": "git",
"url": "https://github.com/FEMessage/upload-to-ali.git"
},
- "keywords": ["vue", "upload", "component"],
- "files": ["src", "dist"],
+ "keywords": [
+ "vue",
+ "upload",
+ "component"
+ ],
+ "files": [
+ "src",
+ "dist"
+ ],
"main": "dist/upload-to-ali.umd.js",
"module": "dist/upload-to-ali.esm.js",
"unpkg": "dist/upload-to-ali.min.js",
@@ -38,10 +45,14 @@
"@babel/preset-env": "^7.4.3",
"babel-loader": "^8.0.5",
"dotenv": "^7.0.0",
+ "file-loader": "^3.0.1",
"github-release-notes": "^0.17.0",
"glob": "^7.1.3",
"husky": "1.3.1",
"jest": "^24.8.0",
+ "less": "^3.9.0",
+ "less-loader": "^5.0.0",
+ "lint-staged": "^8.1.0",
"minimist": "^1.2.0",
"prettier": "1.18.2",
"rollup": "^1.9.0",
@@ -50,17 +61,13 @@
"rollup-plugin-terser": "^4.0.4",
"rollup-plugin-vue": "^4.7.2",
"standard-version": "^6.0.1",
- "stylus": "^0.54.5",
- "stylus-loader": "^3.0.2",
+ "stylelint": "^9.10.0",
+ "stylelint-config-standard": "^18.2.0",
"vue": "^2.6.10",
"vue-loader": "^15.7.1",
"vue-styleguidist": "^3.16.3",
"vue-template-compiler": "^2.5.16",
- "webpack": "^4.29.6",
- "file-loader": "^3.0.1",
- "lint-staged": "^8.1.0",
- "stylelint": "^9.10.0",
- "stylelint-config-standard": "^18.2.0"
+ "webpack": "^4.29.6"
},
"publishConfig": {
"access": "public"
@@ -77,7 +84,7 @@
}
},
"lint-staged": {
- "*.(js|md)": [
+ "*.(js|md|json)": [
"prettier --write",
"git add"
],
diff --git a/src/components/draggable-list.vue b/src/components/draggable-list.vue
index 47a058d..4daaa8b 100644
--- a/src/components/draggable-list.vue
+++ b/src/components/draggable-list.vue
@@ -1,6 +1,6 @@
-
+
-
diff --git a/src/upload-to-ali.vue b/src/upload-to-ali.vue
index 8ddc163..f7269e2 100644
--- a/src/upload-to-ali.vue
+++ b/src/upload-to-ali.vue
@@ -498,15 +498,24 @@ export default {
}
}
-
diff --git a/styleguide.config.js b/styleguide.config.js
index 7e0075a..92d8b14 100644
--- a/styleguide.config.js
+++ b/styleguide.config.js
@@ -68,8 +68,8 @@ module.exports = {
loaders: ['style-loader', 'css-loader']
},
{
- test: /\.styl(us)?$/,
- loaders: ['vue-style-loader', 'css-loader', 'stylus-loader']
+ test: /\.less$/,
+ loaders: ['vue-style-loader', 'css-loader', 'less-loader']
},
{
test: /\.(woff2?|eot|[ot]tf)(\?.*)?$/,
diff --git a/yarn.lock b/yarn.lock
index 8ad70cd..b0d5b0b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1406,11 +1406,6 @@ align-text@^0.1.1, align-text@^0.1.3:
longest "^1.0.1"
repeat-string "^1.5.2"
-amdefine@>=0.0.4:
- version "1.0.1"
- resolved "https://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
- integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=
-
ansi-align@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/ansi-align/download/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f"
@@ -2567,6 +2562,11 @@ clone@^1.0.2:
resolved "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4=
+clone@^2.1.1, clone@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
+ integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=
+
clsx@^1.0.3:
version "1.0.4"
resolved "https://registry.npm.taobao.org/clsx/download/clsx-1.0.4.tgz#0c0171f6d5cb2fe83848463c15fcc26b4df8c2ec"
@@ -3175,11 +3175,6 @@ css-loader@^2.1.1:
postcss-value-parser "^3.3.0"
schema-utils "^1.0.0"
-css-parse@1.7.x:
- version "1.7.0"
- resolved "https://registry.npm.taobao.org/css-parse/download/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b"
- integrity sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=
-
css-selector-tokenizer@^0.7.0:
version "0.7.1"
resolved "https://registry.npm.taobao.org/css-selector-tokenizer/download/css-selector-tokenizer-0.7.1.tgz#a177271a8bca5019172f4f891fc6eed9cbf68d5d"
@@ -3283,13 +3278,6 @@ de-indent@^1.0.2:
resolved "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=
-debug@*, debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
- version "4.1.1"
- resolved "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
- integrity sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=
- dependencies:
- ms "^2.1.1"
-
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -3304,6 +3292,13 @@ debug@3.1.0:
dependencies:
ms "2.0.0"
+debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
+ integrity sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=
+ dependencies:
+ ms "^2.1.1"
+
debug@^3.1.0, debug@^3.2.5, debug@^3.2.6:
version "3.2.6"
resolved "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
@@ -3799,7 +3794,7 @@ err-code@^1.0.0:
resolved "https://registry.npm.taobao.org/err-code/download/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960"
integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=
-errno@^0.1.3, errno@~0.1.7:
+errno@^0.1.1, errno@^0.1.3, errno@~0.1.7:
version "0.1.7"
resolved "https://registry.npm.taobao.org/errno/download/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
integrity sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=
@@ -4699,18 +4694,6 @@ glob-to-regexp@^0.3.0:
resolved "https://registry.npm.taobao.org/glob-to-regexp/download/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
-glob@7.0.x:
- version "7.0.6"
- resolved "https://registry.npm.taobao.org/glob/download/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a"
- integrity sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=
- dependencies:
- fs.realpath "^1.0.0"
- inflight "^1.0.4"
- inherits "2"
- minimatch "^3.0.2"
- once "^1.3.0"
- path-is-absolute "^1.0.0"
-
glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
version "7.1.4"
resolved "https://registry.npm.taobao.org/glob/download/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
@@ -5257,6 +5240,11 @@ image-compressor.js@^1.1.4:
blueimp-canvas-to-blob "^3.14.0"
is-blob "^1.0.0"
+image-size@~0.5.0:
+ version "0.5.5"
+ resolved "https://registry.npm.taobao.org/image-size/download/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
+ integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
+
immer@1.10.0:
version "1.10.0"
resolved "https://registry.npm.taobao.org/immer/download/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d"
@@ -6585,6 +6573,31 @@ left-pad@^1.3.0:
resolved "https://registry.npm.taobao.org/left-pad/download/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e"
integrity sha1-W4o6d2Xf4AEmHd6RVYnngvjJTR4=
+less-loader@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.npm.taobao.org/less-loader/download/less-loader-5.0.0.tgz#498dde3a6c6c4f887458ee9ed3f086a12ad1b466"
+ integrity sha1-SY3eOmxsT4h0WO6e0/CGoSrRtGY=
+ dependencies:
+ clone "^2.1.1"
+ loader-utils "^1.1.0"
+ pify "^4.0.1"
+
+less@^3.9.0:
+ version "3.9.0"
+ resolved "https://registry.npm.taobao.org/less/download/less-3.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless%2Fdownload%2Fless-3.9.0.tgz#b7511c43f37cf57dc87dffd9883ec121289b1474"
+ integrity sha1-t1EcQ/N89X3Iff/ZiD7BISibFHQ=
+ dependencies:
+ clone "^2.1.2"
+ optionalDependencies:
+ errno "^0.1.1"
+ graceful-fs "^4.1.2"
+ image-size "~0.5.0"
+ mime "^1.4.1"
+ mkdirp "^0.5.0"
+ promise "^7.1.1"
+ request "^2.83.0"
+ source-map "~0.6.0"
+
leven@^2.1.0:
version "2.1.0"
resolved "https://registry.npm.taobao.org/leven/download/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580"
@@ -7326,7 +7339,7 @@ mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24:
dependencies:
mime-db "1.40.0"
-mime@1.6.0, mime@^1.3.4:
+mime@1.6.0, mime@^1.3.4, mime@^1.4.1:
version "1.6.0"
resolved "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=
@@ -8930,7 +8943,7 @@ promise-retry@^1.1.1:
err-code "^1.0.0"
retry "^0.10.0"
-promise@^7.0.1:
+promise@^7.0.1, promise@^7.1.1:
version "7.3.1"
resolved "https://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
integrity sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=
@@ -9922,7 +9935,7 @@ request-promise-native@^1.0.5:
stealthy-require "^1.1.1"
tough-cookie "^2.3.3"
-request@^2.87.0, request@^2.88.0:
+request@^2.83.0, request@^2.87.0, request@^2.88.0:
version "2.88.0"
resolved "https://registry.npm.taobao.org/request/download/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
integrity sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=
@@ -10206,11 +10219,6 @@ sane@^4.0.3:
minimist "^1.1.1"
walker "~1.0.5"
-sax@0.5.x:
- version "0.5.8"
- resolved "https://registry.npm.taobao.org/sax/download/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1"
- integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=
-
sax@>=0.6.0, sax@^1.2.4:
version "1.2.4"
resolved "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
@@ -10603,13 +10611,6 @@ source-map-url@^0.4.0:
resolved "https://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
-source-map@0.1.x:
- version "0.1.43"
- resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
- integrity sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=
- dependencies:
- amdefine ">=0.0.4"
-
source-map@0.6.*, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
@@ -11095,27 +11096,6 @@ stylelint@^9.10.0:
svg-tags "^1.0.0"
table "^5.0.0"
-stylus-loader@^3.0.2:
- version "3.0.2"
- resolved "https://registry.npm.taobao.org/stylus-loader/download/stylus-loader-3.0.2.tgz#27a706420b05a38e038e7cacb153578d450513c6"
- integrity sha1-J6cGQgsFo44DjnyssVNXjUUFE8Y=
- dependencies:
- loader-utils "^1.0.2"
- lodash.clonedeep "^4.5.0"
- when "~3.6.x"
-
-stylus@^0.54.5:
- version "0.54.5"
- resolved "https://registry.npm.taobao.org/stylus/download/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79"
- integrity sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=
- dependencies:
- css-parse "1.7.x"
- debug "*"
- glob "7.0.x"
- mkdirp "0.5.x"
- sax "0.5.x"
- source-map "0.1.x"
-
sugarss@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/sugarss/download/sugarss-2.0.0.tgz#ddd76e0124b297d40bf3cca31c8b22ecb43bc61d"
@@ -12300,11 +12280,6 @@ whatwg-url@^7.0.0:
tr46 "^1.0.1"
webidl-conversions "^4.0.2"
-when@~3.6.x:
- version "3.6.4"
- resolved "https://registry.npm.taobao.org/when/download/when-3.6.4.tgz#473b517ec159e2b85005497a13983f095412e34e"
- integrity sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=
-
which-module@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"