diff --git a/.babelrc b/.babelrc index 924f803..8ef17c9 100644 --- a/.babelrc +++ b/.babelrc @@ -1,6 +1,6 @@ { "presets":[ - "es2015", - "stage-2" - ] + "env" + ], + "plugins": ["transform-es2015-spread"] } diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..faaa99a --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +build/ +test +__sites_ diff --git a/.eslintrc.json b/.eslintrc.json index e305bd1..207b813 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -29,6 +29,7 @@ "no-extra-semi": 0, "space-before-function-paren": 0, "no-underscore-dangle": 0, - "semi": ["error", "always"] + "semi": ["error", "always"], + "consistent-return": 0 } } diff --git a/.npmignore b/.npmignore index c34623e..ec9c76d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,6 @@ -site +__sites_ .eslintrc.json shots .babelrc webpack.config.js +test diff --git a/.travis.yml b/.travis.yml index 52ad81f..5523520 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: node_js node_js: - "6" - - "4" + - "7" + - "8" +script: npm run test diff --git a/README.md b/README.md index 04c6881..26f3b5c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Vue-Core-Image-Upload - +[![Build Status](https://travis-ci.org/Vanthink-UED/vue-core-image-upload.svg?branch=master)](https://travis-ci.org/Vanthink-UED/vue-core-image-upload) [![npm](https://img.shields.io/npm/v/vue-core-image-upload.svg?maxAge=2592000)]() diff --git a/UPDATE.log b/UPDATE.log index 805d9b0..c29089b 100644 --- a/UPDATE.log +++ b/UPDATE.log @@ -1,9 +1,5 @@ -### TODO List +# 更新日志 -Fixed 旋转的 bug +## 2.4.x -旋转的定位 - -读取头部 exif - -获取正确的定位 ++ 修复本地裁成功后页面 overflow 没有还原; \ No newline at end of file diff --git a/site/.editorconfig b/__sites_/.editorconfig similarity index 100% rename from site/.editorconfig rename to __sites_/.editorconfig diff --git a/site/.gitignore b/__sites_/.gitignore similarity index 100% rename from site/.gitignore rename to __sites_/.gitignore diff --git a/site/README.md b/__sites_/README.md similarity index 100% rename from site/README.md rename to __sites_/README.md diff --git a/site/build/config.js b/__sites_/build/config.js similarity index 100% rename from site/build/config.js rename to __sites_/build/config.js diff --git a/site/build/index.html b/__sites_/build/index.html similarity index 100% rename from site/build/index.html rename to __sites_/build/index.html diff --git a/site/build/log-plugin.js b/__sites_/build/log-plugin.js similarity index 100% rename from site/build/log-plugin.js rename to __sites_/build/log-plugin.js diff --git a/site/build/server.js b/__sites_/build/server.js similarity index 100% rename from site/build/server.js rename to __sites_/build/server.js diff --git a/site/build/utils.js b/__sites_/build/utils.js similarity index 100% rename from site/build/utils.js rename to __sites_/build/utils.js diff --git a/site/build/webpack.base.js b/__sites_/build/webpack.base.js similarity index 88% rename from site/build/webpack.base.js rename to __sites_/build/webpack.base.js index 3e0998b..95d2c2e 100644 --- a/site/build/webpack.base.js +++ b/__sites_/build/webpack.base.js @@ -22,7 +22,9 @@ module.exports = { extensions: ['.js', '.vue', '.css', '.json'], alias: { root: path.join(__dirname, '../client'), - components: path.join(__dirname, '../client/components') + components: path.join(__dirname, '../client/components'), + core: path.join(__dirname, '../../src'), + vue: 'vue/dist/vue.js' }, modules: [ _.cwd('node_modules'), @@ -42,8 +44,8 @@ module.exports = { use: { loader: 'babel-loader' }, - exclude: /node_modules/ - }, + exclude: /node_modules/ + } ] }, plugins: [ diff --git a/site/build/webpack.dev.js b/__sites_/build/webpack.dev.js similarity index 100% rename from site/build/webpack.dev.js rename to __sites_/build/webpack.dev.js diff --git a/site/build/webpack.prod.js b/__sites_/build/webpack.prod.js similarity index 98% rename from site/build/webpack.prod.js rename to __sites_/build/webpack.prod.js index b144b6e..590fff8 100644 --- a/site/build/webpack.prod.js +++ b/__sites_/build/webpack.prod.js @@ -88,5 +88,4 @@ base.stats = { chunkOrigins: false, modules: false } -console.log(base.module.rules[4]); module.exports = base diff --git a/site/client/app.js b/__sites_/client/app.js similarity index 91% rename from site/client/app.js rename to __sites_/client/app.js index 8b29ba2..ed48189 100644 --- a/site/client/app.js +++ b/__sites_/client/app.js @@ -13,12 +13,12 @@ Vue.use(VueProgressBar, { color: '#2ecc71', failedColor: 'red', height: '2px' -}); +}) const app = new Vue({ router, store, - ...App + render: createEle => createEle(App) }) export { app, router, store } diff --git a/site/client/components/App.vue b/__sites_/client/components/App.vue similarity index 100% rename from site/client/components/App.vue rename to __sites_/client/components/App.vue diff --git a/__sites_/client/components/Footer.vue b/__sites_/client/components/Footer.vue new file mode 100644 index 0000000..e068c11 --- /dev/null +++ b/__sites_/client/components/Footer.vue @@ -0,0 +1,49 @@ + + + diff --git a/site/client/components/Header.vue b/__sites_/client/components/Header.vue similarity index 100% rename from site/client/components/Header.vue rename to __sites_/client/components/Header.vue diff --git a/site/client/components/NavList.vue b/__sites_/client/components/NavList.vue similarity index 100% rename from site/client/components/NavList.vue rename to __sites_/client/components/NavList.vue diff --git a/site/client/components/doc/cn/CompressImage.vue b/__sites_/client/components/doc/cn/CompressImage.vue similarity index 86% rename from site/client/components/doc/cn/CompressImage.vue rename to __sites_/client/components/doc/cn/CompressImage.vue index 3ed9624..07d2dc3 100644 --- a/site/client/components/doc/cn/CompressImage.vue +++ b/__sites_/client/components/doc/cn/CompressImage.vue @@ -8,9 +8,9 @@ class="btn btn-primary" @imageuploaded="imageUploded" :max-file-size="5242880" - compress="50" + compress="70" :data="params" - url="http://101.198.151.190/api/upload.php" > + url="http://localhost:8090/upload" >

代码示例

@@ -19,14 +19,14 @@ @imageuploaded="imageUploded" :max-file-size="5242880" compress="50" // 设置压缩比例 - url="http://101.198.151.190/api/upload.php" > + url="http://localhost:8090/upload" > </vue-core-image-upload> diff --git a/site/client/components/doc/cn/PostData.vue b/__sites_/client/components/doc/cn/PostData.vue similarity index 97% rename from site/client/components/doc/cn/PostData.vue rename to __sites_/client/components/doc/cn/PostData.vue index 34fedac..0dc94e5 100644 --- a/site/client/components/doc/cn/PostData.vue +++ b/__sites_/client/components/doc/cn/PostData.vue @@ -67,7 +67,7 @@ export default { diff --git a/site/client/components/doc/en/PostData.vue b/__sites_/client/components/doc/en/PostData.vue similarity index 97% rename from site/client/components/doc/en/PostData.vue rename to __sites_/client/components/doc/en/PostData.vue index 5225338..87274ce 100644 --- a/site/client/components/doc/en/PostData.vue +++ b/__sites_/client/components/doc/en/PostData.vue @@ -67,7 +67,7 @@ export default { diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 51df541..0000000 --- a/dist/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import VueCoreImageUpload from 'vue-core-image-upload'; -export default VueCoreImageUpload; diff --git a/dist/lib/canvas-helper.js b/dist/lib/canvas-helper.js deleted file mode 100644 index 83ed1c5..0000000 --- a/dist/lib/canvas-helper.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueCoreImageUpload=e():t.VueCoreImageUpload=e()}(this,function(){return function(t){function e(r){if(a[r])return a[r].exports;var o=a[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var a={};return e.m=t,e.c=a,e.i=function(t){return t},e.d=function(t,a,r){e.o(t,a)||Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,"a",a),a},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=12)}({12:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={_getImageType:function(t){var e="image/jpeg",a=t.match(/(image\/[\w]+)\.*/)[0];return void 0!==a&&(e=a),e},compress:function(t,e,a){var r=new FileReader,o=this;r.onload=function(r){var n=new Image;n.src=r.target.result,n.onload=function(){var r=o._getImageType(t.type),g=o._getCanvas(n.naturalWidth,n.naturalHeight),i=(g.getContext("2d").drawImage(n,0,0),g.toDataURL(r,e/100));a(i)}},r.readAsDataURL(t)},crop:function(t,e,a){var r=function(t){return"number"==typeof t};if(r(e.toCropImgX)&&r(e.toCropImgY)&&e.toCropImgW>0&&e.toCropImgH>0){var o=e.toCropImgW,n=e.toCropImgH;e.maxWidth&&e.maxWidth0&&e.toCropImgH>0){var o=e.toCropImgW*e.imgChangeRatio,n=e.toCropImgH*e.imgChangeRatio,g=this._getCanvas(o,n),i=(g.getContext("2d").drawImage(t,0,0,e.toCropImgW,e.toCropImgH,0,0,o,n),this._getImageType(t.src));a(g.toDataURL(i,e.compress/100))}},rotate2:function(t,e,a){var r=this;this._loadImage(t,function(o){var n=o.naturalWidth,g=o.naturalHeight,i=Math.max(n,g),u=r._getCanvas(i,i),m=u.getContext("2d");m.save(),m.translate(i/2,i/2),m.rotate(e*(Math.PI/180));var c=-i/2,s=-i/2;if(0===(e%=360))return a(t,n,g);if(e%180!=0){-90===e||270===e?c=i/2-n:s=i/2-g;var p=n;n=g,g=p}else c=i/2-n,s=i/2-g;m.drawImage(o,c,s),r._getCanvas(n,g).getContext("2d").drawImage(u,0,0,n,g,0,0,n,g);var d=r._getImageType(o.src),f=u.toDataURL(d,1);a(f,n,g)})},_loadImage:function(t,e){var a=new Image;a.src=t,a.onload=function(){e(a)},a.onerror=function(){console.log("Error: image error!")}},_getCanvas:function(t,e){var a=document.createElement("canvas");return a.width=t,a.height=e,a}}}})}); \ No newline at end of file diff --git a/dist/lib/drag.js b/dist/lib/drag.js deleted file mode 100644 index 4bc7ca6..0000000 --- a/dist/lib/drag.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueCoreImageUpload=t():e.VueCoreImageUpload=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}({0:function(e,t,n){"use strict";e.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),setCssText:function(e){var t=[];for(var n in e){var o=e[n];"number"==typeof o&&(o+="px"),t.push(n+": "+o+";")}return t.join("")}}},13:function(e,t,n){"use strict";function o(e,t,n){if(t){var o=u?e.changedTouches[0].clientX:e.clientX,r=u?e.changedTouches[0].clientY:e.clientY,i=o-n.x,f=r-n.y;return i<=n.minLeft&&(i=n.minLeft),i>=n.maxLeft&&(i=n.maxLeft),f<=n.minTop&&(f=n.minTop),f>=n.maxTop&&(f=n.maxTop),{left:i,top:f}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(0),i=function(e){return e&&e.__esModule?e:{default:e}}(r),u=i.default.isMobile}})}); \ No newline at end of file diff --git a/dist/lib/helper.js b/dist/lib/helper.js deleted file mode 100644 index 7018694..0000000 --- a/dist/lib/helper.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueCoreImageUpload=t():e.VueCoreImageUpload=t()}(this,function(){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";e.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),setCssText:function(e){var t=[];for(var r in e){var o=e[r];"number"==typeof o&&(o+="px"),t.push(r+": "+o+";")}return t.join("")}}}])}); \ No newline at end of file diff --git a/dist/lib/loading-gif.js b/dist/lib/loading-gif.js deleted file mode 100644 index f5e49d8..0000000 --- a/dist/lib/loading-gif.js +++ /dev/null @@ -1 +0,0 @@ -!function(A,Q){"object"==typeof exports&&"object"==typeof module?module.exports=Q():"function"==typeof define&&define.amd?define([],Q):"object"==typeof exports?exports.VueCoreImageUpload=Q():A.VueCoreImageUpload=Q()}(this,function(){return function(A){function Q(C){if(o[C])return o[C].exports;var g=o[C]={i:C,l:!1,exports:{}};return A[C].call(g.exports,g,g.exports,Q),g.l=!0,g.exports}var o={};return Q.m=A,Q.c=o,Q.i=function(A){return A},Q.d=function(A,o,C){Q.o(A,o)||Object.defineProperty(A,o,{configurable:!1,enumerable:!0,get:C})},Q.n=function(A){var o=A&&A.__esModule?function(){return A.default}:function(){return A};return Q.d(o,"a",o),o},Q.o=function(A,Q){return Object.prototype.hasOwnProperty.call(A,Q)},Q.p="",Q(Q.s=14)}({14:function(A,Q,o){"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.default="data:image/gif;base64,R0lGODlhGAAYAPQAAP///3FxcePj4/v7++3t7dLS0vHx8b+/v+Dg4MfHx+jo6M7Oztvb2/f397Kysru7u9fX16qqqgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCB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oEkDoiMHDigICGkJBS2dDA6TAAnAEAkCdQ8ORQcHTAkLcQQODLPMIgIJaCWxJMIkPIoAt3EhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGIz+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA=="}})}); \ No newline at end of file diff --git a/dist/lib/resize.js b/dist/lib/resize.js deleted file mode 100644 index facf04e..0000000 --- a/dist/lib/resize.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueCoreImageUpload=t():e.VueCoreImageUpload=t()}(this,function(){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,o){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=23)}({0:function(e,t,i){"use strict";e.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),setCssText:function(e){var t=[];for(var i in e){var o=e[i];"number"==typeof o&&(o+="px"),t.push(i+": "+o+";")}return t.join("")}}},23:function(e,t,i){"use strict";function o(e,t,i,o,n){if(t){var r=document.body.offsetHeight,d=1/n,f=parseFloat(window.getComputedStyle(i).width),c=parseFloat(window.getComputedStyle(i).height),s=document.querySelector(".info-aside"),a=(u-f)/2,l=parseFloat(window.getComputedStyle(s).height),p=(r-c-l)/2,g=h?e.changedTouches[0].clientX:e.clientX,w=h?e.changedTouches[0].clientY:e.clientY,y=t.offsetWidth,b=t.offsetHeight,x={};return n>=1&&g<=a+f?(y>=f&&(x.width=f),x.width=o.w+g-o.x,x.height=y*d,f>c?y>c&&(x.height=c,x.width=c*n):ff&&(x.width=f,x.height=f*d):y>=f&&(x.width=f,x.height=f*d)):n<1&&wc?b>c&&(x.height=c,x.width=c*n):y>f&&(x.width=f,x.height=f*d)):"auto"==n&&w<=p+c+l&&g<=p+f?(x.height=o.h+w-o.y,x.width=o.w+g-o.x):g<=a+f&&(x.width=o.w+g-o.x,x.height=t.style.width,f>c?b>c&&(x.height=c,x.width=c):ff&&(x.width=f,x.height=f):y>f&&(x.width=t.style.height=f)),x}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=i(0),r=function(e){return e&&e.__esModule?e:{default:e}}(n),h=r.default.isMobile,u=document.body.offsetWidth}})}); \ No newline at end of file diff --git a/dist/lib/xhr.js b/dist/lib/xhr.js deleted file mode 100644 index ad8f286..0000000 --- a/dist/lib/xhr.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueCoreImageUpload=t():e.VueCoreImageUpload=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=52)}({52:function(e,t,o){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};void 0===XMLHttpRequest.prototype.sendAsBinary&&(XMLHttpRequest.prototype.sendAsBinary=function(e){var t=Array.prototype.map.call(e,function(e){return 255&e.charCodeAt(0)});this.send(new Uint8Array(t).buffer)}),e.exports=function(e,t,o,r,s,a,i){function u(e){for(var t={},o=/([a-z\-]+):\s?(.*);?/gi,n=void 0;n=o.exec(e);)t[n[1]]=n[2];return t}var p=new XMLHttpRequest,f=a||function(){console.error("AJAX ERROR!")},c="vuecodeimageupload",l=!1;"blob"===e&&(l=e,e="GET"),console.log(r),e=e.toUpperCase(),p.onload=function(){var t=p.response;try{t=JSON.parse(p.responseText)}catch(e){401===p.status&&(t=f("access_denied",p.statusText))}var o=u(p.getAllResponseHeaders());o.statusCode=p.status,s(t||("GET"===e?f("empty_response","Could not get resource"):{}),o)},p.onerror=function(){var e=p.responseText;try{e=JSON.parse(p.responseText)}catch(e){console.error(e)}s(e||f("access_denied","Could not get resource"))};var d=void 0;if("GET"===e||"DELETE"===e)r=null;else if(i){var y=r,m=r.base64Code.replace("data:"+r.type+";base64,","");r=["--"+c,'Content-Disposition: form-data; name="'+r.filed+'"; filename="'+r.filename+'"',"Content-Type: "+r.type,"",window.atob(m),""].join("\r\n");var b=Object.keys(y);if(b.length>4){var v=!0,x=!1,C=void 0;try{for(var T,g=b[Symbol.iterator]();!(v=(T=g.next()).done);v=!0){var h=T.value;-1==["filed","filename","type","base64Code"].indexOf(h)&&(r+=["--"+c,'Content-Disposition: form-data; name="'+h+'";',"",""].join("\r\n"),r+=["object"===n(y[h])?JSON.stringify(y[h]):y[h],""].join("\r\n"))}}catch(a){x=!0,C=a}finally{try{!v&&g.return&&g.return()}finally{if(x)throw C}}}r+="--"+c+"--"}if(p.open(e,t,!0),l&&("responseType"in p?p.responseType=l:p.overrideMimeType("text/plain; charset=x-user-defined")),o){for(d in o)p.setRequestHeader(d,o[d]);i&&p.setRequestHeader("Content-Type","multipart/form-data; boundary="+c)}return i?p.sendAsBinary(r):(p.withCredentials=!0,p.send(r),p)}}})}); \ No newline at end of file diff --git a/dist/props.js b/dist/props.js deleted file mode 100644 index 31628dd..0000000 --- a/dist/props.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueCoreImageUpload=t():e.VueCoreImageUpload=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=24)}({24:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={url:{type:String},text:{type:String,default:"Upload Image"},extensions:{type:String,default:"png,jpg,jpeg,gif,svg,webp"},inputOfFile:{type:String,default:"files"},crop:{type:[String,Boolean],default:""},cropBtn:{type:Object,default:function(){return{ok:"Ok",cancel:"Cancel"}}},cropRatio:{type:String,default:"1:1"},resize:{type:[String,Boolean],default:!1},rotate:{type:Boolean,default:!1},ResizeBtn:{type:Object,default:function(){return{ok:"Ok",cancel:"Cancel"}}},maxFileSize:{type:Number,default:104857600},maxWidth:{type:Number},maxHeight:{type:Number},inputAccept:{type:String,default:"image/jpg,image/jpeg,image/png,image/gif"},isXhr:{type:Boolean,default:!0},headers:{type:Object,default:function(){return{}}},data:{type:Object,default:function(){return{}}},multiple:{type:Boolean,default:!1},multipleSize:{type:Number,default:0},minWidth:{type:Number,default:50},compress:{type:[Number,String],default:0},credentials:{type:[String,Boolean],default:!0}}}})}); \ No newline at end of file diff --git a/dist/resize-bar.vue b/dist/resize-bar.vue deleted file mode 100644 index 9dc2e47..0000000 --- a/dist/resize-bar.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - - - diff --git a/dist/rotate-bar.vue b/dist/rotate-bar.vue deleted file mode 100644 index 77aa551..0000000 --- a/dist/rotate-bar.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/dist/ssr.js b/dist/ssr.js deleted file mode 100755 index 6253fa5..0000000 --- a/dist/ssr.js +++ /dev/null @@ -1,7 +0,0 @@ -import VueCoreImageUpload from 'vue-core-image-upload' - -export default { - install( Vue, options ) { - Vue.component( VueCoreImageUpload.name, VueCoreImageUpload ); - } -} \ No newline at end of file diff --git a/dist/style/style.css b/dist/style/style.css deleted file mode 100644 index 78b7ea7..0000000 --- a/dist/style/style.css +++ /dev/null @@ -1,109 +0,0 @@ -.g-core-image-upload-btn{ - position: relative; - overflow: hidden; -} -.g-core-image-upload-form{ - position: absolute; - left:0; - right: 0; - top:0; - bottom:0; - width: 100%; - height: 100%; - min-height: 61px; - opacity: 0; -} -.g-core-image-upload-container{ - position: absolute; - background: #111; - z-index: 900; -} -.g-core-image-upload-modal{ - position: absolute; - left:0; - right:0; - width: 100%; - height: 100%; - border:1px solid #ccc; - z-index: 899; -} -.dropped{ - border:4px solid #ea6153; -} -.g-core-image-corp-container{ - z-index: 1900; - position:fixed; - left:0; - right:0; - top:0; - bottom: 0; - background: rgba(0,0,0,.9); - color:#f1f1f1; -} -.g-core-image-corp-container .image-aside{ - position: absolute; - right: 30px; - left:30px; - top:60px; - bottom:20px; - text-align: center; -} -.g-core-image-corp-container .image-aside img{ - max-width: 100%; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.g-core-image-corp-container .info-aside{ - position: absolute; - left:0; - right: 0; - top:0; - height: 40px; - padding-left: 10px; - padding-right: 10px; - background: #fefefe; - color:#777; -} -.g-core-image-corp-container .btn-groups{ - text-align: right; - margin: 5px 0 0; -} -.g-core-image-corp-container .btn{ - display: inline-block; - padding: 0 15px; - height: 32px; - margin-left: 15px; - background: #fff; - border:1px solid #ccc; - border-radius: 2px; - font-size: 13px; - color:#222; - line-height: 32px; - transition: all .1s ease-in; -} -.g-core-image-corp-container .btn:hover{ - border:1px solid #777; - box-shadow: 0 1px 3px rgba(0,0,0,.05); -} -.g-core-image-corp-container .btn:active{ - background: #ddd; -} -.g-core-image-corp-container .btn:disabled{ - background: #eee !important; - border-color:#ccc; - cursor: not-allowed; -} -.g-core-image-corp-container .btn-upload{ - background: #27ae60; - border-color:#27ae60; - color:#fff; -} -.g-core-image-corp-container .btn-upload:hover{ - background: #2dc26c; - border-color:#27ae60; - box-shadow: 0 1px 3px rgba(0,0,0,.05); -} diff --git a/dist/vue-core-image-upload.vue b/dist/vue-core-image-upload.vue deleted file mode 100644 index e0e43a3..0000000 --- a/dist/vue-core-image-upload.vue +++ /dev/null @@ -1,307 +0,0 @@ - - - - - diff --git a/index.js b/index.js deleted file mode 100644 index d8af6a4..0000000 --- a/index.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueCoreImageUpload=e():t.VueCoreImageUpload=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=107)}([function(t,e,n){"use strict";t.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),setCssText:function(t){var e=[];for(var n in t){var o=t[n];"number"==typeof o&&(o+="px"),e.push(n+": "+o+";")}return e.join("")}}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var o=n(32)("wks"),i=n(20),r=n(2).Symbol,a="function"==typeof r;(t.exports=function(t){return o[t]||(o[t]=a&&r[t]||(a?r:i)("Symbol."+t))}).store=o},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var o=n(40),i=n(26);t.exports=function(t){return o(i(t))}},function(t,e,n){t.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var o=n(9),i=n(19);t.exports=n(6)?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var o=n(11),i=n(39),r=n(35),a=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(o(t),e=r(e,!0),o(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var o=n(44),i=n(27);t.exports=Object.keys||function(t){return o(t,i)}},function(t,e,n){var o=n(16);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={_getImageType:function(t){var e="image/jpeg",n=t.match(/(image\/[\w]+)\.*/)[0];return void 0!==n&&(e=n),e},compress:function(t,e,n){var o=new FileReader,i=this;o.onload=function(o){var r=new Image;r.src=o.target.result,r.onload=function(){var o=i._getImageType(t.type),a=i._getCanvas(r.naturalWidth,r.naturalHeight),s=(a.getContext("2d").drawImage(r,0,0),a.toDataURL(o,e/100));n(s)}},o.readAsDataURL(t)},crop:function(t,e,n){var o=function(t){return"number"==typeof t};if(o(e.toCropImgX)&&o(e.toCropImgY)&&e.toCropImgW>0&&e.toCropImgH>0){var i=e.toCropImgW,r=e.toCropImgH;e.maxWidth&&e.maxWidth0&&e.toCropImgH>0){var i=e.toCropImgW*e.imgChangeRatio,r=e.toCropImgH*e.imgChangeRatio,a=this._getCanvas(i,r),s=(a.getContext("2d").drawImage(t,0,0,e.toCropImgW,e.toCropImgH,0,0,i,r),this._getImageType(t.src));n(a.toDataURL(s,e.compress/100))}},rotate2:function(t,e,n){var o=this;this._loadImage(t,function(i){var r=i.naturalWidth,a=i.naturalHeight,s=Math.max(r,a),u=o._getCanvas(s,s),c=u.getContext("2d");c.save(),c.translate(s/2,s/2),c.rotate(e*(Math.PI/180));var f=-s/2,p=-s/2;if(0===(e%=360))return n(t,r,a);if(e%180!=0){-90===e||270===e?f=s/2-r:p=s/2-a;var l=r;r=a,a=l}else f=s/2-r,p=s/2-a;c.drawImage(i,f,p),o._getCanvas(r,a).getContext("2d").drawImage(u,0,0,r,a,0,0,r,a);var d=o._getImageType(i.src),h=u.toDataURL(d,1);n(h,r,a)})},_loadImage:function(t,e){var n=new Image;n.src=t,n.onload=function(){e(n)},n.onerror=function(){console.log("Error: image error!")}},_getCanvas:function(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,n}}},function(t,e,n){"use strict";function o(t,e,n){if(e){var o=a?t.changedTouches[0].clientX:t.clientX,i=a?t.changedTouches[0].clientY:t.clientY,r=o-n.x,s=i-n.y;return r<=n.minLeft&&(r=n.minLeft),r>=n.maxLeft&&(r=n.maxLeft),s<=n.minTop&&(s=n.minTop),s>=n.maxTop&&(s=n.maxTop),{left:r,top:s}}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),a=r.default.isMobile},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default="data:image/gif;base64,R0lGODlhGAAYAPQAAP///3FxcePj4/v7++3t7dLS0vHx8b+/v+Dg4MfHx+jo6M7Oztvb2/f397Kysru7u9fX16qqqgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQJBwAAACwAAAAAGAAYAAAFsCAgjiTAMG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oyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGIz+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA=="},function(t,e,n){var o=n(2),i=n(1),r=n(72),a=n(8),s=function(t,e,n){var u,c,f,p=t&s.F,l=t&s.G,d=t&s.S,h=t&s.P,g=t&s.B,m=t&s.W,v=l?i:i[e]||(i[e]={}),A=v.prototype,x=l?o:d?o[e]:(o[e]||{}).prototype;l&&(n=e);for(u in n)(c=!p&&x&&void 0!==x[u])&&u in v||(f=c?x[u]:n[u],v[u]=l&&"function"!=typeof x[u]?n[u]:g&&c?r(f,o):m&&x[u]==f?function(t){var e=function(e,n,o){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,o)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):h&&"function"==typeof f?r(Function.call,f):f,h&&((v.virtual||(v.virtual={}))[u]=f,t&s.R&&A&&!A[u]&&a(A,u,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&m.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function s(t,e){var n,o,i;if(e.singleton){var s=g++;n=h||(h=a(e)),o=u.bind(null,n,s,!1),i=u.bind(null,n,s,!0)}else n=a(e),o=c.bind(null,n),i=function(){r(n)};return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}function u(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=v(e,i);else{var r=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function c(t,e){var n=e.css,o=e.media,i=e.sourceMap;if(o&&t.setAttribute("media",o),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var f={},p=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}},l=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),d=p(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,g=0,m=[];t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},void 0===e.singleton&&(e.singleton=l()),void 0===e.insertAt&&(e.insertAt="bottom");var i=o(t);return n(i,e),function(t){for(var r=[],a=0;a=1&&g<=l+c?(v>=c&&(x.width=c),x.width=o.w+g-o.x,x.height=v*u,c>f?v>f&&(x.height=f,x.width=f*i):cc&&(x.width=c,x.height=c*u):v>=c&&(x.width=c,x.height=c*u)):i<1&&mf?A>f&&(x.height=f,x.width=f*i):v>c&&(x.width=c,x.height=c*u)):"auto"==i&&m<=h+f+d&&g<=h+c?(x.height=o.h+m-o.y,x.width=o.w+g-o.x):g<=l+c&&(x.width=o.w+g-o.x,x.height=e.style.width,c>f?A>f&&(x.height=f,x.width=f):cc&&(x.width=c,x.height=c):v>c&&(x.width=e.style.height=c)),x}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i),a=r.default.isMobile,s=document.body.offsetWidth},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={url:{type:String},text:{type:String,default:"Upload Image"},extensions:{type:String,default:"png,jpg,jpeg,gif,svg,webp"},inputOfFile:{type:String,default:"files"},crop:{type:[String,Boolean],default:""},cropBtn:{type:Object,default:function(){return{ok:"Ok",cancel:"Cancel"}}},cropRatio:{type:String,default:"1:1"},resize:{type:[String,Boolean],default:!1},rotate:{type:Boolean,default:!1},ResizeBtn:{type:Object,default:function(){return{ok:"Ok",cancel:"Cancel"}}},maxFileSize:{type:Number,default:104857600},maxWidth:{type:Number},maxHeight:{type:Number},inputAccept:{type:String,default:"image/jpg,image/jpeg,image/png,image/gif"},isXhr:{type:Boolean,default:!0},headers:{type:Object,default:function(){return{}}},data:{type:Object,default:function(){return{}}},multiple:{type:Boolean,default:!1},multipleSize:{type:Number,default:0},minWidth:{type:Number,default:50},compress:{type:[Number,String],default:0},credentials:{type:[String,Boolean],default:!0}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=!0},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var o=n(9).f,i=n(4),r=n(3)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,r)&&o(t,r,{configurable:!0,value:e})}},function(t,e,n){var o=n(32)("keys"),i=n(20);t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e,n){var o=n(2),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e,n){var o=n(26);t.exports=function(t){return Object(o(t))}},function(t,e,n){var o=n(16);t.exports=function(t,e){if(!o(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!o(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!o(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var o=n(2),i=n(1),r=n(28),a=n(37),s=n(9).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=r?{}:o.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){e.f=n(3)},function(t,e,n){var o=n(16),i=n(2).document,r=o(i)&&o(i.createElement);t.exports=function(t){return r?i.createElement(t):{}}},function(t,e,n){t.exports=!n(6)&&!n(7)(function(){return 7!=Object.defineProperty(n(38)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var o=n(25);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";var o=n(28),i=n(15),r=n(45),a=n(8),s=n(4),u=n(17),c=n(76),f=n(30),p=n(84),l=n(3)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,g,m,v,A){c(n,e,g);var x,b,y,w=function(t){if(!d&&t in I)return I[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+" Iterator",S="values"==m,_=!1,I=t.prototype,O=I[l]||I["@@iterator"]||m&&I[m],k=O||w(m),E=m?S?w("entries"):k:void 0,M="Array"==e?I.entries||O:O;if(M&&(y=p(M.call(new t)))!==Object.prototype&&(f(y,C,!0),o||s(y,l)||a(y,l,h)),S&&O&&"values"!==O.name&&(_=!0,k=function(){return O.call(this)}),o&&!A||!d&&!_&&I[l]||a(I,l,k),u[e]=k,u[C]=h,m)if(x={values:S?k:w("values"),keys:v?k:w("keys"),entries:E},A)for(b in x)b in I||r(I,b,x[b]);else i(i.P+i.F*(d||_),e,x);return x}},function(t,e,n){var o=n(11),i=n(81),r=n(27),a=n(31)("IE_PROTO"),s=function(){},u=function(){var t,e=n(38)("iframe"),o=r.length;for(e.style.display="none",n(74).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(" diff --git a/site/client/components/doc/cn/Others.vue b/site/client/components/doc/cn/Others.vue deleted file mode 100644 index 4b09e82..0000000 --- a/site/client/components/doc/cn/Others.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - \ No newline at end of file diff --git a/site/client/components/doc/en/Others.vue b/site/client/components/doc/en/Others.vue deleted file mode 100644 index 76b1b98..0000000 --- a/site/client/components/doc/en/Others.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - \ No newline at end of file diff --git a/src/crop.vue b/src/crop.vue index ebc3b3f..07565a6 100644 --- a/src/crop.vue +++ b/src/crop.vue @@ -1,7 +1,7 @@ -