@web-utils/component 1.2.5 → 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 +2992 -2075
  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/a125d16c.js +0 -1
  110. package/dist/chunks/addb6ed5.js +0 -1
  111. package/dist/chunks/f15477c7.js +0 -1
@@ -1 +1,79 @@
1
- import{n as i}from"../../chunks/6499de3a.js";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"el-collapse",attrs:{role:"tablist","aria-multiselectable":"true"}},[e._t("default")],2)},c=[];const l={name:"EgdCollapse",componentName:"EgdCollapse",provide(){return{collapse:this}},props:{accordion:Boolean,value:{type:[Array,String,Number],default(){return[]}}},data(){return{activeNames:[].concat(this.value)}},watch:{value(e){this.activeNames=[].concat(e)}},created(){this.$on("item-click",this.handleItemClick)},methods:{setActiveNames(e){e=[].concat(e);const t=this.accordion?e[0]:e;this.activeNames=e,this.$emit("input",t),this.$emit("change",t)},handleItemClick(e){if(this.accordion)this.setActiveNames((this.activeNames[0]||this.activeNames[0]===0)&&this.activeNames[0]===e.name?"":e.name);else{const t=this.activeNames.slice(0),a=t.indexOf(e.name);a>-1?t.splice(a,1):t.push(e.name),this.setActiveNames(t)}}}},s={};var o=i(l,n,c,!1,r,null,null,null);function r(e){for(let t in s)this[t]=s[t]}var m=function(){return o.exports}();export{m as default};
1
+ import { n } from "../../chunks/6499de3a.js";
2
+ var i = function() {
3
+ var e = this, t = e.$createElement, s = e._self._c || t;
4
+ return s("div", {
5
+ staticClass: "el-collapse",
6
+ attrs: {
7
+ role: "tablist",
8
+ "aria-multiselectable": "true"
9
+ }
10
+ }, [e._t("default")], 2);
11
+ }, c = [];
12
+ const l = {
13
+ name: "EgdCollapse",
14
+ componentName: "EgdCollapse",
15
+ provide() {
16
+ return {
17
+ collapse: this
18
+ };
19
+ },
20
+ props: {
21
+ accordion: Boolean,
22
+ value: {
23
+ type: [Array, String, Number],
24
+ default() {
25
+ return [];
26
+ }
27
+ }
28
+ },
29
+ data() {
30
+ return {
31
+ activeNames: [].concat(this.value)
32
+ };
33
+ },
34
+ watch: {
35
+ value(e) {
36
+ this.activeNames = [].concat(e);
37
+ }
38
+ },
39
+ created() {
40
+ this.$on("item-click", this.handleItemClick);
41
+ },
42
+ methods: {
43
+ setActiveNames(e) {
44
+ e = [].concat(e);
45
+ const t = this.accordion ? e[0] : e;
46
+ this.activeNames = e, this.$emit("input", t), this.$emit("change", t);
47
+ },
48
+ handleItemClick(e) {
49
+ if (this.accordion)
50
+ this.setActiveNames(
51
+ (this.activeNames[0] || this.activeNames[0] === 0) && this.activeNames[0] === e.name ? "" : e.name
52
+ );
53
+ else {
54
+ const t = this.activeNames.slice(0), s = t.indexOf(e.name);
55
+ s > -1 ? t.splice(s, 1) : t.push(e.name), this.setActiveNames(t);
56
+ }
57
+ }
58
+ }
59
+ }, a = {};
60
+ var o = /* @__PURE__ */ n(
61
+ l,
62
+ i,
63
+ c,
64
+ !1,
65
+ r,
66
+ null,
67
+ null,
68
+ null
69
+ );
70
+ function r(e) {
71
+ for (let t in a)
72
+ this[t] = a[t];
73
+ }
74
+ const u = /* @__PURE__ */ function() {
75
+ return o.exports;
76
+ }();
77
+ export {
78
+ u as default
79
+ };
@@ -1 +1,132 @@
1
- import a from"element-ui/src/mixins/emitter";import{generateId as n}from"element-ui/src/utils/util";import{n as c}from"../../chunks/6499de3a.js";var o=function(){var e=this,s=e.$createElement,i=e._self._c||s;return i("div",{staticClass:"el-collapse-item",class:{"is-active":e.isActive,"is-disabled":e.disabled}},[i("div",{attrs:{role:"tab","aria-expanded":e.isActive,"aria-controls":`el-collapse-content-${e.id}`,"aria-describedby":`el-collapse-content-${e.id}`}},[i("div",{staticClass:"el-collapse-item__header",class:{focusing:e.focusing,"is-active":e.isActive},attrs:{id:`el-collapse-head-${e.id}`,role:"button",tabindex:e.disabled?void 0:0},on:{click:e.handleHeaderClick,keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.stopPropagation(),e.handleEnterClick.apply(null,arguments))},focus:e.handleFocus,blur:function(t){e.focusing=!1}}},[i("i",{staticClass:"el-collapse-item__arrow el-icon-arrow-right",class:{"is-active":e.isActive},staticStyle:{margin:"0 4px 0 0"}}),e._t("title",function(){return[e._v(" "+e._s(e.title)+" ")]},{title:e.title})],2)]),i("ElCollapseTransition",[i("div",{directives:[{name:"show",rawName:"v-show",value:e.isActive,expression:"isActive"}],staticClass:"el-collapse-item__wrap",attrs:{id:`el-collapse-content-${e.id}`,role:"tabpanel","aria-hidden":!e.isActive,"aria-labelledby":`el-collapse-head-${e.id}`}},[i("div",{staticClass:"el-collapse-item__content"},[e._t("default")],2)])])],1)},r=[];const d={name:"EgdCollapseItem",componentName:"EgdCollapseItem",mixins:[a],inject:["collapse"],props:{title:{type:String},name:{type:[String,Number],default(){return this._uid}},disabled:Boolean},data(){return{focusing:!1,isClick:!1,id:n()}},computed:{isActive(){return this.collapse.activeNames.indexOf(this.name)>-1}},methods:{handleFocus(){setTimeout(()=>{this.isClick?this.isClick=!1:this.focusing=!0},50)},handleHeaderClick(){this.disabled||(this.dispatch("EgdCollapse","item-click",this),this.focusing=!1,this.isClick=!0)},handleEnterClick(){this.dispatch("EgdCollapse","item-click",this)}}},l={};var p=c(d,o,r,!1,u,null,null,null);function u(e){for(let s in l)this[s]=l[s]}var m=function(){return p.exports}();export{m as default};
1
+ import a from "element-ui/src/mixins/emitter";
2
+ import { generateId as n } from "element-ui/src/utils/util";
3
+ import { n as c } from "../../chunks/6499de3a.js";
4
+ var o = function() {
5
+ var e = this, s = e.$createElement, t = e._self._c || s;
6
+ return t("div", {
7
+ staticClass: "el-collapse-item",
8
+ class: {
9
+ "is-active": e.isActive,
10
+ "is-disabled": e.disabled
11
+ }
12
+ }, [t("div", {
13
+ attrs: {
14
+ role: "tab",
15
+ "aria-expanded": e.isActive,
16
+ "aria-controls": `el-collapse-content-${e.id}`,
17
+ "aria-describedby": `el-collapse-content-${e.id}`
18
+ }
19
+ }, [t("div", {
20
+ staticClass: "el-collapse-item__header",
21
+ class: {
22
+ focusing: e.focusing,
23
+ "is-active": e.isActive
24
+ },
25
+ attrs: {
26
+ id: `el-collapse-head-${e.id}`,
27
+ role: "button",
28
+ tabindex: e.disabled ? void 0 : 0
29
+ },
30
+ on: {
31
+ click: e.handleHeaderClick,
32
+ keyup: function(i) {
33
+ return !i.type.indexOf("key") && e._k(i.keyCode, "space", 32, i.key, [" ", "Spacebar"]) && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : (i.stopPropagation(), e.handleEnterClick.apply(null, arguments));
34
+ },
35
+ focus: e.handleFocus,
36
+ blur: function(i) {
37
+ e.focusing = !1;
38
+ }
39
+ }
40
+ }, [t("i", {
41
+ staticClass: "el-collapse-item__arrow el-icon-arrow-right",
42
+ class: {
43
+ "is-active": e.isActive
44
+ },
45
+ staticStyle: {
46
+ margin: "0 4px 0 0"
47
+ }
48
+ }), e._t("title", function() {
49
+ return [e._v(" " + e._s(e.title) + " ")];
50
+ }, {
51
+ title: e.title
52
+ })], 2)]), t("ElCollapseTransition", [t("div", {
53
+ directives: [{
54
+ name: "show",
55
+ rawName: "v-show",
56
+ value: e.isActive,
57
+ expression: "isActive"
58
+ }],
59
+ staticClass: "el-collapse-item__wrap",
60
+ attrs: {
61
+ id: `el-collapse-content-${e.id}`,
62
+ role: "tabpanel",
63
+ "aria-hidden": !e.isActive,
64
+ "aria-labelledby": `el-collapse-head-${e.id}`
65
+ }
66
+ }, [t("div", {
67
+ staticClass: "el-collapse-item__content"
68
+ }, [e._t("default")], 2)])])], 1);
69
+ }, r = [];
70
+ const d = {
71
+ name: "EgdCollapseItem",
72
+ componentName: "EgdCollapseItem",
73
+ mixins: [a],
74
+ inject: ["collapse"],
75
+ props: {
76
+ title: {
77
+ type: String
78
+ },
79
+ name: {
80
+ type: [String, Number],
81
+ default() {
82
+ return this._uid;
83
+ }
84
+ },
85
+ disabled: Boolean
86
+ },
87
+ data() {
88
+ return {
89
+ focusing: !1,
90
+ isClick: !1,
91
+ id: n()
92
+ };
93
+ },
94
+ computed: {
95
+ isActive() {
96
+ return this.collapse.activeNames.indexOf(this.name) > -1;
97
+ }
98
+ },
99
+ methods: {
100
+ handleFocus() {
101
+ setTimeout(() => {
102
+ this.isClick ? this.isClick = !1 : this.focusing = !0;
103
+ }, 50);
104
+ },
105
+ handleHeaderClick() {
106
+ this.disabled || (this.dispatch("EgdCollapse", "item-click", this), this.focusing = !1, this.isClick = !0);
107
+ },
108
+ handleEnterClick() {
109
+ this.dispatch("EgdCollapse", "item-click", this);
110
+ }
111
+ }
112
+ }, l = {};
113
+ var p = /* @__PURE__ */ c(
114
+ d,
115
+ o,
116
+ r,
117
+ !1,
118
+ u,
119
+ null,
120
+ null,
121
+ null
122
+ );
123
+ function u(e) {
124
+ for (let s in l)
125
+ this[s] = l[s];
126
+ }
127
+ const _ = /* @__PURE__ */ function() {
128
+ return p.exports;
129
+ }();
130
+ export {
131
+ _ as default
132
+ };
@@ -1 +1,170 @@
1
- import l from"element-ui/packages/color-picker/src/components/sv-panel";import i from"element-ui/packages/color-picker/src/components/hue-slider";import s from"element-ui/packages/color-picker/src/components/alpha-slider";import a from"element-ui/packages/color-picker/src/components/predefine";import c from"element-ui/src/utils/vue-popper";import p from"element-ui/src/mixins/locale";import{n as u}from"../../chunks/6499de3a.js";var m=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"el-zoom-in-top"},on:{"after-leave":e.doDestroy}},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showPopper,expression:"showPopper"}],staticClass:"el-color-dropdown"},[o("div",{staticClass:"el-color-dropdown__main-wrapper"},[o("hue-slider",{ref:"hue",staticStyle:{float:"right"},attrs:{color:e.color,vertical:""}}),o("sv-panel",{ref:"sl",attrs:{color:e.color}})],1),e.showAlpha?o("alpha-slider",{ref:"alpha",attrs:{color:e.color}}):e._e(),e.predefine?o("predefine",{attrs:{color:e.color,colors:e.predefine}}):e._e(),o("div",{staticClass:"el-color-dropdown__btns"},[o("span",{staticClass:"el-color-dropdown__value"},[o("el-input",{attrs:{"validate-event":!1,size:"mini"},on:{blur:e.handleConfirm},nativeOn:{keyup:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"enter",13,r.key,"Enter")?null:e.handleConfirm.apply(null,arguments)}},model:{value:e.customInput,callback:function(r){e.customInput=r},expression:"customInput"}})],1),o("el-button",{staticClass:"el-color-dropdown__link-btn",attrs:{size:"mini",type:"text"},on:{click:function(r){return e.$emit("clear")}}},[e._v(" "+e._s(e.t("el.colorpicker.clear"))+" ")]),o("el-button",{staticClass:"el-color-dropdown__btn",attrs:{plain:"",size:"mini"},on:{click:e.confirmValue}},[e._v(" "+e._s(e.t("el.colorpicker.confirm"))+" ")])],1)],1)])},d=[];const f={name:"ElColorPickerDropdown",components:{SvPanel:l,HueSlider:i,AlphaSlider:s,Predefine:a},mixins:[c,p],props:{color:{type:Object,required:!0},showAlpha:Boolean,predefine:Array},data(){return{customInput:""}},computed:{currentColor(){const e=this.$parent;return!e.value&&!e.showPanelColor?"":e.color.value}},watch:{showPopper(e){e===!0&&this.$nextTick(()=>{const{sl:t,hue:o,alpha:r}=this.$refs;t&&t.update(),o&&o.update(),r&&r.update()})},currentColor:{immediate:!0,handler(e){this.customInput=e}}},mounted(){this.$parent.popperElm=this.popperElm=this.$el,this.referenceElm=this.$parent.$el},methods:{confirmValue(){this.$emit("pick")},handleConfirm(){this.color.fromString(this.customInput)}}},n={};var h=u(f,m,d,!1,_,null,null,null);function _(e){for(let t in n)this[t]=n[t]}var v=function(){return h.exports}();export{v as default};
1
+ import l from "element-ui/packages/color-picker/src/components/sv-panel";
2
+ import i from "element-ui/packages/color-picker/src/components/hue-slider";
3
+ import s from "element-ui/packages/color-picker/src/components/alpha-slider";
4
+ import a from "element-ui/packages/color-picker/src/components/predefine";
5
+ import c from "element-ui/src/utils/vue-popper";
6
+ import p from "element-ui/src/mixins/locale";
7
+ import { n as u } from "../../chunks/6499de3a.js";
8
+ var m = function() {
9
+ var e = this, t = e.$createElement, o = e._self._c || t;
10
+ return o("transition", {
11
+ attrs: {
12
+ name: "el-zoom-in-top"
13
+ },
14
+ on: {
15
+ "after-leave": e.doDestroy
16
+ }
17
+ }, [o("div", {
18
+ directives: [{
19
+ name: "show",
20
+ rawName: "v-show",
21
+ value: e.showPopper,
22
+ expression: "showPopper"
23
+ }],
24
+ staticClass: "el-color-dropdown"
25
+ }, [o("div", {
26
+ staticClass: "el-color-dropdown__main-wrapper"
27
+ }, [o("hue-slider", {
28
+ ref: "hue",
29
+ staticStyle: {
30
+ float: "right"
31
+ },
32
+ attrs: {
33
+ color: e.color,
34
+ vertical: ""
35
+ }
36
+ }), o("sv-panel", {
37
+ ref: "sl",
38
+ attrs: {
39
+ color: e.color
40
+ }
41
+ })], 1), e.showAlpha ? o("alpha-slider", {
42
+ ref: "alpha",
43
+ attrs: {
44
+ color: e.color
45
+ }
46
+ }) : e._e(), e.predefine ? o("predefine", {
47
+ attrs: {
48
+ color: e.color,
49
+ colors: e.predefine
50
+ }
51
+ }) : e._e(), o("div", {
52
+ staticClass: "el-color-dropdown__btns"
53
+ }, [o("span", {
54
+ staticClass: "el-color-dropdown__value"
55
+ }, [o("el-input", {
56
+ attrs: {
57
+ "validate-event": !1,
58
+ size: "mini"
59
+ },
60
+ on: {
61
+ blur: e.handleConfirm
62
+ },
63
+ nativeOn: {
64
+ keyup: function(r) {
65
+ return !r.type.indexOf("key") && e._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : e.handleConfirm.apply(null, arguments);
66
+ }
67
+ },
68
+ model: {
69
+ value: e.customInput,
70
+ callback: function(r) {
71
+ e.customInput = r;
72
+ },
73
+ expression: "customInput"
74
+ }
75
+ })], 1), o("el-button", {
76
+ staticClass: "el-color-dropdown__link-btn",
77
+ attrs: {
78
+ size: "mini",
79
+ type: "text"
80
+ },
81
+ on: {
82
+ click: function(r) {
83
+ return e.$emit("clear");
84
+ }
85
+ }
86
+ }, [e._v(" " + e._s(e.t("el.colorpicker.clear")) + " ")]), o("el-button", {
87
+ staticClass: "el-color-dropdown__btn",
88
+ attrs: {
89
+ plain: "",
90
+ size: "mini"
91
+ },
92
+ on: {
93
+ click: e.confirmValue
94
+ }
95
+ }, [e._v(" " + e._s(e.t("el.colorpicker.confirm")) + " ")])], 1)], 1)]);
96
+ }, d = [];
97
+ const f = {
98
+ name: "ElColorPickerDropdown",
99
+ components: {
100
+ SvPanel: l,
101
+ HueSlider: i,
102
+ AlphaSlider: s,
103
+ Predefine: a
104
+ },
105
+ mixins: [c, p],
106
+ props: {
107
+ color: {
108
+ type: Object,
109
+ required: !0
110
+ },
111
+ showAlpha: Boolean,
112
+ predefine: Array
113
+ },
114
+ data() {
115
+ return {
116
+ customInput: ""
117
+ };
118
+ },
119
+ computed: {
120
+ currentColor() {
121
+ const e = this.$parent;
122
+ return !e.value && !e.showPanelColor ? "" : e.color.value;
123
+ }
124
+ },
125
+ watch: {
126
+ showPopper(e) {
127
+ e === !0 && this.$nextTick(() => {
128
+ const { sl: t, hue: o, alpha: r } = this.$refs;
129
+ t && t.update(), o && o.update(), r && r.update();
130
+ });
131
+ },
132
+ currentColor: {
133
+ immediate: !0,
134
+ handler(e) {
135
+ this.customInput = e;
136
+ }
137
+ }
138
+ },
139
+ mounted() {
140
+ this.$parent.popperElm = this.popperElm = this.$el, this.referenceElm = this.$parent.$el;
141
+ },
142
+ methods: {
143
+ confirmValue() {
144
+ this.$emit("pick");
145
+ },
146
+ handleConfirm() {
147
+ this.color.fromString(this.customInput);
148
+ }
149
+ }
150
+ }, n = {};
151
+ var h = /* @__PURE__ */ u(
152
+ f,
153
+ m,
154
+ d,
155
+ !1,
156
+ _,
157
+ null,
158
+ null,
159
+ null
160
+ );
161
+ function _(e) {
162
+ for (let t in n)
163
+ this[t] = n[t];
164
+ }
165
+ const $ = /* @__PURE__ */ function() {
166
+ return h.exports;
167
+ }();
168
+ export {
169
+ $ as default
170
+ };
@@ -1 +1,242 @@
1
- import{Dialog as a}from"element-ui";import{dialogDrag as n}from"@web-utils/core/dist/directives/index";import{n as d}from"../../chunks/6499de3a.js";var r=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("Transition",{attrs:{name:"dialog-fade"},on:{"after-enter":e.afterEnter,"after-leave":e.afterLeave}},[l("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"},{name:"dialog-drag",rawName:"v-dialog-drag:[fullScreen]",value:{onMove:e.updatePopper},expression:"{onMove:updatePopper}",arg:e.fullScreen}],staticClass:"el-dialog__wrapper",on:{click:function(o){return o.target!==o.currentTarget?null:e.handleWrapperClick.apply(null,arguments)}}},[l("div",{ref:"dialog",class:["el-dialog","element-dialog","el-dialog-resizeable","normalize",{"is-fullscreen":e.fullScreen,"el-dialog__body-padding":e.bodyPadding,"el-dialog--center":e.center,"el-dialog--flex-row":e.flexRow,"el-dialog--flex-column":e.flexColumn},e.customClass],style:e.style,attrs:{role:"dialog","aria-modal":"true","aria-label":e.title||"dialog"}},[l("div",{staticClass:"el-dialog__header"},[e._t("title",function(){return[l("span",{staticClass:"el-dialog__title"},[e._v(e._s(e.title))])]}),l("div",{staticClass:"header-button-wrapper"},[e._t("header-button"),e.showFullScreen?l("ElButton",{staticClass:"header-button",attrs:{type:"text",icon:e.fullScreen?"el-icon-copy-document":"el-icon-full-screen",size:"medium",title:e.fullScreen?"\u8FD8\u539F":"\u6700\u5927\u5316"},on:{click:e.toggleFullScreen}}):e._e(),e.showClose?l("ElButton",{staticClass:"header-button",attrs:{"aria-label":"Close",type:"text",title:"\u5173\u95ED",icon:"el-icon-close",size:"medium"},on:{click:e.handleClose}}):e._e()],2)],2),e.rendered?l("div",{staticClass:"el-dialog__body",style:{height:e.fullScreen?"100%":e.height}},[e.destroyOnClose?[e.visible?e._t("default"):e._e()]:e._t("default")],2):e._e(),e.shouldShowFooter()?l("div",{staticClass:"el-dialog__footer"},[e._t("footer",null,{handleClose:e.handleClose})],2):e._e()])])])},s=[];const p={props:{modal:{type:Boolean,default:!0},modalAppendToBody:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0}}},u={name:"ElementDialog",directives:{dialogDrag:n},mixins:[...a.mixins,p],props:{title:{type:String,default:""},appendToBody:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},showFullScreen:Boolean,width:{type:String},height:{type:String},customClass:{type:String,default:""},top:{type:String,default:"15vh"},beforeClose:{type:Function},center:{type:Boolean,default:!0},destroyOnClose:Boolean,flexRow:Boolean,flexColumn:Boolean,bodyPadding:{type:Boolean,default:!0}},data(){return{fullScreen:!1,closed:!1}},computed:{style(){const e={};return this.fullScreen||(e.marginTop=this.top,this.width&&(e.width=this.width)),e}},watch:{visible(e){e?(this.closed=!1,this.$emit("open"),this.$el.addEventListener("scroll",this.updatePopper),this.$nextTick(()=>{this.$refs.dialog.scrollTop=0}),this.appendToBody&&document.body.appendChild(this.$el)):(this.$el.removeEventListener("scroll",this.updatePopper),this.closed||this.$emit("close"))}},mounted(){this.visible&&(this.rendered=!0,this.open(),this.appendToBody&&document.body.appendChild(this.$el))},destroyed(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},methods:{toggleFullScreen(){this.fullScreen=!this.fullScreen},enterFullScreen(){this.fullScreen=!0},exitFullScreen(){this.fullScreen=!1},shouldShowFooter(){var e,t;return!!((t=(e=this.$scopedSlots).footer)!=null&&t.call(e))},handleWrapperClick(){!this.closeOnClickModal||this.handleClose()},handleClose(){typeof this.beforeClose=="function"?this.beforeClose(this.hide):this.hide()},hide(e){e!==!1&&(this.$emit("update:visible",!1),this.$emit("close"),this.closed=!0)},updatePopper(){this.broadcast("ElSelectDropdown","updatePopper"),this.broadcast("ElDropdownMenu","updatePopper")},afterEnter(){this.$emit("opened")},afterLeave(){this.exitFullScreen(),this.$emit("closed")}}},i={};var g=d(u,r,s,!1,c,null,null,null);function c(e){for(let t in i)this[t]=i[t]}var f=function(){return g.exports}();export{f as default};
1
+ import { Dialog as s } from "element-ui";
2
+ import { dialogDrag as a } from "@web-utils/core/dist/directives/index";
3
+ import { n } from "../../chunks/6499de3a.js";
4
+ var r = function() {
5
+ var e = this, l = e.$createElement, t = e._self._c || l;
6
+ return t("Transition", {
7
+ attrs: {
8
+ name: "dialog-fade"
9
+ },
10
+ on: {
11
+ "after-enter": e.afterEnter,
12
+ "after-leave": e.afterLeave
13
+ }
14
+ }, [t("div", {
15
+ directives: [{
16
+ name: "show",
17
+ rawName: "v-show",
18
+ value: e.visible,
19
+ expression: "visible"
20
+ }, {
21
+ name: "dialog-drag",
22
+ rawName: "v-dialog-drag:[fullScreen]",
23
+ value: {
24
+ onMove: e.updatePopper
25
+ },
26
+ expression: "{onMove:updatePopper}",
27
+ arg: e.fullScreen
28
+ }],
29
+ staticClass: "el-dialog__wrapper",
30
+ on: {
31
+ click: function(o) {
32
+ return o.target !== o.currentTarget ? null : e.handleWrapperClick.apply(null, arguments);
33
+ }
34
+ }
35
+ }, [t("div", {
36
+ ref: "dialog",
37
+ class: ["el-dialog", "element-dialog", "el-dialog-resizeable", "normalize", {
38
+ "is-fullscreen": e.fullScreen,
39
+ "el-dialog__body-padding": e.bodyPadding,
40
+ "el-dialog--center": e.center,
41
+ "el-dialog--flex-row": e.flexRow,
42
+ "el-dialog--flex-column": e.flexColumn
43
+ }, e.customClass],
44
+ style: e.style,
45
+ attrs: {
46
+ role: "dialog",
47
+ "aria-modal": "true",
48
+ "aria-label": e.title || "dialog"
49
+ }
50
+ }, [t("div", {
51
+ staticClass: "el-dialog__header"
52
+ }, [e._t("title", function() {
53
+ return [t("span", {
54
+ staticClass: "el-dialog__title"
55
+ }, [e._v(e._s(e.title))])];
56
+ }), t("div", {
57
+ staticClass: "header-button-wrapper"
58
+ }, [e._t("header-button"), e.showFullScreen ? t("ElButton", {
59
+ staticClass: "header-button",
60
+ attrs: {
61
+ type: "text",
62
+ icon: e.fullScreen ? "el-icon-copy-document" : "el-icon-full-screen",
63
+ size: "medium",
64
+ title: e.fullScreen ? "\u8FD8\u539F" : "\u6700\u5927\u5316"
65
+ },
66
+ on: {
67
+ click: e.toggleFullScreen
68
+ }
69
+ }) : e._e(), e.showClose ? t("ElButton", {
70
+ staticClass: "header-button",
71
+ attrs: {
72
+ "aria-label": "Close",
73
+ type: "text",
74
+ title: "\u5173\u95ED",
75
+ icon: "el-icon-close",
76
+ size: "medium"
77
+ },
78
+ on: {
79
+ click: e.handleClose
80
+ }
81
+ }) : e._e()], 2)], 2), e.rendered ? t("div", {
82
+ staticClass: "el-dialog__body",
83
+ style: {
84
+ height: e.fullScreen ? "100%" : e.height
85
+ }
86
+ }, [e.destroyOnClose ? [e.visible ? e._t("default") : e._e()] : e._t("default")], 2) : e._e(), e.shouldShowFooter() ? t("div", {
87
+ staticClass: "el-dialog__footer"
88
+ }, [e._t("footer", null, {
89
+ handleClose: e.handleClose
90
+ })], 2) : e._e()])])]);
91
+ }, d = [];
92
+ const u = {
93
+ props: {
94
+ modal: {
95
+ type: Boolean,
96
+ default: !0
97
+ },
98
+ modalAppendToBody: {
99
+ type: Boolean,
100
+ default: !0
101
+ },
102
+ lockScroll: {
103
+ type: Boolean,
104
+ default: !0
105
+ },
106
+ closeOnPressEscape: {
107
+ type: Boolean,
108
+ default: !0
109
+ }
110
+ }
111
+ }, c = {
112
+ name: "ElementDialog",
113
+ directives: {
114
+ dialogDrag: a
115
+ },
116
+ mixins: [...s.mixins, u],
117
+ props: {
118
+ title: {
119
+ type: String,
120
+ default: ""
121
+ },
122
+ appendToBody: {
123
+ type: Boolean,
124
+ default: !0
125
+ },
126
+ closeOnClickModal: {
127
+ type: Boolean,
128
+ default: !1
129
+ },
130
+ showClose: {
131
+ type: Boolean,
132
+ default: !0
133
+ },
134
+ showFullScreen: Boolean,
135
+ width: {
136
+ type: String
137
+ },
138
+ height: {
139
+ type: String
140
+ },
141
+ customClass: {
142
+ type: String,
143
+ default: ""
144
+ },
145
+ top: {
146
+ type: String,
147
+ default: "15vh"
148
+ },
149
+ beforeClose: {
150
+ type: Function
151
+ },
152
+ center: {
153
+ type: Boolean,
154
+ default: !0
155
+ },
156
+ destroyOnClose: Boolean,
157
+ flexRow: Boolean,
158
+ flexColumn: Boolean,
159
+ bodyPadding: {
160
+ type: Boolean,
161
+ default: !0
162
+ }
163
+ },
164
+ data() {
165
+ return {
166
+ fullScreen: !1,
167
+ closed: !1
168
+ };
169
+ },
170
+ computed: {
171
+ style() {
172
+ const e = {};
173
+ return this.fullScreen || (e.marginTop = this.top, this.width && (e.width = this.width)), e;
174
+ }
175
+ },
176
+ watch: {
177
+ visible(e) {
178
+ e ? (this.closed = !1, this.$emit("open"), this.$el.addEventListener("scroll", this.updatePopper), this.$nextTick(() => {
179
+ this.$refs.dialog.scrollTop = 0;
180
+ }), this.appendToBody && document.body.appendChild(this.$el)) : (this.$el.removeEventListener("scroll", this.updatePopper), this.closed || this.$emit("close"));
181
+ }
182
+ },
183
+ mounted() {
184
+ this.visible && (this.rendered = !0, this.open(), this.appendToBody && document.body.appendChild(this.$el));
185
+ },
186
+ destroyed() {
187
+ this.appendToBody && this.$el && this.$el.parentNode && this.$el.parentNode.removeChild(this.$el);
188
+ },
189
+ methods: {
190
+ toggleFullScreen() {
191
+ this.fullScreen = !this.fullScreen;
192
+ },
193
+ enterFullScreen() {
194
+ this.fullScreen = !0;
195
+ },
196
+ exitFullScreen() {
197
+ this.fullScreen = !1;
198
+ },
199
+ shouldShowFooter() {
200
+ var e, l;
201
+ return !!((l = (e = this.$scopedSlots).footer) != null && l.call(e));
202
+ },
203
+ handleWrapperClick() {
204
+ !this.closeOnClickModal || this.handleClose();
205
+ },
206
+ handleClose() {
207
+ typeof this.beforeClose == "function" ? this.beforeClose(this.hide) : this.hide();
208
+ },
209
+ hide(e) {
210
+ e !== !1 && (this.$emit("update:visible", !1), this.$emit("close"), this.closed = !0);
211
+ },
212
+ updatePopper() {
213
+ this.broadcast("ElSelectDropdown", "updatePopper"), this.broadcast("ElDropdownMenu", "updatePopper");
214
+ },
215
+ afterEnter() {
216
+ this.$emit("opened");
217
+ },
218
+ afterLeave() {
219
+ this.exitFullScreen(), this.$emit("closed");
220
+ }
221
+ }
222
+ }, i = {};
223
+ var p = /* @__PURE__ */ n(
224
+ c,
225
+ r,
226
+ d,
227
+ !1,
228
+ h,
229
+ null,
230
+ null,
231
+ null
232
+ );
233
+ function h(e) {
234
+ for (let l in i)
235
+ this[l] = i[l];
236
+ }
237
+ const _ = /* @__PURE__ */ function() {
238
+ return p.exports;
239
+ }();
240
+ export {
241
+ _ as default
242
+ };