@web-utils/component 1.2.4 → 1.2.6

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.
Files changed (111) hide show
  1. package/README.md +27 -27
  2. package/dist/chunks/163eed3b.js +16 -1
  3. package/dist/chunks/2bd4e340.js +184 -0
  4. package/dist/chunks/6499de3a.js +30 -1
  5. package/dist/chunks/7af3ceb1.js +75 -0
  6. package/dist/chunks/86bcadec.js +24 -0
  7. package/dist/chunks/8bbde9bf.js +81 -1
  8. package/dist/chunks/90bd3d52.js +26 -1
  9. package/dist/chunks/92404ceb.js +126 -0
  10. package/dist/chunks/a73fe8ee.js +11 -0
  11. package/dist/chunks/df803484.js +60 -0
  12. package/dist/components/address-input/index.js +113 -1
  13. package/dist/components/aside-menu/index.js +58 -1
  14. package/dist/components/awesome-button/index.js +82 -1
  15. package/dist/components/capsule-tab/index.js +52 -1
  16. package/dist/components/chunk-file-uploader/index.js +119 -1
  17. package/dist/components/chunk-file-uploader-button/index.js +60 -1
  18. package/dist/components/chunk-file-uploader-drop/index.js +65 -1
  19. package/dist/components/chunk-file-uploader-file/index.js +311 -1
  20. package/dist/components/chunk-file-uploader-files/index.js +49 -1
  21. package/dist/components/chunk-file-uploader-list/index.js +50 -1
  22. package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
  23. package/dist/components/code-mirror-editor/index.js +310 -6
  24. package/dist/components/color-picker/index.js +110 -1
  25. package/dist/components/confirm-button/index.js +57 -1
  26. package/dist/components/confirmable/index.js +28 -1
  27. package/dist/components/context-menu/index.js +236 -1
  28. package/dist/components/custom-scrollbar/index.js +150 -1
  29. package/dist/components/data-table-picker/index.js +137 -1
  30. package/dist/components/dynamic-table/index.js +195 -1
  31. package/dist/components/e-charts/index.js +229 -1
  32. package/dist/components/editable-progress/index.js +141 -1
  33. package/dist/components/editable-tree/index.js +789 -1
  34. package/dist/components/egd-collapse/index.js +79 -1
  35. package/dist/components/egd-collapse-item/index.js +132 -1
  36. package/dist/components/el-color-picker-dropdown/index.js +170 -1
  37. package/dist/components/element-dialog/index.js +242 -1
  38. package/dist/components/empty-view/index.js +69 -1
  39. package/dist/components/error-view/index.js +61 -1
  40. package/dist/components/flex-column/index.js +50 -1
  41. package/dist/components/flex-item/index.js +66 -1
  42. package/dist/components/flex-row/index.js +50 -1
  43. package/dist/components/flex-scroller/index.js +47 -1
  44. package/dist/components/form-button/index.js +80 -1
  45. package/dist/components/form-cascader/index.js +151 -1
  46. package/dist/components/form-checkbox-group/index.js +192 -1
  47. package/dist/components/form-date-picker/index.js +182 -1
  48. package/dist/components/form-holder/index.js +90 -1
  49. package/dist/components/form-input/index.js +106 -1
  50. package/dist/components/form-input-email/index.js +97 -1
  51. package/dist/components/form-input-id-card/index.js +104 -1
  52. package/dist/components/form-input-number/index.js +123 -1
  53. package/dist/components/form-input-phone-number/index.js +98 -1
  54. package/dist/components/form-input-time/index.js +124 -1
  55. package/dist/components/form-item/index.js +120 -1
  56. package/dist/components/form-item-config-provider/index.js +63 -1
  57. package/dist/components/form-item-group/index.js +169 -1
  58. package/dist/components/form-radio-group/index.js +170 -1
  59. package/dist/components/form-select/index.js +154 -1
  60. package/dist/components/form-switch/index.js +97 -1
  61. package/dist/components/form-textarea/index.js +102 -1
  62. package/dist/components/form-view/index.js +343 -1
  63. package/dist/components/guide-steps/index.js +94 -1
  64. package/dist/components/icon-card/index.js +62 -1
  65. package/dist/components/iframe-window/index.js +99 -1
  66. package/dist/components/input-number/index.js +274 -1
  67. package/dist/components/input-number-range/index.js +110 -1
  68. package/dist/components/j-s-x-component/index.js +16 -1
  69. package/dist/components/keep-view-alive/index.js +119 -1
  70. package/dist/components/loading-view/index.js +61 -1
  71. package/dist/components/nav-bar/index.js +52 -1
  72. package/dist/components/not-implement/index.js +35 -1
  73. package/dist/components/page/index.js +40 -1
  74. package/dist/components/page-header/index.js +56 -1
  75. package/dist/components/page-index/index.js +151 -1
  76. package/dist/components/page-index-top/index.js +119 -1
  77. package/dist/components/page-skeleton/index.js +56 -1
  78. package/dist/components/page-skeleton-new/index.js +98 -1
  79. package/dist/components/pageable-table/index.js +429 -1
  80. package/dist/components/pageable-view/index.js +328 -2
  81. package/dist/components/photo-swipe/index.js +187 -1
  82. package/dist/components/resize-observer/index.js +62 -1
  83. package/dist/components/search-popover/index.js +391 -2
  84. package/dist/components/sign-panel/index.js +242 -1
  85. package/dist/components/split-pane/index.js +209 -1
  86. package/dist/components/stateful/index.js +84 -1
  87. package/dist/components/static-pageable-table/index.js +92 -1
  88. package/dist/components/swiper/index.js +158 -1
  89. package/dist/components/tab/index.js +145 -1
  90. package/dist/components/tab-item/index.js +73 -1
  91. package/dist/components/table-column/index.js +89 -1
  92. package/dist/components/table-view/index.js +363 -1
  93. package/dist/components/tag-render/index.js +97 -1
  94. package/dist/components/tinymce-editor/index.js +173 -1
  95. package/dist/components/tinymce-wrapper/index.js +618 -1
  96. package/dist/components/toolbar/index.js +217 -1
  97. package/dist/components/toolbar-button/index.js +90 -1
  98. package/dist/components/trigger/index.js +71 -1
  99. package/dist/components/vue-tags-input/index.js +439 -1
  100. package/dist/components/watermark/index.js +63 -1
  101. package/dist/components/x-dialog/index.js +173 -1
  102. package/dist/index.css +2102 -1
  103. package/dist/index.es.js +2995 -2078
  104. package/package.json +29 -29
  105. package/web-types.json +22 -16
  106. package/dist/chunks/23bd3525.js +0 -1
  107. package/dist/chunks/65f4f4f2.js +0 -1
  108. package/dist/chunks/8473fc69.js +0 -1
  109. package/dist/chunks/addb6ed5.js +0 -1
  110. package/dist/chunks/b8305633.js +0 -1
  111. package/dist/chunks/e8547f66.js +0 -1
@@ -1 +1,113 @@
1
- import{n as r}from"../../chunks/6499de3a.js";var i=function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("div",{staticClass:"address-input-wrapper flex-box"},[t("div",{staticClass:"address-input-item-wrapper"},[t("ElCascader",{attrs:{options:e.options,disabled:e.inputDisabled,props:{label:"name",value:e.labelAsValue?"name":"id"}},model:{value:e.internalVal.address,callback:function(s){e.$set(e.internalVal,"address",s)},expression:"internalVal.address"}})],1),t("div",{staticClass:"address-input-item-wrapper flex-1"},[t("ElInput",{attrs:{placeholder:"\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740\uFF01",disabled:e.inputDisabled},model:{value:e.internalVal.detailAddress,callback:function(s){e.$set(e.internalVal,"detailAddress",s)},expression:"internalVal.detailAddress"}})],1)])},l=[];const n={name:"AddressInput",inject:{elForm:{default:""},elFormItem:{default:""}},props:{options:{type:Array,default(){return[]}},value:{type:Object,default:()=>({})},labelAsValue:Boolean,disabled:Boolean},data(){return{internalVal:{address:[],detailAddress:""}}},computed:{inputDisabled(){return this.disabled||(this.elForm||{}).disabled}},watch:{value:{immediate:!0,deep:!0,handler(e){e&&(this.internalVal.address=e.address,this.internalVal.detailAddress=e.detailAddress)}},internalVal:{immediate:!0,deep:!0,handler(e){!e.address&&!e.detailAddress?this.$emit("input",void 0):this.$emit("input",e)}}}},d={};var p=r(n,i,l,!1,u,null,null,null);function u(e){for(let a in d)this[a]=d[a]}var o=function(){return p.exports}();export{o as default};
1
+ import { n as l } from "../../chunks/6499de3a.js";
2
+ var r = function() {
3
+ var e = this, a = e.$createElement, t = e._self._c || a;
4
+ return t("div", {
5
+ staticClass: "address-input-wrapper flex-box"
6
+ }, [t("div", {
7
+ staticClass: "address-input-item-wrapper"
8
+ }, [t("ElCascader", {
9
+ attrs: {
10
+ options: e.options,
11
+ disabled: e.inputDisabled,
12
+ props: {
13
+ label: "name",
14
+ value: e.labelAsValue ? "name" : "id"
15
+ }
16
+ },
17
+ model: {
18
+ value: e.internalVal.address,
19
+ callback: function(s) {
20
+ e.$set(e.internalVal, "address", s);
21
+ },
22
+ expression: "internalVal.address"
23
+ }
24
+ })], 1), t("div", {
25
+ staticClass: "address-input-item-wrapper flex-1"
26
+ }, [t("ElInput", {
27
+ attrs: {
28
+ placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740\uFF01",
29
+ disabled: e.inputDisabled
30
+ },
31
+ model: {
32
+ value: e.internalVal.detailAddress,
33
+ callback: function(s) {
34
+ e.$set(e.internalVal, "detailAddress", s);
35
+ },
36
+ expression: "internalVal.detailAddress"
37
+ }
38
+ })], 1)]);
39
+ }, n = [];
40
+ const i = {
41
+ name: "AddressInput",
42
+ inject: {
43
+ elForm: {
44
+ default: ""
45
+ },
46
+ elFormItem: {
47
+ default: ""
48
+ }
49
+ },
50
+ props: {
51
+ options: {
52
+ type: Array,
53
+ default() {
54
+ return [];
55
+ }
56
+ },
57
+ value: {
58
+ type: Object,
59
+ default: () => ({})
60
+ },
61
+ labelAsValue: Boolean,
62
+ disabled: Boolean
63
+ },
64
+ data() {
65
+ return {
66
+ internalVal: {
67
+ address: [],
68
+ detailAddress: ""
69
+ }
70
+ };
71
+ },
72
+ computed: {
73
+ inputDisabled() {
74
+ return this.disabled || (this.elForm || {}).disabled;
75
+ }
76
+ },
77
+ watch: {
78
+ value: {
79
+ immediate: !0,
80
+ deep: !0,
81
+ handler(e) {
82
+ e && (this.internalVal.address = e.address, this.internalVal.detailAddress = e.detailAddress);
83
+ }
84
+ },
85
+ internalVal: {
86
+ immediate: !0,
87
+ deep: !0,
88
+ handler(e) {
89
+ !e.address && !e.detailAddress ? this.$emit("input", void 0) : this.$emit("input", e);
90
+ }
91
+ }
92
+ }
93
+ }, d = {};
94
+ var u = /* @__PURE__ */ l(
95
+ i,
96
+ r,
97
+ n,
98
+ !1,
99
+ o,
100
+ null,
101
+ null,
102
+ null
103
+ );
104
+ function o(e) {
105
+ for (let a in d)
106
+ this[a] = d[a];
107
+ }
108
+ const c = /* @__PURE__ */ function() {
109
+ return u.exports;
110
+ }();
111
+ export {
112
+ c as default
113
+ };
@@ -1 +1,58 @@
1
- import{n as s}from"../../chunks/6499de3a.js";var u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{"padding-top":"4px"}},e._l(e.menu,function(n){return a("div",{key:n.key,staticClass:"aside-menu-item hover-active",class:{active:e.$route.path===n.path},on:{click:function(p){return e.$router.push(n.path)}}},[e._t("default",function(){return[a("i",{staticClass:"egd-icon-common",class:n.icon}),e._v(" "+e._s(n.label)+" ")]},{item:n})],2)}),0)},i=[];const o={name:"AsideMenu",props:{menu:{type:Array,default:()=>[]}}},r={};var c=s(o,u,i,!1,_,null,null,null);function _(e){for(let t in r)this[t]=r[t]}var l=function(){return c.exports}();export{l as default};
1
+ import { n as a } from "../../chunks/6499de3a.js";
2
+ var o = function() {
3
+ var e = this, t = e.$createElement, s = e._self._c || t;
4
+ return s("div", {
5
+ staticStyle: {
6
+ "padding-top": "4px"
7
+ }
8
+ }, e._l(e.menu, function(n) {
9
+ return s("div", {
10
+ key: n.key,
11
+ staticClass: "aside-menu-item hover-active",
12
+ class: {
13
+ active: e.$route.path === n.path
14
+ },
15
+ on: {
16
+ click: function(l) {
17
+ return e.$router.push(n.path);
18
+ }
19
+ }
20
+ }, [e._t("default", function() {
21
+ return [s("i", {
22
+ staticClass: "egd-icon-common",
23
+ class: n.icon
24
+ }), e._v(" " + e._s(n.label) + " ")];
25
+ }, {
26
+ item: n
27
+ })], 2);
28
+ }), 0);
29
+ }, c = [];
30
+ const u = {
31
+ name: "AsideMenu",
32
+ props: {
33
+ menu: {
34
+ type: Array,
35
+ default: () => []
36
+ }
37
+ }
38
+ }, r = {};
39
+ var i = /* @__PURE__ */ a(
40
+ u,
41
+ o,
42
+ c,
43
+ !1,
44
+ _,
45
+ null,
46
+ null,
47
+ null
48
+ );
49
+ function _(e) {
50
+ for (let t in r)
51
+ this[t] = r[t];
52
+ }
53
+ const p = /* @__PURE__ */ function() {
54
+ return i.exports;
55
+ }();
56
+ export {
57
+ p as default
58
+ };
@@ -1 +1,82 @@
1
- var u=Object.defineProperty,c=Object.defineProperties;var p=Object.getOwnPropertyDescriptors;var i=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var s=(o,t,e)=>t in o?u(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,r=(o,t)=>{for(var e in t||(t={}))d.call(t,e)&&s(o,e,t[e]);if(i)for(var e of i(t))_.call(t,e)&&s(o,e,t[e]);return o},a=(o,t)=>c(o,p(t));import{isFunction as f,error as m}from"@web-utils/core";import{n as h}from"../../chunks/6499de3a.js";const g={props:{type:{type:String,default:"primary"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean}},y={name:"AwesomeButton",mixins:[g],props:{text:{type:String,default:""}},data(){return{isLoading:!1}},methods:{async onClick(o){this.isLoading=!0;const{click:t}=this.$listeners;if(f(t))try{await t(o)}catch(e){m.call(this,e)}this.isLoading=!1}},render(o){var e,n;const t=(n=(e=this.$scopedSlots).default)==null?void 0:n.call(e);return o("ElButton",{on:{click:this.onClick},props:a(r({},this.$props),{disabled:this.isLoading})},t&&(t[0].tag||t[0].text)?t:this.text)}};let v,B;const l={};var x=h(y,v,B,!1,S,null,null,null);function S(o){for(let t in l)this[t]=l[t]}var k=function(){return x.exports}();export{k as default};
1
+ import { isFunction as i, error as r } from "@web-utils/core";
2
+ import { n as a } from "../../chunks/6499de3a.js";
3
+ const l = {
4
+ props: {
5
+ type: {
6
+ type: String,
7
+ default: "primary"
8
+ },
9
+ size: String,
10
+ icon: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ nativeType: {
15
+ type: String,
16
+ default: "button"
17
+ },
18
+ loading: Boolean,
19
+ disabled: Boolean,
20
+ plain: Boolean,
21
+ autofocus: Boolean,
22
+ round: Boolean
23
+ }
24
+ }, c = {
25
+ name: "AwesomeButton",
26
+ mixins: [l],
27
+ props: {
28
+ text: {
29
+ type: String,
30
+ default: ""
31
+ }
32
+ },
33
+ data() {
34
+ return {
35
+ isLoading: !1
36
+ };
37
+ },
38
+ methods: {
39
+ async onClick(e) {
40
+ this.isLoading = !0;
41
+ const { click: t } = this.$listeners;
42
+ if (i(t))
43
+ try {
44
+ await t(e);
45
+ } catch (o) {
46
+ r.call(this, o);
47
+ }
48
+ this.isLoading = !1;
49
+ }
50
+ },
51
+ render(e) {
52
+ var o, n;
53
+ const t = (n = (o = this.$scopedSlots).default) == null ? void 0 : n.call(o);
54
+ return e(
55
+ "ElButton",
56
+ { on: { click: this.onClick }, props: { ...this.$props, disabled: this.isLoading } },
57
+ t && (t[0].tag || t[0].text) ? t : this.text
58
+ );
59
+ }
60
+ };
61
+ let u, p;
62
+ const s = {};
63
+ var d = /* @__PURE__ */ a(
64
+ c,
65
+ u,
66
+ p,
67
+ !1,
68
+ _,
69
+ null,
70
+ null,
71
+ null
72
+ );
73
+ function _(e) {
74
+ for (let t in s)
75
+ this[t] = s[t];
76
+ }
77
+ const h = /* @__PURE__ */ function() {
78
+ return d.exports;
79
+ }();
80
+ export {
81
+ h as default
82
+ };
@@ -1 +1,52 @@
1
- import{n}from"../../chunks/6499de3a.js";var s=function(){var e=this,a=e.$createElement,r=e._self._c||a;return r("ul",{staticClass:"capsule-tab"},e._l(e.tabs,function(t){return r("li",{key:t.value,class:["tab-item",{active:e.value===t.value,single:e.tabs.length===1}],on:{click:function(b){return e.$emit("input",t.value)}}},[e._v(" "+e._s(t.label)+" ")])}),0)},i=[];const u={name:"CapsuleTab",props:{tabs:{type:Array,default:()=>[]},value:{type:String}}},l={};var c=n(u,s,i,!1,o,null,null,null);function o(e){for(let a in l)this[a]=l[a]}var p=function(){return c.exports}();export{p as default};
1
+ import { n as s } from "../../chunks/6499de3a.js";
2
+ var u = function() {
3
+ var e = this, t = e.$createElement, a = e._self._c || t;
4
+ return a("ul", {
5
+ staticClass: "capsule-tab"
6
+ }, e._l(e.tabs, function(n) {
7
+ return a("li", {
8
+ key: n.value,
9
+ class: ["tab-item", {
10
+ active: e.value === n.value,
11
+ single: e.tabs.length === 1
12
+ }],
13
+ on: {
14
+ click: function(i) {
15
+ return e.$emit("input", n.value);
16
+ }
17
+ }
18
+ }, [e._v(" " + e._s(n.label) + " ")]);
19
+ }), 0);
20
+ }, r = [];
21
+ const _ = {
22
+ name: "CapsuleTab",
23
+ props: {
24
+ tabs: {
25
+ type: Array,
26
+ default: () => []
27
+ },
28
+ value: {
29
+ type: String
30
+ }
31
+ }
32
+ }, l = {};
33
+ var c = /* @__PURE__ */ s(
34
+ _,
35
+ u,
36
+ r,
37
+ !1,
38
+ o,
39
+ null,
40
+ null,
41
+ null
42
+ );
43
+ function o(e) {
44
+ for (let t in l)
45
+ this[t] = l[t];
46
+ }
47
+ const p = /* @__PURE__ */ function() {
48
+ return c.exports;
49
+ }();
50
+ export {
51
+ p as default
52
+ };
@@ -1 +1,119 @@
1
- import a from"simple-uploader.js";import{k as r}from"../../chunks/90bd3d52.js";import{n}from"../../chunks/6499de3a.js";var u=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"uploader"},[e._t("default",function(){return[i("ChunkFileUploaderUnSupport"),i("ChunkFileUploaderDrop",[i("p",[e._v("Drop files here to upload or")]),i("ChunkFileUploaderButton",[e._v("select files")]),i("ChunkFileUploaderButton",{attrs:{directory:!0}},[e._v("select folder")])],1),i("ChunkFileUploaderList")]},{files:e.files,fileList:e.fileList,started:e.started})],2)},f=[];const l="fileAdded",s="filesAdded",p="uploadStart",h={name:"ChunkFileUploader",provide(){return{uploader:this}},props:{options:{type:Object,default(){return{}}},autoStart:{type:Boolean,default:!0},fileStatusText:{type:[Object,Function],default(){return{success:"success",error:"error",uploading:"uploading",paused:"paused",waiting:"waiting"}}}},data(){return{started:!1,files:[],fileList:[]}},created(){this.options.initialPaused=!this.autoStart;const e=new a(this.options);this.uploader=e,this.uploader.fileStatusText=this.fileStatusText,e.on("catchAll",this.allEvent),e.on(l,this.fileAdded),e.on(s,this.filesAdded),e.on("fileRemoved",this.fileRemoved),e.on("filesSubmitted",this.filesSubmitted)},destroyed(){const e=this.uploader;e.off("catchAll",this.allEvent),e.off(l,this.fileAdded),e.off(s,this.filesAdded),e.off("fileRemoved",this.fileRemoved),e.off("filesSubmitted",this.filesSubmitted),this.uploader=null},methods:{uploadStart(){this.started=!0},fileAdded(e){if(this.$emit(r(l),e),e.ignored)return!1},filesAdded(e,t){if(this.$emit(r(s),e,t),e.ignored||t.ignored)return!1},fileRemoved(e){this.$emit("file-removed",e),this.files=this.uploader.files,this.fileList=this.uploader.fileList},filesSubmitted(e,t){this.files=this.uploader.files,this.fileList=this.uploader.fileList,this.autoStart&&this.uploader.upload()},allEvent(...e){const t=e[0],o={[l]:!0,[s]:!0,[p]:"uploadStart"}[t];if(o){if(o===!0)return;this[o].apply(this,e.slice(1))}e[0]=r(t),this.$emit.apply(this,e)}}},d={};var c=n(h,u,f,!1,_,null,null,null);function _(e){for(let t in d)this[t]=d[t]}var m=function(){return c.exports}();export{m as default};
1
+ import a from "simple-uploader.js";
2
+ import { k as r } from "../../chunks/90bd3d52.js";
3
+ import { n } from "../../chunks/6499de3a.js";
4
+ var u = function() {
5
+ var e = this, t = e.$createElement, i = e._self._c || t;
6
+ return i("div", {
7
+ staticClass: "uploader"
8
+ }, [e._t("default", function() {
9
+ return [i("ChunkFileUploaderUnSupport"), i("ChunkFileUploaderDrop", [i("p", [e._v("Drop files here to upload or")]), i("ChunkFileUploaderButton", [e._v("select files")]), i("ChunkFileUploaderButton", {
10
+ attrs: {
11
+ directory: !0
12
+ }
13
+ }, [e._v(" select folder ")])], 1), i("ChunkFileUploaderList")];
14
+ }, {
15
+ files: e.files,
16
+ fileList: e.fileList,
17
+ started: e.started
18
+ })], 2);
19
+ }, f = [];
20
+ const s = "fileAdded", l = "filesAdded", p = "uploadStart", h = {
21
+ name: "ChunkFileUploader",
22
+ provide() {
23
+ return {
24
+ uploader: this
25
+ };
26
+ },
27
+ props: {
28
+ options: {
29
+ type: Object,
30
+ default() {
31
+ return {};
32
+ }
33
+ },
34
+ autoStart: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ fileStatusText: {
39
+ type: [Object, Function],
40
+ default() {
41
+ return {
42
+ success: "success",
43
+ error: "error",
44
+ uploading: "uploading",
45
+ paused: "paused",
46
+ waiting: "waiting"
47
+ };
48
+ }
49
+ }
50
+ },
51
+ data() {
52
+ return {
53
+ started: !1,
54
+ files: [],
55
+ fileList: []
56
+ };
57
+ },
58
+ created() {
59
+ this.options.initialPaused = !this.autoStart;
60
+ const e = new a(this.options);
61
+ this.uploader = e, this.uploader.fileStatusText = this.fileStatusText, e.on("catchAll", this.allEvent), e.on(s, this.fileAdded), e.on(l, this.filesAdded), e.on("fileRemoved", this.fileRemoved), e.on("filesSubmitted", this.filesSubmitted);
62
+ },
63
+ destroyed() {
64
+ const e = this.uploader;
65
+ e.off("catchAll", this.allEvent), e.off(s, this.fileAdded), e.off(l, this.filesAdded), e.off("fileRemoved", this.fileRemoved), e.off("filesSubmitted", this.filesSubmitted), this.uploader = null;
66
+ },
67
+ methods: {
68
+ uploadStart() {
69
+ this.started = !0;
70
+ },
71
+ fileAdded(e) {
72
+ if (this.$emit(r(s), e), e.ignored)
73
+ return !1;
74
+ },
75
+ filesAdded(e, t) {
76
+ if (this.$emit(r(l), e, t), e.ignored || t.ignored)
77
+ return !1;
78
+ },
79
+ fileRemoved(e) {
80
+ this.$emit("file-removed", e), this.files = this.uploader.files, this.fileList = this.uploader.fileList;
81
+ },
82
+ filesSubmitted() {
83
+ this.files = this.uploader.files, this.fileList = this.uploader.fileList, this.autoStart && this.uploader.upload();
84
+ },
85
+ allEvent(...e) {
86
+ const t = e[0], o = {
87
+ [s]: !0,
88
+ [l]: !0,
89
+ [p]: "uploadStart"
90
+ }[t];
91
+ if (o) {
92
+ if (o === !0)
93
+ return;
94
+ this[o].apply(this, e.slice(1));
95
+ }
96
+ e[0] = r(t), this.$emit.apply(this, e);
97
+ }
98
+ }
99
+ }, d = {};
100
+ var c = /* @__PURE__ */ n(
101
+ h,
102
+ u,
103
+ f,
104
+ !1,
105
+ _,
106
+ null,
107
+ null,
108
+ null
109
+ );
110
+ function _(e) {
111
+ for (let t in d)
112
+ this[t] = d[t];
113
+ }
114
+ const E = /* @__PURE__ */ function() {
115
+ return c.exports;
116
+ }();
117
+ export {
118
+ E as default
119
+ };
@@ -1 +1,60 @@
1
- import{u as r,s}from"../../chunks/163eed3b.js";import{n as a}from"../../chunks/6499de3a.js";var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("label",{directives:[{name:"show",rawName:"v-show",value:e.support,expression:"support"}],ref:"btn",staticClass:"uploader-btn"},[e._t("default")],2)},l=[];const u={name:"ChunkFileUploaderButton",mixins:[r,s],props:{directory:{type:Boolean,default:!1},single:{type:Boolean,default:!1},attrs:{type:Object,default(){return{}}}},mounted(){this.$nextTick(()=>{this.uploader.uploader.assignBrowse(this.$refs.btn,this.directory,this.single,this.attrs)})}},n={};var p=a(u,i,l,!1,d,null,null,null);function d(e){for(let t in n)this[t]=n[t]}var c=function(){return p.exports}();export{c as default};
1
+ import { u as r, s as o } from "../../chunks/163eed3b.js";
2
+ import { n as a } from "../../chunks/6499de3a.js";
3
+ var l = function() {
4
+ var e = this, t = e.$createElement, s = e._self._c || t;
5
+ return s("label", {
6
+ directives: [{
7
+ name: "show",
8
+ rawName: "v-show",
9
+ value: e.support,
10
+ expression: "support"
11
+ }],
12
+ ref: "btn",
13
+ staticClass: "uploader-btn"
14
+ }, [e._t("default")], 2);
15
+ }, i = [];
16
+ const u = {
17
+ name: "ChunkFileUploaderButton",
18
+ mixins: [r, o],
19
+ props: {
20
+ directory: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ single: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ attrs: {
29
+ type: Object,
30
+ default() {
31
+ return {};
32
+ }
33
+ }
34
+ },
35
+ mounted() {
36
+ this.$nextTick(() => {
37
+ this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, this.attrs);
38
+ });
39
+ }
40
+ }, n = {};
41
+ var p = /* @__PURE__ */ a(
42
+ u,
43
+ l,
44
+ i,
45
+ !1,
46
+ _,
47
+ null,
48
+ null,
49
+ null
50
+ );
51
+ function _(e) {
52
+ for (let t in n)
53
+ this[t] = n[t];
54
+ }
55
+ const f = /* @__PURE__ */ function() {
56
+ return p.exports;
57
+ }();
58
+ export {
59
+ f as default
60
+ };
@@ -1 +1,65 @@
1
- import{u as s,s as n}from"../../chunks/163eed3b.js";import{n as t}from"../../chunks/6499de3a.js";var d=function(){var o=this,r=o.$createElement,a=o._self._c||r;return a("div",{directives:[{name:"show",rawName:"v-show",value:o.support,expression:"support"}],ref:"drop",staticClass:"uploader-drop",class:o.dropClass},[o._t("default")],2)},p=[];const l={name:"ChunkFileUploaderDrop",mixins:[s,n],data(){return{dropClass:""}},async mounted(){await this.$nextTick();const o=this.$refs.drop,r=this.uploader.uploader;r.assignDrop(o),r.on("dragenter",this.onDragEnter),r.on("dragleave",this.onDragLeave),r.on("drop",this.onDrop)},beforeDestroy(){const o=this.$refs.drop,r=this.uploader.uploader;r.off("dragenter",this.onDragEnter),r.off("dragleave",this.onDragLeave),r.off("drop",this.onDrop),r.unAssignDrop(o)},methods:{onDragEnter(){this.dropClass="uploader-dragover"},onDragLeave(){this.dropClass=""},onDrop(){this.dropClass="uploader-droped"}}},e={};var i=t(l,d,p,!1,u,null,null,null);function u(o){for(let r in e)this[r]=e[r]}var c=function(){return i.exports}();export{c as default};
1
+ import { u as t, s as n } from "../../chunks/163eed3b.js";
2
+ import { n as a } from "../../chunks/6499de3a.js";
3
+ var p = function() {
4
+ var o = this, r = o.$createElement, s = o._self._c || r;
5
+ return s("div", {
6
+ directives: [{
7
+ name: "show",
8
+ rawName: "v-show",
9
+ value: o.support,
10
+ expression: "support"
11
+ }],
12
+ ref: "drop",
13
+ staticClass: "uploader-drop",
14
+ class: o.dropClass
15
+ }, [o._t("default")], 2);
16
+ }, i = [];
17
+ const l = {
18
+ name: "ChunkFileUploaderDrop",
19
+ mixins: [t, n],
20
+ data() {
21
+ return {
22
+ dropClass: ""
23
+ };
24
+ },
25
+ async mounted() {
26
+ await this.$nextTick();
27
+ const o = this.$refs.drop, r = this.uploader.uploader;
28
+ r.assignDrop(o), r.on("dragenter", this.onDragEnter), r.on("dragleave", this.onDragLeave), r.on("drop", this.onDrop);
29
+ },
30
+ beforeDestroy() {
31
+ const o = this.$refs.drop, r = this.uploader.uploader;
32
+ r.off("dragenter", this.onDragEnter), r.off("dragleave", this.onDragLeave), r.off("drop", this.onDrop), r.unAssignDrop(o);
33
+ },
34
+ methods: {
35
+ onDragEnter() {
36
+ this.dropClass = "uploader-dragover";
37
+ },
38
+ onDragLeave() {
39
+ this.dropClass = "";
40
+ },
41
+ onDrop() {
42
+ this.dropClass = "uploader-droped";
43
+ }
44
+ }
45
+ }, e = {};
46
+ var d = /* @__PURE__ */ a(
47
+ l,
48
+ p,
49
+ i,
50
+ !1,
51
+ u,
52
+ null,
53
+ null,
54
+ null
55
+ );
56
+ function u(o) {
57
+ for (let r in e)
58
+ this[r] = e[r];
59
+ }
60
+ const h = /* @__PURE__ */ function() {
61
+ return d.exports;
62
+ }();
63
+ export {
64
+ h as default
65
+ };