@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,102 @@
1
- var u=Object.defineProperty;var l=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var s=(e,r,t)=>r in e?u(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,n=(e,r)=>{for(var t in r||(r={}))p.call(r,t)&&s(e,t,r[t]);if(l)for(var t of l(r))m.call(r,t)&&s(e,t,r[t]);return e};import{f as c}from"../../chunks/a125d16c.js";import{i as f,n as d}from"../../chunks/8473fc69.js";import{Input as _}from"element-ui";import{n as h}from"../../chunks/6499de3a.js";var v=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("FormItem",e._b({attrs:{block:e.block,rules:e.computeRules,disabled:e.inputDisabled},scopedSlots:e._u([{key:"default",fn:function(){return[t("ElInput",e._g(e._b({attrs:{value:e.value,type:"textarea",rows:e.rows,resize:e.resize?null:"none","show-word-limit":e.showWordLimit,disabled:e.inputDisabled,maxlength:e.maxLength,placeholder:e.computePlaceholder},on:{input:function(o){return e.$emit("input",o)}}},"ElInput",e.inputProps,!1),e.listeners))]},proxy:!0},{key:"error",fn:function(o){var i=o.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 y=Object.keys(_.props).filter(e=>!["value","placeholder","type","rows","resize","showWordLimit","maxLength","maxlength"].includes(e)),b={name:"FormTextarea",mixins:[c],props:{value:{type:[String,Number]},rows:{type:String,default:"4"},resize:Boolean,showWordLimit:{type:Boolean,default:!0},maxLength:{type:String,default:"800"},block:{type:Boolean,default:!0}},computed:{inputProps(){return f(n(n({},d(this.$attrs)),this.$props),y)}}},a={};var g=h(b,v,x,!1,w,null,null,null);function w(e){for(let r in a)this[r]=a[r]}var k=function(){return g.exports}();export{k as default};
1
+ import { f as s } from "../../chunks/86bcadec.js";
2
+ import { i, n as a } from "../../chunks/2bd4e340.js";
3
+ import { Input as u } from "element-ui";
4
+ import { n as p } from "../../chunks/6499de3a.js";
5
+ var m = function() {
6
+ var e = this, t = e.$createElement, o = e._self._c || t;
7
+ return o("FormItem", e._b({
8
+ attrs: {
9
+ block: e.block,
10
+ rules: e.computeRules,
11
+ disabled: e.inputDisabled
12
+ },
13
+ scopedSlots: e._u([{
14
+ key: "default",
15
+ fn: function() {
16
+ return [o("ElInput", e._g(e._b({
17
+ attrs: {
18
+ value: e.value,
19
+ type: "textarea",
20
+ rows: e.rows,
21
+ resize: e.resize ? null : "none",
22
+ "show-word-limit": e.showWordLimit,
23
+ disabled: e.inputDisabled,
24
+ maxlength: e.maxLength,
25
+ placeholder: e.computePlaceholder
26
+ },
27
+ on: {
28
+ input: function(r) {
29
+ return e.$emit("input", r);
30
+ }
31
+ }
32
+ }, "ElInput", e.inputProps, !1), e.listeners))];
33
+ },
34
+ proxy: !0
35
+ }, {
36
+ key: "error",
37
+ fn: function(r) {
38
+ var l = r.error;
39
+ return [e._t("error", null, {
40
+ error: l
41
+ })];
42
+ }
43
+ }, {
44
+ key: "label",
45
+ fn: function() {
46
+ return [e._t("label")];
47
+ },
48
+ proxy: !0
49
+ }], null, !0)
50
+ }, "FormItem", e.formItemProps, !1));
51
+ }, c = [];
52
+ const f = Object.keys(u.props).filter((e) => !["value", "placeholder", "type", "rows", "resize", "showWordLimit", "maxLength", "maxlength"].includes(e)), d = {
53
+ name: "FormTextarea",
54
+ mixins: [s],
55
+ props: {
56
+ value: {
57
+ type: [String, Number]
58
+ },
59
+ rows: {
60
+ type: String,
61
+ default: "4"
62
+ },
63
+ resize: Boolean,
64
+ showWordLimit: {
65
+ type: Boolean,
66
+ default: !0
67
+ },
68
+ maxLength: {
69
+ type: String,
70
+ default: "800"
71
+ },
72
+ block: {
73
+ type: Boolean,
74
+ default: !0
75
+ }
76
+ },
77
+ computed: {
78
+ inputProps() {
79
+ return i({ ...a(this.$attrs), ...this.$props }, f);
80
+ }
81
+ }
82
+ }, n = {};
83
+ var _ = /* @__PURE__ */ p(
84
+ d,
85
+ m,
86
+ c,
87
+ !1,
88
+ h,
89
+ null,
90
+ null,
91
+ null
92
+ );
93
+ function h(e) {
94
+ for (let t in n)
95
+ this[t] = n[t];
96
+ }
97
+ const g = /* @__PURE__ */ function() {
98
+ return _.exports;
99
+ }();
100
+ export {
101
+ g as default
102
+ };
@@ -1 +1,343 @@
1
- import{hasOwn as a,merge as u,toStringArray as p,animate as h,isInContainer as v}from"@web-utils/core";import{n as b}from"../../chunks/6499de3a.js";var w=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{class:["form-view",t.className]},[t.showToolbar?o("div",{directives:[{name:"show",rawName:"v-show",value:!t.isFormLoading,expression:"!isFormLoading"}],staticClass:"form-view-toolbar"},[t._t("form-view-toolbar",function(){return[o("Toolbar",t._g(t._b({on:{edit:t.onEdit},scopedSlots:t._u([{key:"default",fn:function(r){var i=r.buttons;return[t._t("toolbar-button",null,{buttons:i})]}},t._l(t.getToolbarSlotKeys(),function(r){return{key:r,fn:function(){return[t._t(r)]},proxy:!0}}),{key:"toolbar-right",fn:function(){return[t._t("toolbar-right")]},proxy:!0}],null,!0)},"Toolbar",Object.assign({},t.toolbarProps,{buttons:t.toolbarButtons}),!1),t.toolbarListeners))]})],2):t._e(),o("div",{directives:[{name:"show",rawName:"v-show",value:!t.isFormLoading,expression:"!isFormLoading"}],staticClass:"form-scroller-wrapper"},[o("div",{ref:"formScroller",class:["form-scroller","absolute-box",t.contentClass],on:{scroll:t.onFormScroll}},[t.notForm?o("div",{staticClass:"not-form",style:{width:t.formWidth}},[t.title?o("div",{staticClass:"form-view-title"},[t._v(" "+t._s(t.title)+" ")]):t._e(),t._t("default",function(){return[o("EmptyView",{attrs:{"empty-tips":"\u8BF7\u6DFB\u52A0\u8868\u5355\u5185\u5BB9"}})]}),t.footerBarButtons.length?o("Toolbar",t._g(t._b({attrs:{footer:""},scopedSlots:t._u([{key:"default",fn:function(r){var i=r.buttons,n=r.footer;return[t._t("footer-button",null,{buttons:i,footer:n})]}},t._l(t.getFooterSlotKeys(),function(r){return{key:t.getFooterSlotKey(r),fn:function(){return[t._t(r)]},proxy:!0}})],null,!0)},"Toolbar",Object.assign({},t.toolbarProps,{buttons:t.footerBarButtons}),!1),t.toolbarListeners)):t._e(),t.$scopedSlots["form-bottom"]?t._t("form-bottom"):t._e()],2):o("div",{class:["form-card",{"un-limit":t.unLimit}],style:{width:`calc(${t.formWidth} + 40px)`}},[o("div",{staticClass:"form-content"},[t.title?o("div",{staticClass:"form-view-title"},[t._v(" "+t._s(t.title)+" ")]):t._e(),t._t("default",function(){return[o("EmptyView",{attrs:{"empty-tips":"\u8BF7\u6DFB\u52A0\u8868\u5355\u5185\u5BB9"}})]}),t.footerBarButtons.length?o("Toolbar",t._g(t._b({attrs:{footer:""},scopedSlots:t._u([{key:"default",fn:function(r){var i=r.buttons,n=r.footer;return[t._t("footer-button",null,{buttons:i,footer:n})]}},t._l(t.getFooterSlotKeys(),function(r){return{key:t.getFooterSlotKey(r),fn:function(){return[t._t(r)]},proxy:!0}})],null,!0)},"Toolbar",Object.assign({},t.toolbarProps,{buttons:t.footerBarButtons}),!1),t.toolbarListeners)):t._e()],2)]),t.$scopedSlots["form-bottom"]||t.$parent.$options.flowForm&&t.flowContext.logs.length?o("div",{class:["form-card",{"un-limit":t.unLimit}],staticStyle:{"min-height":"0"},style:{width:`calc(${t.formWidth} + 40px)`}},[o("div",{staticClass:"form-content"},[t.$parent.$options.flowForm&&t.flowContext.logs.length?o("FormItemGroup",{attrs:{"block-title":"\u6D41\u7A0B\u65E5\u5FD7"}},[o("FlowLog",{staticClass:"flow-log",attrs:{fetch:!1,"show-title":!1,"business-key":t.$parent.bizKey}})],1):t._e(),t._t("form-bottom")],2)]):t._e()]),o("ResizeObserver",{on:{notify:t.onFormResize}})],1),t.formNav&&!t.isFormLoading&&t.showNav&&t.groups.length?o("div",{staticClass:"form-nav"},[o("div",{staticClass:"form-nav-header"},[t._v(" \u8868\u5355\u5BFC\u822A ")]),o("ul",{staticClass:"form-nav-list"},t._l(t.groups,function(r,i){return o("li",{key:r.blockTitle,class:["form-nav-item",{active:t.activeIndex===i}],on:{click:function(n){return t.navItemClick(r,i)}}},[t._v(" "+t._s(r.blockTitle)+" ")])}),0)]):t._e(),t.isFormLoading?o("LoadingView",{attrs:{"icon-size":"34px","font-size":"16px"}}):t._e()],1)},g=[];const d=["back","create","save","withdraw","edit","submit","publish","agree","disagree","reject","finish","cancel","enable","exp","imp","del","disabled","reload","slot"],x=d.map(t=>`${t}-down`),_=["back","withdraw","edit"],f=["save","submit","","publish","agree","disagree","reject","finish","cancel"],l=(t,e)=>{if(t.classList.contains(e))return t;let o=t.parentNode;for(;o&&!o.classList.contains(e);)o=o.parentNode;return o.classList.contains(e)?o:null},y={name:"FormView",inject:{flowContext:{default:{}}},props:{notForm:Boolean,loading:Boolean,unLimit:Boolean,formWidth:{type:String,default:"75%"},toolbarAttrs:{type:Object,default:()=>{}},toolbarListeners:{type:Object},contentClass:{type:String},className:{type:String},title:{type:String},showToolbar:{type:Boolean,default:!0},formNav:{type:Boolean,default:!0}},data(){return{groups:[],activeIndex:-1,tryByClick:!1,showNav:!1}},computed:{isFormLoading(){return this.loading||a(this.$parent,"isFormLoaded")?!this.$parent.isFormLoaded:!1},toolbarProps(){var r;const t={},e=((r=this.toolbarAttrs)==null?void 0:r.buttons)||this.$parent.buttons,o=u({},this.toolbarAttrs,t);return o.buttons=e||["back"],o.buttons=p(o.buttons),o},toolbarButtons(){return this.toolbarProps.buttons.filter(t=>!f.includes(t)&&t.indexOf(":down")<0).map(t=>t.replace(":up",""))},footerBarButtons(){let t=this.toolbarProps.buttons.filter(e=>!_.includes(e)&&(f.includes(e)||e.indexOf(":down")>-1)).map(e=>e.replace(":down",""));return t=t||[],this.$parent.isEnabled&&!t.includes("cancel")&&t.push("cancel"),t}},created(){this.$on("FormView.addGroup",t=>{t&&(this.activeIndex===-1&&(this.activeIndex=0),this.groups.push(t),this.groups=this.groups.sort((e,o)=>{const r=l(e.$el,"form-card"),i=l(o.$el,"form-card");if(r===i){const n=[].indexOf.call(e.$el.parentNode.children,e.$el),s=[].indexOf.call(o.$el.parentNode.children,o.$el);return n-s}else{const n=l(r,"form-scroller"),s=[].indexOf.call(n.children,r),m=[].indexOf.call(n.children,i);return s-m}}),t.active&&(this.activeIndex=this.groups.indexOf(t),this.navItemClick(t,this.activeIndex)))}),this.$on("FormView.removeGroup",t=>{if(t){const e=this.groups.indexOf(t);this.groups.splice(e,1),this.activeIndex>this.groups.length-1&&(this.activeIndex=0)}}),this.onFormResize({width:window.document.body.clientWidth})},async activated(){this.$refs.formScroller&&(await this.$nextTick(),this.scrollTo(this.formScrollTop,this.formScrollLeft))},methods:{getToolbarSlotKeys(){return Object.keys(this.$scopedSlots).filter(t=>d.includes(t))},getFooterSlotKeys(){return Object.keys(this.$scopedSlots).filter(t=>x.includes(t))},getFooterSlotKey(t){return t.replace("-down","")},onFormResize({width:t}){this.showNav=t>1500},onEdit(){!this.toolbarListeners.edit&&a(this.$parent,"disabled")&&(this.$parent.disabled=!1)},async navItemClick(t,e){!this.showNav||(await this.$nextTick(),this.activeFormItemGroup(t,e),t.expand||t.open())},activeFormItemGroup(t,e){this.$refs.formScroller.scrollTop=t.$el.offsetTop-10,h(t.$el,"breathe-indicator-animation"),this.tryByClick=!0,this.activeIndex=e},async tryActive(){if(!!this.showNav){for(let t=0;t<this.groups.length;t++)if(v(this.groups[t].$el,this.$refs.formScroller,{bottomOffset:10})){this.activeIndex=t;break}}},onFormScroll(){this.formScrollTop=this.$refs.formScroller.scrollTop,this.formScrollLeft=this.$refs.formScroller.scrollLeft,!this.tryByClick&&this.groups.length&&window.requestAnimationFrame(this.tryActive),this.tryByClick=!1},scrollTo(t,e){t&&(this.$refs.formScroller.scrollTop=t),e&&(this.$refs.formScroller.scrollLeft=e)}}},c={};var k=b(y,w,g,!1,$,null,null,null);function $(t){for(let e in c)this[e]=c[e]}var S=function(){return k.exports}();export{S as default};
1
+ import { hasOwn as a, merge as m, toStringArray as h, animate as p, isInContainer as b } from "@web-utils/core";
2
+ import { n as v } from "../../chunks/6499de3a.js";
3
+ var _ = function() {
4
+ var t = this, e = t.$createElement, o = t._self._c || e;
5
+ return o("div", {
6
+ class: ["form-view", t.className]
7
+ }, [t.showToolbar ? o("div", {
8
+ directives: [{
9
+ name: "show",
10
+ rawName: "v-show",
11
+ value: !t.isFormLoading,
12
+ expression: "!isFormLoading"
13
+ }],
14
+ staticClass: "form-view-toolbar"
15
+ }, [t._t("form-view-toolbar", function() {
16
+ return [o("Toolbar", t._g(t._b({
17
+ on: {
18
+ edit: t.onEdit
19
+ },
20
+ scopedSlots: t._u([{
21
+ key: "default",
22
+ fn: function(r) {
23
+ var s = r.buttons;
24
+ return [t._t("toolbar-button", null, {
25
+ buttons: s
26
+ })];
27
+ }
28
+ }, t._l(t.getToolbarSlotKeys(), function(r) {
29
+ return {
30
+ key: r,
31
+ fn: function() {
32
+ return [t._t(r)];
33
+ },
34
+ proxy: !0
35
+ };
36
+ }), {
37
+ key: "toolbar-right",
38
+ fn: function() {
39
+ return [t._t("toolbar-right")];
40
+ },
41
+ proxy: !0
42
+ }], null, !0)
43
+ }, "Toolbar", Object.assign({}, t.toolbarProps, {
44
+ buttons: t.toolbarButtons
45
+ }), !1), t.toolbarListeners))];
46
+ })], 2) : t._e(), o("div", {
47
+ directives: [{
48
+ name: "show",
49
+ rawName: "v-show",
50
+ value: !t.isFormLoading,
51
+ expression: "!isFormLoading"
52
+ }],
53
+ staticClass: "form-scroller-wrapper"
54
+ }, [o("div", {
55
+ ref: "formScroller",
56
+ class: ["form-scroller", "absolute-box", t.contentClass],
57
+ on: {
58
+ scroll: t.onFormScroll
59
+ }
60
+ }, [t.notForm ? o("div", {
61
+ staticClass: "not-form",
62
+ style: {
63
+ width: t.formWidth
64
+ }
65
+ }, [t.title ? o("div", {
66
+ staticClass: "form-view-title"
67
+ }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), t._t("default", function() {
68
+ return [o("EmptyView", {
69
+ attrs: {
70
+ "empty-tips": "\u8BF7\u6DFB\u52A0\u8868\u5355\u5185\u5BB9"
71
+ }
72
+ })];
73
+ }), t.footerBarButtons.length ? o("Toolbar", t._g(t._b({
74
+ attrs: {
75
+ footer: ""
76
+ },
77
+ scopedSlots: t._u([{
78
+ key: "default",
79
+ fn: function(r) {
80
+ var s = r.buttons, n = r.footer;
81
+ return [t._t("footer-button", null, {
82
+ buttons: s,
83
+ footer: n
84
+ })];
85
+ }
86
+ }, t._l(t.getFooterSlotKeys(), function(r) {
87
+ return {
88
+ key: t.getFooterSlotKey(r),
89
+ fn: function() {
90
+ return [t._t(r)];
91
+ },
92
+ proxy: !0
93
+ };
94
+ })], null, !0)
95
+ }, "Toolbar", Object.assign({}, t.toolbarProps, {
96
+ buttons: t.footerBarButtons
97
+ }), !1), t.toolbarListeners)) : t._e(), t.$scopedSlots["form-bottom"] ? t._t("form-bottom") : t._e()], 2) : o("div", {
98
+ class: ["form-card", {
99
+ "un-limit": t.unLimit
100
+ }],
101
+ style: {
102
+ width: `calc(${t.formWidth} + 40px)`
103
+ }
104
+ }, [o("div", {
105
+ staticClass: "form-content"
106
+ }, [t.title ? o("div", {
107
+ staticClass: "form-view-title"
108
+ }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), t._t("default", function() {
109
+ return [o("EmptyView", {
110
+ attrs: {
111
+ "empty-tips": "\u8BF7\u6DFB\u52A0\u8868\u5355\u5185\u5BB9"
112
+ }
113
+ })];
114
+ }), t.footerBarButtons.length ? o("Toolbar", t._g(t._b({
115
+ attrs: {
116
+ footer: ""
117
+ },
118
+ scopedSlots: t._u([{
119
+ key: "default",
120
+ fn: function(r) {
121
+ var s = r.buttons, n = r.footer;
122
+ return [t._t("footer-button", null, {
123
+ buttons: s,
124
+ footer: n
125
+ })];
126
+ }
127
+ }, t._l(t.getFooterSlotKeys(), function(r) {
128
+ return {
129
+ key: t.getFooterSlotKey(r),
130
+ fn: function() {
131
+ return [t._t(r)];
132
+ },
133
+ proxy: !0
134
+ };
135
+ })], null, !0)
136
+ }, "Toolbar", Object.assign({}, t.toolbarProps, {
137
+ buttons: t.footerBarButtons
138
+ }), !1), t.toolbarListeners)) : t._e()], 2)]), t.$scopedSlots["form-bottom"] || t.$parent.$options.flowForm && t.flowContext.logs.length ? o("div", {
139
+ class: ["form-card", {
140
+ "un-limit": t.unLimit
141
+ }],
142
+ staticStyle: {
143
+ "min-height": "0"
144
+ },
145
+ style: {
146
+ width: `calc(${t.formWidth} + 40px)`
147
+ }
148
+ }, [o("div", {
149
+ staticClass: "form-content"
150
+ }, [t.$parent.$options.flowForm && t.flowContext.logs.length ? o("FormItemGroup", {
151
+ attrs: {
152
+ "block-title": "\u6D41\u7A0B\u65E5\u5FD7"
153
+ }
154
+ }, [o("FlowLog", {
155
+ staticClass: "flow-log",
156
+ attrs: {
157
+ fetch: !1,
158
+ "show-title": !1,
159
+ "business-key": t.$parent.bizKey
160
+ }
161
+ })], 1) : t._e(), t._t("form-bottom")], 2)]) : t._e()]), o("ResizeObserver", {
162
+ on: {
163
+ notify: t.onFormResize
164
+ }
165
+ })], 1), t.formNav && !t.isFormLoading && t.showNav && t.groups.length ? o("div", {
166
+ staticClass: "form-nav"
167
+ }, [o("div", {
168
+ staticClass: "form-nav-header"
169
+ }, [t._v(" \u8868\u5355\u5BFC\u822A ")]), o("ul", {
170
+ staticClass: "form-nav-list"
171
+ }, t._l(t.groups, function(r, s) {
172
+ return o("li", {
173
+ key: r.blockTitle,
174
+ class: ["form-nav-item", {
175
+ active: t.activeIndex === s
176
+ }],
177
+ on: {
178
+ click: function(n) {
179
+ return t.navItemClick(r, s);
180
+ }
181
+ }
182
+ }, [t._v(" " + t._s(r.blockTitle) + " ")]);
183
+ }), 0)]) : t._e(), t.isFormLoading ? o("LoadingView", {
184
+ attrs: {
185
+ "icon-size": "34px",
186
+ "font-size": "16px"
187
+ }
188
+ }) : t._e()], 1);
189
+ }, g = [];
190
+ const u = ["back", "create", "save", "withdraw", "edit", "submit", "publish", "agree", "disagree", "reject", "finish", "cancel", "enable", "exp", "imp", "del", "disabled", "reload", "slot"], y = u.map((t) => `${t}-down`), w = ["back", "withdraw", "edit"], c = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], l = (t, e) => {
191
+ if (t.classList.contains(e))
192
+ return t;
193
+ let o = t.parentNode;
194
+ for (; o && !o.classList.contains(e); )
195
+ o = o.parentNode;
196
+ return o.classList.contains(e) ? o : null;
197
+ }, x = {
198
+ name: "FormView",
199
+ inject: {
200
+ flowContext: {
201
+ default: {}
202
+ }
203
+ },
204
+ props: {
205
+ notForm: Boolean,
206
+ loading: Boolean,
207
+ unLimit: Boolean,
208
+ formWidth: {
209
+ type: String,
210
+ default: "75%"
211
+ },
212
+ toolbarAttrs: {
213
+ type: Object,
214
+ default: () => {
215
+ }
216
+ },
217
+ toolbarListeners: {
218
+ type: Object
219
+ },
220
+ contentClass: {
221
+ type: String
222
+ },
223
+ className: {
224
+ type: String
225
+ },
226
+ title: {
227
+ type: String
228
+ },
229
+ showToolbar: {
230
+ type: Boolean,
231
+ default: !0
232
+ },
233
+ formNav: {
234
+ type: Boolean,
235
+ default: !0
236
+ }
237
+ },
238
+ data() {
239
+ return {
240
+ groups: [],
241
+ activeIndex: -1,
242
+ tryByClick: !1,
243
+ showNav: !1
244
+ };
245
+ },
246
+ computed: {
247
+ isFormLoading() {
248
+ return this.loading || a(this.$parent, "isFormLoaded") ? !this.$parent.isFormLoaded : !1;
249
+ },
250
+ toolbarProps() {
251
+ var r;
252
+ const t = {}, e = ((r = this.toolbarAttrs) == null ? void 0 : r.buttons) || this.$parent.buttons, o = m({}, this.toolbarAttrs, t);
253
+ return o.buttons = e || ["back"], o.buttons = h(o.buttons), o;
254
+ },
255
+ toolbarButtons() {
256
+ return this.toolbarProps.buttons.filter((t) => !c.includes(t) && t.indexOf(":down") < 0).map((t) => t.replace(":up", ""));
257
+ },
258
+ footerBarButtons() {
259
+ let t = this.toolbarProps.buttons.filter((e) => !w.includes(e) && (c.includes(e) || e.indexOf(":down") > -1)).map((e) => e.replace(":down", ""));
260
+ return t = t || [], this.$parent.isEnabled && !t.includes("cancel") && t.push("cancel"), t;
261
+ }
262
+ },
263
+ created() {
264
+ this.$on("FormView.addGroup", (t) => {
265
+ t && (this.activeIndex === -1 && (this.activeIndex = 0), this.groups.push(t), this.groups = this.groups.sort((e, o) => {
266
+ const r = l(e.$el, "form-card"), s = l(o.$el, "form-card");
267
+ if (r === s) {
268
+ const n = [].indexOf.call(e.$el.parentNode.children, e.$el), i = [].indexOf.call(o.$el.parentNode.children, o.$el);
269
+ return n - i;
270
+ } else {
271
+ const n = l(r, "form-scroller"), i = [].indexOf.call(n.children, r), d = [].indexOf.call(n.children, s);
272
+ return i - d;
273
+ }
274
+ }), t.active && (this.activeIndex = this.groups.indexOf(t), this.navItemClick(t, this.activeIndex)));
275
+ }), this.$on("FormView.removeGroup", (t) => {
276
+ if (t) {
277
+ const e = this.groups.indexOf(t);
278
+ this.groups.splice(e, 1), this.activeIndex > this.groups.length - 1 && (this.activeIndex = 0);
279
+ }
280
+ }), this.onFormResize({ width: window.document.body.clientWidth });
281
+ },
282
+ async activated() {
283
+ this.$refs.formScroller && (await this.$nextTick(), this.scrollTo(this.formScrollTop, this.formScrollLeft));
284
+ },
285
+ methods: {
286
+ getToolbarSlotKeys() {
287
+ return Object.keys(this.$scopedSlots).filter((t) => u.includes(t));
288
+ },
289
+ getFooterSlotKeys() {
290
+ return Object.keys(this.$scopedSlots).filter((t) => y.includes(t));
291
+ },
292
+ getFooterSlotKey(t) {
293
+ return t.replace("-down", "");
294
+ },
295
+ onFormResize({ width: t }) {
296
+ this.showNav = t > 1500;
297
+ },
298
+ onEdit() {
299
+ !this.toolbarListeners.edit && a(this.$parent, "disabled") && (this.$parent.disabled = !1);
300
+ },
301
+ async navItemClick(t, e) {
302
+ !this.showNav || (await this.$nextTick(), this.activeFormItemGroup(t, e), t.expand || t.open());
303
+ },
304
+ activeFormItemGroup(t, e) {
305
+ this.$refs.formScroller.scrollTop = t.$el.offsetTop - 10, p(t.$el, "breathe-indicator-animation"), this.tryByClick = !0, this.activeIndex = e;
306
+ },
307
+ async tryActive() {
308
+ if (!!this.showNav) {
309
+ for (let t = 0; t < this.groups.length; t++)
310
+ if (b(this.groups[t].$el, this.$refs.formScroller, { bottomOffset: 10 })) {
311
+ this.activeIndex = t;
312
+ break;
313
+ }
314
+ }
315
+ },
316
+ onFormScroll() {
317
+ this.formScrollTop = this.$refs.formScroller.scrollTop, this.formScrollLeft = this.$refs.formScroller.scrollLeft, !this.tryByClick && this.groups.length && window.requestAnimationFrame(this.tryActive), this.tryByClick = !1;
318
+ },
319
+ scrollTo(t, e) {
320
+ t && (this.$refs.formScroller.scrollTop = t), e && (this.$refs.formScroller.scrollLeft = e);
321
+ }
322
+ }
323
+ }, f = {};
324
+ var $ = /* @__PURE__ */ v(
325
+ x,
326
+ _,
327
+ g,
328
+ !1,
329
+ S,
330
+ null,
331
+ null,
332
+ null
333
+ );
334
+ function S(t) {
335
+ for (let e in f)
336
+ this[e] = f[e];
337
+ }
338
+ const B = /* @__PURE__ */ function() {
339
+ return $.exports;
340
+ }();
341
+ export {
342
+ B as default
343
+ };
@@ -1 +1,94 @@
1
- import{n as i}from"../../chunks/6499de3a.js";var p=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ElSteps",{staticClass:"guide-steps",attrs:{"align-center":""}},e._l(e.steps,function(a,r){return s("ElStep",{key:a.label,class:[{"current important":e.value===r,disabled:!e.available(r),available:!e.ready[r]&&e.available(r)}],attrs:{status:e.ready[r]?"success":"",title:a.label},nativeOn:{click:function(d){return e.activeStep(r)}}})}),1)},o=[];const n={name:"GuideSteps",props:{value:{type:Number,default:0},steps:{type:Array,default:()=>[]}},data(){return{ready:[]}},watch:{steps:{immediate:!0,deep:!0,handler(e){this.ready=e!=null&&e.length?e.map(()=>!1):[]}}},methods:{activeStep(e){e!==0&&!this.available(e)||this.$emit("input",e)},setReady(e,t){e<this.ready.length&&this.$set(this.ready,e,t)},available(e){let t=!0;if(e>0&&e<this.ready.length){for(let s=0;s<e;s++)if(!this.ready[s]){t=!1;break}}return t}}},l={};var u=i(n,p,o,!1,_,null,null,null);function _(e){for(let t in l)this[t]=l[t]}var c=function(){return u.exports}();export{c as default};
1
+ import { n as i } from "../../chunks/6499de3a.js";
2
+ var n = function() {
3
+ var t = this, e = t.$createElement, a = t._self._c || e;
4
+ return a("ElSteps", {
5
+ staticClass: "guide-steps",
6
+ attrs: {
7
+ "align-center": ""
8
+ }
9
+ }, t._l(t.steps, function(r, s) {
10
+ return a("ElStep", {
11
+ key: r.label,
12
+ class: [{
13
+ "current important": t.value === s,
14
+ disabled: !t.available(s),
15
+ available: !t.ready[s] && t.available(s)
16
+ }],
17
+ attrs: {
18
+ status: t.ready[s] ? "success" : "",
19
+ title: r.label
20
+ },
21
+ nativeOn: {
22
+ click: function(_) {
23
+ return t.activeStep(s);
24
+ }
25
+ }
26
+ });
27
+ }), 1);
28
+ }, u = [];
29
+ const c = {
30
+ name: "GuideSteps",
31
+ props: {
32
+ value: {
33
+ type: Number,
34
+ default: 0
35
+ },
36
+ steps: {
37
+ type: Array,
38
+ default: () => []
39
+ }
40
+ },
41
+ data() {
42
+ return {
43
+ ready: []
44
+ };
45
+ },
46
+ watch: {
47
+ steps: {
48
+ immediate: !0,
49
+ deep: !0,
50
+ handler(t) {
51
+ this.ready = t != null && t.length ? t.map(() => !1) : [];
52
+ }
53
+ }
54
+ },
55
+ methods: {
56
+ activeStep(t) {
57
+ t !== 0 && !this.available(t) || this.$emit("input", t);
58
+ },
59
+ setReady(t, e) {
60
+ t < this.ready.length && this.$set(this.ready, t, e);
61
+ },
62
+ available(t) {
63
+ let e = !0;
64
+ if (t > 0 && t < this.ready.length) {
65
+ for (let a = 0; a < t; a++)
66
+ if (!this.ready[a]) {
67
+ e = !1;
68
+ break;
69
+ }
70
+ }
71
+ return e;
72
+ }
73
+ }
74
+ }, l = {};
75
+ var o = /* @__PURE__ */ i(
76
+ c,
77
+ n,
78
+ u,
79
+ !1,
80
+ p,
81
+ null,
82
+ null,
83
+ null
84
+ );
85
+ function p(t) {
86
+ for (let e in l)
87
+ this[e] = l[e];
88
+ }
89
+ const f = /* @__PURE__ */ function() {
90
+ return o.exports;
91
+ }();
92
+ export {
93
+ f as default
94
+ };
@@ -1 +1,62 @@
1
- import{n as a}from"../../chunks/6499de3a.js";var e=function(){var c=this,r=c.$createElement,o=c._self._c||r;return o("div",{class:["icon-card","flex-box",c.iconBg]},[o("div",{staticClass:"card-icon_bg"},[o("i",{class:["card-icon",c.icon]})]),o("div",{staticClass:"flex-1"},[o("p",{staticClass:"icon-card_title"},[c._t("default")],2),o("div",{staticClass:"icon-card_num"},[o("span",{staticClass:"icon-card_color",on:{click:c.toDetails}},[c._v(c._s(c.number))]),c._t("nuit")],2)])])},i=[];const t={name:"IconCard",props:{iconBg:{type:String,default:"blue"},icon:{type:String,default:"el-icon-s-custom"},path:String,number:Number},methods:{toDetails(){this.$router.push(this.path)}}},n={};var d=a(t,e,i,!1,s,null,null,null);function s(c){for(let r in n)this[r]=n[r]}var l=function(){return d.exports}();export{l as default};
1
+ import { n as c } from "../../chunks/6499de3a.js";
2
+ var a = function() {
3
+ var t = this, s = t.$createElement, n = t._self._c || s;
4
+ return n("div", {
5
+ class: ["icon-card", "flex-box", t.iconBg]
6
+ }, [n("div", {
7
+ staticClass: "card-icon_bg"
8
+ }, [n("i", {
9
+ class: ["card-icon", t.icon]
10
+ })]), n("div", {
11
+ staticClass: "flex-1"
12
+ }, [n("p", {
13
+ staticClass: "icon-card_title"
14
+ }, [t._t("default")], 2), n("div", {
15
+ staticClass: "icon-card_num"
16
+ }, [n("span", {
17
+ staticClass: "icon-card_color",
18
+ on: {
19
+ click: t.toDetails
20
+ }
21
+ }, [t._v(t._s(t.number))]), t._t("nuit")], 2)])]);
22
+ }, o = [];
23
+ const i = {
24
+ name: "IconCard",
25
+ props: {
26
+ iconBg: {
27
+ type: String,
28
+ default: "blue"
29
+ },
30
+ icon: {
31
+ type: String,
32
+ default: "el-icon-s-custom"
33
+ },
34
+ path: String,
35
+ number: Number
36
+ },
37
+ methods: {
38
+ toDetails() {
39
+ this.$router.push(this.path);
40
+ }
41
+ }
42
+ }, e = {};
43
+ var r = /* @__PURE__ */ c(
44
+ i,
45
+ a,
46
+ o,
47
+ !1,
48
+ l,
49
+ null,
50
+ null,
51
+ null
52
+ );
53
+ function l(t) {
54
+ for (let s in e)
55
+ this[s] = e[s];
56
+ }
57
+ const u = /* @__PURE__ */ function() {
58
+ return r.exports;
59
+ }();
60
+ export {
61
+ u as default
62
+ };