@web-utils/component 2.70.0 → 3.0.1

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 (189) hide show
  1. package/address-input/index.mjs +16 -14
  2. package/awesome-button/index.mjs +30 -29
  3. package/card/index.mjs +42 -40
  4. package/carousel/index.mjs +27 -25
  5. package/chat/index.mjs +70 -59
  6. package/chunk-file-uploader/index.mjs +594 -35
  7. package/chunk-file-uploader/style.css +1 -1
  8. package/chunks/CountUp.f1a19f35.mjs +124 -0
  9. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +8 -0
  10. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +32 -0
  11. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +356 -0
  12. package/chunks/ElementDialog.d8f3105c.mjs +211 -0
  13. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +95 -0
  14. package/chunks/EmptyView.e2430422.mjs +51 -0
  15. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +23 -0
  16. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +37 -0
  17. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +65 -0
  18. package/chunks/FormItem.2920ac0c.mjs +45 -0
  19. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +258 -0
  20. package/chunks/FormItemGroup.41daddb6.mjs +64 -0
  21. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +155 -0
  22. package/chunks/FyCurd.8acd2983.mjs +548 -0
  23. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +2945 -0
  24. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +47 -0
  25. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +151 -0
  26. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +22 -0
  27. package/chunks/FyForm.0294e494.mjs +439 -0
  28. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +737 -0
  29. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +93 -0
  30. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +56 -0
  31. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +158 -0
  32. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +39 -0
  33. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +102 -0
  34. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +41 -0
  35. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +15 -0
  36. package/chunks/IconTemp.42c48e1f.mjs +32 -0
  37. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +23 -0
  38. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +172 -0
  39. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +23 -0
  40. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +21 -0
  41. package/chunks/Page.81f4b8d9.mjs +32 -0
  42. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +13 -0
  43. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +26 -0
  44. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +88 -0
  45. package/chunks/PageableTable.333cbdc1.mjs +335 -0
  46. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +148 -0
  47. package/chunks/ResizeObserver.60f728f0.mjs +54 -0
  48. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +13 -0
  49. package/chunks/TableColumn.8503272e.mjs +106 -0
  50. package/chunks/Toolbar.5c539dbb.mjs +24 -0
  51. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +275 -0
  52. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +31 -0
  53. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +74 -0
  54. package/chunks/confirmable-mixin.26e1d0e0.mjs +197 -0
  55. package/chunks/{dataformat.f995e2f9.mjs → dataformat.816df805.mjs} +5 -5
  56. package/chunks/{dic.eaac0823.mjs → dic.3b4ba802.mjs} +40 -40
  57. package/chunks/{event.b5d855dd.mjs → event.4377230d.mjs} +2 -2
  58. package/chunks/{index.57f871af.mjs → index.d91bd77a.mjs} +7 -7
  59. package/chunks/{init.47f219b4.mjs → init.f0a03127.mjs} +2 -2
  60. package/chunks/{util.ae730cde.mjs → util.7844e2c2.mjs} +21 -21
  61. package/color-picker/index.mjs +200 -32
  62. package/confirm-button/index.mjs +1 -1
  63. package/confirmable/index.mjs +1 -1
  64. package/count-up/index.mjs +14 -17
  65. package/data-box/index.mjs +36 -33
  66. package/data-card/index.mjs +35 -33
  67. package/data-cardtext/index.mjs +29 -27
  68. package/data-display/index.mjs +37 -34
  69. package/data-icons/index.mjs +32 -29
  70. package/data-imgtext/index.mjs +30 -27
  71. package/data-operatext/index.mjs +41 -39
  72. package/data-panel/index.mjs +39 -36
  73. package/data-pay/index.mjs +26 -22
  74. package/data-price/index.mjs +34 -32
  75. package/data-progress/index.mjs +32 -28
  76. package/data-rotate/index.mjs +38 -35
  77. package/data-table-picker/index.mjs +25 -22
  78. package/data-tabs/index.mjs +35 -32
  79. package/dialog-form/index.mjs +41 -32
  80. package/dynamic-table/index.mjs +47 -42
  81. package/easy-popup/index.mjs +29 -56
  82. package/editable-progress/index.mjs +16 -14
  83. package/editable-tree/index.mjs +129 -476
  84. package/egd-collapse-item/index.mjs +1 -2
  85. package/element-dialog/index.mjs +37 -126
  86. package/empty-view/index.mjs +13 -31
  87. package/flex-column/index.mjs +1 -1
  88. package/flex-item/index.mjs +1 -1
  89. package/flex-row/index.mjs +1 -1
  90. package/flow/index.mjs +105 -40
  91. package/flow-designer/index.mjs +1190 -1114
  92. package/flow-node/index.mjs +15 -47
  93. package/flow-viewer/index.mjs +167 -78
  94. package/form-block/index.mjs +24 -22
  95. package/form-cascader/index.mjs +29 -29
  96. package/form-checkbox-group/index.mjs +76 -31
  97. package/form-date-picker/index.mjs +21 -20
  98. package/form-holder/index.mjs +16 -15
  99. package/form-input/index.mjs +30 -88
  100. package/form-input-email/index.mjs +28 -28
  101. package/form-input-id-card/index.mjs +37 -37
  102. package/form-input-number/index.mjs +219 -59
  103. package/form-input-phone-number/index.mjs +25 -25
  104. package/form-input-tag/index.mjs +160 -38
  105. package/form-input-time/index.mjs +23 -23
  106. package/form-item/index.mjs +15 -144
  107. package/form-item-group/index.mjs +15 -163
  108. package/form-radio-group/index.mjs +39 -38
  109. package/form-select/index.mjs +33 -32
  110. package/form-switch/index.mjs +26 -26
  111. package/form-textarea/index.mjs +26 -26
  112. package/form-view/index.mjs +46 -42
  113. package/fy-array/index.mjs +65 -61
  114. package/fy-cascader/index.mjs +14 -13
  115. package/fy-checkbox/index.mjs +37 -32
  116. package/fy-code/index.mjs +11 -14
  117. package/fy-curd/index.mjs +206 -2795
  118. package/fy-date/index.mjs +16 -57
  119. package/fy-draggable/index.mjs +21 -20
  120. package/fy-dynamic/index.mjs +64 -207
  121. package/fy-empty/index.mjs +12 -29
  122. package/fy-form/index.mjs +178 -732
  123. package/fy-form-design/index.mjs +1738 -1179
  124. package/fy-input/index.mjs +15 -101
  125. package/fy-input-color/index.mjs +17 -66
  126. package/fy-input-icon/index.mjs +21 -116
  127. package/fy-input-map/index.mjs +27 -24
  128. package/fy-input-number/index.mjs +23 -22
  129. package/fy-input-table/index.mjs +22 -18
  130. package/fy-input-tree/index.mjs +32 -28
  131. package/fy-progress/index.mjs +24 -23
  132. package/fy-radio/index.mjs +23 -18
  133. package/fy-rate/index.mjs +16 -49
  134. package/fy-select/index.mjs +29 -122
  135. package/fy-slider/index.mjs +18 -17
  136. package/fy-switch/index.mjs +21 -20
  137. package/fy-tabs/index.mjs +14 -48
  138. package/fy-time/index.mjs +20 -14
  139. package/fy-title/index.mjs +1 -1
  140. package/fy-tree/index.mjs +26 -20
  141. package/fy-u-editor/index.mjs +1 -1
  142. package/fy-upload/index.mjs +76 -74
  143. package/guide-steps/index.mjs +24 -22
  144. package/highlight-j-s/index.mjs +19 -29
  145. package/icon-temp/index.mjs +12 -30
  146. package/iframe-window/index.mjs +19 -18
  147. package/image-cropper/index.mjs +53 -51
  148. package/image-preview/index.mjs +27 -25
  149. package/input-number/index.mjs +63 -172
  150. package/input-number-range/index.mjs +24 -23
  151. package/license/index.mjs +1 -1
  152. package/loading-view/index.mjs +15 -33
  153. package/login/index.mjs +40 -35
  154. package/nav-bar/index.mjs +15 -30
  155. package/notice/index.mjs +19 -18
  156. package/package.json +1 -1
  157. package/page/index.mjs +12 -20
  158. package/page-header/index.mjs +13 -34
  159. package/page-index/index.mjs +34 -33
  160. package/page-index-top/index.mjs +100 -51
  161. package/page-skeleton/index.mjs +18 -35
  162. package/page-skeleton-new/index.mjs +16 -15
  163. package/pageable-table/index.mjs +85 -223
  164. package/pageable-view/index.mjs +34 -33
  165. package/present-view/index.mjs +75 -71
  166. package/record-video/index.mjs +1 -1
  167. package/resize-observer/index.mjs +21 -29
  168. package/search/index.mjs +29 -27
  169. package/search-popover/index.mjs +1 -1
  170. package/sign/index.mjs +1 -1
  171. package/split-pane/index.mjs +40 -45
  172. package/static-pageable-table/index.mjs +20 -18
  173. package/swiper/index.mjs +27 -25
  174. package/table-view/index.mjs +627 -89
  175. package/tag-render/index.mjs +21 -19
  176. package/text-ellipsis/index.mjs +13 -12
  177. package/tinymce-editor/index.mjs +73 -72
  178. package/toolbar/index.mjs +15 -208
  179. package/toolbar-button/index.mjs +32 -57
  180. package/verify/index.mjs +1 -1
  181. package/vue-cron/index.mjs +112 -104
  182. package/watermark/index.mjs +1 -1
  183. package/web-types.json +1 -1
  184. package/x-input-tag/index.mjs +51 -117
  185. package/chunks/FormTemp.7f91629d.mjs +0 -165
  186. package/chunks/confirmable-mixin.817b542f.mjs +0 -116
  187. package/chunks/form-input-mixin.4632ad36.mjs +0 -24
  188. package/chunks/form-item-mixin.ad148e7b.mjs +0 -140
  189. package/chunks/input-number-mixin.41a066be.mjs +0 -60
@@ -0,0 +1,148 @@
1
+ import s from "element-ui/lib/pagination";
2
+ import { _ as r } from "./TableColumn.8503272e.mjs";
3
+ import l from "element-ui/lib/radio";
4
+ import i from "element-ui/lib/button";
5
+ import u from "element-ui/lib/table";
6
+ var f = function() {
7
+ var e = this, o = e.$createElement, t = e._self._c || o;
8
+ return t("div", {
9
+ class: ["pageable-table", {
10
+ "auto-height": e.autoHeight
11
+ }]
12
+ }, [t("div", {
13
+ staticClass: "pageable-table-wrapper"
14
+ }, [e._t("toolbar"), t(u, e._g(e._b({
15
+ ref: "table",
16
+ class: ["flex-item", {
17
+ "header-bold": e.headerBold
18
+ }],
19
+ attrs: {
20
+ data: e.records,
21
+ border: e.border
22
+ },
23
+ on: {
24
+ "hook:updated": e.updateTableScrollPosition,
25
+ "sort-change": e.onSortChange,
26
+ "row-dblclick": e.rowDbClick,
27
+ "current-change": e.onCurrentChange
28
+ },
29
+ scopedSlots: e._u([{
30
+ key: "empty",
31
+ fn: function() {
32
+ return [e._t("empty", function() {
33
+ return [e.tableStatus === e.TABLE_STATUS.loading ? [t("span", {
34
+ staticClass: "pageable-table-loading"
35
+ }, [t("i", {
36
+ staticClass: "table-status-icon el-icon-loading"
37
+ }), e._v(" 加载中...")])] : e.tableStatus === e.TABLE_STATUS.error ? [t(i, {
38
+ staticClass: "pageable-table-error",
39
+ attrs: {
40
+ icon: "table-status-icon fa fa-frown-o"
41
+ },
42
+ on: {
43
+ click: e.refresh
44
+ }
45
+ }, [e._v(" 加载失败,点击重试! ")])] : [e._v(" 暂无数据 ")]];
46
+ })];
47
+ },
48
+ proxy: !0
49
+ }, {
50
+ key: "append",
51
+ fn: function() {
52
+ return [e._t("append")];
53
+ },
54
+ proxy: !0
55
+ }], null, !0)
56
+ }, "ElTable", e.filterTableProperties(e.mergeAttrs), !1), e.filterTableEvents(e.$listeners)), [e.multiple && e.selection ? t(r, {
57
+ key: "multiple",
58
+ attrs: {
59
+ type: "selection",
60
+ width: "45",
61
+ align: "center"
62
+ }
63
+ }) : e._e(), !e.multiple && e.selection ? t(r, {
64
+ key: "single",
65
+ attrs: {
66
+ type: "single-selection",
67
+ "class-name": "single-select-column",
68
+ width: "45",
69
+ align: "center"
70
+ },
71
+ scopedSlots: e._u([{
72
+ key: "header",
73
+ fn: function() {
74
+ return [t(l, {
75
+ attrs: {
76
+ value: !!e.currentRow,
77
+ label: !0
78
+ }
79
+ }, [t("span")])];
80
+ },
81
+ proxy: !0
82
+ }, {
83
+ key: "default",
84
+ fn: function(n) {
85
+ var a = n.row;
86
+ return [t(l, {
87
+ attrs: {
88
+ label: !0,
89
+ value: e.currentRow && e.currentRow[e.$attrs["row-key"] || "id"] === a[e.$attrs["row-key"] || "id"]
90
+ }
91
+ }, [t("span")])];
92
+ }
93
+ }], null, !1, 307797321)
94
+ }) : e._e(), e.index ? t(r, {
95
+ key: "order",
96
+ attrs: {
97
+ type: "index",
98
+ label: "序号",
99
+ width: e.indexWidth,
100
+ align: "center"
101
+ },
102
+ scopedSlots: e._u([{
103
+ key: "default",
104
+ fn: function(n) {
105
+ var a = n.$index;
106
+ return [e._v(" " + e._s((e.page.page - 1) * e.page.limit + a + 1 || a + 1) + " ")];
107
+ }
108
+ }], null, !1, 4238275121)
109
+ }) : e._e(), e._t("default", function() {
110
+ return [e.columns && e.columns.length ? e._l(e.headers, function(n, a) {
111
+ return t(r, e._b({
112
+ key: `${n.prop}-${a}`
113
+ }, "TableColumn", n, !1));
114
+ }) : t(r, {
115
+ attrs: {
116
+ label: "点击表格行复制模板"
117
+ },
118
+ scopedSlots: e._u([{
119
+ key: "default",
120
+ fn: function(n) {
121
+ var a = n.row;
122
+ return [t("pre", {
123
+ staticClass: "pointer"
124
+ }, [e._v(e._s(JSON.stringify(a, null, " ")))])];
125
+ }
126
+ }])
127
+ })];
128
+ })], 2), t(s, {
129
+ staticClass: "flex-not-shrink",
130
+ attrs: {
131
+ "current-page": e.page.page,
132
+ "hide-on-single-page": e.hideOnSinglePage,
133
+ "page-size": e.page.limit,
134
+ total: e.page.total,
135
+ background: "",
136
+ layout: "total, prev, pager, next, jumper"
137
+ },
138
+ on: {
139
+ "current-change": function(n) {
140
+ e.page.page = n;
141
+ }
142
+ }
143
+ })], 2)]);
144
+ }, b = [];
145
+ export {
146
+ f as r,
147
+ b as s
148
+ };
@@ -0,0 +1,54 @@
1
+ import { j as o } from "./index.d91bd77a.mjs";
2
+ import { s as r, r as h } from "./ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs";
3
+ import { n as l } from "./vueComponentNormalizer.446f5dc4.mjs";
4
+ let t;
5
+ function i() {
6
+ i.init || (i.init = !0, t = o() !== -1);
7
+ }
8
+ const c = {
9
+ name: "ResizeObserver",
10
+ mounted() {
11
+ i(), this.$nextTick(() => {
12
+ this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight;
13
+ });
14
+ const e = document.createElement("object");
15
+ this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html", t && this.$el.appendChild(e), e.data = "about:blank", t || this.$el.appendChild(e);
16
+ },
17
+ beforeDestroy() {
18
+ this.removeResizeHandlers();
19
+ },
20
+ methods: {
21
+ compareAndNotify() {
22
+ (this._w !== this.$el.offsetWidth || this._h !== this.$el.offsetHeight) && (this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.$emit("notify", {
23
+ width: this._w,
24
+ height: this._h
25
+ }));
26
+ },
27
+ addResizeHandlers() {
28
+ this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify();
29
+ },
30
+ removeResizeHandlers() {
31
+ this._resizeObject && this._resizeObject.onload && (!t && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), this.$el.removeChild(this._resizeObject), this._resizeObject.onload = null, this._resizeObject = null);
32
+ }
33
+ }
34
+ }, n = {};
35
+ var d = /* @__PURE__ */ l(
36
+ c,
37
+ h,
38
+ r,
39
+ !1,
40
+ a,
41
+ null,
42
+ null,
43
+ null
44
+ );
45
+ function a(e) {
46
+ for (let s in n)
47
+ this[s] = n[s];
48
+ }
49
+ const u = /* @__PURE__ */ function() {
50
+ return d.exports;
51
+ }();
52
+ export {
53
+ u as _
54
+ };
@@ -0,0 +1,13 @@
1
+ var t = function() {
2
+ var e = this, r = e.$createElement, s = e._self._c || r;
3
+ return s("div", {
4
+ staticClass: "resize-observer",
5
+ attrs: {
6
+ tabindex: "-1"
7
+ }
8
+ });
9
+ }, a = [];
10
+ export {
11
+ t as r,
12
+ a as s
13
+ };
@@ -0,0 +1,106 @@
1
+ var u = Object.defineProperty, c = Object.defineProperties;
2
+ var d = Object.getOwnPropertyDescriptors;
3
+ var r = Object.getOwnPropertySymbols;
4
+ var f = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
5
+ var i = (n, e, t) => e in n ? u(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, l = (n, e) => {
6
+ for (var t in e || (e = {}))
7
+ f.call(e, t) && i(n, t, e[t]);
8
+ if (r)
9
+ for (var t of r(e))
10
+ p.call(e, t) && i(n, t, e[t]);
11
+ return n;
12
+ }, o = (n, e) => c(n, d(e));
13
+ import { n as _ } from "./vueComponentNormalizer.446f5dc4.mjs";
14
+ const g = {
15
+ props: {
16
+ type: {
17
+ type: String,
18
+ default: "default"
19
+ },
20
+ label: String,
21
+ className: String,
22
+ labelClassName: String,
23
+ property: String,
24
+ prop: String,
25
+ width: {},
26
+ minWidth: {},
27
+ renderHeader: Function,
28
+ sortable: {
29
+ type: [Boolean, String],
30
+ default: !1
31
+ },
32
+ sortMethod: Function,
33
+ sortBy: [String, Function, Array],
34
+ resizable: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ columnKey: String,
39
+ align: String,
40
+ headerAlign: String,
41
+ showTooltipWhenOverflow: Boolean,
42
+ showOverflowTooltip: {
43
+ type: Boolean,
44
+ default: !0
45
+ },
46
+ fixed: [Boolean, String],
47
+ formatter: Function,
48
+ selectable: Function,
49
+ reserveSelection: Boolean,
50
+ filterMethod: Function,
51
+ filteredValue: Array,
52
+ filters: Array,
53
+ filterPlacement: String,
54
+ filterMultiple: {
55
+ type: Boolean,
56
+ default: !0
57
+ },
58
+ index: [Number, Function],
59
+ sortOrders: {
60
+ type: Array,
61
+ default() {
62
+ return ["ascending", "descending", null];
63
+ },
64
+ validator(n) {
65
+ return n.every((e) => ["ascending", "descending", null].indexOf(e) > -1);
66
+ }
67
+ }
68
+ }
69
+ }, m = {
70
+ name: "TableColumn",
71
+ functional: !0,
72
+ mixins: [g],
73
+ render(n, { data: e, props: t, children: s }) {
74
+ return n(
75
+ "ElTableColumn",
76
+ o(l({}, e), {
77
+ props: o(l({}, t), {
78
+ showOverflowTooltip: ["selection", "single-selection", "index", "expand"].includes(t.type) ? !1 : t.showOverflowTooltip
79
+ })
80
+ }),
81
+ s
82
+ );
83
+ }
84
+ };
85
+ let y, S;
86
+ const a = {};
87
+ var v = /* @__PURE__ */ _(
88
+ m,
89
+ y,
90
+ S,
91
+ !1,
92
+ h,
93
+ null,
94
+ null,
95
+ null
96
+ );
97
+ function h(n) {
98
+ for (let e in a)
99
+ this[e] = a[e];
100
+ }
101
+ const x = /* @__PURE__ */ function() {
102
+ return v.exports;
103
+ }();
104
+ export {
105
+ x as _
106
+ };
@@ -0,0 +1,24 @@
1
+ import { _ as e } from "./Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs";
2
+ import { n as t } from "./vueComponentNormalizer.446f5dc4.mjs";
3
+ let o, s;
4
+ const _ = {};
5
+ var r = /* @__PURE__ */ t(
6
+ e,
7
+ o,
8
+ s,
9
+ !1,
10
+ l,
11
+ null,
12
+ null,
13
+ null
14
+ );
15
+ function l(u) {
16
+ for (let n in _)
17
+ this[n] = _[n];
18
+ }
19
+ const p = /* @__PURE__ */ function() {
20
+ return r.exports;
21
+ }();
22
+ export {
23
+ p as _
24
+ };
@@ -0,0 +1,275 @@
1
+ var u = (e, t, o) => new Promise((s, l) => {
2
+ var c = (a) => {
3
+ try {
4
+ i(o.next(a));
5
+ } catch (n) {
6
+ l(n);
7
+ }
8
+ }, r = (a) => {
9
+ try {
10
+ i(o.throw(a));
11
+ } catch (n) {
12
+ l(n);
13
+ }
14
+ }, i = (a) => a.done ? s(a.value) : Promise.resolve(a.value).then(c, r);
15
+ i((o = o.apply(e, t)).next());
16
+ });
17
+ import { isFunction as b, NOOP as d } from "@web-utils/core";
18
+ import { s as y, r as m } from "./ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs";
19
+ import { n as _ } from "./vueComponentNormalizer.446f5dc4.mjs";
20
+ const g = {
21
+ name: "ToolbarButton",
22
+ inject: {
23
+ toolbar: {
24
+ default: ""
25
+ }
26
+ },
27
+ props: {
28
+ label: {
29
+ type: String
30
+ },
31
+ icon: {
32
+ type: String
33
+ },
34
+ type: {
35
+ type: String
36
+ },
37
+ disabled: Boolean,
38
+ separateLine: {
39
+ type: Boolean,
40
+ default: !0
41
+ },
42
+ footer: Boolean
43
+ },
44
+ data() {
45
+ return {
46
+ loading: !1
47
+ };
48
+ },
49
+ methods: {
50
+ onClick(e) {
51
+ return u(this, null, function* () {
52
+ this.loading = !0;
53
+ const { click: t } = this.$listeners;
54
+ if (b(t))
55
+ try {
56
+ yield t(e);
57
+ } catch (o) {
58
+ }
59
+ this.loading = !1;
60
+ });
61
+ }
62
+ }
63
+ }, h = {};
64
+ var B = /* @__PURE__ */ _(
65
+ g,
66
+ m,
67
+ y,
68
+ !1,
69
+ v,
70
+ null,
71
+ null,
72
+ null
73
+ );
74
+ function v(e) {
75
+ for (let t in h)
76
+ this[t] = h[t];
77
+ }
78
+ const $ = /* @__PURE__ */ function() {
79
+ return B.exports;
80
+ }(), f = {
81
+ back: {
82
+ label: "返回",
83
+ type: "primary",
84
+ icon: "el-icon-d-arrow-left"
85
+ },
86
+ cancel: {
87
+ label: "取消",
88
+ icon: "fa fa-undo"
89
+ },
90
+ create: {
91
+ label: "新增",
92
+ type: "primary",
93
+ icon: "el-icon-plus"
94
+ },
95
+ save: {
96
+ label: "保存",
97
+ type: "primary",
98
+ icon: "fa fa-save"
99
+ },
100
+ withdraw: {
101
+ label: "撤回",
102
+ type: "primary",
103
+ icon: "fa fa-undo"
104
+ },
105
+ edit: {
106
+ label: "编辑",
107
+ type: "primary",
108
+ icon: "el-icon-edit-outline"
109
+ },
110
+ submit: {
111
+ label: "提交审批",
112
+ type: "primary",
113
+ icon: "fa fa-check"
114
+ },
115
+ publish: {
116
+ label: "发布",
117
+ type: "primary",
118
+ icon: "fa fa-send"
119
+ },
120
+ agree: {
121
+ label: "同意",
122
+ type: "primary",
123
+ icon: "fa fa-check-square-o"
124
+ },
125
+ disagree: {
126
+ label: "不同意",
127
+ type: "primary",
128
+ icon: "fa fa-mail-reply"
129
+ },
130
+ reject: {
131
+ label: "退回",
132
+ type: "primary",
133
+ icon: "fa fa-reply"
134
+ },
135
+ finish: {
136
+ label: "完成",
137
+ type: "primary",
138
+ icon: "fa fa-check-square"
139
+ },
140
+ enable: {
141
+ label: "启用",
142
+ type: "primary",
143
+ icon: "el-icon-circle-check"
144
+ },
145
+ exp: {
146
+ label: "导出",
147
+ type: "primary",
148
+ icon: "el-icon-download"
149
+ },
150
+ imp: {
151
+ label: "导入",
152
+ type: "primary",
153
+ icon: "el-icon-upload"
154
+ },
155
+ del: {
156
+ label: "删除",
157
+ type: "primary",
158
+ icon: "el-icon-delete"
159
+ },
160
+ disabled: {
161
+ label: "禁用",
162
+ type: "primary",
163
+ icon: "el-icon-remove-outline"
164
+ },
165
+ reload: {
166
+ label: "刷新",
167
+ type: "primary",
168
+ icon: "el-icon-refresh"
169
+ },
170
+ search: {
171
+ label: "搜索",
172
+ icon: "el-icon-search",
173
+ separateLine: !1
174
+ }
175
+ }, N = {
176
+ name: "Toolbar",
177
+ provide() {
178
+ return {
179
+ toolbar: this
180
+ };
181
+ },
182
+ props: {
183
+ searchable: Boolean,
184
+ buttons: {
185
+ type: Array,
186
+ default: () => ["back"]
187
+ },
188
+ back: {
189
+ type: Function
190
+ },
191
+ cancel: {
192
+ type: Function
193
+ },
194
+ emitter: {
195
+ type: String,
196
+ default: "self"
197
+ },
198
+ footer: Boolean,
199
+ label: {
200
+ type: Object,
201
+ default: () => ({})
202
+ }
203
+ },
204
+ methods: {
205
+ goBack() {
206
+ const e = this.$route.path;
207
+ this.$bus("closeTab", e, this);
208
+ },
209
+ fire(e, t) {
210
+ this.emitter === "parent" ? this.$parent && this.$parent.$emit(e, t, this) : this.$emit(e, t, this);
211
+ },
212
+ createButton(e, {
213
+ label: t,
214
+ icon: o,
215
+ type: s,
216
+ separateLine: l = !0
217
+ }) {
218
+ var a;
219
+ const c = this.$createElement;
220
+ let r;
221
+ const i = ((a = this.label) == null ? void 0 : a[e]) || t;
222
+ return ["back", "cancel"].includes(e) ? r = this.goBack : r = (n) => (this.$listeners[e] || d)(n), c($, {
223
+ attrs: {
224
+ "separate-line": l,
225
+ icon: o,
226
+ label: i,
227
+ footer: this.footer,
228
+ type: s
229
+ },
230
+ on: {
231
+ click: r
232
+ }
233
+ });
234
+ },
235
+ getLeftButtons() {
236
+ var o, s;
237
+ const {
238
+ createButton: e
239
+ } = this;
240
+ return ((s = (o = this.$scopedSlots)["toolbar-left"]) == null ? void 0 : s.call(o)) || this.buttons.map((l) => {
241
+ var r, i, a, n, p;
242
+ const c = f[l];
243
+ return c ? ((i = (r = this.$scopedSlots)[l]) == null ? void 0 : i.call(r)) || e(l, c) : l === "slot" && (p = (n = (a = this.$scopedSlots).default) == null ? void 0 : n.call(a, {
244
+ buttons: this.buttons,
245
+ footer: this.footer
246
+ })) != null ? p : null;
247
+ });
248
+ },
249
+ getRightButtons() {
250
+ var t, o;
251
+ return ((o = (t = this.$scopedSlots)["toolbar-right"]) == null ? void 0 : o.call(t)) || this.getSearchButton();
252
+ },
253
+ getSearchButton() {
254
+ const {
255
+ createButton: e
256
+ } = this;
257
+ return this.searchable ? e("search", f.search) : null;
258
+ }
259
+ },
260
+ render() {
261
+ const e = arguments[0];
262
+ return this.footer ? e("div", {
263
+ class: "footer-bar"
264
+ }, [this.getLeftButtons()]) : e("div", {
265
+ class: "toolbar"
266
+ }, [e("div", {
267
+ class: "toolbar-left"
268
+ }, [this.getLeftButtons()]), e("div", {
269
+ class: "toolbar-right"
270
+ }, [this.getRightButtons()])]);
271
+ }
272
+ };
273
+ export {
274
+ N as _
275
+ };
@@ -0,0 +1,31 @@
1
+ import a from "element-ui/lib/button";
2
+ var o = function() {
3
+ var e = this, n = e.$createElement, t = e._self._c || n;
4
+ return e.footer || e.toolbar.footer ? t(a, {
5
+ attrs: {
6
+ disabled: e.disabled || e.loading,
7
+ type: e.type
8
+ },
9
+ on: {
10
+ click: e.onClick
11
+ }
12
+ }, [e._v(" " + e._s(e.label) + " ")]) : t("span", {
13
+ staticClass: "form-toolbar-button"
14
+ }, [t(a, {
15
+ attrs: {
16
+ icon: e.icon,
17
+ type: "text",
18
+ disabled: e.disabled || e.loading,
19
+ size: "mini"
20
+ },
21
+ on: {
22
+ click: e.onClick
23
+ }
24
+ }, [e._v(" " + e._s(e.label) + " ")]), e.separateLine ? t("span", {
25
+ staticClass: "separate-line"
26
+ }) : e._e()], 1);
27
+ }, i = [];
28
+ export {
29
+ o as r,
30
+ i as s
31
+ };