@web-utils/component 2.7.18 → 2.7.20

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.
@@ -1,7 +1,8 @@
1
1
  import { isEmpty as a } from "@web-utils/core";
2
- import { d as l } from "../../chunks/util.23fe58fb.js";
3
- import { n } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
4
- var r = function() {
2
+ import { d as n } from "../../chunks/util.23fe58fb.js";
3
+ import m from "vue";
4
+ import { n as r } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
5
+ var c = function() {
5
6
  var e = this, t = e.$createElement, o = e._self._c || t;
6
7
  return o(e.dialogType, e._b({
7
8
  tag: "Component",
@@ -12,8 +13,8 @@ var r = function() {
12
13
  "before-close": e.beforeClose
13
14
  },
14
15
  on: {
15
- "update:visible": function(i) {
16
- e.visible = i;
16
+ "update:visible": function(s) {
17
+ e.visible = s;
17
18
  }
18
19
  }
19
20
  }, "Component", e.dialog, !1), [o("FyForm", {
@@ -25,16 +26,16 @@ var r = function() {
25
26
  status: e.disabled
26
27
  },
27
28
  on: {
28
- "update:status": function(i) {
29
- e.disabled = i;
29
+ "update:status": function(s) {
30
+ e.disabled = s;
30
31
  },
31
32
  submit: e.handleSubmit,
32
33
  "reset-change": e.close
33
34
  },
34
35
  model: {
35
36
  value: e.data,
36
- callback: function(i) {
37
- e.data = i;
37
+ callback: function(s) {
38
+ e.data = s;
38
39
  },
39
40
  expression: "data"
40
41
  }
@@ -61,9 +62,10 @@ var r = function() {
61
62
  click: e.reset
62
63
  }
63
64
  }, [e._v(e._s(e.option.emptyText))]) : e._e()], 1) : e._e()], 1);
64
- }, c = [];
65
- const d = {
65
+ }, d = [];
66
+ const h = {
66
67
  name: "DialogForm",
68
+ showForm: u,
67
69
  data() {
68
70
  return {
69
71
  opt: {},
@@ -94,7 +96,7 @@ const d = {
94
96
  },
95
97
  methods: {
96
98
  isEmpty: a,
97
- deepClone: l,
99
+ deepClone: n,
98
100
  submit() {
99
101
  this.$refs.form.submit();
100
102
  },
@@ -119,24 +121,102 @@ const d = {
119
121
  this.callback && this.callback({ data: e, close: this.close, done: t });
120
122
  }
121
123
  }
122
- }, s = {};
123
- var m = /* @__PURE__ */ n(
124
+ }, i = {};
125
+ var p = /* @__PURE__ */ r(
126
+ h,
127
+ c,
124
128
  d,
125
- r,
129
+ !1,
130
+ b,
131
+ null,
132
+ null,
133
+ null
134
+ );
135
+ function b(e) {
136
+ for (let t in i)
137
+ this[t] = i[t];
138
+ }
139
+ const f = /* @__PURE__ */ function() {
140
+ return p.exports;
141
+ }(), u = (e) => {
142
+ const t = m.extend(f), o = new t().$mount();
143
+ return document.body.appendChild(o.$el), o.show(e), o;
144
+ }, _ = {
145
+ name: "DialogForm",
146
+ showForm: u,
147
+ data() {
148
+ return {
149
+ opt: {},
150
+ disabled: !1,
151
+ callback: null,
152
+ visible: !1,
153
+ dialog: {
154
+ closeOnClickModal: !1
155
+ },
156
+ isDrawer: !1,
157
+ option: {
158
+ submitText: "提交",
159
+ emptyText: "关闭",
160
+ submitIcon: "el-icon-check",
161
+ emptyIcon: "el-icon-close",
162
+ column: []
163
+ },
164
+ data: {}
165
+ };
166
+ },
167
+ computed: {
168
+ dialogType() {
169
+ return this.isDrawer ? "ElDrawer" : "ElementDialog";
170
+ },
171
+ menuPosition() {
172
+ return this.opt.menuPosition || "center";
173
+ }
174
+ },
175
+ methods: {
176
+ isEmpty: a,
177
+ deepClone: n,
178
+ submit() {
179
+ this.$refs.form.submit();
180
+ },
181
+ reset() {
182
+ this.$refs.form.resetForm();
183
+ },
184
+ beforeClose(e) {
185
+ e(), this.close();
186
+ },
187
+ show(e) {
188
+ this.opt = e, this.callback = e.callback;
189
+ const t = this.deepClone(e);
190
+ ["callback", "option", "data"].forEach((o) => delete t[o]), this.dialog = Object.assign(this.dialog, t), this.dialog.size = this.dialog.width, this.isDrawer = this.dialog.type === "drawer", this.option = Object.assign(this.option, e.option), this.data = e.data, this.visible = !0;
191
+ },
192
+ close() {
193
+ const e = () => {
194
+ this.visible = !1, this.$destroy(), this.$el.remove();
195
+ };
196
+ typeof this.dialog.beforeClose == "function" ? this.dialog.beforeClose(e) : e();
197
+ },
198
+ handleSubmit(e, t) {
199
+ this.callback && this.callback({ data: e, close: this.close, done: t });
200
+ }
201
+ }
202
+ }, l = {};
203
+ var g = /* @__PURE__ */ r(
204
+ _,
126
205
  c,
206
+ d,
127
207
  !1,
128
- u,
208
+ v,
129
209
  null,
130
210
  null,
131
211
  null
132
212
  );
133
- function u(e) {
134
- for (let t in s)
135
- this[t] = s[t];
213
+ function v(e) {
214
+ for (let t in l)
215
+ this[t] = l[t];
136
216
  }
137
- const h = /* @__PURE__ */ function() {
138
- return m.exports;
217
+ const w = /* @__PURE__ */ function() {
218
+ return g.exports;
139
219
  }();
140
220
  export {
141
- h as default
221
+ w as default
142
222
  };
@@ -123,8 +123,8 @@ var Q = function() {
123
123
  }, [i("ElUpload", {
124
124
  key: t.reload,
125
125
  class: {
126
- "avue-upload__list": t.listType === "picture-img",
127
- "avue-upload__upload": t.disabled
126
+ "avue-upload--list": t.listType === "picture-img",
127
+ "avue-upload--upload": t.disabled
128
128
  },
129
129
  attrs: {
130
130
  action: t.action,
package/dist/index.es.js CHANGED
@@ -6574,7 +6574,10 @@ function __vue2_injectStyles$2p(t) {
6574
6574
  }
6575
6575
  const DialogFilter = /* @__PURE__ */ function() {
6576
6576
  return __component__$2p.exports;
6577
- }();
6577
+ }(), showForm = (t) => {
6578
+ const n = Vue.extend(DialogForm), s = new n().$mount();
6579
+ return document.body.appendChild(s.$el), s.show(t), s;
6580
+ };
6578
6581
  var render$2c = function() {
6579
6582
  var t = this, n = t.$createElement, s = t._self._c || n;
6580
6583
  return s(t.dialogType, t._b({
@@ -6638,6 +6641,7 @@ var render$2c = function() {
6638
6641
  }, staticRenderFns$2c = [];
6639
6642
  const DialogForm_vue_vue_type_style_index_0_lang = "", __vue2_script$2o = {
6640
6643
  name: "DialogForm",
6644
+ showForm,
6641
6645
  data() {
6642
6646
  return {
6643
6647
  opt: {},
@@ -26500,8 +26504,8 @@ var render$P = function() {
26500
26504
  }, [s("ElUpload", {
26501
26505
  key: t.reload,
26502
26506
  class: {
26503
- "avue-upload__list": t.listType === "picture-img",
26504
- "avue-upload__upload": t.disabled
26507
+ "avue-upload--list": t.listType === "picture-img",
26508
+ "avue-upload--upload": t.disabled
26505
26509
  },
26506
26510
  attrs: {
26507
26511
  action: t.action,
@@ -35891,7 +35895,7 @@ function __vue2_injectStyles(t) {
35891
35895
  }
35892
35896
  const Watermark = /* @__PURE__ */ function() {
35893
35897
  return __component__.exports;
35894
- }(), version = "2.7.18";
35898
+ }(), version = "2.7.20";
35895
35899
  function index(t) {
35896
35900
  t.component(AddressInput.name, AddressInput), t.component(Affix.name, Affix), t.component(AsideMenu.name, AsideMenu), t.component(Avatar.name, Avatar), t.component(AwesomeButton.name, AwesomeButton), t.component(CapsuleTab.name, CapsuleTab), t.component(Card.name, Card), t.component(Carousel.name, Carousel), t.component(Chat.name, Chat), t.component(ChunkFileUploader.name, ChunkFileUploader), t.component(ChunkFileUploaderButton.name, ChunkFileUploaderButton), t.component(ChunkFileUploaderDrop.name, ChunkFileUploaderDrop), t.component(ChunkFileUploaderFile.name, ChunkFileUploaderFile), t.component(ChunkFileUploaderFiles.name, ChunkFileUploaderFiles), t.component(ChunkFileUploaderList.name, ChunkFileUploaderList), t.component(ChunkFileUploaderUnSupport.name, ChunkFileUploaderUnSupport), t.component(CodeMirrorEditor.name, CodeMirrorEditor), t.component(ColorPicker.name, ColorPicker), t.component(Column.name, Column), t.component(ColumnDefault.name, ColumnDefault), t.component(ColumnDynamic.name, ColumnDynamic), t.component(ColumnMenu.name, ColumnMenu), t.component(ColumnSlot.name, ColumnSlot), t.component(Comment.name, Comment), t.component(Confirmable.name, Confirmable), t.component(ConfirmButton.name, ConfirmButton), t.component(ContextMenu.name, ContextMenu), t.component(CountUp.name, CountUp), t.component(CustomScrollbar.name, CustomScrollbar), t.component(DataBox.name, DataBox), t.component(DataCard.name, DataCard), t.component(DataCardtext.name, DataCardtext), t.component(DataDisplay.name, DataDisplay), t.component(DataIcons.name, DataIcons), t.component(DataImgtext.name, DataImgtext), t.component(DataOperatext.name, DataOperatext), t.component(DataPanel.name, DataPanel), t.component(DataPay.name, DataPay), t.component(DataPrice.name, DataPrice), t.component(DataProgress.name, DataProgress), t.component(DataRotate.name, DataRotate), t.component(DataTablePicker.name, DataTablePicker), t.component(DataTabs.name, DataTabs), t.component(DialogColumn.name, DialogColumn), t.component(DialogExcel.name, DialogExcel), t.component(DialogFilter.name, DialogFilter), t.component(DialogForm.name, DialogForm), t.component(DynamicTable.name, DynamicTable), t.component(ECharts.name, ECharts), t.component(EditableProgress.name, EditableProgress), t.component(EditableTree.name, EditableTree), t.component(EgdCollapse.name, EgdCollapse), t.component(EgdCollapseItem.name, EgdCollapseItem), t.component(ElementDialog.name, ElementDialog), t.component(EmptyView.name, EmptyView), t.component(ErrorView.name, ErrorView), t.component(FlexColumn.name, FlexColumn), t.component(FlexItem.name, FlexItem), t.component(FlexRow.name, FlexRow), t.component(FlexScroller.name, FlexScroller), t.component(Flow.name, Flow), t.component(FlowNode.name, FlowNode), t.component(FormButton.name, FormButton), t.component(FormCascader.name, FormCascader), t.component(FormCheckboxGroup.name, FormCheckboxGroup), t.component(FormDatePicker.name, FormDatePicker), t.component(FormGroup.name, FormGroup), t.component(FormHolder.name, FormHolder), t.component(FormInput.name, FormInput), t.component(FormInputEmail.name, FormInputEmail), t.component(FormInputIdCard.name, FormInputIdCard), t.component(FormInputNumber.name, FormInputNumber), t.component(FormInputPhoneNumber.name, FormInputPhoneNumber), t.component(FormInputTime.name, FormInputTime), t.component(FormItem.name, FormItem), t.component(FormItemConfigProvider.name, FormItemConfigProvider), t.component(FormItemGroup.name, FormItemGroup), t.component(FormRadioGroup.name, FormRadioGroup), t.component(FormSelect.name, FormSelect), t.component(FormSwitch.name, FormSwitch), t.component(FormTemp.name, FormTemp), t.component(FormTextarea.name, FormTextarea), t.component(FormView.name, FormView), t.component(FyArray.name, FyArray), t.component(FyArticle.name, FyArticle), t.component(FyCascader.name, FyCascader), t.component(FyCheckbox.name, FyCheckbox), t.component(FyCode.name, FyCode), t.component(FyCurd.name, FyCurd), t.component(FyDate.name, FyDate), t.component(FyDialogForm.name, FyDialogForm), t.component(FyDraggable.name, FyDraggable), t.component(FyDynamic.name, FyDynamic), t.component(FyEmpty.name, FyEmpty), t.component(FyForm.name, FyForm), t.component(FyFormDesign.name, FyFormDesign), t.component(FyFormMenu.name, FyFormMenu), t.component(FyInput.name, FyInput), t.component(FyInputColor.name, FyInputColor), t.component(FyInputIcon.name, FyInputIcon), t.component(FyInputMap.name, FyInputMap), t.component(FyInputNumber.name, FyInputNumber), t.component(FyInputTable.name, FyInputTable), t.component(FyInputTree.name, FyInputTree), t.component(FyProgress.name, FyProgress), t.component(FyRadio.name, FyRadio), t.component(FyRate.name, FyRate), t.component(FySelect.name, FySelect), t.component(FySlider.name, FySlider), t.component(FySwitch.name, FySwitch), t.component(FyTabs.name, FyTabs), t.component(FyTime.name, FyTime), t.component(FyTitle.name, FyTitle), t.component(FyTree.name, FyTree), t.component(FyUEditor.name, FyUEditor), t.component(FyUpload.name, FyUpload), t.component(GuideSteps.name, GuideSteps), t.component(HeaderMenu.name, HeaderMenu), t.component(HeaderSearch.name, HeaderSearch), t.component(IconCard.name, IconCard), t.component(IconTemp.name, IconTemp), t.component(IframeWindow.name, IframeWindow), t.component(ImageCropper.name, ImageCropper), t.component(ImagePreview.name, ImagePreview), t.component(ImageViewer.name, ImageViewer), t.component(InputNumber.name, InputNumber), t.component(InputNumberRange.name, InputNumberRange), t.component(JSXComponent.name, JSXComponent), t.component(KeepViewAlive.name, KeepViewAlive), t.component(Keyboard.name, Keyboard), t.component(License.name, License), t.component(LoadingView.name, LoadingView), t.component(Login.name, Login), t.component(NameAvatar.name, NameAvatar), t.component(NavBar.name, NavBar), t.component(Notice.name, Notice), t.component(NotImplement.name, NotImplement), t.component(Page.name, Page), t.component(PageableTable.name, PageableTable), t.component(PageableView.name, PageableView), t.component(PageHeader.name, PageHeader), t.component(PageIndex.name, PageIndex), t.component(PageIndexTop.name, PageIndexTop), t.component(PageSkeleton.name, PageSkeleton), t.component(PageSkeletonNew.name, PageSkeletonNew), t.component(PhotoSwipe.name, PhotoSwipe), t.component(Queue.name, Queue), t.component(RecordVideo.name, RecordVideo), t.component(ResizeObserver.name, ResizeObserver), t.component(Search.name, Search), t.component(SearchPopover.name, SearchPopover), t.component(Sign.name, Sign), t.component(SignPanel.name, SignPanel), t.component(Skeleton.name, Skeleton), t.component(SplitPane.name, SplitPane), t.component(Stateful.name, Stateful), t.component(StaticPageableTable.name, StaticPageableTable), t.component(Swiper.name, Swiper), t.component(Tab.name, Tab), t.component(TabItem.name, TabItem), t.component(TableColumn.name, TableColumn), t.component(TablePage.name, TablePage), t.component(TableView.name, TableView), t.component(TagRender.name, TagRender), t.component(TextEllipsis.name, TextEllipsis), t.component(TinymceEditor.name, TinymceEditor), t.component(TinymceWrapper.name, TinymceWrapper), t.component(Toolbar.name, Toolbar), t.component(ToolbarButton.name, ToolbarButton), t.component(Trigger.name, Trigger), t.component(Verify.name, Verify), t.component(VueTagsInput.name, VueTagsInput), t.component(Watermark.name, Watermark);
35897
35901
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
- "version": "2.7.18",
3
+ "version": "2.7.20",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "MIT",
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@web-utils/component",
5
- "version": "2.7.18",
5
+ "version": "2.7.20",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",