@web-utils/component 1.2.5 → 1.2.7

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/element-dialog/index.js +242 -1
  37. package/dist/components/empty-view/index.js +69 -1
  38. package/dist/components/error-view/index.js +61 -1
  39. package/dist/components/flex-column/index.js +50 -1
  40. package/dist/components/flex-item/index.js +66 -1
  41. package/dist/components/flex-row/index.js +50 -1
  42. package/dist/components/flex-scroller/index.js +47 -1
  43. package/dist/components/form-button/index.js +80 -1
  44. package/dist/components/form-cascader/index.js +151 -1
  45. package/dist/components/form-checkbox-group/index.js +192 -1
  46. package/dist/components/form-date-picker/index.js +182 -1
  47. package/dist/components/form-holder/index.js +90 -1
  48. package/dist/components/form-input/index.js +106 -1
  49. package/dist/components/form-input-email/index.js +97 -1
  50. package/dist/components/form-input-id-card/index.js +104 -1
  51. package/dist/components/form-input-number/index.js +123 -1
  52. package/dist/components/form-input-phone-number/index.js +98 -1
  53. package/dist/components/form-input-time/index.js +124 -1
  54. package/dist/components/form-item/index.js +120 -1
  55. package/dist/components/form-item-config-provider/index.js +63 -1
  56. package/dist/components/form-item-group/index.js +169 -1
  57. package/dist/components/form-radio-group/index.js +170 -1
  58. package/dist/components/form-select/index.js +154 -1
  59. package/dist/components/form-switch/index.js +97 -1
  60. package/dist/components/form-textarea/index.js +102 -1
  61. package/dist/components/form-view/index.js +343 -1
  62. package/dist/components/guide-steps/index.js +94 -1
  63. package/dist/components/icon-card/index.js +62 -1
  64. package/dist/components/iframe-window/index.js +99 -1
  65. package/dist/components/input-number/index.js +274 -1
  66. package/dist/components/input-number-range/index.js +110 -1
  67. package/dist/components/j-s-x-component/index.js +16 -1
  68. package/dist/components/keep-view-alive/index.js +119 -1
  69. package/dist/components/loading-view/index.js +61 -1
  70. package/dist/components/nav-bar/index.js +52 -1
  71. package/dist/components/not-implement/index.js +35 -1
  72. package/dist/components/page/index.js +40 -1
  73. package/dist/components/page-header/index.js +56 -1
  74. package/dist/components/page-index/index.js +151 -1
  75. package/dist/components/page-index-top/index.js +119 -1
  76. package/dist/components/page-skeleton/index.js +56 -1
  77. package/dist/components/page-skeleton-new/index.js +98 -1
  78. package/dist/components/pageable-table/index.js +429 -1
  79. package/dist/components/pageable-view/index.js +328 -2
  80. package/dist/components/photo-swipe/index.js +187 -1
  81. package/dist/components/resize-observer/index.js +62 -1
  82. package/dist/components/search-popover/index.js +391 -2
  83. package/dist/components/sign-panel/index.js +242 -1
  84. package/dist/components/split-pane/index.js +209 -1
  85. package/dist/components/stateful/index.js +84 -1
  86. package/dist/components/static-pageable-table/index.js +92 -1
  87. package/dist/components/swiper/index.js +158 -1
  88. package/dist/components/tab/index.js +145 -1
  89. package/dist/components/tab-item/index.js +73 -1
  90. package/dist/components/table-column/index.js +89 -1
  91. package/dist/components/table-view/index.js +363 -1
  92. package/dist/components/tag-render/index.js +97 -1
  93. package/dist/components/tinymce-editor/index.js +173 -1
  94. package/dist/components/tinymce-wrapper/index.js +618 -1
  95. package/dist/components/toolbar/index.js +217 -1
  96. package/dist/components/toolbar-button/index.js +90 -1
  97. package/dist/components/trigger/index.js +71 -1
  98. package/dist/components/vue-tags-input/index.js +439 -1
  99. package/dist/components/watermark/index.js +63 -1
  100. package/dist/components/x-dialog/index.js +173 -1
  101. package/dist/index.css +2102 -1
  102. package/dist/index.es.js +3097 -2347
  103. package/package.json +29 -29
  104. package/web-types.json +22 -55
  105. package/dist/chunks/23bd3525.js +0 -1
  106. package/dist/chunks/65f4f4f2.js +0 -1
  107. package/dist/chunks/8473fc69.js +0 -1
  108. package/dist/chunks/a125d16c.js +0 -1
  109. package/dist/chunks/addb6ed5.js +0 -1
  110. package/dist/chunks/f15477c7.js +0 -1
  111. package/dist/components/el-color-picker-dropdown/index.js +0 -1
@@ -1 +1,66 @@
1
- var u=Object.defineProperty,c=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var r=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var s=(t,e,l)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l,o=(t,e)=>{for(var l in e||(e={}))_.call(e,l)&&s(t,l,e[l]);if(r)for(var l of r(e))x.call(e,l)&&s(t,l,e[l]);return t},f=(t,e)=>c(t,v(e));import{h}from"../../chunks/8473fc69.js";import{n as m}from"../../chunks/6499de3a.js";const d={name:"FlexItem",functional:!0,props:{flexRow:{type:Boolean,default:!1},flexColumn:{type:Boolean,default:!1},verticalCenter:{type:Boolean,default:!1},horizonCenter:{type:Boolean,default:!1},center:{type:Boolean,default:!1},textCenter:{type:Boolean,default:!1},relative:{type:Boolean,default:!1},absolute:{type:Boolean,default:!1}},render(t,{children:e,data:l,props:n}){const a=h(l.class,n.relative?"flex-item-relative":"flex-item");return n.absolute&&!n.relative&&a.push("flex-item-relative"),n.center||n.horizonCenter&&n.verticalCenter?(a.push("horizon-center"),a.push("vertical-center")):(n.horizonCenter&&a.push("horizon-center"),n.verticalCenter&&a.push("vertical-center")),n.textCenter&&a.push("text-center"),n.flexColumn&&a.push("flex-column"),n.flexRow&&a.push("flex-row"),n.absolute?t("div",f(o({},l),{class:a}),[t("div",{class:"absolute",style:"overflow:auto"},e)]):t("div",f(o({},l),{class:a}),e)}};let C,y;const i={};var B=m(d,C,y,!1,z,null,null,null);function z(t){for(let e in i)this[e]=i[e]}var w=function(){return B.exports}();export{w as default};
1
+ import { h as f } from "../../chunks/2bd4e340.js";
2
+ import { n as s } from "../../chunks/6499de3a.js";
3
+ const r = {
4
+ name: "FlexItem",
5
+ functional: !0,
6
+ props: {
7
+ flexRow: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ flexColumn: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ verticalCenter: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ horizonCenter: {
20
+ type: Boolean,
21
+ default: !1
22
+ },
23
+ center: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ textCenter: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ relative: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ absolute: {
36
+ type: Boolean,
37
+ default: !1
38
+ }
39
+ },
40
+ render(n, { children: l, data: o, props: e }) {
41
+ const t = f(o.class, e.relative ? "flex-item-relative" : "flex-item");
42
+ return e.absolute && !e.relative && t.push("flex-item-relative"), e.center || e.horizonCenter && e.verticalCenter ? (t.push("horizon-center"), t.push("vertical-center")) : (e.horizonCenter && t.push("horizon-center"), e.verticalCenter && t.push("vertical-center")), e.textCenter && t.push("text-center"), e.flexColumn && t.push("flex-column"), e.flexRow && t.push("flex-row"), e.absolute ? n("div", { ...o, class: t }, [n("div", { class: "absolute", style: "overflow:auto" }, l)]) : n("div", { ...o, class: t }, l);
43
+ }
44
+ };
45
+ let i, u;
46
+ const a = {};
47
+ var c = /* @__PURE__ */ s(
48
+ r,
49
+ i,
50
+ u,
51
+ !1,
52
+ v,
53
+ null,
54
+ null,
55
+ null
56
+ );
57
+ function v(n) {
58
+ for (let l in a)
59
+ this[l] = a[l];
60
+ }
61
+ const h = /* @__PURE__ */ function() {
62
+ return c.exports;
63
+ }();
64
+ export {
65
+ h as default
66
+ };
@@ -1 +1,50 @@
1
- var u=Object.defineProperty,f=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var a=(t,e,n)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,s=(t,e)=>{for(var n in e||(e={}))v.call(e,n)&&a(t,n,e[n]);if(o)for(var n of o(e))h.call(e,n)&&a(t,n,e[n]);return t},i=(t,e)=>f(t,_(e));import{h as C}from"../../chunks/8473fc69.js";import{n as d}from"../../chunks/6499de3a.js";const x={name:"FlexRow",functional:!0,props:{verticalCenter:{type:Boolean,default:!1},horizonCenter:{type:Boolean,default:!1},center:{type:Boolean,default:!1},textCenter:{type:Boolean,default:!1}},render(t,{data:e,children:n,props:r}){const l=C(e.class,"flex-row");return r.center||r.horizonCenter&&r.verticalCenter?(l.push("horizon-center"),l.push("vertical-center")):(r.horizonCenter&&l.push("horizon-center"),r.verticalCenter&&l.push("vertical-center")),r.textCenter&&l.push("text-center"),t("div",i(s({},e),{class:l}),n)}};let m,p;const c={};var z=d(x,m,p,!1,y,null,null,null);function y(t){for(let e in c)this[e]=c[e]}var w=function(){return z.exports}();export{w as default};
1
+ import { h as s } from "../../chunks/2bd4e340.js";
2
+ import { n as a } from "../../chunks/6499de3a.js";
3
+ const c = {
4
+ name: "FlexRow",
5
+ functional: !0,
6
+ props: {
7
+ verticalCenter: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ horizonCenter: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ center: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ textCenter: {
20
+ type: Boolean,
21
+ default: !1
22
+ }
23
+ },
24
+ render(r, { data: n, children: o, props: e }) {
25
+ const t = s(n.class, "flex-row");
26
+ return e.center || e.horizonCenter && e.verticalCenter ? (t.push("horizon-center"), t.push("vertical-center")) : (e.horizonCenter && t.push("horizon-center"), e.verticalCenter && t.push("vertical-center")), e.textCenter && t.push("text-center"), r("div", { ...n, class: t }, o);
27
+ }
28
+ };
29
+ let i, u;
30
+ const l = {};
31
+ var f = /* @__PURE__ */ a(
32
+ c,
33
+ i,
34
+ u,
35
+ !1,
36
+ _,
37
+ null,
38
+ null,
39
+ null
40
+ );
41
+ function _(r) {
42
+ for (let n in l)
43
+ this[n] = l[n];
44
+ }
45
+ const C = /* @__PURE__ */ function() {
46
+ return f.exports;
47
+ }();
48
+ export {
49
+ C as default
50
+ };
@@ -1 +1,47 @@
1
- import{n as t}from"../../chunks/6499de3a.js";var n=function(){var e=this,l=e.$createElement,o=e._self._c||l;return o("div",{staticClass:"flex-scroller-wrapper"},[o("div",{class:["flex-scroller",{"flex-column":e.flexColumn,"flex-row":e.flexRow,"content-scroll":e.contentScroll},e.contentClass]},[e._t("default")],2)])},s=[];const c={name:"FlexScroller",props:{flexColumn:Boolean,flexRow:Boolean,contentClass:{type:String},contentScroll:{type:Boolean,default:!0}}},r={};var a=t(c,n,s,!1,f,null,null,null);function f(e){for(let l in r)this[l]=r[l]}var _=function(){return a.exports}();export{_ as default};
1
+ import { n as o } from "../../chunks/6499de3a.js";
2
+ var r = function() {
3
+ var e = this, l = e.$createElement, n = e._self._c || l;
4
+ return n("div", {
5
+ staticClass: "flex-scroller-wrapper"
6
+ }, [n("div", {
7
+ class: ["flex-scroller", {
8
+ "flex-column": e.flexColumn,
9
+ "flex-row": e.flexRow,
10
+ "content-scroll": e.contentScroll
11
+ }, e.contentClass]
12
+ }, [e._t("default")], 2)]);
13
+ }, c = [];
14
+ const s = {
15
+ name: "FlexScroller",
16
+ props: {
17
+ flexColumn: Boolean,
18
+ flexRow: Boolean,
19
+ contentClass: {
20
+ type: String
21
+ },
22
+ contentScroll: {
23
+ type: Boolean,
24
+ default: !0
25
+ }
26
+ }
27
+ }, t = {};
28
+ var a = /* @__PURE__ */ o(
29
+ s,
30
+ r,
31
+ c,
32
+ !1,
33
+ _,
34
+ null,
35
+ null,
36
+ null
37
+ );
38
+ function _(e) {
39
+ for (let l in t)
40
+ this[l] = t[l];
41
+ }
42
+ const f = /* @__PURE__ */ function() {
43
+ return a.exports;
44
+ }();
45
+ export {
46
+ f as default
47
+ };
@@ -1 +1,80 @@
1
- import{c as r}from"../../chunks/65f4f4f2.js";import{n as o}from"../../chunks/6499de3a.js";const i={name:"Confirmable",mixins:[r]};let a,s;const e={};var _=o(i,a,s,!1,u,null,null,null);function u(l){for(let n in e)this[n]=e[n]}var c=function(){return _.exports}();const p={props:{type:{type:String,default:"danger"},size:String,icon:{type:String,default:""},nativeType:{type:String,default:"button"},loading:Boolean,disabled:Boolean,plain:Boolean,autofocus:Boolean,round:Boolean,confirmable:Boolean,text:{type:String,default:""},tag:{type:String,default:"AwesomeButton"}}},f={name:"FormButton",mixins:[c,p]};let m,d;const t={};var v=o(f,m,d,!1,g,null,null,null);function g(l){for(let n in t)this[n]=t[n]}var x=function(){return v.exports}();export{x as default};
1
+ import { c as r } from "../../chunks/7af3ceb1.js";
2
+ import { n as o } from "../../chunks/6499de3a.js";
3
+ const i = {
4
+ name: "Confirmable",
5
+ mixins: [r]
6
+ };
7
+ let s, _;
8
+ const t = {};
9
+ var a = /* @__PURE__ */ o(
10
+ i,
11
+ s,
12
+ _,
13
+ !1,
14
+ u,
15
+ null,
16
+ null,
17
+ null
18
+ );
19
+ function u(l) {
20
+ for (let n in t)
21
+ this[n] = t[n];
22
+ }
23
+ const c = /* @__PURE__ */ function() {
24
+ return a.exports;
25
+ }(), p = {
26
+ props: {
27
+ type: {
28
+ type: String,
29
+ default: "danger"
30
+ },
31
+ size: String,
32
+ icon: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ nativeType: {
37
+ type: String,
38
+ default: "button"
39
+ },
40
+ loading: Boolean,
41
+ disabled: Boolean,
42
+ plain: Boolean,
43
+ autofocus: Boolean,
44
+ round: Boolean,
45
+ confirmable: Boolean,
46
+ text: {
47
+ type: String,
48
+ default: ""
49
+ },
50
+ tag: {
51
+ type: String,
52
+ default: "AwesomeButton"
53
+ }
54
+ }
55
+ }, f = {
56
+ name: "FormButton",
57
+ mixins: [c, p]
58
+ };
59
+ let m, d;
60
+ const e = {};
61
+ var v = /* @__PURE__ */ o(
62
+ f,
63
+ m,
64
+ d,
65
+ !1,
66
+ g,
67
+ null,
68
+ null,
69
+ null
70
+ );
71
+ function g(l) {
72
+ for (let n in e)
73
+ this[n] = e[n];
74
+ }
75
+ const B = /* @__PURE__ */ function() {
76
+ return v.exports;
77
+ }();
78
+ export {
79
+ B as default
80
+ };
@@ -1 +1,151 @@
1
- var u=Object.defineProperty;var n=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var o=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&o(e,r,t[r]);if(n)for(var r of n(t))c.call(t,r)&&o(e,r,t[r]);return e};import{f as d}from"../../chunks/a125d16c.js";import{f as m}from"../../chunks/23bd3525.js";import{Cascader as f}from"element-ui";import{i as h,n as y}from"../../chunks/8473fc69.js";import{findTreeChildren as v,cloneDeep as _,setParent as b}from"@web-utils/core";import{n as S}from"../../chunks/6499de3a.js";var k=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("FormItem",e._b({attrs:{rules:e.computeRules,disabled:e.inputDisabled},scopedSlots:e._u([{key:"default",fn:function(){return[e._t("default",function(){return[r("ElCascader",e._g(e._b({class:{"is-readonly":e.readonly},staticStyle:{width:"100%"},attrs:{value:e.inputVal,"show-all-levels":e.showAllLevels,separator:e.separator,readonly:e.readonly,options:e.innerOptions,props:{checkStrictly:e.checkStrictly,label:e.labelKey,value:e.valueKey},disabled:e.inputDisabled,placeholder:e.computePlaceholder},on:{input:e.emitInput}},"ElCascader",e.inputProps,!1),e.listeners))]})]},proxy:!0},{key:"error",fn:function(a){var i=a.error;return[e._t("error",null,{error:i})]}},{key:"label",fn:function(){return[e._t("label")]},proxy:!0}],null,!0)},"FormItem",e.formItemProps,!1))},x=[];const P=Object.keys(f.props).filter(e=>!["value","placeholder","disabled","options","showAllLevels","show-all-levels","separator"].includes(e)),w={name:"FormCascader",mixins:[d,m],props:{value:{type:[String,Number]},options:{type:Array,default:()=>[]},showAllLevels:Boolean,separator:{type:String,default:"/"},last:{type:Boolean,default:!0},checkStrictly:{type:Boolean,default:!0},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"}},data(){return{innerOptions:[]}},computed:{inputProps(){return h(l(l({},y(this.$attrs)),this.$props),P)},inputVal(){let[e]=v(this.innerOptions,r=>r[this.valueKey]===this.value);const t=[];for(;e;)t.push(e[this.valueKey]),e=e.parent;return t.reverse()}},watch:{options:{immediate:!0,handler(e){if(e){const t=_(e);b(t),this.innerOptions=t}else this.innerOptions=[]}}},methods:{emitInput(e){const t=this.last?e[e.length-1]:e;this.$emit("input",t)}}},s={};var C=S(w,k,x,!1,K,null,null,null);function K(e){for(let t in s)this[t]=s[t]}var g=function(){return C.exports}();export{g as default};
1
+ import { f as s } from "../../chunks/86bcadec.js";
2
+ import { f as a } from "../../chunks/a73fe8ee.js";
3
+ import { Cascader as i } from "element-ui";
4
+ import { i as u, n as p } from "../../chunks/2bd4e340.js";
5
+ import { findTreeChildren as c, cloneDeep as d, setParent as m } from "@web-utils/core";
6
+ import { n as f } from "../../chunks/6499de3a.js";
7
+ var h = function() {
8
+ var e = this, t = e.$createElement, r = e._self._c || t;
9
+ return r("FormItem", e._b({
10
+ attrs: {
11
+ rules: e.computeRules,
12
+ disabled: e.inputDisabled
13
+ },
14
+ scopedSlots: e._u([{
15
+ key: "default",
16
+ fn: function() {
17
+ return [e._t("default", function() {
18
+ return [r("ElCascader", e._g(e._b({
19
+ class: {
20
+ "is-readonly": e.readonly
21
+ },
22
+ staticStyle: {
23
+ width: "100%"
24
+ },
25
+ attrs: {
26
+ value: e.inputVal,
27
+ "show-all-levels": e.showAllLevels,
28
+ separator: e.separator,
29
+ readonly: e.readonly,
30
+ options: e.innerOptions,
31
+ props: {
32
+ checkStrictly: e.checkStrictly,
33
+ label: e.labelKey,
34
+ value: e.valueKey
35
+ },
36
+ disabled: e.inputDisabled,
37
+ placeholder: e.computePlaceholder
38
+ },
39
+ on: {
40
+ input: e.emitInput
41
+ }
42
+ }, "ElCascader", e.inputProps, !1), e.listeners))];
43
+ })];
44
+ },
45
+ proxy: !0
46
+ }, {
47
+ key: "error",
48
+ fn: function(l) {
49
+ var o = l.error;
50
+ return [e._t("error", null, {
51
+ error: o
52
+ })];
53
+ }
54
+ }, {
55
+ key: "label",
56
+ fn: function() {
57
+ return [e._t("label")];
58
+ },
59
+ proxy: !0
60
+ }], null, !0)
61
+ }, "FormItem", e.formItemProps, !1));
62
+ }, y = [];
63
+ const v = Object.keys(i.props).filter((e) => !["value", "placeholder", "disabled", "options", "showAllLevels", "show-all-levels", "separator"].includes(e)), _ = {
64
+ name: "FormCascader",
65
+ mixins: [s, a],
66
+ props: {
67
+ value: {
68
+ type: [String, Number]
69
+ },
70
+ options: {
71
+ type: Array,
72
+ default: () => []
73
+ },
74
+ showAllLevels: Boolean,
75
+ separator: {
76
+ type: String,
77
+ default: "/"
78
+ },
79
+ last: {
80
+ type: Boolean,
81
+ default: !0
82
+ },
83
+ checkStrictly: {
84
+ type: Boolean,
85
+ default: !0
86
+ },
87
+ labelKey: {
88
+ type: String,
89
+ default: "label"
90
+ },
91
+ valueKey: {
92
+ type: String,
93
+ default: "value"
94
+ }
95
+ },
96
+ data() {
97
+ return {
98
+ innerOptions: []
99
+ };
100
+ },
101
+ computed: {
102
+ inputProps() {
103
+ return u({ ...p(this.$attrs), ...this.$props }, v);
104
+ },
105
+ inputVal() {
106
+ let [e] = c(this.innerOptions, (r) => r[this.valueKey] === this.value);
107
+ const t = [];
108
+ for (; e; )
109
+ t.push(e[this.valueKey]), e = e.parent;
110
+ return t.reverse();
111
+ }
112
+ },
113
+ watch: {
114
+ options: {
115
+ immediate: !0,
116
+ handler(e) {
117
+ if (e) {
118
+ const t = d(e);
119
+ m(t), this.innerOptions = t;
120
+ } else
121
+ this.innerOptions = [];
122
+ }
123
+ }
124
+ },
125
+ methods: {
126
+ emitInput(e) {
127
+ const t = this.last ? e[e.length - 1] : e;
128
+ this.$emit("input", t);
129
+ }
130
+ }
131
+ }, n = {};
132
+ var b = /* @__PURE__ */ f(
133
+ _,
134
+ h,
135
+ y,
136
+ !1,
137
+ S,
138
+ null,
139
+ null,
140
+ null
141
+ );
142
+ function S(e) {
143
+ for (let t in n)
144
+ this[t] = n[t];
145
+ }
146
+ const g = /* @__PURE__ */ function() {
147
+ return b.exports;
148
+ }();
149
+ export {
150
+ g as default
151
+ };
@@ -1 +1,192 @@
1
- var c=Object.defineProperty;var i=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var a=(e,o,r)=>o in e?c(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,l=(e,o)=>{for(var r in o||(o={}))u.call(o,r)&&a(e,r,o[r]);if(i)for(var r of i(o))s.call(o,r)&&a(e,r,o[r]);return e};import{f as h}from"../../chunks/a125d16c.js";import{f as b}from"../../chunks/23bd3525.js";import{i as f,n as m}from"../../chunks/8473fc69.js";import{CheckboxGroup as x}from"element-ui";import{n as d}from"../../chunks/6499de3a.js";var k=function(){var e=this,o=e.$createElement,r=e._self._c||o;return r("FormItem",e._b({class:["form-checkbox-group",{"form-checkbox-group-row":e.fillRow},e.ellipsis?"form-checkbox-group-row-ellipsis":e.fillRow?"form-checkbox-group-row-break-word":""],attrs:{rules:e.computeRules,disabled:e.inputDisabled},scopedSlots:e._u([{key:"default",fn:function(){return[r("ElCheckboxGroup",e._g(e._b({attrs:{disabled:e.inputDisabled,value:e.computeVal,placeholder:e.computePlaceholder},on:{input:e.emitInput}},"ElCheckboxGroup",e.inputProps,!1),e.listeners),e._l(e.innerOptions,function(t){return r("ElCheckbox",{key:t[e.valueKey],attrs:{label:t[e.valueKey]}},[e._v(" "+e._s(t[e.labelKey])+" ")])}),1),e.computeVal.includes(e.otherVal)?r("FormInput",{staticClass:"form-checkbox-group-other",style:e.otherLabel?{width:e.otherWidth}:{marginBottom:0,width:e.otherWidth},attrs:{"wrap-col":!1,"label-width":"0",prop:e.otherProp,required:!!e.otherProp,placeholder:e.otherPlaceholder,label:e.otherLabel,"show-message":!!e.otherLabel,value:e.other},on:{input:function(t){return e.$emit("update:other",t)}}}):e._e()]},proxy:!0},{key:"error",fn:function(t){var p=t.error;return[e._t("error",null,{error:p})]}},{key:"label",fn:function(){return[e._t("label")]},proxy:!0},{key:"below",fn:function(){return[e._t("below")]},proxy:!0}],null,!0)},"FormItem",e.formItemProps,!1))},g=[];const _=Object.keys(x.props).filter(e=>!["value","placeholder","disabled"].includes(e)),y={name:"FormCheckboxGroup",mixins:[h,b],props:{options:{type:Array,default:()=>[]},value:{type:[String,Array]},other:{type:String},otherVal:{type:String},otherProp:{type:String},otherPlaceholder:{type:String},otherLabel:{type:String},otherWidth:{type:String,default:"200px"},gender:Boolean,confirm:Boolean,labelProp:{type:String,default:"name"},valueProp:{type:String,default:"code"},split:Boolean,classic:Boolean,fillRow:Boolean,ellipsis:Boolean},computed:{prefix(){return"\u8BF7\u9009\u62E9"},labelKey(){return this.classic?"label":this.labelProp},valueKey(){return this.classic?"value":this.valueProp},inputProps(){return f(l(l({},m(this.$attrs)),this.$props),_)},innerOptions(){return this.gender?[{[this.labelKey]:"\u7537",[this.valueKey]:"\u7537"},{[this.labelKey]:"\u5973",[this.valueKey]:"\u5973"}]:this.confirm?[{[this.labelKey]:"\u662F",[this.valueKey]:"\u662F"},{[this.labelKey]:"\u5426",[this.valueKey]:"\u5426"}]:this.options},computeVal(){return this.split?this.value?this.value.split(","):[]:this.value||[]}},methods:{emitInput(e){this.split?this.$emit("input",e.join(",")):this.$emit("input",e)}}},n={};var v=d(y,k,g,!1,w,null,null,null);function w(e){for(let o in n)this[o]=n[o]}var P=function(){return v.exports}();export{P as default};
1
+ import { f as n } from "../../chunks/86bcadec.js";
2
+ import { f as s } from "../../chunks/a73fe8ee.js";
3
+ import { i as a, n as u } from "../../chunks/2bd4e340.js";
4
+ import { CheckboxGroup as p } from "element-ui";
5
+ import { n as h } from "../../chunks/6499de3a.js";
6
+ var c = function() {
7
+ var e = this, r = e.$createElement, o = e._self._c || r;
8
+ return o("FormItem", e._b({
9
+ class: ["form-checkbox-group", {
10
+ "form-checkbox-group-row": e.fillRow
11
+ }, e.ellipsis ? "form-checkbox-group-row-ellipsis" : e.fillRow ? "form-checkbox-group-row-break-word" : ""],
12
+ attrs: {
13
+ rules: e.computeRules,
14
+ disabled: e.inputDisabled
15
+ },
16
+ scopedSlots: e._u([{
17
+ key: "default",
18
+ fn: function() {
19
+ return [o("ElCheckboxGroup", e._g(e._b({
20
+ attrs: {
21
+ disabled: e.inputDisabled,
22
+ value: e.computeVal,
23
+ placeholder: e.computePlaceholder
24
+ },
25
+ on: {
26
+ input: e.emitInput
27
+ }
28
+ }, "ElCheckboxGroup", e.inputProps, !1), e.listeners), e._l(e.innerOptions, function(t) {
29
+ return o("ElCheckbox", {
30
+ key: t[e.valueKey],
31
+ attrs: {
32
+ label: t[e.valueKey]
33
+ }
34
+ }, [e._v(" " + e._s(t[e.labelKey]) + " ")]);
35
+ }), 1), e.computeVal.includes(e.otherVal) ? o("FormInput", {
36
+ staticClass: "form-checkbox-group-other",
37
+ style: e.otherLabel ? {
38
+ width: e.otherWidth
39
+ } : {
40
+ marginBottom: 0,
41
+ width: e.otherWidth
42
+ },
43
+ attrs: {
44
+ "wrap-col": !1,
45
+ "label-width": "0",
46
+ prop: e.otherProp,
47
+ required: !!e.otherProp,
48
+ placeholder: e.otherPlaceholder,
49
+ label: e.otherLabel,
50
+ "show-message": !!e.otherLabel,
51
+ value: e.other
52
+ },
53
+ on: {
54
+ input: function(t) {
55
+ return e.$emit("update:other", t);
56
+ }
57
+ }
58
+ }) : e._e()];
59
+ },
60
+ proxy: !0
61
+ }, {
62
+ key: "error",
63
+ fn: function(t) {
64
+ var i = t.error;
65
+ return [e._t("error", null, {
66
+ error: i
67
+ })];
68
+ }
69
+ }, {
70
+ key: "label",
71
+ fn: function() {
72
+ return [e._t("label")];
73
+ },
74
+ proxy: !0
75
+ }, {
76
+ key: "below",
77
+ fn: function() {
78
+ return [e._t("below")];
79
+ },
80
+ proxy: !0
81
+ }], null, !0)
82
+ }, "FormItem", e.formItemProps, !1));
83
+ }, f = [];
84
+ const m = Object.keys(p.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), d = {
85
+ name: "FormCheckboxGroup",
86
+ mixins: [n, s],
87
+ props: {
88
+ options: {
89
+ type: Array,
90
+ default: () => []
91
+ },
92
+ value: {
93
+ type: [String, Array]
94
+ },
95
+ other: {
96
+ type: String
97
+ },
98
+ otherVal: {
99
+ type: String
100
+ },
101
+ otherProp: {
102
+ type: String
103
+ },
104
+ otherPlaceholder: {
105
+ type: String
106
+ },
107
+ otherLabel: {
108
+ type: String
109
+ },
110
+ otherWidth: {
111
+ type: String,
112
+ default: "200px"
113
+ },
114
+ gender: Boolean,
115
+ confirm: Boolean,
116
+ labelProp: {
117
+ type: String,
118
+ default: "name"
119
+ },
120
+ valueProp: {
121
+ type: String,
122
+ default: "code"
123
+ },
124
+ split: Boolean,
125
+ classic: Boolean,
126
+ fillRow: Boolean,
127
+ ellipsis: Boolean
128
+ },
129
+ computed: {
130
+ prefix() {
131
+ return "\u8BF7\u9009\u62E9";
132
+ },
133
+ labelKey() {
134
+ return this.classic ? "label" : this.labelProp;
135
+ },
136
+ valueKey() {
137
+ return this.classic ? "value" : this.valueProp;
138
+ },
139
+ inputProps() {
140
+ return a({ ...u(this.$attrs), ...this.$props }, m);
141
+ },
142
+ innerOptions() {
143
+ return this.gender ? [
144
+ {
145
+ [this.labelKey]: "\u7537",
146
+ [this.valueKey]: "\u7537"
147
+ },
148
+ {
149
+ [this.labelKey]: "\u5973",
150
+ [this.valueKey]: "\u5973"
151
+ }
152
+ ] : this.confirm ? [
153
+ {
154
+ [this.labelKey]: "\u662F",
155
+ [this.valueKey]: "\u662F"
156
+ },
157
+ {
158
+ [this.labelKey]: "\u5426",
159
+ [this.valueKey]: "\u5426"
160
+ }
161
+ ] : this.options;
162
+ },
163
+ computeVal() {
164
+ return this.split ? this.value ? this.value.split(",") : [] : this.value || [];
165
+ }
166
+ },
167
+ methods: {
168
+ emitInput(e) {
169
+ this.split ? this.$emit("input", e.join(",")) : this.$emit("input", e);
170
+ }
171
+ }
172
+ }, l = {};
173
+ var b = /* @__PURE__ */ h(
174
+ d,
175
+ c,
176
+ f,
177
+ !1,
178
+ y,
179
+ null,
180
+ null,
181
+ null
182
+ );
183
+ function y(e) {
184
+ for (let r in l)
185
+ this[r] = l[r];
186
+ }
187
+ const P = /* @__PURE__ */ function() {
188
+ return b.exports;
189
+ }();
190
+ export {
191
+ P as default
192
+ };