super-page-runtime 2.0.43-beta2 → 2.0.43-beta4

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 (21) hide show
  1. package/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
  2. package/dist/es/components/runtime/utils/events/event-util.js +26 -7
  3. package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -1
  4. package/dist/es/components/runtime/utils/events/standard-event.js +9 -9
  5. package/dist/es/components/runtime/utils/events/validator-util.js +11 -1
  6. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +2 -2
  7. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +2 -2
  8. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +13 -13
  9. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
  10. package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +2 -2
  11. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +4 -4
  12. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +6 -6
  13. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -3
  14. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +2 -2
  15. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
  16. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -2
  17. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +3 -3
  18. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +2 -2
  19. package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +3 -3
  20. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +6 -6
  21. package/package.json +2 -2
@@ -18,6 +18,7 @@ export declare function getCustomFunc(pageContext: PageContext, funcName: any):
18
18
  */
19
19
  export declare function removeCustomFuncFromWindow(pageDesign: PageDesign): void;
20
20
  export declare function handleEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
21
+ export declare function handleFormEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
21
22
  export declare function getHandleEvent($event: any, pageContext: PageContext, configure: Component, eventType: string, otherParams?: object): any;
22
23
  export declare function getTableUuid(pageContext: PageContext, configure: Component): any;
23
24
  export declare function handleEventByEventName(pageContext: PageContext, configure: Component, eventName: string, otherParams?: object): any;
@@ -7,6 +7,14 @@ import { analysisCondition } from "agilebuilder-ui/src/utils/util";
7
7
  import { getListCode } from "../common-util.js";
8
8
  import eventBus from "../eventBus.js";
9
9
  import { getValueFromSource } from "../page-helper-util.js";
10
+ const skipValidateEvents = [
11
+ "downloadTemplate",
12
+ "back",
13
+ "exportForm",
14
+ "exportPDF",
15
+ "lineEditCreate",
16
+ "workflowSave"
17
+ ];
10
18
  function initPageEvents(pageDesign, pageContext) {
11
19
  if (pageDesign && pageDesign.customEvents) {
12
20
  const customEvents = transferToFunction(pageDesign.customEvents);
@@ -80,17 +88,20 @@ function removeCustomFuncFromWindow(pageDesign) {
80
88
  }
81
89
  }
82
90
  function handleEvent($event, pageContext, configure, eventType, otherParams) {
83
- return handleEventUtil($event, pageContext, configure, eventType, true, otherParams);
91
+ return handleEventUtil($event, pageContext, configure, eventType, true, otherParams, false);
92
+ }
93
+ function handleFormEvent($event, pageContext, configure, eventType, otherParams) {
94
+ return handleEventUtil($event, pageContext, configure, eventType, true, otherParams, true);
84
95
  }
85
96
  function getHandleEvent($event, pageContext, configure, eventType, otherParams) {
86
- return handleEventUtil($event, pageContext, configure, eventType, false, otherParams);
97
+ return handleEventUtil($event, pageContext, configure, eventType, false, otherParams, false);
87
98
  }
88
- function handleEventUtil($event, pageContext, configure, eventType, isExecute, otherParams) {
99
+ function handleEventUtil($event, pageContext, configure, eventType, isExecute, otherParams, skipValidate) {
89
100
  const pageCode = pageContext.code;
90
101
  const pageVersion = pageContext.version;
91
102
  const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
92
103
  let eventFun;
93
- if (eventType && eventType === "click") {
104
+ if (!skipValidate && eventType && eventType === "click") {
94
105
  const tableUuid = getTableUuid(pageContext, configure);
95
106
  if (tableUuid) {
96
107
  const gridRef = getComponentRef(pageContext, tableUuid);
@@ -181,13 +192,20 @@ function buttonClickEvent(pageContext, configure, eventParams) {
181
192
  }
182
193
  function doValidateForm(pageContext, configure, eventParams) {
183
194
  const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
195
+ let isEnableRequired = true;
184
196
  const clickEventFunObj = getClickEventFuncByType(pageContext, events, "click");
185
197
  if (clickEventFunObj) {
186
198
  const isStandardEvent = clickEventFunObj.isStandard;
187
199
  const event = clickEventFunObj.event;
188
- isNotNeedValidateRequired(isStandardEvent, event);
200
+ const isNotNeedValidate = isNotNeedValidateRequired(isStandardEvent, event);
201
+ if (isNotNeedValidate) {
202
+ isEnableRequired = false;
203
+ }
189
204
  }
190
- validateDataModelFunc(pageContext, configure, true).then(() => {
205
+ validateDataModelFunc(pageContext, configure, isEnableRequired).then((validateReslut) => {
206
+ if (!validateReslut) {
207
+ return;
208
+ }
191
209
  const beforeClickResult = doBeforeClickEvent(pageContext, configure, eventParams);
192
210
  if (!beforeClickResult) {
193
211
  return;
@@ -268,7 +286,7 @@ function isNotDoAfterClick(isStandardEvent, clickEvent) {
268
286
  return isStandardEvent && (clickEvent.eventName === "exportForm" || clickEvent.eventName === "exportPDF" || clickEvent.eventName === "import" || clickEvent.eventName === "assign" || clickEvent.eventName === "copyTask" || clickEvent.eventName === "addSigner" || clickEvent.eventName === "returnTaskTo" || clickEvent.eventName === "removeSigner");
269
287
  }
270
288
  function isNotNeedValidateRequired(isStandardEvent, clickEvent) {
271
- return isStandardEvent && (clickEvent.eventName === "downloadTemplate" || clickEvent.eventName === "back" || clickEvent.eventName === "exportForm" || clickEvent.eventName === "exportPDF" || clickEvent.eventName === "lineEditCreate");
289
+ return isStandardEvent && skipValidateEvents.includes(clickEvent.eventName);
272
290
  }
273
291
  function doAfterClickEvent(pageContext, configure, otherParams) {
274
292
  const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
@@ -607,6 +625,7 @@ export {
607
625
  gridSelectRecord,
608
626
  gridSelectionChange,
609
627
  handleEvent,
628
+ handleFormEvent,
610
629
  headerClick,
611
630
  initPageEvents,
612
631
  removeCustomFuncFromWindow,
@@ -42,7 +42,7 @@ export declare const standardEvents: {
42
42
  queryCharts: (params: any) => void;
43
43
  };
44
44
  export declare function exportFormReport(pageContext: any, configureObj: any, templateFile: any, isPdf: any): void;
45
- export declare function getSaveFormRequestWithRow(pageContext: PageContext, configureObj: any, url: string, isUnControlVersion: boolean, mainDefaultValueColumns: any, dynamicColumnInfo: any, row: any, commonParams: any): any;
45
+ export declare function getSaveFormRequestWithRow(pageContext: PageContext, configureObj: any, url: string, isUnControlVersion: boolean, mainDefaultValueColumns: any, dynamicColumnInfo: any, row: any, otherParams: any): any;
46
46
  export declare function getSaveFormRequest(pageContext: any, configureObj: any, url: any, isUnControlVersion: any, mainDefaultValueColumns: any, dynamicColumnInfo: any): any;
47
47
  /**
48
48
  * 按钮执行后页面处理方式:刷新、关闭弹框等等
@@ -240,8 +240,8 @@ const standardEvents = {
240
240
  }
241
241
  };
242
242
  function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
243
- const templateUUID = templateFile.templateUUID;
244
- const fileName = templateFile.templateShowPath;
243
+ const templateUUID = templateFile.templateUuid;
244
+ const fileName = templateFile.templateName;
245
245
  const systemCode = pageContext.systemCode;
246
246
  const logSetting = configureObj.props.logSetting;
247
247
  const isWorkflowForm = pageContext.workflowCode ? true : false;
@@ -290,9 +290,9 @@ function exportFormReportSuccess(fileName, backendUrl, param) {
290
290
  const path = baseUrl + "/dsc/commons/export-reports";
291
291
  axios.defaults.headers.common.Authorization = getToken();
292
292
  const request = axios.post(path, param, {
293
- headers: {
294
- "content-type": "application/x-www-form-urlencoded"
295
- },
293
+ // headers: {
294
+ // 'content-type': 'application/x-www-form-urlencoded'
295
+ // },
296
296
  responseType: "blob"
297
297
  });
298
298
  request.then((response) => {
@@ -415,7 +415,7 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
415
415
  }
416
416
  return param;
417
417
  }
418
- function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, row, commonParams) {
418
+ function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVersion, mainDefaultValueColumns, dynamicColumnInfo, row, otherParams) {
419
419
  const systemCode = pageContext.systemCode;
420
420
  const backendUrl = pageContext.backendUrl;
421
421
  const param = getCommonFormRequestParam(
@@ -427,9 +427,9 @@ function getSaveFormRequestWithRow(pageContext, configureObj, url, isUnControlVe
427
427
  null,
428
428
  row
429
429
  );
430
- if (commonParams) {
431
- if (commonParams.tableName) {
432
- param.tableName = commonParams.tableName;
430
+ if (otherParams) {
431
+ if (otherParams.tableName) {
432
+ param.tableName = otherParams.tableName;
433
433
  }
434
434
  }
435
435
  return getSaveFormRequestByParam(systemCode, backendUrl, param, url, pageContext.entity.data);
@@ -149,16 +149,26 @@ function validateDataModelFunc(pageContext, configureObj, isEnableRequired) {
149
149
  const pageModel = pageContext.entity.page;
150
150
  const data = { ...pageModel, ...dataModel };
151
151
  const rules = pageContext.rules;
152
+ if (isEnableRequired === void 0 || isEnableRequired === null) {
153
+ isEnableRequired = configureObj.props.verification ? configureObj.props.verification.required : false;
154
+ if (typeof isEnableRequired === "undefined") {
155
+ isEnableRequired = false;
156
+ }
157
+ }
152
158
  return validateDataModel(isEnableRequired, data, rules, pageContext);
153
159
  }
154
160
  function validateDataModel(isEnableRequired, dataModel, rules, pageContext) {
155
- {
161
+ if (isEnableRequired) {
156
162
  const isWorkflow = pageContext.workflowCode ? true : false;
157
163
  if (isWorkflow) {
158
164
  return validateWorkflowFormDataModel(dataModel, pageContext);
159
165
  } else {
160
166
  return validateCommonFormDataModel(dataModel, pageContext, rules);
161
167
  }
168
+ } else {
169
+ return new Promise((resolve, reject) => {
170
+ resolve(true);
171
+ });
162
172
  }
163
173
  }
164
174
  function validateWorkflowFormDataModel(dataModel, pageContext) {
@@ -315,7 +315,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
315
315
  const tableConfigure = configure;
316
316
  buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
317
317
  return new Promise((resolve, reject) => {
318
- const commonParams = { tableName: tableConfigure.props.dataOrigin.tableName };
318
+ const otherParams = { tableName: tableConfigure.props.dataOrigin.tableName };
319
319
  getSaveFormRequestWithRow(
320
320
  pageContext,
321
321
  buttonConfigure,
@@ -324,7 +324,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
324
324
  mainDefaultValueColumns,
325
325
  dynamicColumnInfo,
326
326
  row,
327
- commonParams
327
+ otherParams
328
328
  ).then((commonEntity) => {
329
329
  if (commonEntity) {
330
330
  resolve(commonEntity.entity);
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList } from "vue";
2
2
  import { getVariableValue, setVariableValue, getOptionDatasFromPage, monitorFieldChange, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "checkbox-runtime",
7
7
  props: {
@@ -104,7 +104,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
104
104
  key: item.value,
105
105
  value: item.value,
106
106
  label: item.label,
107
- onClick: ($event) => unref(handleEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
107
+ onClick: ($event) => unref(handleFormEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
108
108
  }, null, 8, ["value", "label", "onClick"]);
109
109
  }), 128))
110
110
  ]),
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, resolveComponent, openBlock, createBloc
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getDateShortCuts } from "../../../../utils/form/date-shortcuts.js";
4
4
  import { getValueFromVariable, setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
5
- import { getCustomFunc, handleEvent } from "../../../../utils/events/event-util.js";
5
+ import { getCustomFunc, handleFormEvent } from "../../../../utils/events/event-util.js";
6
6
  import _sfc_main$1 from "../common/title-suffix-element.vue.js";
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "datepicker-runtime",
@@ -131,12 +131,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
131
131
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
132
132
  shortcuts: shortcuts.value,
133
133
  type: designProperty.value.dateType,
134
- onChange: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
135
- onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
136
- onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
137
- onCalendarChange: _cache[4] || (_cache[4] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "calendar-change")),
138
- onVisibleChange: _cache[5] || (_cache[5] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
139
- onPanelChange: _cache[6] || (_cache[6] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
134
+ onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
135
+ onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
136
+ onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
137
+ onCalendarChange: _cache[4] || (_cache[4] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "calendar-change")),
138
+ onVisibleChange: _cache[5] || (_cache[5] = ($event) => _ctx.handleEhandleFormEventvent($event, _ctx.pageContext, _ctx.configure, "visible-change")),
139
+ onPanelChange: _cache[6] || (_cache[6] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
140
140
  }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
141
141
  key: 1,
142
142
  clearable: designProperty.value.clearable,
@@ -151,12 +151,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
151
151
  "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => dynamicModelMethod.value = $event),
152
152
  shortcuts: shortcuts.value,
153
153
  type: designProperty.value.dateType,
154
- onChange: _cache[8] || (_cache[8] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
155
- onBlur: _cache[9] || (_cache[9] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
156
- onFocus: _cache[10] || (_cache[10] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
157
- onCalendarChange: _cache[11] || (_cache[11] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "calendar-change")),
158
- onVisibleChange: _cache[12] || (_cache[12] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
159
- onPanelChange: _cache[13] || (_cache[13] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
154
+ onChange: _cache[8] || (_cache[8] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
155
+ onBlur: _cache[9] || (_cache[9] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
156
+ onFocus: _cache[10] || (_cache[10] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
157
+ onCalendarChange: _cache[11] || (_cache[11] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "calendar-change")),
158
+ onVisibleChange: _cache[12] || (_cache[12] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
159
+ onPanelChange: _cache[13] || (_cache[13] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
160
160
  }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type"]))
161
161
  ]),
162
162
  _: 1
@@ -4,7 +4,7 @@ import "agilebuilder-ui/src/utils/request";
4
4
  import "dayjs";
5
5
  import "agilebuilder-ui/src/utils/calculator/calculator-util";
6
6
  import "../../../../utils/global-refs.js";
7
- import { handleEvent } from "../../../../utils/events/event-util.js";
7
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
8
8
  import _sfc_main$1 from "../common/title-suffix-element.vue.js";
9
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  __name: "depttree-runtime",
@@ -28,10 +28,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  const headerStyle = runtimeInfo.headerStyle;
29
29
  const autoSetFields = designProperty.value.autoSetFields ? designProperty.value.autoSetFields : [];
30
30
  function changeValue(value) {
31
- handleEvent(value, props.pageContext, props.configure, "change");
31
+ handleFormEvent(value, props.pageContext, props.configure, "change");
32
32
  }
33
33
  function showTree() {
34
- handleEvent(null, props.pageContext, props.configure, "click");
34
+ handleFormEvent(null, props.pageContext, props.configure, "click");
35
35
  }
36
36
  return (_ctx, _cache) => {
37
37
  const _component_OrganizationInput = resolveComponent("OrganizationInput");
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeStyle, toDisplayString } from "vue";
2
2
  import { formatVariableValue } from "../../../../utils/page-helper-util.js";
3
- import { handleEvent } from "../../../../utils/events/event-util.js";
3
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "divider-runtime",
6
6
  props: {
@@ -26,7 +26,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
26
  direction: designProperty.value.direction,
27
27
  "border-style": designProperty.value.borderType,
28
28
  "content-position": designProperty.value.titlePosition,
29
- onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
29
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
30
30
  }, {
31
31
  default: withCtx(() => [
32
32
  createElementVNode("div", {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  import _sfc_main$1 from "../common/title-suffix-element.vue.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "input-number-runtime",
@@ -62,9 +62,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
62
  step: designProperty.value.step,
63
63
  min: designProperty.value.min,
64
64
  max: designProperty.value.max,
65
- onChange: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
66
- onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
67
- onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus"))
65
+ onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
66
+ onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
67
+ onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus"))
68
68
  }, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])
69
69
  ]),
70
70
  _: 1
@@ -2,7 +2,7 @@ import { defineComponent, computed, ref, watch, resolveComponent, openBlock, cre
2
2
  import { SuperIcon } from "agilebuilder-ui";
3
3
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
4
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
5
- import { handleEvent } from "../../../../utils/events/event-util.js";
5
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
6
6
  import { formatScanRuleSets, analysisScanValue, setScanAnalysisValue } from "../../../../utils/form/scan-util.js";
7
7
  import _sfc_main$1 from "../common/title-suffix-element.vue.js";
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -94,11 +94,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
94
94
  "show-word-limit": designProperty.value.showInputNum,
95
95
  modelValue: dynamicModelMethod.value,
96
96
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
97
- onInput: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "input")),
98
- onChange: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
99
- onBlur: _cache[3] || (_cache[3] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
100
- onFocus: _cache[4] || (_cache[4] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
101
- onClick: _cache[5] || (_cache[5] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
97
+ onInput: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "input")),
98
+ onChange: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
99
+ onBlur: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
100
+ onFocus: _cache[4] || (_cache[4] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
101
+ onClick: _cache[5] || (_cache[5] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
102
102
  }, createSlots({ _: 2 }, [
103
103
  designProperty.value.iconPosition != "outer" && (designProperty.value.preIconType && designProperty.value.preIconValue || designProperty.value.preText) ? {
104
104
  name: "prefix",
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, resolveComponent, openBlock, createBloc
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { queryOptions, formatVariableValue, formatValueByType } from "../../../../utils/page-helper-util.js";
4
4
  import { SuperIcon } from "agilebuilder-ui";
5
- import { handleEvent } from "../../../../utils/events/event-util.js";
5
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
6
6
  const _hoisted_1 = { style: { "overflow": "hidden", "white-space": "nowrap" } };
7
7
  const _hoisted_2 = ["title"];
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -76,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76
76
  default: withCtx(() => [
77
77
  createElementVNode("div", {
78
78
  style: { "display": "flex", "width": "100%", "justify-content": "space-between" },
79
- onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
79
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
80
80
  }, [
81
81
  createElementVNode("span", _hoisted_1, [
82
82
  designProperty.value.preIconValue || designProperty.value.preText ? (openBlock(), createElementBlock("span", {
@@ -111,7 +111,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
111
111
  }, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createElementBlock("span", {
112
112
  key: 1,
113
113
  style: { "display": "flex", "justify-content": "space-between" },
114
- onClick: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
114
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
115
115
  }, [
116
116
  createElementVNode("span", {
117
117
  style: { "overflow": "hidden", "white-space": "nowrap" },
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue } from "../../../../utils/page-helper-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "link-runtime",
7
7
  props: {
@@ -58,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
58
58
  disabled: designProperty.value.state === "disabled",
59
59
  type: designProperty.value.type,
60
60
  underline: designProperty.value.underline,
61
- onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
61
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
62
62
  }, {
63
63
  default: withCtx(() => [
64
64
  createTextVNode(toDisplayString(dynamicValue.value), 1)
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList } from "vue";
2
2
  import { getVariableValue, setVariableValue, getOptionDatasFromPage, autoSetAfterSelect, queryOptionDatasources } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "radio-runtime",
7
7
  props: {
@@ -106,7 +106,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
106
106
  }
107
107
  autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
108
108
  }
109
- handleEvent(value, props.pageContext, props.configure, "change");
109
+ handleFormEvent(value, props.pageContext, props.configure, "change");
110
110
  }
111
111
  function updateOptions(newOptions) {
112
112
  listOptions.value = newOptions ? newOptions : [];
@@ -144,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
144
144
  key: item.value,
145
145
  value: item.value,
146
146
  label: item.label,
147
- onClick: ($event) => unref(handleEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
147
+ onClick: ($event) => unref(handleFormEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
148
148
  }, null, 8, ["value", "label", "onClick"]);
149
149
  }), 128))
150
150
  ]),
@@ -3,7 +3,7 @@ import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
4
  import Quill from "quill";
5
5
  import "quill/dist/quill.snow.css";
6
- import { handleEvent } from "../../../../utils/events/event-util.js";
6
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
7
7
  import http from "agilebuilder-ui/src/utils/request";
8
8
  const _hoisted_1 = { style: { "width": "100%", "height": "100%" } };
9
9
  const _hoisted_2 = {
@@ -161,7 +161,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
161
161
  function handleFocusOut(event) {
162
162
  var _a;
163
163
  if (event.relatedTarget === null || !((_a = quillEditorRef.value) == null ? void 0 : _a.contains(event.relatedTarget))) {
164
- handleEvent(quill.value.root.innerHTML, props.pageContext, props.configure, "change", {
164
+ handleFormEvent(quill.value.root.innerHTML, props.pageContext, props.configure, "change", {
165
165
  entity
166
166
  });
167
167
  }
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderList, createElementVNode } from "vue";
2
2
  import { getVariableValue, setVariableValue, getOptionDatasFromPage, queryOptionDatasources, autoSetAfterSelect } from "../../../../utils/page-helper-util.js";
3
3
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  import _sfc_main$1 from "../common/title-suffix-element.vue.js";
6
6
  const _hoisted_1 = { style: { "float": "left" } };
7
7
  const _hoisted_2 = { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } };
@@ -131,7 +131,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
131
131
  }
132
132
  autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
133
133
  }
134
- handleEvent(value, props.pageContext, props.configure, "change");
134
+ handleFormEvent(value, props.pageContext, props.configure, "change");
135
135
  }
136
136
  function updateOptions(newOptions) {
137
137
  listOptions.value = newOptions ? newOptions : [];
@@ -189,7 +189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
189
189
  key: item.value,
190
190
  label: item.label,
191
191
  value: item.value,
192
- onClick: ($event) => unref(handleEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
192
+ onClick: ($event) => unref(handleFormEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
193
193
  }, {
194
194
  default: withCtx(() => [
195
195
  item._description_ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "switch-runtime",
7
7
  props: {
@@ -53,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
53
53
  style: normalizeStyle(unref(switchStyle)),
54
54
  modelValue: dynamicModelMethod.value,
55
55
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
56
- onChange: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change"))
56
+ onChange: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change"))
57
57
  }, null, 8, ["disabled", "active-value:", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])
58
58
  ]),
59
59
  _: 1
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { formatVariableValue } from "../../../../utils/page-helper-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "tag-runtime",
7
7
  props: {
@@ -48,8 +48,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48
48
  size: designProperty.value.size,
49
49
  closable: designProperty.value.closable,
50
50
  type: designProperty.value.type,
51
- onClose: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "remove")),
52
- onClick: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
51
+ onClose: _cache[0] || (_cache[0] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "remove")),
52
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
53
53
  }, {
54
54
  default: withCtx(() => [
55
55
  createTextVNode(toDisplayString(dynamicValue.value), 1)
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, createBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
- import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ import { handleFormEvent } from "../../../../utils/events/event-util.js";
5
5
  import _sfc_main$1 from "../common/title-suffix-element.vue.js";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "textarea-runtime",
@@ -63,11 +63,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
63
63
  maxlength: designProperty.value.maxLength,
64
64
  "show-word-limit": designProperty.value.showInputNum,
65
65
  type: "textarea",
66
- onInput: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "input")),
67
- onChange: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
68
- onBlur: _cache[3] || (_cache[3] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
69
- onFocus: _cache[4] || (_cache[4] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
70
- onClick: _cache[5] || (_cache[5] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
66
+ onInput: _cache[1] || (_cache[1] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "input")),
67
+ onChange: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
68
+ onBlur: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
69
+ onFocus: _cache[4] || (_cache[4] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
70
+ onClick: _cache[5] || (_cache[5] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
71
71
  }, null, 8, ["disabled", "readonly", "size", "clearable", "placeholder", "modelValue", "rows", "maxlength", "show-word-limit"])
72
72
  ]),
73
73
  _: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.0.43-beta2",
3
+ "version": "2.0.43-beta4",
4
4
  "description": "AgileBuilder super page runtime",
5
5
  "license": "ISC",
6
6
  "main": "dist/es/index.js",
@@ -69,4 +69,4 @@
69
69
  "vue-router": "^4.3.0",
70
70
  "vuex": "^4.1.0"
71
71
  }
72
- }
72
+ }