@kyfe/hroa-ui 0.0.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -77
- package/dist/demo.html +10 -0
- package/dist/hroa-ui.common.js +31775 -0
- package/dist/hroa-ui.css +6 -0
- package/dist/hroa-ui.umd.js +31775 -0
- package/dist/hroa-ui.umd.min.js +9 -0
- package/lib/getJsModule/index.css +6 -0
- package/lib/getJsModule/index.js +9 -0
- package/lib/hr-at-input/index.css +6 -0
- package/lib/hr-at-input/index.js +1 -0
- package/lib/hr-bottom-button/index.css +1 -0
- package/lib/hr-bottom-button/index.js +1 -0
- package/lib/hr-button/index.css +1 -0
- package/lib/hr-button/index.js +1 -0
- package/lib/hr-clipboard/index.css +1 -0
- package/lib/hr-clipboard/index.js +1 -0
- package/lib/hr-condition-filtrate/index.css +1 -0
- package/lib/hr-condition-filtrate/index.js +1 -0
- package/lib/hr-condition-filtrate-popup/index.css +1 -0
- package/lib/hr-condition-filtrate-popup/index.js +1 -0
- package/lib/hr-elasticity-box/index.css +1 -0
- package/lib/hr-elasticity-box/index.js +1 -0
- package/lib/hr-elasticity-box-item/index.css +1 -0
- package/lib/hr-elasticity-box-item/index.js +1 -0
- package/lib/hr-emotional-picture/index.css +1 -0
- package/lib/hr-emotional-picture/index.js +1 -0
- package/lib/hr-employee-choose/index.css +1 -0
- package/lib/hr-employee-choose/index.js +1 -0
- package/lib/hr-img-list/index.css +1 -0
- package/lib/hr-img-list/index.js +1 -0
- package/lib/hr-info-card/index.css +1 -0
- package/lib/hr-info-card/index.js +1 -0
- package/lib/hr-license-plate-number/index.css +1 -0
- package/lib/hr-license-plate-number/index.js +1 -0
- package/lib/hr-module-card/index.css +1 -0
- package/lib/hr-module-card/index.js +1 -0
- package/lib/hr-multiterm-choose/index.css +1 -0
- package/lib/hr-multiterm-choose/index.js +1 -0
- package/lib/hr-no-data/index.css +1 -0
- package/lib/hr-no-data/index.js +1 -0
- package/lib/hr-notice-bar/index.js +1 -0
- package/lib/hr-open-ks/index.css +1 -0
- package/lib/hr-open-ks/index.js +1 -0
- package/lib/hr-pager/index.css +1 -0
- package/lib/hr-pager/index.js +1 -0
- package/lib/hr-popup/index.css +1 -0
- package/lib/hr-popup/index.js +1 -0
- package/lib/hr-preview-file/index.css +1 -0
- package/lib/hr-preview-file/index.js +1 -0
- package/lib/hr-rate/index.css +1 -0
- package/lib/hr-rate/index.js +1 -0
- package/lib/hr-reason-textarea/index.css +1 -0
- package/lib/hr-reason-textarea/index.js +1 -0
- package/lib/hr-search-input/index.css +1 -0
- package/lib/hr-search-input/index.js +1 -0
- package/lib/hr-select/index.js +1 -0
- package/lib/hr-select-list/index.css +1 -0
- package/lib/hr-select-list/index.js +9 -0
- package/lib/hr-single-choose/index.css +1 -0
- package/lib/hr-single-choose/index.js +1 -0
- package/lib/hr-slide-pager/index.css +1 -0
- package/lib/hr-slide-pager/index.js +1 -0
- package/lib/hr-sort/index.css +1 -0
- package/lib/hr-sort/index.js +1 -0
- package/lib/hr-stack-image/index.css +1 -0
- package/lib/hr-stack-image/index.js +1 -0
- package/lib/hr-tab-nav/index.css +1 -0
- package/lib/hr-tab-nav/index.js +1 -0
- package/lib/hr-view-item/index.css +1 -0
- package/lib/hr-view-item/index.js +1 -0
- package/lib/index/index.css +6 -0
- package/lib/index/index.js +9 -0
- package/lib/utils/index.js +1 -0
- package/package.json +7 -6
- package/packages/getJsModule.js +11 -0
- package/packages/hr-at-input/index.js +7 -0
- package/packages/hr-at-input/src/blot/atPerson.js +43 -0
- package/packages/hr-at-input/src/index.vue +472 -0
- package/packages/hr-at-input/src/quill.snow.css +945 -0
- package/packages/hr-at-input/src/utils/index.js +60 -0
- package/packages/hr-at-input//346/224/257/346/214/201@/351/200/211/344/272/272/350/276/223/345/205/245/346/241/206.md +0 -0
- package/packages/hr-bottom-button/index.js +6 -6
- package/packages/hr-bottom-button/src/index.vue +108 -84
- package/packages/hr-button/index.js +12 -12
- package/packages/hr-button/src/hr-button.vue +38 -38
- package/packages/hr-clipboard/index.js +8 -3
- package/packages/hr-clipboard/src/index.vue +46 -0
- package/packages/hr-clipboard/src/util.js +9 -9
- package/packages/hr-condition-filtrate/enum/index.js +10 -10
- package/packages/hr-condition-filtrate/index.js +6 -6
- package/packages/hr-condition-filtrate/src/employee-choose/index.vue +101 -101
- package/packages/hr-condition-filtrate/src/index.vue +245 -245
- package/packages/hr-condition-filtrate/src/multiterm-choose/index.vue +166 -166
- package/packages/hr-condition-filtrate/src/org-tree-choose/index.vue +101 -101
- package/packages/hr-condition-filtrate/src/single-choose/index.vue +143 -143
- package/packages/hr-condition-filtrate/src/text-input/index.vue +60 -60
- package/packages/hr-condition-filtrate/src/time-selector/date-range-select.vue +154 -154
- package/packages/hr-condition-filtrate/src/time-selector/index.vue +380 -380
- package/packages/hr-condition-filtrate/src/time-selector/utils/constant.js +30 -30
- package/packages/hr-condition-filtrate/src/time-selector/utils/tools.js +212 -212
- package/packages/hr-condition-filtrate-popup/index.js +7 -0
- package/packages/hr-condition-filtrate-popup/src/index.vue +236 -0
- package/packages/hr-elasticity-box/index.js +7 -0
- package/packages/hr-elasticity-box/src/elasticity-box-item.vue +61 -0
- package/packages/hr-elasticity-box/src/index.vue +52 -0
- package/packages/hr-elasticity-box-item/index.js +7 -0
- package/packages/hr-emotional-picture/index.js +6 -6
- package/packages/hr-emotional-picture/src/index.vue +66 -66
- package/packages/hr-employee-choose/index.js +7 -0
- package/packages/hr-employee-choose/src/image/arrow-right.png +0 -0
- package/packages/hr-employee-choose/src/index.vue +119 -0
- package/packages/hr-img-list/index.js +3 -3
- package/packages/hr-img-list/src/index.vue +143 -123
- package/packages/hr-info-card/index.js +7 -0
- package/packages/hr-info-card/src/index.vue +67 -0
- package/packages/hr-license-plate-number/index.js +8 -0
- package/packages/hr-license-plate-number/src/enum.js +44 -0
- package/packages/hr-license-plate-number/src/index.vue +164 -0
- package/packages/hr-license-plate-number/src/vnp-keyboard.vue +182 -0
- package/packages/hr-license-plate-number//350/275/246/347/211/214/345/217/267/345/274/271/347/252/227.md +0 -0
- package/packages/hr-module-card/index.js +12 -12
- package/packages/hr-module-card/src/index.vue +132 -132
- package/packages/hr-module-card//346/250/241/345/235/227/345/215/241/347/211/207/347/273/204/344/273/266.md +29 -29
- package/packages/hr-multiterm-choose/index.js +8 -0
- package/packages/hr-multiterm-choose/src/active-icon.png +0 -0
- package/packages/hr-multiterm-choose/src/index.vue +212 -0
- package/packages/hr-multiterm-choose//345/244/232/351/200/211/346/241/206.md +0 -0
- package/packages/hr-no-data/index.js +7 -0
- package/packages/hr-no-data/src/index.vue +48 -0
- package/packages/hr-notice-bar/index.js +6 -6
- package/packages/hr-notice-bar/src/bem.js +37 -37
- package/packages/hr-notice-bar/src/index.js +51 -51
- package/packages/hr-notice-bar//351/200/232/347/237/245/346/240/217/347/273/204/344/273/266.md +2 -2
- package/packages/hr-open-ks/index.js +7 -3
- package/packages/hr-open-ks/src/{main.vue → index.vue} +97 -85
- package/packages/hr-open-ks/src/util.js +31 -31
- package/packages/hr-pager/index.js +6 -6
- package/packages/hr-pager/src/index.vue +95 -95
- package/packages/hr-popup/index.js +3 -3
- package/packages/hr-popup/src/index.vue +59 -47
- package/packages/hr-preview-file/index.js +7 -0
- package/packages/hr-preview-file/src/index.vue +58 -0
- package/packages/hr-preview-file/src/util.js +50 -0
- package/packages/hr-rate/index.js +7 -0
- package/packages/hr-rate/src/index.vue +42 -0
- package/packages/hr-rate//350/257/204/345/210/206/347/273/204/344/273/266/357/274/210/345/270/246/346/226/207/346/241/210/357/274/211.md +0 -0
- package/packages/hr-reason-textarea/index.js +7 -0
- package/packages/hr-reason-textarea/src/index.vue +128 -0
- package/packages/hr-search-input/index.js +7 -7
- package/packages/hr-search-input/src/index.vue +144 -144
- package/packages/hr-select/index.js +7 -3
- package/packages/hr-select/src/index.vue +41 -0
- package/packages/hr-select-list/index.js +3 -3
- package/packages/hr-select-list/src/index.vue +167 -161
- package/packages/hr-single-choose/index.js +8 -0
- package/packages/hr-single-choose/src/index.vue +178 -0
- package/packages/hr-single-choose//345/215/225/351/200/211/346/241/206.md +0 -0
- package/packages/hr-slide-pager/guide/image/turn-left.png +0 -0
- package/packages/hr-slide-pager/guide/image/turn-right.png +0 -0
- package/packages/hr-slide-pager/guide/index.vue +58 -58
- package/packages/hr-slide-pager/index.js +6 -6
- package/packages/hr-slide-pager/src/index.vue +375 -370
- package/packages/hr-sort/index.js +3 -0
- package/packages/hr-sort/src/main.vue +133 -0
- package/packages/hr-sort//346/216/222/345/272/217.md +0 -0
- package/packages/hr-stack-image/index.js +3 -3
- package/packages/hr-stack-image/src/main.vue +76 -76
- package/packages/hr-tab-nav/index.js +7 -7
- package/packages/hr-tab-nav/src/index.vue +114 -96
- package/packages/hr-view-item/index.js +12 -12
- package/packages/hr-view-item/src/index.vue +89 -89
- package/packages/index.js +23 -53
- package/packages/utils/directive/common.js +0 -0
- package/packages/utils/directive/index.js +2 -0
- package/packages/utils/{directive.js → directive/specific.js} +54 -58
- package/packages/utils/index.js +7 -73
- package/packages/utils/tool/common.js +65 -0
- package/packages/utils/tool/index.js +2 -0
- package/packages/utils/tool/specific.js +0 -0
- package/dist/404.html +0 -20
- package/dist/ERP-components/index.html +0 -34
- package/dist/H5-components/custom//346/211/223/345/274/200/350/267/250/345/243/260/350/201/212/345/244/251.html +0 -34
- package/dist/H5-components/index.html +0 -34
- package/dist/H5-components/initial-stage/introduce.html +0 -71
- package/dist/H5-components/initial-stage/updateLog.html +0 -42
- package/dist/H5-components/views/hr-emotional-picture.html +0 -51
- package/dist/H5-components/views/hr-info-card.html +0 -53
- package/dist/H5-components/views/hr-no-data.html +0 -47
- package/dist/H5-components/views/hr-preview-file.html +0 -76
- package/dist/H5-components/views/hr-search-input.html +0 -50
- package/dist/H5-components/views/tic-rich-input.html +0 -95
- package/dist/H5-components/views//345/211/252/345/210/207/346/235/277/345/244/215/345/210/266.html +0 -59
- package/dist/H5-components/views//345/261/202/345/217/240/345/233/276/347/211/207.html +0 -62
- package/dist/H5-components/views//346/211/223/345/274/200/350/267/250/345/243/260/347/224/250/346/210/267.html +0 -66
- package/dist/H5-components/views//346/213/226/346/213/275dom/345/205/203/347/264/240.html +0 -52
- package/dist/H5-components/views//346/214/211/351/222/256/347/277/273/351/241/265/347/273/204/344/273/266.html +0 -48
- package/dist/H5-components/views//346/273/221/345/212/250/347/277/273/351/241/265/347/273/204/344/273/266.html +0 -55
- package/dist/H5-components/views//351/200/211/346/213/251/345/231/250/350/241/250/345/215/225.html +0 -111
- package/dist/assets/css/0.styles.89cafbc9.css +0 -8
- package/dist/assets/img/hr-emotional-picture.e7db80e6.png +0 -0
- package/dist/assets/img/hr-info-card.c50e7c33.png +0 -0
- package/dist/assets/img/hr-pager.34bafc88.png +0 -0
- package/dist/assets/img/hr-preview-file-1.3cb7c6ed.png +0 -0
- package/dist/assets/img/hr-preview-file-2.0fe45ea1.png +0 -0
- package/dist/assets/img/search.83621669.svg +0 -1
- package/dist/assets/img/select.acadd024.png +0 -0
- package/dist/assets/img/slide-pager.8e2433c6.png +0 -0
- package/dist/assets/img/tic-rich-input.8beff81a.png +0 -0
- package/dist/assets/img/v-dragable.b824e34a.png +0 -0
- package/dist/assets/js/1.1b9c091d.js +0 -1
- package/dist/assets/js/12.af649b9d.js +0 -1
- package/dist/assets/js/13.16dba19e.js +0 -1
- package/dist/assets/js/14.73f3c298.js +0 -1
- package/dist/assets/js/15.0a34e390.js +0 -1
- package/dist/assets/js/16.0cb2e2cf.js +0 -1
- package/dist/assets/js/17.ab78de8b.js +0 -1
- package/dist/assets/js/18.267c7007.js +0 -1
- package/dist/assets/js/19.879db5c0.js +0 -1
- package/dist/assets/js/2.c3a8a3e9.js +0 -16
- package/dist/assets/js/20.fe2689df.js +0 -1
- package/dist/assets/js/21.15a9e12c.js +0 -1
- package/dist/assets/js/22.8d5eaba3.js +0 -1
- package/dist/assets/js/23.333c4992.js +0 -1
- package/dist/assets/js/24.543262a0.js +0 -1
- package/dist/assets/js/25.657016f9.js +0 -1
- package/dist/assets/js/26.03bfb23b.js +0 -1
- package/dist/assets/js/27.3faf82a6.js +0 -1
- package/dist/assets/js/28.2bc37274.js +0 -1
- package/dist/assets/js/29.27882fc9.js +0 -1
- package/dist/assets/js/3.b50928b1.js +0 -1
- package/dist/assets/js/30.e682e7b5.js +0 -1
- package/dist/assets/js/31.711223cc.js +0 -1
- package/dist/assets/js/32.65c4dfd4.js +0 -1
- package/dist/assets/js/33.b3a7c2ea.js +0 -1
- package/dist/assets/js/34.159478bb.js +0 -1
- package/dist/assets/js/35.5dead2b1.js +0 -1
- package/dist/assets/js/36.b58af11f.js +0 -1
- package/dist/assets/js/37.86d4ed5a.js +0 -1
- package/dist/assets/js/38.af279c3f.js +0 -1
- package/dist/assets/js/39.89b34b70.js +0 -1
- package/dist/assets/js/4.5d6de21f.js +0 -1
- package/dist/assets/js/40.3e1516da.js +0 -1
- package/dist/assets/js/41.d021ff9e.js +0 -1
- package/dist/assets/js/42.cb50aa1c.js +0 -1
- package/dist/assets/js/43.5fded5c8.js +0 -1
- package/dist/assets/js/44.50f78d19.js +0 -1
- package/dist/assets/js/45.527386eb.js +0 -1
- package/dist/assets/js/46.9f784389.js +0 -1
- package/dist/assets/js/47.7553aa19.js +0 -1
- package/dist/assets/js/48.9fee02f5.js +0 -1
- package/dist/assets/js/49.25c724d7.js +0 -1
- package/dist/assets/js/5.b3e00557.js +0 -1
- package/dist/assets/js/50.aba60d25.js +0 -1
- package/dist/assets/js/51.01a0bacf.js +0 -1
- package/dist/assets/js/52.86012cbb.js +0 -1
- package/dist/assets/js/53.1563eb60.js +0 -1
- package/dist/assets/js/54.7e734114.js +0 -1
- package/dist/assets/js/55.28b96a29.js +0 -1
- package/dist/assets/js/56.81bd12a3.js +0 -1
- package/dist/assets/js/57.70cac198.js +0 -1
- package/dist/assets/js/58.cc1b357e.js +0 -1
- package/dist/assets/js/59.697472ae.js +0 -1
- package/dist/assets/js/6.2c85d2f8.js +0 -1
- package/dist/assets/js/60.36873359.js +0 -1
- package/dist/assets/js/61.0a367a50.js +0 -1
- package/dist/assets/js/62.1aaa7b15.js +0 -1
- package/dist/assets/js/63.52c8de07.js +0 -1
- package/dist/assets/js/64.25b51d76.js +0 -1
- package/dist/assets/js/65.462206d5.js +0 -1
- package/dist/assets/js/66.c336d9fe.js +0 -1
- package/dist/assets/js/67.1b7fa2b9.js +0 -1
- package/dist/assets/js/68.e0ebaf13.js +0 -1
- package/dist/assets/js/69.3e1b6d2e.js +0 -1
- package/dist/assets/js/7.d1b0af72.js +0 -1
- package/dist/assets/js/70.40431d36.js +0 -1
- package/dist/assets/js/71.64f24577.js +0 -1
- package/dist/assets/js/72.2cf8371b.js +0 -1
- package/dist/assets/js/73.88f7feb5.js +0 -1
- package/dist/assets/js/74.2d5471c0.js +0 -1
- package/dist/assets/js/8.9ab5ee55.js +0 -1
- package/dist/assets/js/9.aaca0f9d.js +0 -9
- package/dist/assets/js/app.7efea3c2.js +0 -16
- package/dist/assets/js/vendors~docsearch.6f3b450f.js +0 -3
- package/dist/guide/about//346/255/244/346/226/207/346/241/243/351/241/271/347/233/256.html +0 -41
- package/dist/guide/index.html +0 -34
- package/dist/index.html +0 -40
- package/dist/local-js/axios@0.19.0.min.js +0 -9
- package/dist/local-js/ks@3.0.7.umd.min.js +0 -1
- package/dist/local-js/ksui@3.0.37.umd.min.js +0 -10
- package/dist/local-js/quill.js +0 -3
- package/dist/local-js/vant@2.5.6.min.js +0 -7
- package/dist/local-js/vconsole.min.js +0 -10
- package/dist/local-js/vue-router@3.1.3.min.js +0 -6
- package/dist/local-js/vue@2.6.10.runtime.min.js +0 -6
- package/dist/local-js/vue@2.7.16.min.js +0 -11932
- package/dist/local-js/vuex@3.1.1.min.js +0 -6
- package/dist/utils/ERP/ERP/345/267/245/345/205/267/346/226/271/346/263/225.html +0 -38
- package/dist/utils/H5/H5/345/267/245/345/205/267/346/226/271/346/263/225.html +0 -55
- package/dist/utils/H5/copyText /345/244/215/345/210/266.html" +0 -45
- package/dist/utils/index.html +0 -34
- package/dist//346/226/207/346/241/243/345/272/223/346/226/207/344/273/266/345/244/271.html +0 -46
- package/lib/demo.html +0 -10
- package/lib/hrui@1.0.1.common.js +0 -7411
- package/lib/hrui@1.0.1.css +0 -1
- package/lib/hrui@1.0.1.umd.js +0 -7411
- package/lib/hrui@1.0.1.umd.min.js +0 -1
- package/packages/hr-clipboard/src/icon.png +0 -0
- package/packages/hr-clipboard/src/main.vue +0 -64
- package/packages/hr-select/src/main.vue +0 -62
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,n){"object"===typeof exports&&"object"===typeof module?module.exports=n():"function"===typeof define&&define.amd?define([],n):"object"===typeof exports?exports["hroa-ui@1.0.0"]=n():t["hroa-ui@1.0.0"]=n()})(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},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,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/",e(e.s="e74d")}({"0244":function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"04cf":function(t,n,e){var r=e("4a89"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"08c1":function(t,n,e){"use strict";var r,o,i,c,u=e("e6a1"),f=e("b808"),a=e("a9f2"),s=e("a274"),l=e("569f"),p=e("ab4c"),d=e("9184"),v=e("8115"),h=e("88b8"),b=e("1aa7"),y=e("1ad4").set,m=e("a24c")(),x=e("cc20"),g=e("73c3"),_=e("4b9e"),w=e("1c08"),j="Promise",O=f.TypeError,S=f.process,E=S&&S.versions,P=E&&E.v8||"",k=f[j],T="process"==s(S),F=function(){},M=o=x.f,I=!!function(){try{var t=k.resolve(1),n=(t.constructor={})[e("b67f")("species")]=function(t){t(F,F)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(F)instanceof n&&0!==P.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(r){}}(),A=function(t){var n;return!(!p(t)||"function"!=typeof(n=t.then))&&n},R=function(t,n){if(!t._n){t._n=!0;var e=t._c;m((function(){var r=t._v,o=1==t._s,i=0,c=function(n){var e,i,c,u=o?n.ok:n.fail,f=n.resolve,a=n.reject,s=n.domain;try{u?(o||(2==t._h&&L(t),t._h=1),!0===u?e=r:(s&&s.enter(),e=u(r),s&&(s.exit(),c=!0)),e===n.promise?a(O("Promise-chain cycle")):(i=A(e))?i.call(e,f,a):f(e)):a(r)}catch(l){s&&!c&&s.exit(),a(l)}};while(e.length>i)c(e[i++]);t._c=[],t._n=!1,n&&!t._h&&W(t)}))}},W=function(t){y.call(f,(function(){var n,e,r,o=t._v,i=C(t);if(i&&(n=g((function(){T?S.emit("unhandledRejection",o,t):(e=f.onunhandledrejection)?e({promise:t,reason:o}):(r=f.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=T||C(t)?2:1),t._a=void 0,i&&n.e)throw n.v}))},C=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){y.call(f,(function(){var n;T?S.emit("rejectionHandled",t):(n=f.onrejectionhandled)&&n({promise:t,reason:t._v})}))},N=function(t){var n=this;n._d||(n._d=!0,n=n._w||n,n._v=t,n._s=2,n._a||(n._a=n._c.slice()),R(n,!0))},B=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw O("Promise can't be resolved itself");(n=A(t))?m((function(){var r={_w:e,_d:!1};try{n.call(t,a(B,r,1),a(N,r,1))}catch(o){N.call(r,o)}})):(e._v=t,e._s=1,R(e,!1))}catch(r){N.call({_w:e,_d:!1},r)}}};I||(k=function(t){v(this,k,j,"_h"),d(t),r.call(this);try{t(a(B,this,1),a(N,this,1))}catch(n){N.call(this,n)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=e("9faf")(k.prototype,{then:function(t,n){var e=M(b(this,k));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=T?S.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&R(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=a(B,t,1),this.reject=a(N,t,1)},x.f=M=function(t){return t===k||t===c?new i(t):o(t)}),l(l.G+l.W+l.F*!I,{Promise:k}),e("aab6")(k,j),e("0ec0")(j),c=e("ca38")[j],l(l.S+l.F*!I,j,{reject:function(t){var n=M(this),e=n.reject;return e(t),n.promise}}),l(l.S+l.F*(u||!I),j,{resolve:function(t){return w(u&&this===c?k:this,t)}}),l(l.S+l.F*!(I&&e("2299")((function(t){k.all(t)["catch"](F)}))),j,{all:function(t){var n=this,e=M(n),r=e.resolve,o=e.reject,i=g((function(){var e=[],i=0,c=1;h(t,!1,(function(t){var u=i++,f=!1;e.push(void 0),c++,n.resolve(t).then((function(t){f||(f=!0,e[u]=t,--c||r(e))}),o)})),--c||r(e)}));return i.e&&o(i.v),e.promise},race:function(t){var n=this,e=M(n),r=e.reject,o=g((function(){h(t,!1,(function(t){n.resolve(t).then(e.resolve,r)}))}));return o.e&&r(o.v),e.promise}})},"0ec0":function(t,n,e){"use strict";var r=e("b808"),o=e("e4e1"),i=e("45e2"),c=e("b67f")("species");t.exports=function(t){var n=r[t];i&&n&&!n[c]&&o.f(n,c,{configurable:!0,get:function(){return this}})}},"0f4a":function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},"14c6":function(t,n,e){"use strict";var r=e("3bb1"),o=e("b5cb"),i=e("a638"),c=e("58b9");t.exports=e("fa2d")(Array,"Array",(function(t,n){this._t=c(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):o(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},"154d":function(t,n){},"18fd":function(t,n){},"1aa7":function(t,n,e){var r=e("27b2"),o=e("9184"),i=e("b67f")("species");t.exports=function(t,n){var e,c=r(t).constructor;return void 0===c||void 0==(e=r(c)[i])?n:o(e)}},"1ad4":function(t,n,e){var r,o,i,c=e("a9f2"),u=e("ef26"),f=e("d8db"),a=e("781f"),s=e("b808"),l=s.process,p=s.setImmediate,d=s.clearImmediate,v=s.MessageChannel,h=s.Dispatch,b=0,y={},m="onreadystatechange",x=function(){var t=+this;if(y.hasOwnProperty(t)){var n=y[t];delete y[t],n()}},g=function(t){x.call(t.data)};p&&d||(p=function(t){var n=[],e=1;while(arguments.length>e)n.push(arguments[e++]);return y[++b]=function(){u("function"==typeof t?t:Function(t),n)},r(b),b},d=function(t){delete y[t]},"process"==e("71fa")(l)?r=function(t){l.nextTick(c(x,t,1))}:h&&h.now?r=function(t){h.now(c(x,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=g,r=c(i.postMessage,i,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts?(r=function(t){s.postMessage(t+"","*")},s.addEventListener("message",g,!1)):r=m in a("script")?function(t){f.appendChild(a("script"))[m]=function(){f.removeChild(this),x.call(t)}}:function(t){setTimeout(c(x,t,1),0)}),t.exports={set:p,clear:d}},"1c08":function(t,n,e){var r=e("27b2"),o=e("ab4c"),i=e("cc20");t.exports=function(t,n){if(r(t),o(n)&&n.constructor===t)return n;var e=i.f(t),c=e.resolve;return c(n),e.promise}},"1d27":function(t,n,e){var r=e("27b2");t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(c){var i=t["return"];throw void 0!==i&&r(i.call(t)),c}}},"1d73":function(t,n,e){t.exports=e("312a")("native-function-to-string",Function.toString)},"1f51":function(t,n,e){var r=e("b808"),o=e("a0a8"),i=e("0f4a"),c=e("c0f4")("src"),u=e("1d73"),f="toString",a=(""+u).split(f);e("ca38").inspectSource=function(t){return u.call(t)},(t.exports=function(t,n,e,u){var f="function"==typeof e;f&&(i(e,"name")||o(e,"name",n)),t[n]!==e&&(f&&(i(e,c)||o(e,c,t[n]?""+t[n]:a.join(String(n)))),t===r?t[n]=e:u?t[n]?t[n]=e:o(t,n,e):(delete t[n],o(t,n,e)))})(Function.prototype,f,(function(){return"function"==typeof this&&this[c]||u.call(this)}))},2299:function(t,n,e){var r=e("b67f")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(c){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i=[7],u=i[r]();u.next=function(){return{done:e=!0}},i[r]=function(){return u},t(i)}catch(c){}return e}},"27b2":function(t,n,e){var r=e("ab4c");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"312a":function(t,n,e){var r=e("ca38"),o=e("b808"),i="__core-js_shared__",c=o[i]||(o[i]={});(t.exports=function(t,n){return c[t]||(c[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e("e6a1")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"3bb1":function(t,n,e){var r=e("b67f")("unscopables"),o=Array.prototype;void 0==o[r]&&e("a0a8")(o,r,{}),t.exports=function(t){o[r][t]=!0}},4052:function(t,n,e){var r=e("4a89"),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},"45e2":function(t,n,e){t.exports=!e("b629")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},4842:function(t,n,e){var r=e("569f");r(r.S+r.F,"Object",{assign:e("a402")})},"49c1":function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"4a89":function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},"4b9e":function(t,n,e){var r=e("b808"),o=r.navigator;t.exports=o&&o.userAgent||""},"4cf4":function(t,n,e){var r=e("0244");t.exports=function(t){return Object(r(t))}},"55e7":function(t,n,e){"use strict";e.r(n);var r=e("18fd");for(var o in r)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return r[t]}))}(o);var i=e("6bf1");e.d(n,"draggable",(function(){return i["draggable"]}))},"569f":function(t,n,e){var r=e("b808"),o=e("ca38"),i=e("a0a8"),c=e("1f51"),u=e("a9f2"),f="prototype",a=function(t,n,e){var s,l,p,d,v=t&a.F,h=t&a.G,b=t&a.S,y=t&a.P,m=t&a.B,x=h?r:b?r[n]||(r[n]={}):(r[n]||{})[f],g=h?o:o[n]||(o[n]={}),_=g[f]||(g[f]={});for(s in h&&(e=n),e)l=!v&&x&&void 0!==x[s],p=(l?x:e)[s],d=m&&l?u(p,r):y&&"function"==typeof p?u(Function.call,p):p,x&&c(x,s,p,t&a.U),g[s]!=p&&i(g,s,d),y&&_[s]!=p&&(_[s]=p)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},"58b9":function(t,n,e){var r=e("d43f"),o=e("0244");t.exports=function(t){return r(o(t))}},"696b":function(t,n){n.f=Object.getOwnPropertySymbols},"6bf1":function(t,n,e){"use strict";e.r(n),e.d(n,"draggable",(function(){return r}));var r={bind:function(t){var n=!1,e={x:0,y:0},r={x:0,y:0};function o(o){n=!0,r.x=o.touches[0].clientX,r.y=o.touches[0].clientY,e.x=t.offsetLeft,e.y=t.offsetTop}function i(o){if(n){var i=e.x+(o.touches[0].clientX-r.x),c=e.y+(o.touches[0].clientY-r.y);i<0&&(i=0),i>document.documentElement.clientWidth-t.offsetWidth&&(i=document.documentElement.clientWidth-t.offsetWidth),c<0&&(c=0),c>document.documentElement.clientHeight-t.offsetHeight&&(c=document.documentElement.clientHeight-t.offsetHeight),t.style.left=i+"px",t.style.top=c+"px"}}function c(){n=!1}t.addEventListener("touchstart",o,!1),t.addEventListener("touchmove",i,!1),t.addEventListener("touchend",c,!1)}}},"71fa":function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},"73c3":function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(n){return{e:!0,v:n}}}},"781f":function(t,n,e){var r=e("ab4c"),o=e("b808").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},8115:function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},"88b8":function(t,n,e){var r=e("a9f2"),o=e("1d27"),i=e("f26d"),c=e("27b2"),u=e("04cf"),f=e("b36f"),a={},s={};n=t.exports=function(t,n,e,l,p){var d,v,h,b,y=p?function(){return t}:f(t),m=r(e,l,n?2:1),x=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(d=u(t.length);d>x;x++)if(b=n?m(c(v=t[x])[0],v[1]):m(t[x]),b===a||b===s)return b}else for(h=y.call(t);!(v=h.next()).done;)if(b=o(h,m,v.value,n),b===a||b===s)return b};n.BREAK=a,n.RETURN=s},"8ae2":function(t,n,e){"use strict";e.r(n);var r=e("aab4");e.d(n,"ksStorage",(function(){return r["ksStorage"]})),e.d(n,"debounce",(function(){return r["debounce"]}));var o=e("154d");for(var i in o)["default","ksStorage","debounce"].indexOf(i)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(i)},9184:function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"9ed1":function(t,n,e){var r=e("f6d7"),o=e("49c1");t.exports=Object.keys||function(t){return r(t,o)}},"9faf":function(t,n,e){var r=e("1f51");t.exports=function(t,n,e){for(var o in n)r(t,o,n[o],e);return t}},a0a8:function(t,n,e){var r=e("e4e1"),o=e("dcc3");t.exports=e("45e2")?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},a24c:function(t,n,e){var r=e("b808"),o=e("1ad4").set,i=r.MutationObserver||r.WebKitMutationObserver,c=r.process,u=r.Promise,f="process"==e("71fa")(c);t.exports=function(){var t,n,e,a=function(){var r,o;f&&(r=c.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?e():n=void 0,i}}n=void 0,r&&r.enter()};if(f)e=function(){c.nextTick(a)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var s=u.resolve(void 0);e=function(){s.then(a)}}else e=function(){o.call(r,a)};else{var l=!0,p=document.createTextNode("");new i(a).observe(p,{characterData:!0}),e=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};n&&(n.next=o),t||(t=o,e()),n=o}}},a274:function(t,n,e){var r=e("71fa"),o=e("b67f")("toStringTag"),i="Arguments"==r(function(){return arguments}()),c=function(t,n){try{return t[n]}catch(e){}};t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=c(n=Object(t),o))?e:i?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},a402:function(t,n,e){"use strict";var r=e("45e2"),o=e("9ed1"),i=e("696b"),c=e("bf41"),u=e("4cf4"),f=e("d43f"),a=Object.assign;t.exports=!a||e("b629")((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=a({},t)[e]||Object.keys(a({},n)).join("")!=r}))?function(t,n){var e=u(t),a=arguments.length,s=1,l=i.f,p=c.f;while(a>s){var d,v=f(arguments[s++]),h=l?o(v).concat(l(v)):o(v),b=h.length,y=0;while(b>y)d=h[y++],r&&!p.call(v,d)||(e[d]=v[d])}return e}:a},a638:function(t,n){t.exports={}},a9f2:function(t,n,e){var r=e("9184");t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},aab4:function(t,n,e){"use strict";e.r(n),e.d(n,"ksStorage",(function(){return r})),e.d(n,"debounce",(function(){return o}));var r={setItem:function(t,n){return window.$__ENV_WEB__?sessionStorage.setItem(t,n):window.ks.callFunc&&window.ks.callFunc({method:"storageSetItem",params:{key:t,value:n}})},getItem:function(t){return window.$__ENV_WEB__?sessionStorage.getItem(t):window.ks.callFunc&&window.ks.callFunc({method:"storageGetItem",params:{key:t}})},removeItem:function(t){return window.ks.callFunc&&window.ks.callFunc({method:"storageSetItem",params:{key:t,value:""}})}},o=function(t,n,e){var r=null;return function(){var o=this,i=arguments;if(r&&clearTimeout(r),e){var c=!r;r=setTimeout((function(){r=null}),n),c&&t.apply(o,i)}else r=setTimeout((function(){return t.apply(o,i)}),n)}}},aab6:function(t,n,e){var r=e("e4e1").f,o=e("0f4a"),i=e("b67f")("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},ab4c:function(t,n){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},b36f:function(t,n,e){var r=e("a274"),o=e("b67f")("iterator"),i=e("a638");t.exports=e("ca38").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},b5cb:function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},b629:function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},b67f:function(t,n,e){var r=e("312a")("wks"),o=e("c0f4"),i=e("b808").Symbol,c="function"==typeof i,u=t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))};u.store=r},b808:function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},b938:function(t,n,e){var r=e("ab4c");t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},be5a:function(t,n,e){var r=e("312a")("keys"),o=e("c0f4");t.exports=function(t){return r[t]||(r[t]=o(t))}},bf41:function(t,n){n.f={}.propertyIsEnumerable},c0f4:function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},c339:function(t,n,e){var r=e("0f4a"),o=e("4cf4"),i=e("be5a")("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},ca38:function(t,n){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},cc1d:function(t,n,e){var r=e("58b9"),o=e("04cf"),i=e("4052");t.exports=function(t){return function(n,e,c){var u,f=r(n),a=o(f.length),s=i(c,a);if(t&&e!=e){while(a>s)if(u=f[s++],u!=u)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===e)return t||s||0;return!t&&-1}}},cc20:function(t,n,e){"use strict";var r=e("9184");function o(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)}t.exports.f=function(t){return new o(t)}},d43f:function(t,n,e){var r=e("71fa");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},d8db:function(t,n,e){var r=e("b808").document;t.exports=r&&r.documentElement},d9fc:function(t,n,e){"use strict";var r=e("569f"),o=e("ca38"),i=e("b808"),c=e("1aa7"),u=e("1c08");r(r.P+r.R,"Promise",{finally:function(t){var n=c(this,o.Promise||i.Promise),e="function"==typeof t;return this.then(e?function(e){return u(n,t()).then((function(){return e}))}:t,e?function(e){return u(n,t()).then((function(){throw e}))}:t)}})},dcc3:function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},e4e1:function(t,n,e){var r=e("27b2"),o=e("e830"),i=e("b938"),c=Object.defineProperty;n.f=e("45e2")?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return c(t,n,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},e523:function(t,n,e){var r=e("e4e1"),o=e("27b2"),i=e("9ed1");t.exports=e("45e2")?Object.defineProperties:function(t,n){o(t);var e,c=i(n),u=c.length,f=0;while(u>f)r.f(t,e=c[f++],n[e]);return t}},e6a1:function(t,n){t.exports=!1},e74d:function(t,n,e){"use strict";e.r(n);e("14c6"),e("08c1"),e("4842"),e("d9fc");var r=e("55e7"),o=e("8ae2");n["default"]={directive:r,tools:o}},e830:function(t,n,e){t.exports=!e("45e2")&&!e("b629")((function(){return 7!=Object.defineProperty(e("781f")("div"),"a",{get:function(){return 7}}).a}))},ed0f:function(t,n,e){var r=e("27b2"),o=e("e523"),i=e("49c1"),c=e("be5a")("IE_PROTO"),u=function(){},f="prototype",a=function(){var t,n=e("781f")("iframe"),r=i.length,o="<",c=">";n.style.display="none",e("d8db").appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write(o+"script"+c+"document.F=Object"+o+"/script"+c),t.close(),a=t.F;while(r--)delete a[f][i[r]];return a()};t.exports=Object.create||function(t,n){var e;return null!==t?(u[f]=r(t),e=new u,u[f]=null,e[c]=t):e=a(),void 0===n?e:o(e,n)}},eec7:function(t,n,e){"use strict";var r=e("ed0f"),o=e("dcc3"),i=e("aab6"),c={};e("a0a8")(c,e("b67f")("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(c,{next:o(1,e)}),i(t,n+" Iterator")}},ef26:function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},f26d:function(t,n,e){var r=e("a638"),o=e("b67f")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},f6d7:function(t,n,e){var r=e("0f4a"),o=e("58b9"),i=e("cc1d")(!1),c=e("be5a")("IE_PROTO");t.exports=function(t,n){var e,u=o(t),f=0,a=[];for(e in u)e!=c&&r(u,e)&&a.push(e);while(n.length>f)r(u,e=n[f++])&&(~i(a,e)||a.push(e));return a}},fa2d:function(t,n,e){"use strict";var r=e("e6a1"),o=e("569f"),i=e("1f51"),c=e("a0a8"),u=e("a638"),f=e("eec7"),a=e("aab6"),s=e("c339"),l=e("b67f")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",h="values",b=function(){return this};t.exports=function(t,n,e,y,m,x,g){f(e,n,y);var _,w,j,O=function(t){if(!p&&t in k)return k[t];switch(t){case v:return function(){return new e(this,t)};case h:return function(){return new e(this,t)}}return function(){return new e(this,t)}},S=n+" Iterator",E=m==h,P=!1,k=t.prototype,T=k[l]||k[d]||m&&k[m],F=T||O(m),M=m?E?O("entries"):F:void 0,I="Array"==n&&k.entries||T;if(I&&(j=s(I.call(new t)),j!==Object.prototype&&j.next&&(a(j,S,!0),r||"function"==typeof j[l]||c(j,l,b))),E&&T&&T.name!==h&&(P=!0,F=function(){return T.call(this)}),r&&!g||!p&&!P&&k[l]||c(k,l,F),u[n]=F,u[S]=b,m)if(_={values:E?F:O(h),keys:x?F:O(v),entries:M},g)for(w in _)w in k||i(k,w,_[w]);else o(o.P+o.F*(p||P),n,_);return _}}})["default"]}));
|
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kyfe/hroa-ui",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"serve": "vue-cli-service serve",
|
|
6
6
|
"build": "vue-cli-service build",
|
|
7
7
|
"lint": "vue-cli-service lint",
|
|
8
|
-
"lib": "vue-cli-service build --target lib --name
|
|
9
|
-
"build:lib": "
|
|
8
|
+
"lib": "vue-cli-service build --target lib --dest dist --name hroa-ui ./packages/index.js",
|
|
9
|
+
"build:lib": "build-lib.sh",
|
|
10
10
|
"docs:dev": "vuepress dev docs",
|
|
11
11
|
"docs:build": "vuepress build docs"
|
|
12
12
|
},
|
|
13
|
-
"main": "./dist/hrui.common.js",
|
|
14
|
-
"module": "./dist/hrui.umd.js",
|
|
15
13
|
"dependencies": {
|
|
16
14
|
"core-js": "2.6.5",
|
|
15
|
+
"quill": "^1.3.7",
|
|
17
16
|
"vue": "^2.6.10"
|
|
18
17
|
},
|
|
19
18
|
"devDependencies": {
|
|
@@ -62,5 +61,7 @@
|
|
|
62
61
|
"> 1%",
|
|
63
62
|
"last 2 versions",
|
|
64
63
|
"not dead"
|
|
65
|
-
]
|
|
64
|
+
],
|
|
65
|
+
"main": "./dist/hroa-ui.common.js",
|
|
66
|
+
"module": "./dist/hroa-ui.umd.js"
|
|
66
67
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const jsModulefiles = require.context('./', true, /\.js$/)
|
|
2
|
+
|
|
3
|
+
export const getJsModuleList = () => {
|
|
4
|
+
const moduleMap = {}
|
|
5
|
+
jsModulefiles.keys().forEach((file) => {
|
|
6
|
+
if (file.indexOf('hr') === -1 && file.indexOf('src/index.js') === -1) return
|
|
7
|
+
const component = jsModulefiles(file).default || jsModulefiles(file)
|
|
8
|
+
moduleMap[component.name] = component
|
|
9
|
+
})
|
|
10
|
+
return moduleMap
|
|
11
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// import oldQuill from 'quill'
|
|
2
|
+
const Quill = window.Quill
|
|
3
|
+
// const Quill = window.Quill || oldQuill
|
|
4
|
+
|
|
5
|
+
// const Embed = Quill.import('blots/block/embed')
|
|
6
|
+
const Embed = Quill.import('blots/embed')
|
|
7
|
+
// const Embed = Quill.import('blots/inline')
|
|
8
|
+
// 扩展Quill内置的@人功能
|
|
9
|
+
class AtPerson extends Embed {
|
|
10
|
+
static create (value) {
|
|
11
|
+
let node = super.create(value)
|
|
12
|
+
|
|
13
|
+
let employeeName = value.split('/')[0]
|
|
14
|
+
let employeeNumber = value.split('/')[1]
|
|
15
|
+
|
|
16
|
+
node.setAttribute('alt', `${employeeNumber}, ${employeeName}`)
|
|
17
|
+
|
|
18
|
+
node.setAttribute('style', 'color: rgb(121, 114, 254); display: inline-block;')
|
|
19
|
+
node.setAttribute('contenteditable', true)
|
|
20
|
+
node.innerText = '@' + employeeName + ' '
|
|
21
|
+
return node
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 返回节点自身的value值 用于撤销操作
|
|
25
|
+
static value (node) {
|
|
26
|
+
let employeeName = node.innerText && node.innerText.split('/')[0]
|
|
27
|
+
let employeeNumber = node.innerText && node.innerText.split('/')[1]
|
|
28
|
+
if (!employeeNumber && node.getAttribute('alt')) {
|
|
29
|
+
employeeNumber = node.getAttribute('alt').split(',')[0]
|
|
30
|
+
}
|
|
31
|
+
employeeName = employeeName.replace('@', '').trim()
|
|
32
|
+
return `${employeeName}/${employeeNumber}`
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 定义自定义标签
|
|
37
|
+
AtPerson.blotName = 'at'
|
|
38
|
+
AtPerson.tagName = 'at'
|
|
39
|
+
AtPerson.className = 'at'
|
|
40
|
+
|
|
41
|
+
export default AtPerson
|
|
42
|
+
|
|
43
|
+
|
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 富文本编辑区域 -->
|
|
3
|
+
<div class="hr-at-input ql-editor"
|
|
4
|
+
:id="`editor${this.tag}`"
|
|
5
|
+
@keydown.enter="onEnter"
|
|
6
|
+
@keydown.delete="onDelete"
|
|
7
|
+
@input="onInput"
|
|
8
|
+
@paste="onPaste"
|
|
9
|
+
ref="htmlContent"></div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
// import oldQuill from 'quill'
|
|
14
|
+
// 为了解决ios光标索引错乱问题,评论框组件优先使用2.0.4版本的quill(部分低版本安卓机器只能用1.3.7版本, 因为2.0.4版本有es6语法)
|
|
15
|
+
// const Quill = oldQuill
|
|
16
|
+
const Quill = window.Quill
|
|
17
|
+
import AtPerson from './blot/atPerson.js'
|
|
18
|
+
import { strTranslateAt, atTranslateStr } from './utils/index.js'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'HrAtInput',
|
|
22
|
+
// 实现v-model指令
|
|
23
|
+
model: {
|
|
24
|
+
// eslint-disable-next-line
|
|
25
|
+
innerHTML: '',
|
|
26
|
+
event: 'change'
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
placeholder: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: '请输入'
|
|
32
|
+
},
|
|
33
|
+
// 当同一页面有多个编辑器时,传入不同tag起区分编辑器的作用
|
|
34
|
+
tag: {
|
|
35
|
+
type: [String, Number],
|
|
36
|
+
default: 1
|
|
37
|
+
},
|
|
38
|
+
value: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
maxLength: {
|
|
43
|
+
type: Number,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
data () {
|
|
47
|
+
return {
|
|
48
|
+
textContent: '',
|
|
49
|
+
htmlContent: '',
|
|
50
|
+
len: 0,
|
|
51
|
+
quill: null,
|
|
52
|
+
selectionStatus: null, // 选区状态
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
mounted () {
|
|
56
|
+
Quill.register('formats/AtPerson', AtPerson)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
this.quill = new Quill(`#editor${this.tag}`, {
|
|
60
|
+
placeholder: this.placeholder,
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
setTimeout(() => {
|
|
64
|
+
this.initQuillCopyConfig()
|
|
65
|
+
this.addEventListeners()
|
|
66
|
+
this.initEmojiFocusEvent()
|
|
67
|
+
})
|
|
68
|
+
},
|
|
69
|
+
computed: {
|
|
70
|
+
isIos () {
|
|
71
|
+
return (document.querySelector('#kuasheng-h5') && document.querySelector('#kuasheng-h5').className.indexOf('ios')) > -1
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
watch: {
|
|
75
|
+
placeholder (val) {
|
|
76
|
+
this.quill.root.setAttribute('data-placeholder', val)
|
|
77
|
+
},
|
|
78
|
+
value (val) {
|
|
79
|
+
this.setHtmlContentNew(val)
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
methods: {
|
|
83
|
+
/**
|
|
84
|
+
* @description 将自定义标记文本转为at标签
|
|
85
|
+
* @param {String} content
|
|
86
|
+
* @param {Boolean} isQuillUse 是否在quill富文本使用(默认是)
|
|
87
|
+
* @returns {String}
|
|
88
|
+
*/
|
|
89
|
+
strTranslateAt,
|
|
90
|
+
/**
|
|
91
|
+
* @description at标签转化为自定义标识文本
|
|
92
|
+
* @param {String} content
|
|
93
|
+
* @returns {String}
|
|
94
|
+
*/
|
|
95
|
+
atTranslateStr,
|
|
96
|
+
/**
|
|
97
|
+
* @description 添加quill匹配器来处理粘贴的内容
|
|
98
|
+
*/
|
|
99
|
+
initQuillCopyConfig () {
|
|
100
|
+
// 处理粘贴at标签
|
|
101
|
+
this.quill.clipboard.addMatcher('AT', (node, delta) => {
|
|
102
|
+
console.log('node----🔥', node)
|
|
103
|
+
console.log('delta----🔥', delta)
|
|
104
|
+
let arr = node.getAttribute('alt') && node.getAttribute('alt').split(', ')
|
|
105
|
+
if (node.tagName === 'AT' && arr && arr.length) {
|
|
106
|
+
delta.ops.forEach((op) => {
|
|
107
|
+
op.insert['at'] = `${arr[1]}/${arr[0]}`
|
|
108
|
+
delete op.attributes
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
return delta
|
|
112
|
+
})
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* @description 监听输入框删除事件
|
|
116
|
+
*/
|
|
117
|
+
onDelete () {
|
|
118
|
+
this.$emit('delete')
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* @description 给@人标识绑定聚焦事件,让其点击有焦点
|
|
122
|
+
*/
|
|
123
|
+
initEmojiFocusEvent () {
|
|
124
|
+
// 处理编辑器里面的@人标识可focus
|
|
125
|
+
this.$refs.htmlContent.querySelector('.ql-editor').addEventListener('click', async (e) => {
|
|
126
|
+
console.log('e.target', e)
|
|
127
|
+
if (e.target.parentNode.tagName === 'AT' && e.target.parentNode.className === 'at') {
|
|
128
|
+
let blot = Quill.find(e.target.parentNode)
|
|
129
|
+
let index = this.quill && this.quill.getIndex(blot) + 1
|
|
130
|
+
// index正常返回数字,则设置选区
|
|
131
|
+
if (Object.prototype.toString.call(index) === '[object Number]') {
|
|
132
|
+
this.quill && this.quill.setSelection(index, 0)
|
|
133
|
+
}
|
|
134
|
+
return
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* @description 接收AT选人页面选中人员数据,并回显到输入框内 (父组件调用)
|
|
140
|
+
* @param {Array} userList 人员集合(数据结构:[{employeeNumber, employeeName}])
|
|
141
|
+
*/
|
|
142
|
+
setAtPersonList (userList) {
|
|
143
|
+
userList.forEach(async (item, index) => {
|
|
144
|
+
this.insertAtCursor(item, index)
|
|
145
|
+
})
|
|
146
|
+
setTimeout(() => {
|
|
147
|
+
// 这里执行onInput是为了走里面的超出字数截断文本逻辑
|
|
148
|
+
this.onInput({ inputType: 'atPerson' })
|
|
149
|
+
}, 100)
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* @description 插入at自定义标签
|
|
153
|
+
* @param {*} assignObj 人员信息对象
|
|
154
|
+
* @param {*} index 人员对象数组索引
|
|
155
|
+
*/
|
|
156
|
+
async insertAtCursor (assignObj, index) {
|
|
157
|
+
this.quill.focus()
|
|
158
|
+
await this.delayFn(10)
|
|
159
|
+
let rangeIndex = this.quill.selection.savedRange.index
|
|
160
|
+
console.log('rangeIndex---index', rangeIndex, index)
|
|
161
|
+
|
|
162
|
+
// @人员标签插入
|
|
163
|
+
const employeeNumber = assignObj.employeeNumber || ''
|
|
164
|
+
const employeeName = assignObj.employeeName || assignObj.name || ''
|
|
165
|
+
|
|
166
|
+
// this.quill.insertEmbed(rangeIndex, 'at', {
|
|
167
|
+
// alt: `$_hl{${employeeNumber}, ${employeeName}}`,
|
|
168
|
+
// text: `@${employeeName}`,
|
|
169
|
+
// })
|
|
170
|
+
|
|
171
|
+
let html = `<at>${employeeName}/${employeeNumber}</at>`
|
|
172
|
+
this.quill.clipboard.dangerouslyPasteHTML(rangeIndex, `${html}`)
|
|
173
|
+
|
|
174
|
+
// 输入@选择人员后,清除@字符
|
|
175
|
+
if (!this.isBtnUse && index === 0) {
|
|
176
|
+
this.quill.deleteText(rangeIndex - 1, 1)
|
|
177
|
+
this.isBtnUse = false
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// 插入成功后移动光标
|
|
181
|
+
// this.quill.setSelection(rangeIndex + 1, 0)
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* @description 同步阻塞延迟函数
|
|
185
|
+
* @param {*} time 毫秒
|
|
186
|
+
*/
|
|
187
|
+
delayFn (time) {
|
|
188
|
+
return new Promise(resolve => {
|
|
189
|
+
setTimeout(() => {
|
|
190
|
+
resolve()
|
|
191
|
+
}, time)
|
|
192
|
+
})
|
|
193
|
+
},
|
|
194
|
+
/**
|
|
195
|
+
* @description 聚焦输入框 唤起键盘
|
|
196
|
+
* @param {Boolean} isFocusEnd 光标是否置尾
|
|
197
|
+
*/
|
|
198
|
+
focusInput (isFocusEnd = false) {
|
|
199
|
+
this.quill && this.quill.focus()
|
|
200
|
+
|
|
201
|
+
// 兼容ios无法唤起键盘
|
|
202
|
+
if (this.isIos && this.inputTemp) {
|
|
203
|
+
this.inputTemp.focus()
|
|
204
|
+
}
|
|
205
|
+
// 光标置尾
|
|
206
|
+
if (isFocusEnd) {
|
|
207
|
+
this.quill && this.quill.setSelection(this.len || this.quill.getLength(), 0)
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
/**
|
|
211
|
+
* @description 输入框失焦
|
|
212
|
+
*/
|
|
213
|
+
blurInput () {
|
|
214
|
+
this.quill.blur()
|
|
215
|
+
},
|
|
216
|
+
/**
|
|
217
|
+
* @description 监听quill各种事件
|
|
218
|
+
*/
|
|
219
|
+
addEventListeners () {
|
|
220
|
+
this.$refs.htmlContent.querySelector('.ql-editor').addEventListener('focus', () => {
|
|
221
|
+
this.$emit('focus')
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
this.$refs.htmlContent.querySelector('.ql-editor').addEventListener('input', () => {
|
|
225
|
+
this.setQuillPlaceholder('')
|
|
226
|
+
})
|
|
227
|
+
|
|
228
|
+
this.$refs.htmlContent.querySelector('.ql-editor').addEventListener('blur', () => {
|
|
229
|
+
this.setQuillPlaceholder(this.placeholder)
|
|
230
|
+
this.$emit('blur')
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
this.quill.on('text-change', (delta, oldDelta, source) => {
|
|
234
|
+
// 获取内容
|
|
235
|
+
this.htmlContent = this.$refs.htmlContent.querySelector('.ql-editor').innerHTML
|
|
236
|
+
this.textContent = this.$refs.htmlContent.querySelector('.ql-editor').textContent
|
|
237
|
+
this.handleChange(this.textContent, this.htmlContent)
|
|
238
|
+
|
|
239
|
+
if (source == 'user') {
|
|
240
|
+
// 判断用户手动输入的@字符
|
|
241
|
+
if (delta && ((delta.ops[0] && delta.ops[0].insert && delta.ops[0].insert == '@') ||
|
|
242
|
+
(delta.ops[1] && delta.ops[1].insert && delta.ops[1].insert == '@'))) {
|
|
243
|
+
console.log('判断新输入的@字符')
|
|
244
|
+
// 去选人页面
|
|
245
|
+
this.goToSelectAtPerson()
|
|
246
|
+
} else {
|
|
247
|
+
const length = this.quill.getLength()
|
|
248
|
+
if (length <= 1) this.setQuillPlaceholder(this.placeholder)
|
|
249
|
+
|
|
250
|
+
// 兼容ios在标签后输入光标会跳的问题
|
|
251
|
+
if (delta.ops[delta.ops.length - 1].insert && this.isIos) {
|
|
252
|
+
const selection = this.quill.getSelection().index + delta.ops[delta.ops.length - 1].insert.length
|
|
253
|
+
this.quill.setSelection(selection)
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
})
|
|
258
|
+
},
|
|
259
|
+
/**
|
|
260
|
+
* @description 设置输入框提示语
|
|
261
|
+
* @param {*} text
|
|
262
|
+
*/
|
|
263
|
+
setQuillPlaceholder (text) {
|
|
264
|
+
const editorContainer = this.quill.container.childNodes[0]
|
|
265
|
+
editorContainer.setAttribute('data-placeholder', text)
|
|
266
|
+
},
|
|
267
|
+
/**
|
|
268
|
+
* @description 去选人页面
|
|
269
|
+
* @param {Boolean} isBtnUse 是否按钮触发的 (按钮触发的去选人则输入框无需删除@符号处理)
|
|
270
|
+
*/
|
|
271
|
+
goToSelectAtPerson (isBtnUse = false) {
|
|
272
|
+
this.isBtnUse = isBtnUse
|
|
273
|
+
this.$nextTick(() => {
|
|
274
|
+
// 跳转之前把键盘收起,否则返回详情会出现样式问题
|
|
275
|
+
this.quill.enable(true)
|
|
276
|
+
this.quill.blur()
|
|
277
|
+
setTimeout(() => {
|
|
278
|
+
// 通知父组件打开选择At人员页面
|
|
279
|
+
this.$emit('openSelectAtPersonPage', this.getHasSelectedCount())
|
|
280
|
+
})
|
|
281
|
+
})
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* @description 获取当前评论已@人数
|
|
285
|
+
* @returns { Number }
|
|
286
|
+
*/
|
|
287
|
+
getHasSelectedCount () {
|
|
288
|
+
let content = this.$refs.htmlContent.querySelector('.ql-editor').innerHTML
|
|
289
|
+
let str = atTranslateStr(content)
|
|
290
|
+
let resArr = str.match(/\$_hl{(\S+, \S+)}/g)
|
|
291
|
+
return (resArr && resArr.length) || 0
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
* @description html转delta
|
|
295
|
+
*/
|
|
296
|
+
htmlToDelta (html) {
|
|
297
|
+
let delta = window.Quill ? this.quill.clipboard.convertHTML(html) : this.quill.clipboard.convert(html) // 把html转换成delta,因为quill只识别delta
|
|
298
|
+
|
|
299
|
+
delta.forEach(v => {
|
|
300
|
+
// 兼容pc端表情
|
|
301
|
+
if (v.insert && v.insert.image && v.insert.image.indexOf('http://erphostjs.kye-erp.com/kuasheng-emoji') > -1) {
|
|
302
|
+
v.attributes = { width: '16' }
|
|
303
|
+
}
|
|
304
|
+
})
|
|
305
|
+
return delta
|
|
306
|
+
},
|
|
307
|
+
/**
|
|
308
|
+
* @description 设置编辑器内容
|
|
309
|
+
* @param {string} html
|
|
310
|
+
*/
|
|
311
|
+
setHtmlContentNew (html) {
|
|
312
|
+
let rangeIndex = this.quill.selection.savedRange.index
|
|
313
|
+
|
|
314
|
+
// 将自定义标记文本转为at标签
|
|
315
|
+
html = strTranslateAt(html)
|
|
316
|
+
|
|
317
|
+
this.htmlContent = html
|
|
318
|
+
|
|
319
|
+
let delta = this.htmlToDelta(html)
|
|
320
|
+
|
|
321
|
+
this.quill && this.quill.setContents(delta, 'user')
|
|
322
|
+
this.$nextTick(() => {
|
|
323
|
+
this.htmlLength()
|
|
324
|
+
})
|
|
325
|
+
|
|
326
|
+
// 原先有聚焦的场景下赋值才需要聚焦,非编辑场景下赋值无需聚焦
|
|
327
|
+
if (this.quill.hasFocus()) {
|
|
328
|
+
this.quill.setSelection(rangeIndex, 0)
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
htmlLength () {
|
|
332
|
+
let textContent = this.$refs.htmlContent.querySelector('.ql-editor').textContent || ''
|
|
333
|
+
this.textContent = textContent
|
|
334
|
+
this.len = (this.quill && this.quill.getLength()) - 1
|
|
335
|
+
this.$emit('update:richInputLength', this.len)
|
|
336
|
+
},
|
|
337
|
+
/**
|
|
338
|
+
* @description 获取文本内容及文本长度,并发送给外部组件
|
|
339
|
+
*/
|
|
340
|
+
handleChange (textContent, innerHTML) {
|
|
341
|
+
this.len = (this.quill && this.quill.getLength()) - 1
|
|
342
|
+
this.$emit('change', innerHTML)
|
|
343
|
+
this.$emit('update:richInputLength', this.len)
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
346
|
+
* @description 监听输入框input事件
|
|
347
|
+
* @param {*} e
|
|
348
|
+
*/
|
|
349
|
+
onInput (e) {
|
|
350
|
+
setTimeout(() => {
|
|
351
|
+
let { inputType } = e
|
|
352
|
+
let index_old = this.quill && this.quill.getSelection() && this.quill.getSelection().index - 1
|
|
353
|
+
|
|
354
|
+
// 获取当前内容长度
|
|
355
|
+
let len = this.quill.getLength() - 1
|
|
356
|
+
this.len = len
|
|
357
|
+
let maxLength = this.maxLength
|
|
358
|
+
|
|
359
|
+
// 忽略粘贴事件
|
|
360
|
+
if (inputType !== 'insertFromPaste' && maxLength && len >= maxLength) {
|
|
361
|
+
// 获取当前索引
|
|
362
|
+
let index = index_old || maxLength || 0
|
|
363
|
+
|
|
364
|
+
index = index - (len - maxLength) + 1
|
|
365
|
+
|
|
366
|
+
if (index > maxLength) {
|
|
367
|
+
index = maxLength
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// 超出限制长度,截取
|
|
371
|
+
this.quill.deleteText(index, len - maxLength)
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
if (inputType !== 'insertFromPaste' && maxLength && len > maxLength) {
|
|
375
|
+
window.vant.Toast('字数超限')
|
|
376
|
+
}
|
|
377
|
+
this.$emit('input')
|
|
378
|
+
})
|
|
379
|
+
},
|
|
380
|
+
/**
|
|
381
|
+
* @description 监听输入框粘贴事件
|
|
382
|
+
* @param {*} e
|
|
383
|
+
*/
|
|
384
|
+
onPaste (e) {
|
|
385
|
+
let { type } = e
|
|
386
|
+
|
|
387
|
+
setTimeout(() => {
|
|
388
|
+
// 获取当前内容长度
|
|
389
|
+
let maxLength = this.maxLength
|
|
390
|
+
// 获取粘贴内容后的总长度
|
|
391
|
+
let len_Total = this.quill.getLength() - 1
|
|
392
|
+
|
|
393
|
+
// 忽略粘贴事件
|
|
394
|
+
if (type === 'paste' && maxLength && len_Total >= maxLength) {
|
|
395
|
+
// 获取初始索引 index_old
|
|
396
|
+
let selection_old = this.quill && this.quill.getSelection()
|
|
397
|
+
let index_old = selection_old && selection_old.index || this.cursorIndex
|
|
398
|
+
|
|
399
|
+
// 获取当前索引
|
|
400
|
+
let index = index_old || maxLength || 0
|
|
401
|
+
|
|
402
|
+
index = index - (len_Total - maxLength) + 1
|
|
403
|
+
|
|
404
|
+
// 超出限制长度,截取
|
|
405
|
+
this.quill.deleteText(index - 1, len_Total - maxLength)
|
|
406
|
+
window.vant.Toast('字数超限')
|
|
407
|
+
this.len = this.quill.getLength() - 1
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
this.$emit('input')
|
|
411
|
+
}, 1)
|
|
412
|
+
},
|
|
413
|
+
/**
|
|
414
|
+
* @description 监听输入框换行事件
|
|
415
|
+
* @param {*} e
|
|
416
|
+
*/
|
|
417
|
+
onEnter () {
|
|
418
|
+
let index_old = this.quill && this.quill.getSelection() && this.quill.getSelection().index - 1
|
|
419
|
+
|
|
420
|
+
// 获取当前内容长度
|
|
421
|
+
let len = this.quill.getLength() - 1
|
|
422
|
+
let maxLength = this.maxLength
|
|
423
|
+
|
|
424
|
+
// 忽略粘贴事件
|
|
425
|
+
if (maxLength && len >= maxLength) {
|
|
426
|
+
// 获取当前索引
|
|
427
|
+
let index = index_old || maxLength || 0
|
|
428
|
+
|
|
429
|
+
if (index > maxLength) {
|
|
430
|
+
index = maxLength
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// 超出限制长度,截取
|
|
434
|
+
this.quill.deleteText(index, len - maxLength)
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
setTimeout(() => {
|
|
438
|
+
// 换行后需要定位到换行位置
|
|
439
|
+
document.getSelection() && document.getSelection().getRangeAt(0) && document.getSelection().getRangeAt(0).commonAncestorContainer && document.getSelection().getRangeAt(0).commonAncestorContainer.scrollIntoView({ behavior: "auto", block: "center", inline: "center" })
|
|
440
|
+
})
|
|
441
|
+
},
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
</script>
|
|
445
|
+
|
|
446
|
+
<style lang="less">
|
|
447
|
+
@import "./quill.snow.css";
|
|
448
|
+
.hr-at-input {
|
|
449
|
+
width: 100%;
|
|
450
|
+
min-height: 22px;
|
|
451
|
+
background: #fff;
|
|
452
|
+
font-size: 14px;
|
|
453
|
+
padding: 0px !important;
|
|
454
|
+
border-radius: 4px;
|
|
455
|
+
|
|
456
|
+
// 更改placeholder样式
|
|
457
|
+
&.ql-editor .ql-blank::before {
|
|
458
|
+
color: #a5a5a5;
|
|
459
|
+
content: attr(data-placeholder);
|
|
460
|
+
font-style: inherit;
|
|
461
|
+
// pointer-events: none;
|
|
462
|
+
position: absolute;
|
|
463
|
+
left: 12px;
|
|
464
|
+
right: 0;
|
|
465
|
+
font-size: 13px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.ql-editor {
|
|
469
|
+
text-align: left !important;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
</style>
|