@farris/ui-vue 1.2.9 → 1.3.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.
- package/components/accordion/index.esm.js +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
var Ze = Object.defineProperty;
|
|
2
|
+
var _e = (e, t, n) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var N = (e, t, n) => _e(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as U, ref as l, watch as A, computed as L, onMounted as Q, createVNode as i, nextTick as fe, toRefs as Ke, onBeforeMount as ve, createTextVNode as q, Fragment as ue, withModifiers as le, inject as Se, provide as et, onUnmounted as Ce, Teleport as tt, Transition as nt, shallowRef as at, createApp as lt, render as ce, h as ot, cloneVNode as it, mergeProps as Ie, reactive as Z } from "vue";
|
|
5
|
+
import { isPlainObject as be, cloneDeep as X } from "lodash-es";
|
|
6
|
+
import ut from "../list-view/index.esm.js";
|
|
7
|
+
import st from "../button-edit/index.esm.js";
|
|
8
|
+
const rt = {
|
|
9
9
|
/** 当前控件组别及样式 */
|
|
10
10
|
defaultState: {
|
|
11
11
|
/** 选中的控件对应的组别 */
|
|
@@ -345,14 +345,14 @@ const Se = {
|
|
|
345
345
|
group: 4
|
|
346
346
|
}
|
|
347
347
|
]
|
|
348
|
-
},
|
|
348
|
+
}, ct = {
|
|
349
349
|
/** 接受传入的原始数据的defaultState */
|
|
350
|
-
initialState: { type: Object, default:
|
|
350
|
+
initialState: { type: Object, default: rt },
|
|
351
351
|
/** 页面高度 */
|
|
352
352
|
height: { type: Number, default: 700 },
|
|
353
353
|
/** 页面宽度 */
|
|
354
354
|
width: { type: Number, default: 750 }
|
|
355
|
-
},
|
|
355
|
+
}, dt = {
|
|
356
356
|
/** 记录默认模式及分组状态 */
|
|
357
357
|
defaultStates: { type: Object, default: { mode: "" } },
|
|
358
358
|
/** 当前开关模式 */
|
|
@@ -364,7 +364,7 @@ const Se = {
|
|
|
364
364
|
/** 用户设置的屏幕分辨率缩写变化-例:中等屏幕 */
|
|
365
365
|
onScreenNameChanged: { type: Function, default: () => {
|
|
366
366
|
} }
|
|
367
|
-
},
|
|
367
|
+
}, ft = "https://json-schema.org/draft/2020-12/schema", vt = "https://farris-design.gitee.io/capsule.schema.json", pt = "capsule", mt = "A Farris Component", ht = "object", yt = {
|
|
368
368
|
id: {
|
|
369
369
|
description: "The unique identifier for a capsule",
|
|
370
370
|
type: "string"
|
|
@@ -426,43 +426,43 @@ const Se = {
|
|
|
426
426
|
type: "boolean",
|
|
427
427
|
default: !0
|
|
428
428
|
}
|
|
429
|
-
},
|
|
429
|
+
}, gt = [
|
|
430
430
|
"id",
|
|
431
431
|
"type"
|
|
432
|
-
],
|
|
433
|
-
$schema:
|
|
434
|
-
$id:
|
|
435
|
-
title:
|
|
436
|
-
description:
|
|
437
|
-
type:
|
|
438
|
-
properties:
|
|
439
|
-
required:
|
|
440
|
-
},
|
|
432
|
+
], bt = {
|
|
433
|
+
$schema: ft,
|
|
434
|
+
$id: vt,
|
|
435
|
+
title: pt,
|
|
436
|
+
description: mt,
|
|
437
|
+
type: ht,
|
|
438
|
+
properties: yt,
|
|
439
|
+
required: gt
|
|
440
|
+
}, Me = {}, xe = {};
|
|
441
441
|
function pe(e) {
|
|
442
|
-
const { properties: t, title: n, ignore: a } = e, o = a && Array.isArray(a),
|
|
443
|
-
return (!o || !a.find((c) => c == "id")) && (
|
|
442
|
+
const { properties: t, title: n, ignore: a } = e, o = a && Array.isArray(a), r = Object.keys(t).reduce((c, d) => ((!o || !a.find((v) => v == d)) && (c[d] = t[d].type === "object" && t[d].properties ? pe(t[d]) : X(t[d].default)), c), {});
|
|
443
|
+
return n && (!o || !a.find((c) => c == "id")) && (r.id = `${n}-${Date.now()}`), r;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
446
|
-
const a =
|
|
445
|
+
function Ee(e, t = {}, n) {
|
|
446
|
+
const a = Me[e];
|
|
447
447
|
if (a) {
|
|
448
448
|
let o = pe(a);
|
|
449
|
-
const
|
|
450
|
-
return o =
|
|
449
|
+
const r = xe[e];
|
|
450
|
+
return o = r ? r({ getSchemaByType: Ee }, o, t, n) : o, o;
|
|
451
451
|
}
|
|
452
452
|
return null;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function wt(e, t) {
|
|
455
455
|
const n = pe(t);
|
|
456
|
-
return Object.keys(e).reduce((a, o) => (a[o] &&
|
|
456
|
+
return Object.keys(e).reduce((a, o) => (a[o] && be(a[o]) && be(e[o]) ? Object.assign(a[o], e[o]) : a[o] = e[o], a), n), n;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function St(e, t) {
|
|
459
459
|
return Object.keys(e).filter((a) => e[a] != null).reduce((a, o) => {
|
|
460
460
|
if (t.has(o)) {
|
|
461
|
-
const
|
|
462
|
-
if (typeof
|
|
463
|
-
a[
|
|
461
|
+
const r = t.get(o);
|
|
462
|
+
if (typeof r == "string")
|
|
463
|
+
a[r] = e[o];
|
|
464
464
|
else {
|
|
465
|
-
const c =
|
|
465
|
+
const c = r(o, e[o], e);
|
|
466
466
|
Object.assign(a, c);
|
|
467
467
|
}
|
|
468
468
|
} else
|
|
@@ -470,16 +470,16 @@ function vt(e, t) {
|
|
|
470
470
|
return a;
|
|
471
471
|
}, {});
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
const a =
|
|
475
|
-
return
|
|
473
|
+
function Ct(e, t, n = /* @__PURE__ */ new Map()) {
|
|
474
|
+
const a = wt(e, t);
|
|
475
|
+
return St(a, n);
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
function t(s,
|
|
479
|
-
if (typeof
|
|
480
|
-
return f[s].length ===
|
|
481
|
-
if (typeof
|
|
482
|
-
const h = Object.keys(
|
|
477
|
+
function It(e = {}) {
|
|
478
|
+
function t(s, p, u, f) {
|
|
479
|
+
if (typeof u == "number")
|
|
480
|
+
return f[s].length === u;
|
|
481
|
+
if (typeof u == "object") {
|
|
482
|
+
const h = Object.keys(u)[0], b = u[h];
|
|
483
483
|
if (h === "not")
|
|
484
484
|
return Number(f[s].length) !== Number(b);
|
|
485
485
|
if (h === "moreThan")
|
|
@@ -489,63 +489,63 @@ function ht(e = {}) {
|
|
|
489
489
|
}
|
|
490
490
|
return !1;
|
|
491
491
|
}
|
|
492
|
-
function n(s,
|
|
493
|
-
return f[s] && f[s].propertyValue && String(f[s].propertyValue.value) === String(
|
|
492
|
+
function n(s, p, u, f) {
|
|
493
|
+
return f[s] && f[s].propertyValue && String(f[s].propertyValue.value) === String(u);
|
|
494
494
|
}
|
|
495
495
|
const a = /* @__PURE__ */ new Map([
|
|
496
496
|
["length", t],
|
|
497
497
|
["getProperty", n]
|
|
498
498
|
]);
|
|
499
|
-
Object.keys(e).reduce((s,
|
|
500
|
-
function o(s,
|
|
501
|
-
const
|
|
502
|
-
return typeof
|
|
499
|
+
Object.keys(e).reduce((s, p) => (s.set(p, e[p]), s), a);
|
|
500
|
+
function o(s, p) {
|
|
501
|
+
const u = s;
|
|
502
|
+
return typeof p == "number" ? [{ target: u, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: u, operator: "getProperty", param: s, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
|
|
503
503
|
if (f === "length")
|
|
504
|
-
return { target:
|
|
505
|
-
const h = f, b =
|
|
506
|
-
return { target:
|
|
504
|
+
return { target: u, operator: "length", param: null, value: p[f] };
|
|
505
|
+
const h = f, b = p[f];
|
|
506
|
+
return { target: u, operator: "getProperty", param: h, value: b };
|
|
507
507
|
}) : [];
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
return Object.keys(s).reduce((
|
|
509
|
+
function r(s) {
|
|
510
|
+
return Object.keys(s).reduce((u, f) => {
|
|
511
511
|
const h = o(f, s[f]);
|
|
512
|
-
return
|
|
512
|
+
return u.push(...h), u;
|
|
513
513
|
}, []);
|
|
514
514
|
}
|
|
515
|
-
function c(s,
|
|
515
|
+
function c(s, p) {
|
|
516
516
|
if (a.has(s.operator)) {
|
|
517
|
-
const
|
|
518
|
-
return
|
|
517
|
+
const u = a.get(s.operator);
|
|
518
|
+
return u && u(s.target, s.param, s.value, p) || !1;
|
|
519
519
|
}
|
|
520
520
|
return !1;
|
|
521
521
|
}
|
|
522
|
-
function d(s,
|
|
523
|
-
return
|
|
522
|
+
function d(s, p) {
|
|
523
|
+
return r(s).reduce((h, b) => h && c(b, p), !0);
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
const
|
|
525
|
+
function v(s, p) {
|
|
526
|
+
const u = Object.keys(s), f = u.includes("allOf"), h = u.includes("anyOf"), b = f || h, w = (b ? s[b ? f ? "allOf" : "anyOf" : "allOf"] : [s]).map((R) => d(R, p));
|
|
527
527
|
return f ? !w.includes(!1) : w.includes(!0);
|
|
528
528
|
}
|
|
529
|
-
return { parseValueSchema:
|
|
529
|
+
return { parseValueSchema: v };
|
|
530
530
|
}
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
function K(e, t, n = /* @__PURE__ */ new Map(), a = (c, d,
|
|
534
|
-
return
|
|
535
|
-
const d =
|
|
536
|
-
return Object.assign(
|
|
531
|
+
const Mt = {}, xt = {};
|
|
532
|
+
It();
|
|
533
|
+
function K(e, t, n = /* @__PURE__ */ new Map(), a = (c, d, v) => d, o = {}, r = (c) => c) {
|
|
534
|
+
return Me[t.title] = t, xe[t.title] = a, Mt[t.title] = o, xt[t.title] = r, (c = {}) => {
|
|
535
|
+
const d = Ct(c, t, n), v = Object.keys(e).reduce((s, p) => (s[p] = e[p].default, s), {});
|
|
536
|
+
return Object.assign(v, d);
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
539
|
function ee(e, t) {
|
|
540
540
|
return { customClass: t.class, customStyle: t.style };
|
|
541
541
|
}
|
|
542
|
-
const
|
|
542
|
+
const Et = /* @__PURE__ */ new Map([
|
|
543
543
|
["appearance", ee]
|
|
544
544
|
]);
|
|
545
|
-
function
|
|
545
|
+
function Dt(e, t, n) {
|
|
546
546
|
return t;
|
|
547
547
|
}
|
|
548
|
-
const
|
|
548
|
+
const Bt = "capsule", Tt = "A Farris Component", Lt = "object", Rt = {
|
|
549
549
|
basic: {
|
|
550
550
|
description: "Basic Infomation",
|
|
551
551
|
title: "基本信息",
|
|
@@ -567,12 +567,12 @@ const St = "capsule", Ct = "A Farris Component", Mt = "object", It = {
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
},
|
|
571
|
-
title:
|
|
572
|
-
description:
|
|
573
|
-
type:
|
|
574
|
-
categories:
|
|
575
|
-
},
|
|
570
|
+
}, Ft = {
|
|
571
|
+
title: Bt,
|
|
572
|
+
description: Tt,
|
|
573
|
+
type: Lt,
|
|
574
|
+
categories: Rt
|
|
575
|
+
}, De = {
|
|
576
576
|
items: {
|
|
577
577
|
Type: Array,
|
|
578
578
|
default: [
|
|
@@ -585,7 +585,7 @@ const St = "capsule", Ct = "A Farris Component", Mt = "object", It = {
|
|
|
585
585
|
*/
|
|
586
586
|
modelValue: { type: String, default: "" },
|
|
587
587
|
type: { type: String, default: "primary" }
|
|
588
|
-
},
|
|
588
|
+
}, kt = {
|
|
589
589
|
name: { type: String, default: "" },
|
|
590
590
|
value: { type: String, default: "" },
|
|
591
591
|
isActive: { type: Boolean, default: !1 },
|
|
@@ -594,25 +594,25 @@ const St = "capsule", Ct = "A Farris Component", Mt = "object", It = {
|
|
|
594
594
|
show: { type: Boolean, default: !0 },
|
|
595
595
|
disabled: { type: Boolean, default: !1 }
|
|
596
596
|
};
|
|
597
|
-
K(
|
|
598
|
-
const
|
|
597
|
+
K(De, bt, Et, Dt, Ft);
|
|
598
|
+
const Wt = /* @__PURE__ */ U({
|
|
599
599
|
name: "FCapsuleItem",
|
|
600
|
-
props:
|
|
600
|
+
props: kt,
|
|
601
601
|
emits: ["mounted", "active"],
|
|
602
602
|
setup(e, t) {
|
|
603
603
|
const n = l(), a = l(e.isActive);
|
|
604
604
|
A(() => e.isActive, (c) => {
|
|
605
605
|
a.value = c;
|
|
606
606
|
});
|
|
607
|
-
const o =
|
|
607
|
+
const o = L(() => ({
|
|
608
608
|
"f-capsule-item": !0,
|
|
609
609
|
"f-capsule-active-item": a.value,
|
|
610
610
|
"f-capsule-disabled": e.disabled
|
|
611
611
|
}));
|
|
612
|
-
|
|
612
|
+
Q(() => {
|
|
613
613
|
t.emit("mounted", n, e.value);
|
|
614
614
|
});
|
|
615
|
-
function
|
|
615
|
+
function r(c) {
|
|
616
616
|
e.disabled || t.emit("active", c, {
|
|
617
617
|
name: e.name,
|
|
618
618
|
value: e.value
|
|
@@ -621,96 +621,96 @@ const Dt = /* @__PURE__ */ q({
|
|
|
621
621
|
return () => i("div", {
|
|
622
622
|
ref: n,
|
|
623
623
|
class: o.value,
|
|
624
|
-
onClick: (c) =>
|
|
624
|
+
onClick: (c) => r(c)
|
|
625
625
|
}, [e.icon && i("i", {
|
|
626
626
|
class: e.icon
|
|
627
627
|
}, null), e.name]);
|
|
628
628
|
}
|
|
629
|
-
}),
|
|
629
|
+
}), $t = /* @__PURE__ */ U({
|
|
630
630
|
name: "FCapsule",
|
|
631
|
-
props:
|
|
631
|
+
props: De,
|
|
632
632
|
emits: ["change", "update:modelValue"],
|
|
633
633
|
setup(e, t) {
|
|
634
|
-
const n = l(e.items), a = l(), o = 2,
|
|
635
|
-
const
|
|
634
|
+
const n = l(e.items), a = l(), o = 2, r = l(e.modelValue), c = l("none"), d = l(e.type), v = L(() => {
|
|
635
|
+
const g = {
|
|
636
636
|
"f-capsule-container": !0
|
|
637
637
|
};
|
|
638
|
-
return d.value && (
|
|
639
|
-
}), s =
|
|
638
|
+
return d.value && (g[d.value] = !0), g;
|
|
639
|
+
}), s = L(() => ({})), p = L(() => ({
|
|
640
640
|
"f-capsule": !0
|
|
641
|
-
})),
|
|
642
|
-
left: `${
|
|
641
|
+
})), u = l(o), f = l(0), h = l(0), b = L(() => ({
|
|
642
|
+
left: `${u.value}px`,
|
|
643
643
|
width: `${f.value}px`,
|
|
644
644
|
transition: c.value
|
|
645
|
-
})),
|
|
645
|
+
})), I = L(() => ({
|
|
646
646
|
width: `${h.value}px`
|
|
647
|
-
})),
|
|
648
|
-
function w(
|
|
647
|
+
})), y = /* @__PURE__ */ new Map();
|
|
648
|
+
function w(g) {
|
|
649
649
|
var m;
|
|
650
|
-
if (
|
|
651
|
-
const T = (m =
|
|
650
|
+
if (y.has(g.value)) {
|
|
651
|
+
const T = (m = y.get(g.value)) == null ? void 0 : m.value;
|
|
652
652
|
if (T) {
|
|
653
|
-
const O = T.getBoundingClientRect(),
|
|
654
|
-
|
|
653
|
+
const O = T.getBoundingClientRect(), P = a.value.getBoundingClientRect();
|
|
654
|
+
u.value = O.left - P.left + o + a.value.scrollLeft, f.value = O.width - 2 * o;
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
|
-
function F(
|
|
659
|
-
const T =
|
|
660
|
-
|
|
658
|
+
function F(g, m) {
|
|
659
|
+
const T = g.value;
|
|
660
|
+
r.value = T, t.emit("update:modelValue", T), w(g), m && t.emit("change", T);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
const m = n.value.findIndex((T) => T.value ===
|
|
662
|
+
function R(g) {
|
|
663
|
+
const m = n.value.findIndex((T) => T.value === g);
|
|
664
664
|
m > -1 && F(n.value[m], !1);
|
|
665
665
|
}
|
|
666
|
-
A(() => e.modelValue, (
|
|
667
|
-
|
|
668
|
-
}), A(() => e.items, async (
|
|
669
|
-
const m =
|
|
670
|
-
|
|
671
|
-
}),
|
|
672
|
-
|
|
666
|
+
A(() => e.modelValue, (g) => {
|
|
667
|
+
r.value = g, R(r.value);
|
|
668
|
+
}), A(() => e.items, async (g) => {
|
|
669
|
+
const m = g.filter((T) => T.show);
|
|
670
|
+
$(m), n.value = m, await fe(), R(r.value), h.value = Array.from(y.values()).reduce((T, O) => (T += O.value.clientWidth, T), 0);
|
|
671
|
+
}), Q(async () => {
|
|
672
|
+
R(r.value), await fe(), c.value = "0.1s ease-out all", h.value = Array.from(y.values()).reduce((g, m) => (g += m.value.clientWidth, g), 0);
|
|
673
673
|
});
|
|
674
|
-
function j(
|
|
674
|
+
function j(g, m) {
|
|
675
675
|
F(m, !0);
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
|
|
677
|
+
function B(g, m) {
|
|
678
|
+
y.set(m, g);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
Array.from(
|
|
682
|
-
|
|
680
|
+
function $(g) {
|
|
681
|
+
Array.from(y.keys()).forEach((m) => {
|
|
682
|
+
g.find((O) => O.value === m) || y.delete(m);
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return i(
|
|
687
|
-
name:
|
|
688
|
-
value:
|
|
689
|
-
isActive:
|
|
685
|
+
function S(g, m) {
|
|
686
|
+
return i(Wt, {
|
|
687
|
+
name: g.name,
|
|
688
|
+
value: g.value,
|
|
689
|
+
isActive: g.value === r.value,
|
|
690
690
|
index: m,
|
|
691
|
-
disabled:
|
|
692
|
-
key:
|
|
693
|
-
onMounted:
|
|
691
|
+
disabled: g.disabled,
|
|
692
|
+
key: g.value,
|
|
693
|
+
onMounted: B,
|
|
694
694
|
onActive: j
|
|
695
695
|
}, null);
|
|
696
696
|
}
|
|
697
697
|
return () => i("span", {
|
|
698
698
|
ref: a,
|
|
699
|
-
class:
|
|
699
|
+
class: v.value,
|
|
700
700
|
style: s.value
|
|
701
701
|
}, [i("span", {
|
|
702
702
|
class: "f-capsule-pane"
|
|
703
|
-
}, [n.value.map((
|
|
704
|
-
class:
|
|
703
|
+
}, [n.value.map((g, m) => S(g, m))]), i("small", {
|
|
704
|
+
class: p.value,
|
|
705
705
|
style: b.value
|
|
706
706
|
}, null), i("div", {
|
|
707
707
|
class: "f-capsule-board",
|
|
708
|
-
style:
|
|
708
|
+
style: I.value
|
|
709
709
|
}, null)]);
|
|
710
710
|
}
|
|
711
|
-
}),
|
|
711
|
+
}), Ot = /* @__PURE__ */ new Map([
|
|
712
712
|
["appearance", ee]
|
|
713
|
-
]),
|
|
713
|
+
]), At = "https://json-schema.org/draft/2020-12/schema", jt = "https://farris-design.gitee.io/switch.schema.json", Vt = "switch", zt = "A Farris Component", Ht = "object", Nt = {
|
|
714
714
|
id: {
|
|
715
715
|
description: "The unique identifier for a switch",
|
|
716
716
|
type: "string"
|
|
@@ -780,29 +780,29 @@ const Dt = /* @__PURE__ */ q({
|
|
|
780
780
|
size: {
|
|
781
781
|
description: "",
|
|
782
782
|
type: "enum",
|
|
783
|
-
default: "
|
|
783
|
+
default: "medium"
|
|
784
784
|
}
|
|
785
|
-
},
|
|
785
|
+
}, Pt = [
|
|
786
786
|
"id",
|
|
787
787
|
"type"
|
|
788
|
-
],
|
|
788
|
+
], Gt = [
|
|
789
789
|
"id",
|
|
790
790
|
"appearance",
|
|
791
791
|
"binding"
|
|
792
|
-
],
|
|
793
|
-
$schema:
|
|
794
|
-
$id:
|
|
795
|
-
title:
|
|
796
|
-
description:
|
|
797
|
-
type:
|
|
798
|
-
properties:
|
|
799
|
-
required:
|
|
800
|
-
ignore:
|
|
792
|
+
], qt = {
|
|
793
|
+
$schema: At,
|
|
794
|
+
$id: jt,
|
|
795
|
+
title: Vt,
|
|
796
|
+
description: zt,
|
|
797
|
+
type: Ht,
|
|
798
|
+
properties: Nt,
|
|
799
|
+
required: Pt,
|
|
800
|
+
ignore: Gt
|
|
801
801
|
};
|
|
802
|
-
function
|
|
802
|
+
function Ut(e, t, n) {
|
|
803
803
|
return t;
|
|
804
804
|
}
|
|
805
|
-
const
|
|
805
|
+
const Be = {
|
|
806
806
|
/** 组件值*/
|
|
807
807
|
modelValue: { type: Boolean, default: !1 },
|
|
808
808
|
/** 禁用 */
|
|
@@ -819,66 +819,66 @@ const xe = {
|
|
|
819
819
|
onModelValueChanged: { type: Function, default: () => {
|
|
820
820
|
} }
|
|
821
821
|
};
|
|
822
|
-
K(
|
|
823
|
-
const
|
|
822
|
+
K(Be, qt, Ot, Ut);
|
|
823
|
+
const Xt = /* @__PURE__ */ U({
|
|
824
824
|
name: "FSwitch",
|
|
825
|
-
props:
|
|
825
|
+
props: Be,
|
|
826
826
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
827
827
|
setup(e, t) {
|
|
828
828
|
const {
|
|
829
829
|
disabled: n,
|
|
830
830
|
size: a,
|
|
831
831
|
onLabel: o,
|
|
832
|
-
offLabel:
|
|
832
|
+
offLabel: r,
|
|
833
833
|
onBackground: c,
|
|
834
834
|
offBackground: d,
|
|
835
|
-
onColor:
|
|
835
|
+
onColor: v,
|
|
836
836
|
offColor: s
|
|
837
|
-
} =
|
|
837
|
+
} = Ke(e), p = l(e.modelValue), u = L(() => ({
|
|
838
838
|
switch: !0,
|
|
839
839
|
"f-cmp-switch": !0,
|
|
840
|
-
checked:
|
|
840
|
+
checked: p.value,
|
|
841
841
|
disabled: n.value,
|
|
842
842
|
"switch-large": a.value === "large",
|
|
843
843
|
"switch-medium": a.value === "medium",
|
|
844
844
|
"switch-small": a.value === "small"
|
|
845
|
-
})), f =
|
|
845
|
+
})), f = L(() => p.value ? {
|
|
846
846
|
outline: "none",
|
|
847
847
|
background: c.value
|
|
848
848
|
} : {
|
|
849
849
|
outline: "none",
|
|
850
850
|
backgroundColor: d.value
|
|
851
|
-
}), h =
|
|
852
|
-
background:
|
|
851
|
+
}), h = L(() => p.value ? {
|
|
852
|
+
background: v.value
|
|
853
853
|
} : {
|
|
854
854
|
backgroundColor: s.value
|
|
855
|
-
}), b =
|
|
856
|
-
function
|
|
857
|
-
n.value || (
|
|
858
|
-
}
|
|
859
|
-
return A(
|
|
860
|
-
|
|
861
|
-
}), A(() => e.modelValue, (
|
|
862
|
-
|
|
855
|
+
}), b = L(() => (o == null ? void 0 : o.value) || (r == null ? void 0 : r.value));
|
|
856
|
+
function I() {
|
|
857
|
+
n.value || (p.value = !p.value, t.emit("update:modelValue", p.value));
|
|
858
|
+
}
|
|
859
|
+
return A(p, (y, w) => {
|
|
860
|
+
y !== w && t.emit("modelValueChanged", y);
|
|
861
|
+
}), A(() => e.modelValue, (y, w) => {
|
|
862
|
+
y !== w && (p.value = y);
|
|
863
863
|
}), () => i("span", {
|
|
864
864
|
tabindex: "0",
|
|
865
865
|
role: "button",
|
|
866
|
-
class:
|
|
866
|
+
class: u.value,
|
|
867
867
|
style: f.value,
|
|
868
|
-
onClick:
|
|
868
|
+
onClick: I
|
|
869
869
|
}, [b.value && i("span", {
|
|
870
870
|
class: "switch-pane"
|
|
871
871
|
}, [i("span", {
|
|
872
872
|
class: "switch-label-checked"
|
|
873
873
|
}, [o == null ? void 0 : o.value]), i("span", {
|
|
874
874
|
class: "switch-label-unchecked"
|
|
875
|
-
}, [
|
|
875
|
+
}, [r == null ? void 0 : r.value])]), i("small", {
|
|
876
876
|
style: h.value
|
|
877
877
|
}, [t.slots.default && t.slots.default()])]);
|
|
878
878
|
}
|
|
879
|
-
}),
|
|
879
|
+
}), Yt = /* @__PURE__ */ U({
|
|
880
880
|
name: "FScreenResolutionSelector",
|
|
881
|
-
props:
|
|
881
|
+
props: dt,
|
|
882
882
|
emits: ["screenNameChanged", "currentScreenResolutionChanged", "switchInStandardModeChanged"],
|
|
883
883
|
setup(e, t) {
|
|
884
884
|
const n = l([{
|
|
@@ -901,25 +901,25 @@ const zt = /* @__PURE__ */ q({
|
|
|
901
901
|
code: "EL",
|
|
902
902
|
value: "EL",
|
|
903
903
|
active: !1
|
|
904
|
-
}]), a = l(e.defaultStates), o = l("MD"),
|
|
905
|
-
function d(
|
|
906
|
-
n.value.forEach((
|
|
907
|
-
|
|
904
|
+
}]), a = l(e.defaultStates), o = l("MD"), r = l("中等屏幕"), c = l(!0);
|
|
905
|
+
function d(p) {
|
|
906
|
+
n.value.forEach((u) => {
|
|
907
|
+
u.active = u.code === p, u.active && (o.value = u.code, r.value = u.name, t.emit("screenNameChanged", r.value), t.emit("currentScreenResolutionChanged", o.value));
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function v() {
|
|
911
911
|
t.emit("switchInStandardModeChanged", c.value);
|
|
912
912
|
}
|
|
913
913
|
A(c, () => {
|
|
914
|
-
}),
|
|
915
|
-
a.value.
|
|
914
|
+
}), ve(() => {
|
|
915
|
+
a.value.model === "standard" ? c.value = !0 : (c.value = !1, v());
|
|
916
916
|
});
|
|
917
917
|
function s() {
|
|
918
|
-
return i(
|
|
918
|
+
return i($t, {
|
|
919
919
|
class: "f-layout-editor-screen-resolution-selector-frame",
|
|
920
920
|
items: n.value,
|
|
921
921
|
modelValue: o.value,
|
|
922
|
-
"onUpdate:modelValue": (
|
|
922
|
+
"onUpdate:modelValue": (p) => o.value = p,
|
|
923
923
|
onChange: d
|
|
924
924
|
}, null);
|
|
925
925
|
}
|
|
@@ -929,20 +929,20 @@ const zt = /* @__PURE__ */ q({
|
|
|
929
929
|
class: "f-layout-editor-screen-resolution-selector-header"
|
|
930
930
|
}, [i("div", {
|
|
931
931
|
class: "f-layout-editor-screen-resolution-selector-form"
|
|
932
|
-
}, [
|
|
932
|
+
}, [q("表单布局配置")])]), s(), i("div", {
|
|
933
933
|
class: "f-layout-editor-screen-resolution-selector-switch"
|
|
934
|
-
}, [i(
|
|
934
|
+
}, [i(Xt, {
|
|
935
935
|
class: "f-layout-editor-show-switch",
|
|
936
936
|
modelValue: c.value,
|
|
937
|
-
"onUpdate:modelValue": (
|
|
938
|
-
onModelValueChanged:
|
|
937
|
+
"onUpdate:modelValue": (p) => c.value = p,
|
|
938
|
+
onModelValueChanged: v
|
|
939
939
|
}, null), c.value ? i("div", {
|
|
940
940
|
class: "f-layout-editor-show-switch-label"
|
|
941
|
-
}, [
|
|
941
|
+
}, [q("标准模式")]) : i("div", {
|
|
942
942
|
class: "f-layout-editor-show-switch-label"
|
|
943
|
-
}, [
|
|
943
|
+
}, [q("自定义模式")])])]);
|
|
944
944
|
}
|
|
945
|
-
}),
|
|
945
|
+
}), Jt = {
|
|
946
946
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
947
947
|
currentScreenResolution: { type: String, default: "" },
|
|
948
948
|
/** 模式开关 */
|
|
@@ -951,21 +951,21 @@ const zt = /* @__PURE__ */ q({
|
|
|
951
951
|
currentArea: { type: Object, default: [] },
|
|
952
952
|
/** 接受组件列表区传入的二维数组 */
|
|
953
953
|
twoDimensionalArray: { type: Array, default: [] }
|
|
954
|
-
},
|
|
954
|
+
}, Qt = {
|
|
955
955
|
/** 单个组件的预览状态 */
|
|
956
956
|
item: { type: Object, default: {} },
|
|
957
957
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
958
958
|
currentScreenResolution: { type: String, default: "" },
|
|
959
959
|
/** 接受switch状态,若为自定义模式,则需要改变Col-num的num来源;*/
|
|
960
960
|
switchInStandardMode: { type: Boolean, default: !1 }
|
|
961
|
-
},
|
|
961
|
+
}, Zt = /* @__PURE__ */ U({
|
|
962
962
|
name: "FColumnWidthView",
|
|
963
|
-
props:
|
|
963
|
+
props: Qt,
|
|
964
964
|
emits: [],
|
|
965
965
|
setup(e, t) {
|
|
966
|
-
const n = l(e.item), a = l(e.currentScreenResolution), o =
|
|
967
|
-
return A([() => e.item, () => e.currentScreenResolution], ([
|
|
968
|
-
|
|
966
|
+
const n = l(e.item), a = l(e.currentScreenResolution), o = L(() => `col-${n.value[`columnIn${a.value}`]}`);
|
|
967
|
+
return A([() => e.item, () => e.currentScreenResolution], ([r, c], [d, v]) => {
|
|
968
|
+
r !== d && (n.value = r), c !== v && (a.value = c);
|
|
969
969
|
}), () => i("div", {
|
|
970
970
|
class: o.value
|
|
971
971
|
}, [i("div", {
|
|
@@ -975,72 +975,72 @@ const zt = /* @__PURE__ */ q({
|
|
|
975
975
|
class: "f-layout-editor-column-width-view-label"
|
|
976
976
|
}, [n.value.label])])]);
|
|
977
977
|
}
|
|
978
|
-
}),
|
|
978
|
+
}), _t = /* @__PURE__ */ U({
|
|
979
979
|
name: "FPreview",
|
|
980
|
-
props:
|
|
980
|
+
props: Jt,
|
|
981
981
|
emits: ["update:twoDimensionalArray"],
|
|
982
982
|
setup(e, t) {
|
|
983
|
-
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.currentArea),
|
|
984
|
-
A([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([
|
|
985
|
-
|
|
983
|
+
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.currentArea), r = l(e.twoDimensionalArray), c = l([]);
|
|
984
|
+
A([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([u, f, h], [b, I, y]) => {
|
|
985
|
+
u !== b && (o.value = u), f !== I && (a.value = f), h !== y && (n.value = h);
|
|
986
986
|
}), A(() => e.twoDimensionalArray, () => {
|
|
987
|
-
|
|
988
|
-
}),
|
|
987
|
+
r.value = e.twoDimensionalArray, d();
|
|
988
|
+
}), Q(() => {
|
|
989
989
|
d();
|
|
990
990
|
});
|
|
991
991
|
function d() {
|
|
992
|
-
c.value =
|
|
992
|
+
c.value = X(r.value), c.value = v();
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
const
|
|
994
|
+
function v() {
|
|
995
|
+
const u = [];
|
|
996
996
|
let f = 1;
|
|
997
997
|
return c.value.forEach((h) => {
|
|
998
998
|
const b = s(h, f);
|
|
999
|
-
f += b.length,
|
|
1000
|
-
}),
|
|
999
|
+
f += b.length, u.push(b);
|
|
1000
|
+
}), u;
|
|
1001
1001
|
}
|
|
1002
|
-
function s(
|
|
1002
|
+
function s(u, f) {
|
|
1003
1003
|
const h = [];
|
|
1004
1004
|
let b = [];
|
|
1005
|
-
return
|
|
1006
|
-
f !==
|
|
1005
|
+
return u.forEach((I) => {
|
|
1006
|
+
f !== I.componentRow && (f += 1, h.push(b), b = []), b.push(I);
|
|
1007
1007
|
}), h.push(b), h;
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function p() {
|
|
1010
1010
|
if (a.value)
|
|
1011
1011
|
return "";
|
|
1012
|
-
const
|
|
1012
|
+
const u = Array.from({
|
|
1013
1013
|
length: 12
|
|
1014
1014
|
}, () => i("div", {
|
|
1015
1015
|
class: "col-1"
|
|
1016
1016
|
}, [i("div", {
|
|
1017
1017
|
class: "f-layout-editor-preview-customize-single-background"
|
|
1018
|
-
}, [
|
|
1018
|
+
}, [q(" ")])]));
|
|
1019
1019
|
return i("div", {
|
|
1020
1020
|
class: "f-layout-editor-preview-customize-whole-background"
|
|
1021
|
-
}, [
|
|
1021
|
+
}, [u]);
|
|
1022
1022
|
}
|
|
1023
1023
|
return () => i("div", {
|
|
1024
1024
|
class: "f-layout-editor-preview f-utils-fill-flex-column"
|
|
1025
1025
|
}, [i("div", {
|
|
1026
1026
|
class: "f-layout-editor-preview-header"
|
|
1027
|
-
}, [
|
|
1027
|
+
}, [q("预览区")]), p(), i("div", {
|
|
1028
1028
|
class: "f-layout-editor-preview-view f-utils-overflow-xhya"
|
|
1029
1029
|
}, [i("div", {
|
|
1030
1030
|
class: "f-layout-editor-preview-row-group"
|
|
1031
|
-
}, [c.value.map((
|
|
1031
|
+
}, [c.value.map((u) => {
|
|
1032
1032
|
var f, h;
|
|
1033
|
-
return ((f =
|
|
1033
|
+
return ((f = u[0][0]) == null ? void 0 : f.group.toString()) === ((h = o.value[0]) == null ? void 0 : h.id) && u.map((b) => i("div", {
|
|
1034
1034
|
class: "f-layout-editor-row"
|
|
1035
|
-
}, [b.map((
|
|
1036
|
-
item:
|
|
1037
|
-
"onUpdate:item": (
|
|
1035
|
+
}, [b.map((I) => i(Zt, {
|
|
1036
|
+
item: I,
|
|
1037
|
+
"onUpdate:item": (y) => I = y,
|
|
1038
1038
|
currentScreenResolution: n.value,
|
|
1039
1039
|
switchInStandardMode: a.value
|
|
1040
1040
|
}, null))]));
|
|
1041
1041
|
})])])]);
|
|
1042
1042
|
}
|
|
1043
|
-
}),
|
|
1043
|
+
}), Kt = {
|
|
1044
1044
|
/** 用户切换屏幕分辨率-缩写-例:MD; */
|
|
1045
1045
|
currentScreenResolution: { type: String, default: "" },
|
|
1046
1046
|
/** 检测用户是否切换模式 */
|
|
@@ -1058,52 +1058,52 @@ const zt = /* @__PURE__ */ q({
|
|
|
1058
1058
|
onOriginalDataChanged: { type: Function, default: () => {
|
|
1059
1059
|
} }
|
|
1060
1060
|
};
|
|
1061
|
-
function
|
|
1061
|
+
function en(e, t) {
|
|
1062
1062
|
const n = l(-1), a = l(!1);
|
|
1063
|
-
function o(
|
|
1064
|
-
if (
|
|
1065
|
-
const f =
|
|
1066
|
-
|
|
1063
|
+
function o(u) {
|
|
1064
|
+
if (u.target.offsetParent) {
|
|
1065
|
+
const f = u.target.offsetParent, h = f.offsetWidth - u.target.offsetWidth / 2 - 4, b = f.offsetHeight / 2;
|
|
1066
|
+
u.dataTransfer && u.dataTransfer.setDragImage(f, h, b);
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
|
-
function u
|
|
1070
|
-
if (
|
|
1071
|
-
const f = e.value.findIndex((h) => h.label ===
|
|
1069
|
+
function r(u) {
|
|
1070
|
+
if (u) {
|
|
1071
|
+
const f = e.value.findIndex((h) => h.label === u.label);
|
|
1072
1072
|
setTimeout(() => {
|
|
1073
|
-
n.value = f, a.value = !0,
|
|
1073
|
+
n.value = f, a.value = !0, u.moving = !0;
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
function c(
|
|
1078
|
-
|
|
1077
|
+
function c(u, f) {
|
|
1078
|
+
u.stopPropagation(), o(u), r(f);
|
|
1079
1079
|
}
|
|
1080
|
-
function d(
|
|
1081
|
-
const f = e.value.findIndex((h) => h.label ===
|
|
1080
|
+
function d(u) {
|
|
1081
|
+
const f = e.value.findIndex((h) => h.label === u.label);
|
|
1082
1082
|
if (n.value !== f) {
|
|
1083
1083
|
const h = e.value[n.value], b = e.value;
|
|
1084
1084
|
b.splice(n.value, 1), b.splice(f, 0, h), n.value = f, t && t();
|
|
1085
1085
|
}
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1088
|
-
|
|
1087
|
+
function v(u, f) {
|
|
1088
|
+
u.preventDefault(), d(f);
|
|
1089
1089
|
}
|
|
1090
|
-
function s(
|
|
1091
|
-
|
|
1090
|
+
function s(u) {
|
|
1091
|
+
u.preventDefault(), u.dataTransfer && (u.dataTransfer.dropEffect = "move");
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function p(u, f) {
|
|
1094
1094
|
f && (f.moving = !1), a.value = !1;
|
|
1095
1095
|
}
|
|
1096
1096
|
return {
|
|
1097
1097
|
dragstart: c,
|
|
1098
|
-
dragenter:
|
|
1098
|
+
dragenter: v,
|
|
1099
1099
|
dragover: s,
|
|
1100
|
-
dragend:
|
|
1100
|
+
dragend: p,
|
|
1101
1101
|
isDragging: a
|
|
1102
1102
|
};
|
|
1103
1103
|
}
|
|
1104
|
-
const
|
|
1104
|
+
const tn = /* @__PURE__ */ new Map([
|
|
1105
1105
|
["appearance", ee]
|
|
1106
|
-
]),
|
|
1106
|
+
]), nn = "https://json-schema.org/draft/2020-12/schema", an = "https://farris-design.gitee.io/combo-list.schema.json", ln = "combo-list", on = "A Farris Input Component", un = "object", sn = {
|
|
1107
1107
|
id: {
|
|
1108
1108
|
description: "The unique identifier for a combo list",
|
|
1109
1109
|
type: "string"
|
|
@@ -1219,27 +1219,27 @@ const Yt = /* @__PURE__ */ new Map([
|
|
|
1219
1219
|
type: "sting",
|
|
1220
1220
|
default: ""
|
|
1221
1221
|
}
|
|
1222
|
-
},
|
|
1222
|
+
}, rn = [
|
|
1223
1223
|
"id",
|
|
1224
1224
|
"type"
|
|
1225
|
-
],
|
|
1225
|
+
], cn = [
|
|
1226
1226
|
"id",
|
|
1227
1227
|
"appearance",
|
|
1228
1228
|
"binding"
|
|
1229
|
-
],
|
|
1230
|
-
$schema:
|
|
1231
|
-
$id:
|
|
1232
|
-
title:
|
|
1233
|
-
description:
|
|
1234
|
-
type:
|
|
1235
|
-
properties:
|
|
1236
|
-
required:
|
|
1237
|
-
ignore:
|
|
1229
|
+
], dn = {
|
|
1230
|
+
$schema: nn,
|
|
1231
|
+
$id: an,
|
|
1232
|
+
title: ln,
|
|
1233
|
+
description: on,
|
|
1234
|
+
type: un,
|
|
1235
|
+
properties: sn,
|
|
1236
|
+
required: rn,
|
|
1237
|
+
ignore: cn
|
|
1238
1238
|
};
|
|
1239
|
-
function
|
|
1239
|
+
function fn(e, t, n) {
|
|
1240
1240
|
return t;
|
|
1241
1241
|
}
|
|
1242
|
-
const
|
|
1242
|
+
const Te = {
|
|
1243
1243
|
/**
|
|
1244
1244
|
* 组件标识
|
|
1245
1245
|
*/
|
|
@@ -1406,8 +1406,8 @@ const Ee = {
|
|
|
1406
1406
|
// 搜索启用高亮
|
|
1407
1407
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1408
1408
|
};
|
|
1409
|
-
K(
|
|
1410
|
-
const
|
|
1409
|
+
K(Te, dn, tn, fn);
|
|
1410
|
+
const vn = {
|
|
1411
1411
|
dataSource: { type: Array, default: [] },
|
|
1412
1412
|
enableSearch: { type: Boolean, default: !1 },
|
|
1413
1413
|
idField: { type: String, default: "id" },
|
|
@@ -1427,15 +1427,13 @@ const on = {
|
|
|
1427
1427
|
default: !1
|
|
1428
1428
|
},
|
|
1429
1429
|
// 搜索启用高亮
|
|
1430
|
-
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1431
|
-
|
|
1432
|
-
showCheckbox: { type: Boolean, default: !1 }
|
|
1433
|
-
}, un = /* @__PURE__ */ q({
|
|
1430
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1431
|
+
}, pn = /* @__PURE__ */ U({
|
|
1434
1432
|
name: "FComboListContainer",
|
|
1435
|
-
props:
|
|
1433
|
+
props: vn,
|
|
1436
1434
|
emits: ["selectionChange"],
|
|
1437
1435
|
setup(e, t) {
|
|
1438
|
-
const n = l(), a = l(e.dataSource), o = l([]),
|
|
1436
|
+
const n = l(), a = l(e.dataSource), o = l([]), r = l(e.separator), c = l(e.width), d = l(e.maxHeight), v = l(String(e.selectedValues).split(r.value)), s = L(() => e.multiSelect), p = L(() => ({
|
|
1439
1437
|
enableSelectRow: !0,
|
|
1440
1438
|
multiSelect: e.multiSelect,
|
|
1441
1439
|
multiSelectMode: "OnCheckAndClick",
|
|
@@ -1446,133 +1444,133 @@ const on = {
|
|
|
1446
1444
|
A(e.dataSource, () => {
|
|
1447
1445
|
a.value = e.dataSource;
|
|
1448
1446
|
});
|
|
1449
|
-
const
|
|
1450
|
-
const
|
|
1451
|
-
return c.value !== void 0 && (
|
|
1447
|
+
const u = L(() => e.enableSearch ? "SearchBar" : "ContentHeader"), f = L(() => {
|
|
1448
|
+
const I = {};
|
|
1449
|
+
return c.value !== void 0 && (I.width = `${c.value}px`), d.value !== void 0 && d.value > 0 && (I.maxHeight = `${d.value}px`), I;
|
|
1452
1450
|
});
|
|
1453
|
-
function h(
|
|
1454
|
-
o.value =
|
|
1451
|
+
function h(I) {
|
|
1452
|
+
o.value = I.map((y) => Object.assign({}, y)), v.value = I.map((y) => y[e.idField]), t.emit("selectionChange", o.value);
|
|
1455
1453
|
}
|
|
1456
|
-
function b(
|
|
1454
|
+
function b(I) {
|
|
1457
1455
|
if (e.enableHighlightSearch)
|
|
1458
1456
|
return;
|
|
1459
|
-
let
|
|
1460
|
-
typeof e.searchOption == "function" ?
|
|
1457
|
+
let y = [];
|
|
1458
|
+
typeof e.searchOption == "function" ? y = a.value.filter((w) => e.searchOption(I, w)) : y = a.value.filter((w) => w[e.valueField].indexOf(I) > -1 || w[e.textField].indexOf(I) > -1), n.value.updateDataSource(y);
|
|
1461
1459
|
}
|
|
1462
|
-
return A([() => e.selectedValues], ([
|
|
1463
|
-
|
|
1460
|
+
return A([() => e.selectedValues], ([I]) => {
|
|
1461
|
+
v.value = I.split(r.value);
|
|
1464
1462
|
}), () => i("div", {
|
|
1465
1463
|
class: "f-combo-list-container pl-1",
|
|
1466
1464
|
style: f.value
|
|
1467
|
-
}, [i(
|
|
1465
|
+
}, [i(ut, {
|
|
1468
1466
|
ref: n,
|
|
1469
1467
|
size: "small",
|
|
1470
1468
|
itemClass: "f-combo-list-item",
|
|
1471
|
-
header:
|
|
1469
|
+
header: u.value,
|
|
1472
1470
|
headerClass: "f-combo-list-search-box",
|
|
1473
1471
|
data: a.value,
|
|
1474
1472
|
idField: e.idField,
|
|
1475
1473
|
textField: e.textField,
|
|
1476
1474
|
titleField: e.titleField,
|
|
1477
1475
|
multiSelect: e.multiSelect,
|
|
1478
|
-
selection:
|
|
1476
|
+
selection: p.value,
|
|
1479
1477
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1480
|
-
selectionValues:
|
|
1478
|
+
selectionValues: v.value,
|
|
1481
1479
|
onSelectionChange: h,
|
|
1482
1480
|
onAfterSearch: b
|
|
1483
1481
|
}, null)]);
|
|
1484
1482
|
}
|
|
1485
1483
|
});
|
|
1486
|
-
function
|
|
1484
|
+
function mn(e) {
|
|
1487
1485
|
const t = l(""), n = l(e.modelValue), a = l(e.data || []), o = l(e.editable);
|
|
1488
|
-
function u
|
|
1489
|
-
const f = String(
|
|
1490
|
-
return a.value.filter((
|
|
1491
|
-
const F = f.indexOf(
|
|
1492
|
-
return F -
|
|
1486
|
+
function r(u) {
|
|
1487
|
+
const f = String(u).split(e.separator), h = f.map((y) => [y, !0]), b = new Map(h);
|
|
1488
|
+
return a.value.filter((y) => b.has(String(y[e.valueField]))).sort((y, w) => {
|
|
1489
|
+
const F = f.indexOf(y[e.valueField]), R = f.indexOf(w[e.valueField]);
|
|
1490
|
+
return F - R;
|
|
1493
1491
|
});
|
|
1494
1492
|
}
|
|
1495
|
-
function c(
|
|
1496
|
-
const f = u
|
|
1497
|
-
t.value = o.value ? f ||
|
|
1493
|
+
function c(u) {
|
|
1494
|
+
const f = r(u).map((h) => h[e.textField]).join(e.separator);
|
|
1495
|
+
t.value = o.value ? f || u : f;
|
|
1498
1496
|
}
|
|
1499
|
-
function d(
|
|
1500
|
-
const f =
|
|
1497
|
+
function d(u) {
|
|
1498
|
+
const f = u.split(e.separator).map((b) => [b, !0]), h = new Map(f);
|
|
1501
1499
|
return a.value.filter((b) => h.has(b[e.textField]));
|
|
1502
1500
|
}
|
|
1503
|
-
function
|
|
1501
|
+
function v(u) {
|
|
1504
1502
|
const f = {};
|
|
1505
|
-
return f[e.idField] =
|
|
1503
|
+
return f[e.idField] = u, f[e.textField] = u, [f];
|
|
1506
1504
|
}
|
|
1507
|
-
function s(
|
|
1508
|
-
let f = d(
|
|
1505
|
+
function s(u) {
|
|
1506
|
+
let f = d(u);
|
|
1509
1507
|
const h = f && f.length > 0;
|
|
1510
|
-
return o.value && !h && (f =
|
|
1508
|
+
return o.value && !h && (f = v(u)), f;
|
|
1511
1509
|
}
|
|
1512
|
-
function
|
|
1513
|
-
const { url:
|
|
1514
|
-
let
|
|
1515
|
-
fetch(
|
|
1516
|
-
var
|
|
1510
|
+
function p() {
|
|
1511
|
+
const { url: u, method: f = "GET", headers: h = {}, body: b = null } = e.remote, I = f.toLowerCase() == "get" ? { method: f, headers: h } : { method: f, headers: h, body: b };
|
|
1512
|
+
let y = !1;
|
|
1513
|
+
fetch(u, I).then((w) => {
|
|
1514
|
+
var R, j;
|
|
1517
1515
|
if (w.status === 200)
|
|
1518
|
-
return
|
|
1516
|
+
return y = !!((j = (R = w.headers) == null ? void 0 : R.get("content-type")) != null && j.includes("application/json")), y ? w.text() : w.json();
|
|
1519
1517
|
throw new Error(w.statusText);
|
|
1520
1518
|
}).then((w) => {
|
|
1521
|
-
a.value =
|
|
1519
|
+
a.value = y ? JSON.parse(w) : w;
|
|
1522
1520
|
}).catch((w) => {
|
|
1523
1521
|
console.error(w);
|
|
1524
1522
|
});
|
|
1525
1523
|
}
|
|
1526
|
-
return e.remote &&
|
|
1524
|
+
return e.remote && p(), A(() => e.data, () => {
|
|
1527
1525
|
a.value = e.data;
|
|
1528
|
-
}), A([a], ([
|
|
1529
|
-
if (e.modelValue) {
|
|
1530
|
-
const f =
|
|
1526
|
+
}), A([a], ([u]) => {
|
|
1527
|
+
if (e.modelValue != null) {
|
|
1528
|
+
const f = u.find((h) => h[e.valueField] === e.modelValue);
|
|
1531
1529
|
f && (t.value = f[e.textField]);
|
|
1532
1530
|
}
|
|
1533
|
-
}), A(() => e.modelValue, (
|
|
1534
|
-
n.value =
|
|
1535
|
-
}), c(e.modelValue), { dataSource: a, displayText: t, editable: o, modelValue: n, getItemsByDisplayText: d, getItemsByValue:
|
|
1531
|
+
}), A(() => e.modelValue, (u) => {
|
|
1532
|
+
n.value = u, c(u);
|
|
1533
|
+
}), c(e.modelValue), { dataSource: a, displayText: t, editable: o, modelValue: n, getItemsByDisplayText: d, getItemsByValue: r, getSelectedItemsByDisplayText: s };
|
|
1536
1534
|
}
|
|
1537
|
-
const
|
|
1535
|
+
const hn = /* @__PURE__ */ U({
|
|
1538
1536
|
name: "FComboList",
|
|
1539
|
-
props:
|
|
1537
|
+
props: Te,
|
|
1540
1538
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1541
1539
|
setup(e, t) {
|
|
1542
|
-
const n = l(), a = l(e.disabled), o = l(e.enableClear),
|
|
1540
|
+
const n = l(), a = l(e.disabled), o = l(e.enableClear), r = l(e.enableSearch), c = l(e.readonly), {
|
|
1543
1541
|
dataSource: d,
|
|
1544
|
-
displayText:
|
|
1542
|
+
displayText: v,
|
|
1545
1543
|
editable: s,
|
|
1546
|
-
modelValue:
|
|
1547
|
-
getSelectedItemsByDisplayText:
|
|
1548
|
-
} =
|
|
1544
|
+
modelValue: p,
|
|
1545
|
+
getSelectedItemsByDisplayText: u
|
|
1546
|
+
} = mn(e), f = L(() => e.multiSelect), h = L(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1549
1547
|
function b() {
|
|
1550
1548
|
!f.value && n.value && n.value.hidePopup();
|
|
1551
1549
|
}
|
|
1552
|
-
function
|
|
1553
|
-
|
|
1550
|
+
function I(B) {
|
|
1551
|
+
v.value = B.map(($) => $[e.textField]).join(e.separator), B.length === 1 ? p.value = B[0][e.valueField] : p.value = B.map(($) => $[e.valueField]).join(e.separator), t.emit("update:modelValue", p.value), t.emit("change", B, p.value), b();
|
|
1554
1552
|
}
|
|
1555
|
-
function
|
|
1553
|
+
function y() {
|
|
1556
1554
|
c.value || n.value.togglePopup();
|
|
1557
1555
|
}
|
|
1558
|
-
function w(
|
|
1559
|
-
|
|
1556
|
+
function w(B) {
|
|
1557
|
+
p.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1560
1558
|
}
|
|
1561
|
-
function F(
|
|
1562
|
-
const
|
|
1563
|
-
|
|
1559
|
+
function F(B) {
|
|
1560
|
+
const $ = u(B);
|
|
1561
|
+
I($);
|
|
1564
1562
|
}
|
|
1565
|
-
function
|
|
1566
|
-
return
|
|
1563
|
+
function R() {
|
|
1564
|
+
return v.value;
|
|
1567
1565
|
}
|
|
1568
|
-
function j(
|
|
1569
|
-
t.emit("input",
|
|
1566
|
+
function j(B) {
|
|
1567
|
+
t.emit("input", B);
|
|
1570
1568
|
}
|
|
1571
1569
|
return t.expose({
|
|
1572
|
-
getDisplayText:
|
|
1573
|
-
}), A([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([
|
|
1574
|
-
a.value =
|
|
1575
|
-
}), () => i(
|
|
1570
|
+
getDisplayText: R
|
|
1571
|
+
}), A([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([B, $, S, g, m]) => {
|
|
1572
|
+
a.value = B, s.value = $, o.value = S, r.value = g, c.value = m;
|
|
1573
|
+
}), () => i(st, {
|
|
1576
1574
|
ref: n,
|
|
1577
1575
|
id: e.id,
|
|
1578
1576
|
disable: a.value,
|
|
@@ -1587,33 +1585,33 @@ const rn = /* @__PURE__ */ q({
|
|
|
1587
1585
|
enableTitle: e.enableTitle,
|
|
1588
1586
|
multiSelect: e.multiSelect,
|
|
1589
1587
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1590
|
-
modelValue:
|
|
1591
|
-
"onUpdate:modelValue": (
|
|
1588
|
+
modelValue: v.value,
|
|
1589
|
+
"onUpdate:modelValue": (B) => v.value = B,
|
|
1592
1590
|
focusOnCreated: e.focusOnCreated,
|
|
1593
1591
|
selectOnCreated: e.selectOnCreated,
|
|
1594
1592
|
onClear: w,
|
|
1595
|
-
onClick:
|
|
1593
|
+
onClick: y,
|
|
1596
1594
|
onChange: F,
|
|
1597
1595
|
onInput: j,
|
|
1598
1596
|
beforeOpen: e.beforeOpen
|
|
1599
1597
|
}, {
|
|
1600
|
-
default: () => [i(
|
|
1598
|
+
default: () => [i(pn, {
|
|
1601
1599
|
idField: e.idField,
|
|
1602
1600
|
valueField: e.valueField,
|
|
1603
1601
|
textField: e.textField,
|
|
1604
1602
|
titleField: e.titleField,
|
|
1605
1603
|
dataSource: d.value,
|
|
1606
|
-
selectedValues:
|
|
1604
|
+
selectedValues: p.value,
|
|
1607
1605
|
multiSelect: e.multiSelect,
|
|
1608
|
-
enableSearch:
|
|
1606
|
+
enableSearch: r.value,
|
|
1609
1607
|
maxHeight: e.maxHeight,
|
|
1610
1608
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1611
1609
|
width: e.fitEditor ? h.value : void 0,
|
|
1612
|
-
onSelectionChange:
|
|
1610
|
+
onSelectionChange: I
|
|
1613
1611
|
}, null)]
|
|
1614
1612
|
});
|
|
1615
1613
|
}
|
|
1616
|
-
}),
|
|
1614
|
+
}), yn = {
|
|
1617
1615
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
1618
1616
|
currentScreenResolution: { type: String, default: "" },
|
|
1619
1617
|
/** 传入的单个控件的响应式列宽值 */
|
|
@@ -1623,13 +1621,13 @@ const rn = /* @__PURE__ */ q({
|
|
|
1623
1621
|
/** 列数值变化事件 */
|
|
1624
1622
|
fieldChanged: { type: Function, default: () => {
|
|
1625
1623
|
} }
|
|
1626
|
-
},
|
|
1624
|
+
}, gn = /* @__PURE__ */ new Map([
|
|
1627
1625
|
["appearance", ee]
|
|
1628
1626
|
]);
|
|
1629
|
-
function
|
|
1627
|
+
function bn(e, t, n) {
|
|
1630
1628
|
return t;
|
|
1631
1629
|
}
|
|
1632
|
-
const
|
|
1630
|
+
const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-design.gitee.io/radio-button.schema.json", Cn = "radio-button", In = "A Farris Component", Mn = "object", xn = {
|
|
1633
1631
|
id: {
|
|
1634
1632
|
description: "The unique identifier for radio-button",
|
|
1635
1633
|
type: "string"
|
|
@@ -1691,18 +1689,18 @@ const pn = "https://json-schema.org/draft/2020-12/schema", vn = "https://farris-
|
|
|
1691
1689
|
type: "boolean",
|
|
1692
1690
|
default: !0
|
|
1693
1691
|
}
|
|
1694
|
-
},
|
|
1692
|
+
}, En = [
|
|
1695
1693
|
"id",
|
|
1696
1694
|
"type"
|
|
1697
|
-
],
|
|
1698
|
-
$schema:
|
|
1699
|
-
$id:
|
|
1700
|
-
title:
|
|
1701
|
-
description:
|
|
1702
|
-
type:
|
|
1703
|
-
properties:
|
|
1704
|
-
required:
|
|
1705
|
-
},
|
|
1695
|
+
], Dn = {
|
|
1696
|
+
$schema: wn,
|
|
1697
|
+
$id: Sn,
|
|
1698
|
+
title: Cn,
|
|
1699
|
+
description: In,
|
|
1700
|
+
type: Mn,
|
|
1701
|
+
properties: xn,
|
|
1702
|
+
required: En
|
|
1703
|
+
}, Bn = "radio-button", Tn = "A Farris Component", Ln = "object", Rn = {
|
|
1706
1704
|
basic: {
|
|
1707
1705
|
description: "Basic Infomation",
|
|
1708
1706
|
title: "基本信息",
|
|
@@ -1724,12 +1722,12 @@ const pn = "https://json-schema.org/draft/2020-12/schema", vn = "https://farris-
|
|
|
1724
1722
|
}
|
|
1725
1723
|
}
|
|
1726
1724
|
}
|
|
1727
|
-
},
|
|
1728
|
-
title:
|
|
1729
|
-
description:
|
|
1730
|
-
type:
|
|
1731
|
-
categories:
|
|
1732
|
-
},
|
|
1725
|
+
}, Fn = {
|
|
1726
|
+
title: Bn,
|
|
1727
|
+
description: Tn,
|
|
1728
|
+
type: Ln,
|
|
1729
|
+
categories: Rn
|
|
1730
|
+
}, Le = {
|
|
1733
1731
|
/**
|
|
1734
1732
|
* 单选组枚举数组
|
|
1735
1733
|
*/
|
|
@@ -1744,45 +1742,45 @@ const pn = "https://json-schema.org/draft/2020-12/schema", vn = "https://farris-
|
|
|
1744
1742
|
onSelectedValueChanged: { type: Function, default: () => {
|
|
1745
1743
|
} }
|
|
1746
1744
|
};
|
|
1747
|
-
K(
|
|
1748
|
-
const
|
|
1745
|
+
K(Le, Dn, gn, bn, Fn);
|
|
1746
|
+
const kn = /* @__PURE__ */ U({
|
|
1749
1747
|
name: "FRadioButton",
|
|
1750
|
-
props:
|
|
1748
|
+
props: Le,
|
|
1751
1749
|
emits: ["selectedValueChanged"],
|
|
1752
1750
|
setup(e, t) {
|
|
1753
1751
|
const n = l(e.enumData);
|
|
1754
|
-
function a(
|
|
1755
|
-
if (
|
|
1752
|
+
function a(r, c) {
|
|
1753
|
+
if (r.currentTarget.classList.value = "btn btn-secondary active", r.currentTarget.tagName.toLowerCase() === "label") {
|
|
1756
1754
|
const {
|
|
1757
1755
|
currentTarget: d
|
|
1758
|
-
} =
|
|
1759
|
-
Array.from(
|
|
1756
|
+
} = r, v = d.parentElement;
|
|
1757
|
+
Array.from(v.querySelectorAll("label")).filter((p) => p !== d).forEach((p) => p.classList.remove("active"));
|
|
1760
1758
|
}
|
|
1761
1759
|
t.emit("selectedValueChanged", c);
|
|
1762
1760
|
}
|
|
1763
|
-
function o(
|
|
1764
|
-
return `${
|
|
1761
|
+
function o(r) {
|
|
1762
|
+
return `${r.text}${e.suffixValue}`;
|
|
1765
1763
|
}
|
|
1766
|
-
return A(() => e.enumData, (
|
|
1767
|
-
|
|
1764
|
+
return A(() => e.enumData, (r, c) => {
|
|
1765
|
+
r !== c && (n.value = e.enumData);
|
|
1768
1766
|
}), () => i("div", {
|
|
1769
1767
|
class: "f-radio-button"
|
|
1770
1768
|
}, [i("div", {
|
|
1771
1769
|
class: ["farris-input-wrap"]
|
|
1772
|
-
}, [n.value.map((
|
|
1773
|
-
class:
|
|
1774
|
-
onClick: (d) => a(d,
|
|
1770
|
+
}, [n.value.map((r, c) => i(ue, null, [i("label", {
|
|
1771
|
+
class: r.active ? "btn btn-secondary active" : "btn btn-secondary",
|
|
1772
|
+
onClick: (d) => a(d, r)
|
|
1775
1773
|
}, [i("span", {
|
|
1776
1774
|
class: "f-radio-button-text"
|
|
1777
|
-
}, [o(
|
|
1775
|
+
}, [o(r)])])]))])]);
|
|
1778
1776
|
}
|
|
1779
|
-
}),
|
|
1777
|
+
}), Wn = /* @__PURE__ */ new Map([
|
|
1780
1778
|
["appearance", ee]
|
|
1781
1779
|
]);
|
|
1782
|
-
function
|
|
1780
|
+
function $n(e, t, n) {
|
|
1783
1781
|
return t;
|
|
1784
1782
|
}
|
|
1785
|
-
const
|
|
1783
|
+
const On = "https://json-schema.org/draft/2020-12/schema", An = "https://farris-design.gitee.io/rate.schema.json", jn = "rate", Vn = "A Farris Component", zn = "object", Hn = {
|
|
1786
1784
|
id: {
|
|
1787
1785
|
description: "The unique identifier for rate",
|
|
1788
1786
|
type: "string"
|
|
@@ -1844,23 +1842,23 @@ const Tn = "https://json-schema.org/draft/2020-12/schema", Ln = "https://farris-
|
|
|
1844
1842
|
type: "boolean",
|
|
1845
1843
|
default: !0
|
|
1846
1844
|
}
|
|
1847
|
-
},
|
|
1845
|
+
}, Nn = [
|
|
1848
1846
|
"id",
|
|
1849
1847
|
"type"
|
|
1850
|
-
],
|
|
1848
|
+
], Pn = [
|
|
1851
1849
|
"id",
|
|
1852
1850
|
"appearance",
|
|
1853
1851
|
"binding"
|
|
1854
|
-
],
|
|
1855
|
-
$schema:
|
|
1856
|
-
$id:
|
|
1857
|
-
title:
|
|
1858
|
-
description:
|
|
1859
|
-
type:
|
|
1860
|
-
properties:
|
|
1861
|
-
required:
|
|
1862
|
-
ignore:
|
|
1863
|
-
},
|
|
1852
|
+
], Gn = {
|
|
1853
|
+
$schema: On,
|
|
1854
|
+
$id: An,
|
|
1855
|
+
title: jn,
|
|
1856
|
+
description: Vn,
|
|
1857
|
+
type: zn,
|
|
1858
|
+
properties: Hn,
|
|
1859
|
+
required: Nn,
|
|
1860
|
+
ignore: Pn
|
|
1861
|
+
}, qn = "rate", Un = "A Farris Component", Xn = "object", Yn = {
|
|
1864
1862
|
basic: {
|
|
1865
1863
|
description: "Basic Infomation",
|
|
1866
1864
|
title: "基本信息",
|
|
@@ -1882,12 +1880,12 @@ const Tn = "https://json-schema.org/draft/2020-12/schema", Ln = "https://farris-
|
|
|
1882
1880
|
}
|
|
1883
1881
|
}
|
|
1884
1882
|
}
|
|
1885
|
-
},
|
|
1886
|
-
title:
|
|
1887
|
-
description:
|
|
1888
|
-
type:
|
|
1889
|
-
categories:
|
|
1890
|
-
},
|
|
1883
|
+
}, Jn = {
|
|
1884
|
+
title: qn,
|
|
1885
|
+
description: Un,
|
|
1886
|
+
type: Xn,
|
|
1887
|
+
categories: Yn
|
|
1888
|
+
}, Qn = ["很不满意", "不满意", "一般", "满意", "非常满意"], Re = {
|
|
1891
1889
|
/** 星星大小 */
|
|
1892
1890
|
size: { type: String, default: "large" },
|
|
1893
1891
|
/** 启用半颗星模式 */
|
|
@@ -1909,7 +1907,7 @@ const Tn = "https://json-schema.org/draft/2020-12/schema", Ln = "https://farris-
|
|
|
1909
1907
|
/** 禁用单个星星的文字提示 */
|
|
1910
1908
|
toolTipDisabled: { type: Boolean, default: !0 },
|
|
1911
1909
|
/** 默认的满意度文案 */
|
|
1912
|
-
toolTipContents: { type: Array, default:
|
|
1910
|
+
toolTipContents: { type: Array, default: Qn },
|
|
1913
1911
|
/** 启用评分 */
|
|
1914
1912
|
enableScore: { type: Boolean, default: !0 },
|
|
1915
1913
|
/** 启用满意度 */
|
|
@@ -1920,82 +1918,82 @@ const Tn = "https://json-schema.org/draft/2020-12/schema", Ln = "https://farris-
|
|
|
1920
1918
|
value: { type: Number, default: 0 },
|
|
1921
1919
|
modelValue: { type: Number, default: 0 }
|
|
1922
1920
|
};
|
|
1923
|
-
K(
|
|
1924
|
-
const
|
|
1921
|
+
K(Re, Gn, Wn, $n, Jn);
|
|
1922
|
+
const Zn = /* @__PURE__ */ U({
|
|
1925
1923
|
name: "FRate",
|
|
1926
|
-
props:
|
|
1924
|
+
props: Re,
|
|
1927
1925
|
emits: ["selectedValue", "update:modelValue"],
|
|
1928
1926
|
setup(e, t) {
|
|
1929
|
-
const n = l(e.size), a = l(e.enableHalf), o = l(e.enableClear),
|
|
1930
|
-
let
|
|
1931
|
-
const
|
|
1932
|
-
let j = 1,
|
|
1933
|
-
const
|
|
1934
|
-
|
|
1927
|
+
const n = l(e.size), a = l(e.enableHalf), o = l(e.enableClear), r = l(e.disabled), c = l(e.pointSystem), d = l(e.lightColor), v = l(e.darkColor), s = l(e.iconClass), p = l(e.numOfStar), u = l(e.toolTipDisabled), f = l(e.toolTipContents), h = l(e.enableScore), b = l(e.enableSatisfaction);
|
|
1928
|
+
let I;
|
|
1929
|
+
const y = l(0), w = l(0), F = l(0), R = l(e.modelValue);
|
|
1930
|
+
let j = 1, B, $, S;
|
|
1931
|
+
const g = 4;
|
|
1932
|
+
Q(() => {
|
|
1935
1933
|
});
|
|
1936
1934
|
function m() {
|
|
1937
|
-
const E =
|
|
1938
|
-
|
|
1939
|
-
for (let
|
|
1940
|
-
|
|
1941
|
-
id:
|
|
1935
|
+
const E = p.value;
|
|
1936
|
+
S = [];
|
|
1937
|
+
for (let W = 1; W <= E; W++)
|
|
1938
|
+
S.push({
|
|
1939
|
+
id: W
|
|
1942
1940
|
});
|
|
1943
1941
|
}
|
|
1944
1942
|
function T() {
|
|
1945
1943
|
let E;
|
|
1946
|
-
a.value ? E = Math.ceil(
|
|
1944
|
+
a.value ? E = Math.ceil(R.value / j) : E = R.value, w.value = (I * R.value + Math.floor(R.value) * g) / j, B = f.value[E - 1];
|
|
1947
1945
|
}
|
|
1948
1946
|
function O() {
|
|
1949
1947
|
switch (n.value) {
|
|
1950
1948
|
case "small":
|
|
1951
|
-
|
|
1949
|
+
I = 14;
|
|
1952
1950
|
break;
|
|
1953
1951
|
case "middle":
|
|
1954
|
-
|
|
1952
|
+
I = 16;
|
|
1955
1953
|
break;
|
|
1956
1954
|
case "large":
|
|
1957
|
-
|
|
1955
|
+
I = 18;
|
|
1958
1956
|
break;
|
|
1959
1957
|
case "extraLarge":
|
|
1960
|
-
|
|
1958
|
+
I = 24;
|
|
1961
1959
|
break;
|
|
1962
1960
|
}
|
|
1963
|
-
m(),
|
|
1961
|
+
m(), p.value && (j = c.value / p.value), R.value && T();
|
|
1964
1962
|
}
|
|
1965
1963
|
O();
|
|
1966
|
-
function
|
|
1964
|
+
function P(E) {
|
|
1967
1965
|
return E.className.indexOf("f-icon") !== -1;
|
|
1968
1966
|
}
|
|
1969
|
-
function
|
|
1970
|
-
return
|
|
1967
|
+
function Y() {
|
|
1968
|
+
return y.value === w.value && o.value && w.value !== 0 ? (w.value = 0, R.value = 0, $ = null, y.value = 0, F.value = 0, t.emit("selectedValue", R.value), t.emit("update:modelValue", R.value), !0) : !1;
|
|
1971
1969
|
}
|
|
1972
|
-
function D(E,
|
|
1970
|
+
function D(E, W, H) {
|
|
1973
1971
|
if (E.movementX || E.movementY) {
|
|
1974
|
-
if (
|
|
1972
|
+
if (r.value)
|
|
1975
1973
|
return;
|
|
1976
|
-
b.value && (
|
|
1974
|
+
b.value && (B = f.value[W - 1]), E.offsetX < I / 2 && a.value === !0 ? (y.value = I * W - I / 2 + g * (W - 1), F.value = j * W - j / 2) : (y.value = I * W + g * (W - 1), F.value = j * W);
|
|
1977
1975
|
}
|
|
1978
|
-
if (
|
|
1979
|
-
if (
|
|
1976
|
+
if (H === !0) {
|
|
1977
|
+
if (Y())
|
|
1980
1978
|
return;
|
|
1981
|
-
|
|
1979
|
+
R.value = F.value, w.value = y.value, $ = B, t.emit("update:modelValue", R.value), t.emit("selectedValue", R.value);
|
|
1982
1980
|
}
|
|
1983
1981
|
}
|
|
1984
|
-
function k(E,
|
|
1985
|
-
var
|
|
1986
|
-
if (
|
|
1987
|
-
const te = parseInt((
|
|
1988
|
-
D(E, te,
|
|
1982
|
+
function k(E, W) {
|
|
1983
|
+
var H;
|
|
1984
|
+
if (P(E.target) && E.target) {
|
|
1985
|
+
const te = parseInt((H = E.target) == null ? void 0 : H.id);
|
|
1986
|
+
D(E, te, W);
|
|
1989
1987
|
}
|
|
1990
1988
|
}
|
|
1991
|
-
const z =
|
|
1992
|
-
width: (
|
|
1989
|
+
const z = L(() => F.value ? F.value + "分" : R.value + "分"), M = L(() => ({
|
|
1990
|
+
width: (y.value || w.value) + "px"
|
|
1993
1991
|
}));
|
|
1994
1992
|
function x() {
|
|
1995
|
-
|
|
1993
|
+
y.value = 0;
|
|
1996
1994
|
}
|
|
1997
1995
|
return A(() => e.modelValue, (E) => {
|
|
1998
|
-
|
|
1996
|
+
R.value = E, T();
|
|
1999
1997
|
}), () => i("div", {
|
|
2000
1998
|
class: "farris-star-rating",
|
|
2001
1999
|
onMouseover: le((E) => k(E, !1), ["prevent"]),
|
|
@@ -2005,7 +2003,7 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2005
2003
|
}, [i("div", {
|
|
2006
2004
|
class: "star-light-area",
|
|
2007
2005
|
style: M.value
|
|
2008
|
-
}, [
|
|
2006
|
+
}, [S.map((E) => i("span", {
|
|
2009
2007
|
class: ["f-icon default-light-color ", s.value, {
|
|
2010
2008
|
"f-star-sm": n.value === "small"
|
|
2011
2009
|
}, {
|
|
@@ -2015,7 +2013,7 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2015
2013
|
}, {
|
|
2016
2014
|
"f-star-exlarge": n.value === "extraLarge"
|
|
2017
2015
|
}, {
|
|
2018
|
-
disabled:
|
|
2016
|
+
disabled: u.value
|
|
2019
2017
|
}],
|
|
2020
2018
|
id: E.id,
|
|
2021
2019
|
style: {
|
|
@@ -2029,7 +2027,7 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2029
2027
|
}, {
|
|
2030
2028
|
large: n.value === "large"
|
|
2031
2029
|
}]
|
|
2032
|
-
}, [
|
|
2030
|
+
}, [S.map((E) => i("span", {
|
|
2033
2031
|
class: ["f-icon default-dark-color", s.value, {
|
|
2034
2032
|
"f-star-sm": n.value === "small"
|
|
2035
2033
|
}, {
|
|
@@ -2041,7 +2039,7 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2041
2039
|
}],
|
|
2042
2040
|
id: E.id,
|
|
2043
2041
|
style: {
|
|
2044
|
-
color:
|
|
2042
|
+
color: v.value
|
|
2045
2043
|
}
|
|
2046
2044
|
}, null))]), i("div", {
|
|
2047
2045
|
class: ["f-utils-fill", {
|
|
@@ -2053,11 +2051,11 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2053
2051
|
}, {
|
|
2054
2052
|
"font-exlarge": n.value === "extraLarge"
|
|
2055
2053
|
}]
|
|
2056
|
-
}, [h.value && i("span", null, [
|
|
2054
|
+
}, [h.value && i("span", null, [q(" "), z.value, q(" ")]), b.value && ($ || B) && i("span", null, [q(" "), B || $])])]);
|
|
2057
2055
|
}
|
|
2058
|
-
}),
|
|
2056
|
+
}), _n = /* @__PURE__ */ U({
|
|
2059
2057
|
name: "FColumnWidthEditor",
|
|
2060
|
-
props:
|
|
2058
|
+
props: yn,
|
|
2061
2059
|
emits: ["fieldChanged"],
|
|
2062
2060
|
setup(e, t) {
|
|
2063
2061
|
const n = {
|
|
@@ -2065,30 +2063,30 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2065
2063
|
MD: ["1", "2"],
|
|
2066
2064
|
LG: ["1", "2", "3", "4"],
|
|
2067
2065
|
EL: ["1", "2", "3", "4", "5", "6"]
|
|
2068
|
-
}, a = l(e.currentScreenResolution), o = l(e.field),
|
|
2066
|
+
}, a = l(e.currentScreenResolution), o = l(e.field), r = l(e.switchInStandardMode), c = l(), d = l(""), v = l(), s = l("customize"), p = l(), u = Se("ResponseLayoutEditorDraggableComposition"), {
|
|
2069
2067
|
dragstart: f,
|
|
2070
2068
|
dragenter: h,
|
|
2071
2069
|
dragover: b,
|
|
2072
|
-
dragend:
|
|
2073
|
-
} =
|
|
2074
|
-
function
|
|
2075
|
-
c.value = n == null ? void 0 : n[a.value],
|
|
2070
|
+
dragend: I
|
|
2071
|
+
} = u;
|
|
2072
|
+
function y() {
|
|
2073
|
+
c.value = n == null ? void 0 : n[a.value], r.value ? (d.value = `displayWidthIn${a.value}`, s.value = `${o.value[d.value]}`) : (d.value = `columnIn${a.value}`, p.value = o.value[d.value]);
|
|
2076
2074
|
}
|
|
2077
2075
|
function w(m) {
|
|
2078
|
-
if (
|
|
2076
|
+
if (r.value === !0) {
|
|
2079
2077
|
const T = Number(m == null ? void 0 : m.text);
|
|
2080
|
-
|
|
2078
|
+
v.value = T;
|
|
2081
2079
|
const O = o.value[`columnIn${a.value}`] / o.value[`displayWidthIn${a.value}`];
|
|
2082
2080
|
o.value[`columnIn${a.value}`] = T * O, o.value[`displayWidthIn${a.value}`] = Number(T), t.emit("fieldChanged", o.value);
|
|
2083
2081
|
}
|
|
2084
2082
|
}
|
|
2085
2083
|
function F(m) {
|
|
2086
|
-
|
|
2084
|
+
p.value = m;
|
|
2087
2085
|
const T = o.value[`columnIn${a.value}`] / o.value[`displayWidthIn${a.value}`];
|
|
2088
|
-
o.value[`columnIn${a.value}`] =
|
|
2086
|
+
o.value[`columnIn${a.value}`] = p.value, o.value[`displayWidthIn${a.value}`] = p.value / T, t.emit("fieldChanged", o.value);
|
|
2089
2087
|
}
|
|
2090
|
-
function
|
|
2091
|
-
return i(
|
|
2088
|
+
function R() {
|
|
2089
|
+
return i(Zn, {
|
|
2092
2090
|
enableHalf: !0,
|
|
2093
2091
|
size: "extraLarge",
|
|
2094
2092
|
pointSystem: 12,
|
|
@@ -2096,10 +2094,10 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2096
2094
|
lightColor: "#5D89FE",
|
|
2097
2095
|
darkColor: "#e7e9f3",
|
|
2098
2096
|
iconClass: "f-icon-column-rectangle",
|
|
2099
|
-
modelValue:
|
|
2100
|
-
"onUpdate:modelValue": (m) =>
|
|
2097
|
+
modelValue: p.value,
|
|
2098
|
+
"onUpdate:modelValue": (m) => p.value = m,
|
|
2101
2099
|
enableScore: !1,
|
|
2102
|
-
onSelectedValue: () => F(
|
|
2100
|
+
onSelectedValue: () => F(p.value)
|
|
2103
2101
|
}, null);
|
|
2104
2102
|
}
|
|
2105
2103
|
function j() {
|
|
@@ -2107,24 +2105,24 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2107
2105
|
c.value = n == null ? void 0 : n[a.value];
|
|
2108
2106
|
const T = o.value[`displayWidthIn${a.value}`];
|
|
2109
2107
|
return c.value.forEach((O) => {
|
|
2110
|
-
const
|
|
2108
|
+
const P = {
|
|
2111
2109
|
text: O,
|
|
2112
2110
|
active: T.toString() === O
|
|
2113
2111
|
};
|
|
2114
|
-
m.push(
|
|
2112
|
+
m.push(P);
|
|
2115
2113
|
}), m;
|
|
2116
2114
|
}
|
|
2117
|
-
function
|
|
2115
|
+
function B() {
|
|
2118
2116
|
const m = j();
|
|
2119
|
-
return i(
|
|
2117
|
+
return i(kn, {
|
|
2120
2118
|
enumData: m,
|
|
2121
2119
|
suffixValue: "列",
|
|
2122
2120
|
onSelectedValueChanged: w
|
|
2123
2121
|
}, {
|
|
2124
|
-
default: () => [
|
|
2122
|
+
default: () => [q(" ")]
|
|
2125
2123
|
});
|
|
2126
2124
|
}
|
|
2127
|
-
function
|
|
2125
|
+
function $() {
|
|
2128
2126
|
var m;
|
|
2129
2127
|
if (((m = o == null ? void 0 : o.value) == null ? void 0 : m.showTopBorder) === 1)
|
|
2130
2128
|
return i("div", {
|
|
@@ -2133,134 +2131,134 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2133
2131
|
class: "f-layout-editor-column-width-editor-row-left"
|
|
2134
2132
|
}, null), i("span", {
|
|
2135
2133
|
class: "f-layout-editor-column-width-editor-row-middle"
|
|
2136
|
-
}, [
|
|
2134
|
+
}, [q("第"), o.value.componentRow, q("行")]), i("span", {
|
|
2137
2135
|
class: "f-layout-editor-column-width-editor-row-right"
|
|
2138
2136
|
}, null)]);
|
|
2139
2137
|
}
|
|
2140
|
-
function
|
|
2141
|
-
return
|
|
2138
|
+
function S() {
|
|
2139
|
+
return r.value ? i("div", {
|
|
2142
2140
|
class: "f-column-width-editor-switch-standard"
|
|
2143
2141
|
}, [i("div", {
|
|
2144
2142
|
class: "f-layout-editor-column-width-editor-click-button"
|
|
2145
|
-
}, [
|
|
2143
|
+
}, [B()])]) : i("div", {
|
|
2146
2144
|
class: "f-column-width-editor-switch-customize",
|
|
2147
2145
|
onDragenter: (m) => h(m, o.value),
|
|
2148
|
-
onDragend: (m) =>
|
|
2146
|
+
onDragend: (m) => I(m, o.value),
|
|
2149
2147
|
onDragover: (m) => b(m)
|
|
2150
2148
|
}, [i("div", {
|
|
2151
2149
|
class: "f-layout-editor-column-width-editor-rectangle"
|
|
2152
|
-
}, [
|
|
2150
|
+
}, [R(), i("div", {
|
|
2153
2151
|
class: "f-layout-editor-rate-show-column"
|
|
2154
|
-
}, [
|
|
2152
|
+
}, [p.value, q("列")]), i("span", {
|
|
2155
2153
|
class: "f-layout-editor-drag-handler f-icon f-icon-drag-vertical",
|
|
2156
2154
|
draggable: "true",
|
|
2157
2155
|
onDragstart: (m) => f(m, o.value)
|
|
2158
2156
|
}, null)])]);
|
|
2159
2157
|
}
|
|
2160
|
-
function
|
|
2158
|
+
function g() {
|
|
2161
2159
|
var m;
|
|
2162
2160
|
return i("div", {
|
|
2163
2161
|
class: "f-layout-editor-column-width-editor-component"
|
|
2164
2162
|
}, [i("div", {
|
|
2165
2163
|
class: "f-layout-editor-column-width-editor-label"
|
|
2166
|
-
}, [(m = o == null ? void 0 : o.value) == null ? void 0 : m.label]),
|
|
2164
|
+
}, [(m = o == null ? void 0 : o.value) == null ? void 0 : m.label]), S()]);
|
|
2167
2165
|
}
|
|
2168
|
-
return A(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([m, T, O], [
|
|
2169
|
-
O !== D && (a.value = O, c.value = n[a.value],
|
|
2170
|
-
}),
|
|
2171
|
-
|
|
2166
|
+
return A(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([m, T, O], [P, Y, D]) => {
|
|
2167
|
+
O !== D && (a.value = O, c.value = n[a.value], y()), T !== Y && (r.value = T), r.value === !1 && y(), m !== P && (o.value = m);
|
|
2168
|
+
}), Q(() => {
|
|
2169
|
+
y();
|
|
2172
2170
|
}), () => i("div", {
|
|
2173
2171
|
class: "f-layout-editor-column-width-editor"
|
|
2174
|
-
}, [
|
|
2172
|
+
}, [$(), g()]);
|
|
2175
2173
|
}
|
|
2176
|
-
}),
|
|
2174
|
+
}), Kn = /* @__PURE__ */ U({
|
|
2177
2175
|
name: "FFieldList",
|
|
2178
|
-
props:
|
|
2176
|
+
props: Kt,
|
|
2179
2177
|
emits: ["update:currentArea", "twoDimensionalArrayChanged", "originalDataChanged"],
|
|
2180
2178
|
setup(e, t) {
|
|
2181
|
-
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.originalData),
|
|
2182
|
-
function
|
|
2179
|
+
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.originalData), r = l(e.originalDataCopy), c = l(e.defaultStates), d = l(""), v = l([]), s = l(e.currentArea), p = l(0), u = l(), f = l(0), h = l("1"), b = l([]);
|
|
2180
|
+
function I() {
|
|
2183
2181
|
var k;
|
|
2184
|
-
let D =
|
|
2182
|
+
let D = y();
|
|
2185
2183
|
for (let z = 0; z < D.length; z++) {
|
|
2186
2184
|
const M = {
|
|
2187
2185
|
id: (k = D[z]) == null ? void 0 : k.toString(),
|
|
2188
2186
|
label: "区域" + D[z]
|
|
2189
2187
|
};
|
|
2190
|
-
|
|
2188
|
+
v.value.push(M);
|
|
2191
2189
|
}
|
|
2192
2190
|
w();
|
|
2193
2191
|
}
|
|
2194
|
-
function
|
|
2192
|
+
function y() {
|
|
2195
2193
|
let D = [];
|
|
2196
2194
|
return o.value.forEach((k) => {
|
|
2197
2195
|
D.indexOf(k.group) === -1 && D.push(k.group);
|
|
2198
2196
|
}), D;
|
|
2199
2197
|
}
|
|
2200
2198
|
function w() {
|
|
2201
|
-
h.value = c.value.defaultGroupNumber.toString(), d.value = `区域${h.value}`, s.value = [
|
|
2199
|
+
h.value = c.value.defaultGroupNumber.toString(), d.value = `区域${h.value}`, s.value = [v.value[Number(h.value) - 1]], t.emit("update:currentArea", s.value);
|
|
2202
2200
|
}
|
|
2203
2201
|
function F() {
|
|
2204
2202
|
let D = [];
|
|
2205
|
-
|
|
2203
|
+
u.value = [];
|
|
2206
2204
|
let k = 1;
|
|
2207
2205
|
o.value.forEach((z) => {
|
|
2208
|
-
z.group === k || (k += 1,
|
|
2209
|
-
}),
|
|
2206
|
+
z.group === k || (k += 1, u.value.push(D), D = []), D.push(z);
|
|
2207
|
+
}), u.value.push(D);
|
|
2210
2208
|
}
|
|
2211
|
-
function
|
|
2212
|
-
|
|
2209
|
+
function R() {
|
|
2210
|
+
u.value[s.value[0].id - 1] = X(b.value);
|
|
2213
2211
|
let D = [];
|
|
2214
|
-
f.value = 0,
|
|
2215
|
-
let z =
|
|
2212
|
+
f.value = 0, u.value.forEach((k) => {
|
|
2213
|
+
let z = B(k, f.value);
|
|
2216
2214
|
D.push(z), f.value = z[z.length - 1].componentRow;
|
|
2217
|
-
}),
|
|
2215
|
+
}), $(D);
|
|
2218
2216
|
}
|
|
2219
2217
|
function j() {
|
|
2220
2218
|
F();
|
|
2221
2219
|
let D = [];
|
|
2222
|
-
return f.value = 0,
|
|
2223
|
-
let z =
|
|
2220
|
+
return f.value = 0, u.value.forEach((k) => {
|
|
2221
|
+
let z = B(k, f.value);
|
|
2224
2222
|
D.push(z), f.value = z[z.length - 1].componentRow;
|
|
2225
|
-
}), t.emit("twoDimensionalArrayChanged",
|
|
2223
|
+
}), t.emit("twoDimensionalArrayChanged", u.value), $(D), o.value;
|
|
2226
2224
|
}
|
|
2227
|
-
function
|
|
2225
|
+
function B(D, k) {
|
|
2228
2226
|
let M = 12;
|
|
2229
|
-
return
|
|
2227
|
+
return p.value = 1 + k, D.forEach((x) => {
|
|
2230
2228
|
x.showTopBorder = 0;
|
|
2231
2229
|
let E = x[`columnIn${n.value}`];
|
|
2232
|
-
M >= E ? (x.componentRow =
|
|
2230
|
+
M >= E ? (x.componentRow = p.value, M -= E) : (p.value += 1, x.componentRow = p.value, M = 12 - E, x.showTopBorder = 1);
|
|
2233
2231
|
}), D[0].showTopBorder = 1, D;
|
|
2234
2232
|
}
|
|
2235
|
-
function
|
|
2233
|
+
function $(D) {
|
|
2236
2234
|
let k = [];
|
|
2237
2235
|
for (let z of D)
|
|
2238
2236
|
k = k.concat(z);
|
|
2239
|
-
o.value =
|
|
2237
|
+
o.value = X(k), f.value = 0;
|
|
2240
2238
|
}
|
|
2241
|
-
function
|
|
2239
|
+
function S() {
|
|
2242
2240
|
return i("div", {
|
|
2243
2241
|
class: "f-layout-editor-field-list-top"
|
|
2244
2242
|
}, [i("div", {
|
|
2245
2243
|
class: "f-layout-editor-field-list-header"
|
|
2246
|
-
}, [
|
|
2244
|
+
}, [q("组件列表")]), i("div", {
|
|
2247
2245
|
class: "f-layout-editor-choose-group"
|
|
2248
|
-
}, [i(
|
|
2246
|
+
}, [i(hn, {
|
|
2249
2247
|
modelValue: h.value,
|
|
2250
2248
|
"onUpdate:modelValue": (D) => h.value = D,
|
|
2251
2249
|
placeholder: "当前可编辑组",
|
|
2252
2250
|
enableClear: !1,
|
|
2253
2251
|
"id-field": "id",
|
|
2254
2252
|
"text-field": "label",
|
|
2255
|
-
data:
|
|
2253
|
+
data: v.value,
|
|
2256
2254
|
editable: !1,
|
|
2257
|
-
onChange:
|
|
2255
|
+
onChange: P
|
|
2258
2256
|
}, null)])]);
|
|
2259
2257
|
}
|
|
2260
|
-
function
|
|
2258
|
+
function g() {
|
|
2261
2259
|
return i("div", {
|
|
2262
2260
|
class: "f-layout-editor-field-list-content f-utils-overflow-xhya"
|
|
2263
|
-
}, [b.value.map((D) => i(
|
|
2261
|
+
}, [b.value.map((D) => i(_n, {
|
|
2264
2262
|
key: D.label,
|
|
2265
2263
|
currentScreenResolution: n.value,
|
|
2266
2264
|
field: D,
|
|
@@ -2273,7 +2271,7 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2273
2271
|
function m(D) {
|
|
2274
2272
|
b.value.forEach((k) => {
|
|
2275
2273
|
k.label == D.label && Object.assign(k, D);
|
|
2276
|
-
}),
|
|
2274
|
+
}), R(), O(), T();
|
|
2277
2275
|
}
|
|
2278
2276
|
function T() {
|
|
2279
2277
|
b.value = [], o.value.forEach((D) => {
|
|
@@ -2281,108 +2279,108 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2281
2279
|
});
|
|
2282
2280
|
}
|
|
2283
2281
|
function O() {
|
|
2284
|
-
o.value =
|
|
2282
|
+
o.value = X(j()), t.emit("originalDataChanged", o.value);
|
|
2285
2283
|
}
|
|
2286
|
-
function
|
|
2284
|
+
function P(D) {
|
|
2287
2285
|
for (let k = 0; k < D.length; k++)
|
|
2288
2286
|
s.value = [{
|
|
2289
2287
|
id: D[k].id,
|
|
2290
2288
|
label: D[k].label
|
|
2291
2289
|
}];
|
|
2292
|
-
t.emit("update:currentArea", s.value), T(),
|
|
2290
|
+
t.emit("update:currentArea", s.value), T(), R();
|
|
2293
2291
|
}
|
|
2294
|
-
const
|
|
2295
|
-
|
|
2292
|
+
const Y = en(b, () => {
|
|
2293
|
+
R(), O(), T();
|
|
2296
2294
|
});
|
|
2297
|
-
return
|
|
2295
|
+
return et("ResponseLayoutEditorDraggableComposition", Y), A(() => e.currentArea, (D, k) => {
|
|
2298
2296
|
D !== k && (s.value = e.currentArea, T());
|
|
2299
2297
|
}), A(s, (D, k) => {
|
|
2300
2298
|
D !== k && T();
|
|
2301
2299
|
}), A(() => e.currentGroup, (D, k) => {
|
|
2302
2300
|
D !== k && (d.value = e.currentGroup);
|
|
2303
2301
|
}), A(() => e.currentScreenResolution, (D, k) => {
|
|
2304
|
-
D !== k && (n.value = e.currentScreenResolution, O(), F(), s.value[0] && (b.value =
|
|
2302
|
+
D !== k && (n.value = e.currentScreenResolution, O(), F(), s.value[0] && (b.value = X(u.value[Number(s.value[0].id) - 1])));
|
|
2305
2303
|
}), A(() => e.switchInStandardMode, (D, k) => {
|
|
2306
|
-
D !== k && (a.value = e.switchInStandardMode, o.value =
|
|
2304
|
+
D !== k && (a.value = e.switchInStandardMode, o.value = X(r.value));
|
|
2307
2305
|
}), A(c, (D, k) => {
|
|
2308
2306
|
D !== k && O();
|
|
2309
|
-
}),
|
|
2310
|
-
|
|
2307
|
+
}), ve(() => {
|
|
2308
|
+
I(), j(), T();
|
|
2311
2309
|
}), () => i("div", {
|
|
2312
2310
|
class: "f-layout-editor-field-list f-utils-fill-flex-column"
|
|
2313
2311
|
}, [a.value ? (
|
|
2314
2312
|
/* 标准模式 */
|
|
2315
2313
|
i("div", {
|
|
2316
2314
|
class: "f-layout-editor-field-list-standard f-utils-fill-flex-column"
|
|
2317
|
-
}, [
|
|
2315
|
+
}, [S(), g()])
|
|
2318
2316
|
) : (
|
|
2319
2317
|
/* 自定义模式 */
|
|
2320
2318
|
i("div", {
|
|
2321
2319
|
class: "f-layout-editor-field-list-customize f-utils-fill-flex-column"
|
|
2322
|
-
}, [
|
|
2320
|
+
}, [S(), g()])
|
|
2323
2321
|
)]);
|
|
2324
2322
|
}
|
|
2325
|
-
}), ie = /* @__PURE__ */
|
|
2323
|
+
}), ie = /* @__PURE__ */ U({
|
|
2326
2324
|
name: "FResponseLayoutEditor",
|
|
2327
|
-
props:
|
|
2325
|
+
props: ct,
|
|
2328
2326
|
emits: ["close", "submit"],
|
|
2329
2327
|
setup(e, t) {
|
|
2330
|
-
const n = l(e.initialState), a = l(), o = l(),
|
|
2328
|
+
const n = l(e.initialState), a = l(), o = l(), r = l(""), c = l(""), d = l(!0), v = l([{
|
|
2331
2329
|
id: "1",
|
|
2332
2330
|
label: "区域1"
|
|
2333
|
-
}]), s = l([]),
|
|
2331
|
+
}]), s = l([]), p = l(), u = l(e.width), f = l(e.height);
|
|
2334
2332
|
A(() => e.initialState, (m) => {
|
|
2335
2333
|
n.value = m;
|
|
2336
|
-
}), A([() => e.currentArea, () => e.switchInStandardMode], ([m, T], [O,
|
|
2337
|
-
m !== O && (
|
|
2334
|
+
}), A([() => e.currentArea, () => e.switchInStandardMode], ([m, T], [O, P]) => {
|
|
2335
|
+
m !== O && (v.value = m), T !== P && (d.value = T);
|
|
2338
2336
|
});
|
|
2339
2337
|
function h(m) {
|
|
2340
|
-
|
|
2338
|
+
r.value = m;
|
|
2341
2339
|
}
|
|
2342
2340
|
function b(m) {
|
|
2343
2341
|
c.value = m;
|
|
2344
2342
|
}
|
|
2345
|
-
function
|
|
2343
|
+
function I(m) {
|
|
2346
2344
|
d.value = m;
|
|
2347
2345
|
}
|
|
2348
|
-
function
|
|
2349
|
-
|
|
2346
|
+
function y(m) {
|
|
2347
|
+
v.value = [].concat(m);
|
|
2350
2348
|
}
|
|
2351
2349
|
function w(m) {
|
|
2352
|
-
a.value =
|
|
2350
|
+
a.value = X(m);
|
|
2353
2351
|
}
|
|
2354
2352
|
function F(m) {
|
|
2355
2353
|
s.value = m;
|
|
2356
2354
|
}
|
|
2357
|
-
function
|
|
2355
|
+
function R() {
|
|
2358
2356
|
t.emit("close");
|
|
2359
2357
|
}
|
|
2360
2358
|
function j() {
|
|
2361
2359
|
t.emit("submit", a.value);
|
|
2362
2360
|
}
|
|
2363
|
-
function
|
|
2364
|
-
return i(
|
|
2361
|
+
function B() {
|
|
2362
|
+
return i(Kn, {
|
|
2365
2363
|
class: "f-utils-fill-flex-column",
|
|
2366
2364
|
defaultStates: o.value,
|
|
2367
|
-
originalDataCopy:
|
|
2365
|
+
originalDataCopy: p.value,
|
|
2368
2366
|
currentScreenResolution: c.value,
|
|
2369
2367
|
"onUpdate:currentScreenResolution": (m) => c.value = m,
|
|
2370
2368
|
originalData: a.value,
|
|
2371
2369
|
"onUpdate:originalData": (m) => a.value = m,
|
|
2372
2370
|
switchInStandardMode: d.value,
|
|
2373
2371
|
"onUpdate:switchInStandardMode": (m) => d.value = m,
|
|
2374
|
-
currentArea:
|
|
2375
|
-
"onUpdate:currentArea": (m) =>
|
|
2376
|
-
onCurrentAreaChanged:
|
|
2372
|
+
currentArea: v.value,
|
|
2373
|
+
"onUpdate:currentArea": (m) => v.value = m,
|
|
2374
|
+
onCurrentAreaChanged: y,
|
|
2377
2375
|
onTwoDimensionalArrayChanged: F,
|
|
2378
2376
|
onOriginalDataChanged: w
|
|
2379
2377
|
}, null);
|
|
2380
2378
|
}
|
|
2381
|
-
function
|
|
2382
|
-
return i(
|
|
2379
|
+
function $() {
|
|
2380
|
+
return i(_t, {
|
|
2383
2381
|
class: "f-utils-fill-flex-column",
|
|
2384
|
-
currentArea:
|
|
2385
|
-
"onUpdate:currentArea": (m) =>
|
|
2382
|
+
currentArea: v.value,
|
|
2383
|
+
"onUpdate:currentArea": (m) => v.value = m,
|
|
2386
2384
|
currentScreenResolution: c.value,
|
|
2387
2385
|
"onUpdate:currentScreenResolution": (m) => c.value = m,
|
|
2388
2386
|
switchInStandardMode: d.value,
|
|
@@ -2390,64 +2388,64 @@ const Gn = /* @__PURE__ */ q({
|
|
|
2390
2388
|
"onUpdate:twoDimensionalArray": (m) => s.value = m
|
|
2391
2389
|
}, null);
|
|
2392
2390
|
}
|
|
2393
|
-
const
|
|
2394
|
-
return
|
|
2395
|
-
a.value =
|
|
2391
|
+
const S = L(() => d.value ? "f-layout-editor-left-standard f-utils-fill-flex-column" : "f-layout-editor-left-customize f-utils-fill-flex-column"), g = L(() => d.value ? "f-layout-editor-right-standard f-utils-fill-flex-column" : "f-layout-editor-right-customize f-utils-fill-flex-column");
|
|
2392
|
+
return ve(() => {
|
|
2393
|
+
a.value = X(n.value.importData), p.value = X(n.value.importData), o.value = n.value.defaultState, r.value = "中等屏幕", c.value = "MD";
|
|
2396
2394
|
}), (m) => i("div", {
|
|
2397
2395
|
class: "f-layout-editor f-utils-flex-column",
|
|
2398
|
-
style: "height:" + f.value + "px;width:" +
|
|
2396
|
+
style: "height:" + f.value + "px;width:" + u.value + "px;"
|
|
2399
2397
|
}, [i("div", {
|
|
2400
2398
|
class: "f-layout-editor-top"
|
|
2401
|
-
}, [i(
|
|
2399
|
+
}, [i(Yt, {
|
|
2402
2400
|
defaultStates: o.value,
|
|
2403
2401
|
onScreenNameChanged: h,
|
|
2404
2402
|
onCurrentScreenResolutionChanged: b,
|
|
2405
|
-
onSwitchInStandardModeChanged:
|
|
2403
|
+
onSwitchInStandardModeChanged: I
|
|
2406
2404
|
}, null)]), i("div", {
|
|
2407
2405
|
class: "f-layout-editor-content f-utils-fill"
|
|
2408
2406
|
}, [i("div", {
|
|
2409
2407
|
class: "f-layout-editor-left f-utils-fill-flex-column"
|
|
2410
2408
|
}, [i("div", {
|
|
2411
|
-
class:
|
|
2412
|
-
}, [
|
|
2409
|
+
class: S.value
|
|
2410
|
+
}, [B()])]), i("div", {
|
|
2413
2411
|
class: "f-layout-editor-right f-utils-fill-flex-column"
|
|
2414
2412
|
}, [i("div", {
|
|
2415
|
-
class:
|
|
2416
|
-
}, [
|
|
2413
|
+
class: g.value
|
|
2414
|
+
}, [$()])])]), i("div", {
|
|
2417
2415
|
class: "f-layout-editor-bottom"
|
|
2418
2416
|
}, [i("div", {
|
|
2419
2417
|
class: "f-layout-editor-button"
|
|
2420
2418
|
}, [i("div", {
|
|
2421
2419
|
class: "f-layout-editor-cancel-btn",
|
|
2422
|
-
onClick:
|
|
2420
|
+
onClick: R
|
|
2423
2421
|
}, [i("span", {
|
|
2424
2422
|
class: "f-layout-editor-text-cancel"
|
|
2425
|
-
}, [
|
|
2423
|
+
}, [q("取消")])]), i("div", {
|
|
2426
2424
|
class: "f-layout-editor-sure-btn",
|
|
2427
2425
|
onClick: j
|
|
2428
2426
|
}, [i("span", {
|
|
2429
2427
|
class: "f-layout-editor-text-sure"
|
|
2430
|
-
}, [
|
|
2428
|
+
}, [q("确认")])])])])]);
|
|
2431
2429
|
}
|
|
2432
|
-
}),
|
|
2430
|
+
}), ea = /* @__PURE__ */ new Map([
|
|
2433
2431
|
["appearance", ee]
|
|
2434
2432
|
]);
|
|
2435
|
-
function
|
|
2433
|
+
function ta(e, t, n, a) {
|
|
2436
2434
|
const o = e.getSchemaByType("section");
|
|
2437
2435
|
return o.id = `${a}-section`, o.appearance = { class: "f-section-form f-section-in-main" }, o.mainTitle = "标题", o.contents = [t], o;
|
|
2438
2436
|
}
|
|
2439
|
-
function
|
|
2437
|
+
function na(e, t, n, a) {
|
|
2440
2438
|
const o = e.getSchemaByType("component");
|
|
2441
2439
|
return o.id = `${a}-component`, o.componentType = "form-col-1", o.appearance = {
|
|
2442
2440
|
class: "f-struct-form f-struct-wrapper"
|
|
2443
2441
|
}, o.contents = [t], o;
|
|
2444
2442
|
}
|
|
2445
|
-
function
|
|
2443
|
+
function aa(e, t, n) {
|
|
2446
2444
|
t.appearance = { class: "f-form-layout farris-form farris-form-controls-inline" };
|
|
2447
|
-
const a =
|
|
2448
|
-
return
|
|
2445
|
+
const a = ta(e, t, n, t.id);
|
|
2446
|
+
return na(e, a, n, t.id);
|
|
2449
2447
|
}
|
|
2450
|
-
const
|
|
2448
|
+
const la = "https://json-schema.org/draft/2020-12/schema", oa = "https://farris-design.gitee.io/response-layout-editor-setting.schema.json", ia = "response-layout-editor-setting", ua = "A Farris Data Collection Component", sa = "object", ra = {
|
|
2451
2449
|
id: {
|
|
2452
2450
|
description: "The unique identifier for response layout editor",
|
|
2453
2451
|
type: "string"
|
|
@@ -2475,18 +2473,18 @@ const Zn = "https://json-schema.org/draft/2020-12/schema", _n = "https://farris-
|
|
|
2475
2473
|
type: "array",
|
|
2476
2474
|
default: []
|
|
2477
2475
|
}
|
|
2478
|
-
},
|
|
2476
|
+
}, ca = [
|
|
2479
2477
|
"id",
|
|
2480
2478
|
"type"
|
|
2481
|
-
],
|
|
2482
|
-
$schema:
|
|
2483
|
-
$id:
|
|
2484
|
-
title:
|
|
2485
|
-
description:
|
|
2486
|
-
type:
|
|
2487
|
-
properties:
|
|
2488
|
-
required:
|
|
2489
|
-
},
|
|
2479
|
+
], da = {
|
|
2480
|
+
$schema: la,
|
|
2481
|
+
$id: oa,
|
|
2482
|
+
title: ia,
|
|
2483
|
+
description: ua,
|
|
2484
|
+
type: sa,
|
|
2485
|
+
properties: ra,
|
|
2486
|
+
required: ca
|
|
2487
|
+
}, fa = "response-form", va = "A Farris Component", pa = "object", ma = {
|
|
2490
2488
|
basic: {
|
|
2491
2489
|
description: "Basic Infomation",
|
|
2492
2490
|
title: "基本信息",
|
|
@@ -2508,20 +2506,20 @@ const Zn = "https://json-schema.org/draft/2020-12/schema", _n = "https://farris-
|
|
|
2508
2506
|
}
|
|
2509
2507
|
}
|
|
2510
2508
|
}
|
|
2511
|
-
},
|
|
2512
|
-
title:
|
|
2513
|
-
description:
|
|
2514
|
-
type:
|
|
2515
|
-
categories:
|
|
2516
|
-
},
|
|
2509
|
+
}, ha = {
|
|
2510
|
+
title: fa,
|
|
2511
|
+
description: va,
|
|
2512
|
+
type: pa,
|
|
2513
|
+
categories: ma
|
|
2514
|
+
}, me = {
|
|
2517
2515
|
/** 接受传入的原始数据的defaultState */
|
|
2518
|
-
initialState: { type: Object
|
|
2516
|
+
initialState: { type: Object },
|
|
2519
2517
|
/** 页面高度 */
|
|
2520
2518
|
height: { type: Number, default: 700 },
|
|
2521
2519
|
/** 页面宽度 */
|
|
2522
2520
|
width: { type: Number, default: 750 },
|
|
2523
2521
|
modelValue: { type: Object }
|
|
2524
|
-
},
|
|
2522
|
+
}, we = K(me, da, ea, aa, ha), ya = {
|
|
2525
2523
|
/**
|
|
2526
2524
|
* 自定义类
|
|
2527
2525
|
*/
|
|
@@ -2579,28 +2577,29 @@ const Zn = "https://json-schema.org/draft/2020-12/schema", _n = "https://farris-
|
|
|
2579
2577
|
render: { type: Function, default: null },
|
|
2580
2578
|
acceptCallback: { type: Function, default: null },
|
|
2581
2579
|
rejectCallback: { type: Function, default: null },
|
|
2582
|
-
enableEsc: { type: Boolean, default: !0 }
|
|
2580
|
+
enableEsc: { type: Boolean, default: !0 },
|
|
2581
|
+
enableEnter: { type: Boolean, default: !1 }
|
|
2583
2582
|
};
|
|
2584
|
-
class
|
|
2583
|
+
class G {
|
|
2585
2584
|
constructor(t, n) {
|
|
2586
2585
|
this.x = t, this.y = n;
|
|
2587
2586
|
}
|
|
2588
2587
|
static getTransformInfo(t) {
|
|
2589
2588
|
const a = window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
2590
2589
|
if (a.length >= 6) {
|
|
2591
|
-
const o = parseInt(a[4], 10),
|
|
2592
|
-
return { x: o, y:
|
|
2590
|
+
const o = parseInt(a[4], 10), r = parseInt(a[5], 10);
|
|
2591
|
+
return { x: o, y: r };
|
|
2593
2592
|
}
|
|
2594
2593
|
return { x: 0, y: 0 };
|
|
2595
2594
|
}
|
|
2596
2595
|
static fromEvent(t, n = null) {
|
|
2597
2596
|
if (this.isMouseEvent(t))
|
|
2598
|
-
return new
|
|
2597
|
+
return new G(t.clientX, t.clientY);
|
|
2599
2598
|
if (n === null || t.changedTouches.length === 1)
|
|
2600
|
-
return new
|
|
2599
|
+
return new G(t.changedTouches[0].clientX, t.changedTouches[0].clientY);
|
|
2601
2600
|
for (let a = 0; a < t.changedTouches.length; a++)
|
|
2602
2601
|
if (t.changedTouches[a].target === n)
|
|
2603
|
-
return new
|
|
2602
|
+
return new G(t.changedTouches[a].clientX, t.changedTouches[a].clientY);
|
|
2604
2603
|
}
|
|
2605
2604
|
static isMouseEvent(t) {
|
|
2606
2605
|
return Object.prototype.toString.apply(t).indexOf("MouseEvent") === 8;
|
|
@@ -2609,19 +2608,19 @@ class P {
|
|
|
2609
2608
|
return !!t && "x" in t && "y" in t;
|
|
2610
2609
|
}
|
|
2611
2610
|
static getCurrent(t) {
|
|
2612
|
-
const n = new
|
|
2611
|
+
const n = new G(0, 0);
|
|
2613
2612
|
if (window) {
|
|
2614
2613
|
const a = window.getComputedStyle(t);
|
|
2615
2614
|
if (a) {
|
|
2616
|
-
const o = parseInt(a.getPropertyValue("left"), 10),
|
|
2617
|
-
n.x = isNaN(o) ? 0 : o, n.y = isNaN(
|
|
2615
|
+
const o = parseInt(a.getPropertyValue("left"), 10), r = parseInt(a.getPropertyValue("top"), 10);
|
|
2616
|
+
n.x = isNaN(o) ? 0 : o, n.y = isNaN(r) ? 0 : r;
|
|
2618
2617
|
}
|
|
2619
2618
|
return n;
|
|
2620
2619
|
}
|
|
2621
2620
|
return null;
|
|
2622
2621
|
}
|
|
2623
2622
|
static copy(t) {
|
|
2624
|
-
return new
|
|
2623
|
+
return new G(0, 0).set(t);
|
|
2625
2624
|
}
|
|
2626
2625
|
get value() {
|
|
2627
2626
|
return { x: this.x, y: this.y };
|
|
@@ -2664,20 +2663,20 @@ class _ {
|
|
|
2664
2663
|
return this.width = t.width, this.height = t.height, this;
|
|
2665
2664
|
}
|
|
2666
2665
|
}
|
|
2667
|
-
function
|
|
2668
|
-
const n = l(), a = l(), o = l(),
|
|
2669
|
-
function
|
|
2666
|
+
function ga(e, t) {
|
|
2667
|
+
const n = l(), a = l(), o = l(), r = l(), c = l(), d = l(), v = l(), s = l(), p = l(), u = l(), f = l(), h = l(), b = l(e.draggable), I = l(!1);
|
|
2668
|
+
function y() {
|
|
2670
2669
|
const M = a.value || document.body, x = window.getComputedStyle(M);
|
|
2671
2670
|
if (!x || !n.value)
|
|
2672
2671
|
return;
|
|
2673
|
-
const E =
|
|
2674
|
-
|
|
2675
|
-
const
|
|
2676
|
-
|
|
2672
|
+
const E = G.getTransformInfo(n.value), W = {};
|
|
2673
|
+
v.value && (W.deltaL = n.value.offsetLeft - v.value.x, W.deltaT = n.value.offsetTop - v.value.y);
|
|
2674
|
+
const H = x.getPropertyValue("position");
|
|
2675
|
+
W.width = M.clientWidth, W.height = M.clientHeight, W.pr = parseInt(x.getPropertyValue("padding-right"), 10), W.pb = parseInt(x.getPropertyValue("padding-bottom"), 10), W.position = x.getPropertyValue("position"), H === "static" && (M.style.position = "relative"), W.translateX = E.x, W.translateY = E.y, u.value = W;
|
|
2677
2676
|
}
|
|
2678
2677
|
function w(M) {
|
|
2679
2678
|
if (n.value) {
|
|
2680
|
-
|
|
2679
|
+
r.value = _.getCurrent(n.value), c.value = G.getCurrent(n.value), d.value = r.value ? _.copy(r.value) : null, v.value = c.value ? G.copy(c.value) : null, y();
|
|
2681
2680
|
const x = M.target.getAttribute("type") || "";
|
|
2682
2681
|
s.value = {
|
|
2683
2682
|
n: !!x.match(/n/),
|
|
@@ -2688,133 +2687,133 @@ function da(e, t) {
|
|
|
2688
2687
|
}
|
|
2689
2688
|
}
|
|
2690
2689
|
function F() {
|
|
2691
|
-
var M, x, E,
|
|
2690
|
+
var M, x, E, W;
|
|
2692
2691
|
if (n.value) {
|
|
2693
|
-
const
|
|
2694
|
-
s.value && ((s.value.n || s.value.s) && ((M = d.value) != null && M.height) && (
|
|
2692
|
+
const H = n.value;
|
|
2693
|
+
s.value && ((s.value.n || s.value.s) && ((M = d.value) != null && M.height) && (H.style.height = d.value.height + "px"), (s.value.w || s.value.e) && ((x = d.value) != null && x.width) && (H.style.width = d.value.width + "px"), v.value && ((E = v.value) != null && E.x && (H.style.left = v.value.x + "px"), (W = v.value) != null && W.y && (H.style.top = v.value.y + "px")));
|
|
2695
2694
|
}
|
|
2696
2695
|
}
|
|
2697
|
-
function
|
|
2696
|
+
function R() {
|
|
2698
2697
|
const M = e.minHeight ? e.minHeight : 1, x = e.minWidth ? e.minWidth : 1;
|
|
2699
|
-
d.value &&
|
|
2698
|
+
d.value && v.value && s.value && r.value && (d.value.height < M && (d.value.height = M, s.value.n && c.value && (v.value.y = c.value.y + (r.value.height - M))), d.value.width < x && (d.value.width = x, s.value.w && c.value && (v.value.x = c.value.x + (r.value.width - x))), e.maxHeight && d.value.height > e.maxHeight && (d.value.height = e.maxHeight, c.value && s.value.n && (v.value.y = c.value.y + (r.value.height - e.maxHeight))), e.maxWidth && d.value.width > e.maxWidth && (d.value.width = e.maxWidth, s.value.w && c.value && (v.value.x = c.value.x + (r.value.width - e.maxWidth))));
|
|
2700
2699
|
}
|
|
2701
2700
|
function j() {
|
|
2702
2701
|
if (a.value) {
|
|
2703
|
-
const M =
|
|
2704
|
-
if (
|
|
2705
|
-
const x = M.width - M.pr - M.deltaL - M.translateX -
|
|
2706
|
-
s.value.n &&
|
|
2702
|
+
const M = u.value;
|
|
2703
|
+
if (v.value && d.value && s.value && r.value) {
|
|
2704
|
+
const x = M.width - M.pr - M.deltaL - M.translateX - v.value.x, E = M.height - M.pb - M.deltaT - M.translateY - v.value.y;
|
|
2705
|
+
s.value.n && v.value.y + M.translateY < 0 && c.value && (v.value.y = -M.translateY, d.value.height = r.value.height + c.value.y + M.translateY), s.value.w && v.value.x + M.translateX < 0 && c.value && (v.value.x = -M.translateX, d.value.width = r.value.width + c.value.x + M.translateX), d.value.width > x && (d.value.width = x), d.value.height > E && (d.value.height = E);
|
|
2707
2706
|
}
|
|
2708
2707
|
}
|
|
2709
2708
|
}
|
|
2710
|
-
function
|
|
2711
|
-
if (!o.value || !
|
|
2709
|
+
function B(M) {
|
|
2710
|
+
if (!o.value || !r.value || !c.value || !s.value)
|
|
2712
2711
|
return;
|
|
2713
2712
|
M.subtract(o.value);
|
|
2714
2713
|
const x = M.x, E = M.y;
|
|
2715
|
-
s.value.n ? (
|
|
2714
|
+
s.value.n ? (v.value.y = c.value.y + E, d.value.height = r.value.height - E) : s.value.s && (d.value.height = r.value.height + E), s.value.e ? d.value.width = r.value.width + x : s.value.w && (d.value.width = r.value.width - x, v.value.x = c.value.x + x), j(), R(), F();
|
|
2716
2715
|
}
|
|
2717
|
-
function
|
|
2718
|
-
if (!
|
|
2716
|
+
function $(M) {
|
|
2717
|
+
if (!p.value)
|
|
2719
2718
|
return;
|
|
2720
|
-
const x =
|
|
2721
|
-
x &&
|
|
2719
|
+
const x = G.fromEvent(M);
|
|
2720
|
+
x && B(x);
|
|
2722
2721
|
}
|
|
2723
|
-
function
|
|
2722
|
+
function S() {
|
|
2724
2723
|
if (n.value) {
|
|
2725
2724
|
const {
|
|
2726
2725
|
width: M,
|
|
2727
2726
|
height: x,
|
|
2728
2727
|
x: E,
|
|
2729
|
-
y:
|
|
2730
|
-
} = n.value.getBoundingClientRect(),
|
|
2728
|
+
y: W
|
|
2729
|
+
} = n.value.getBoundingClientRect(), H = G.getTransformInfo(n.value);
|
|
2731
2730
|
return {
|
|
2732
2731
|
size: {
|
|
2733
2732
|
width: M,
|
|
2734
2733
|
height: x
|
|
2735
2734
|
},
|
|
2736
2735
|
position: {
|
|
2737
|
-
x: E -
|
|
2738
|
-
y:
|
|
2736
|
+
x: E - H.x,
|
|
2737
|
+
y: W - H.y
|
|
2739
2738
|
}
|
|
2740
2739
|
};
|
|
2741
2740
|
}
|
|
2742
2741
|
return null;
|
|
2743
2742
|
}
|
|
2744
|
-
function
|
|
2743
|
+
function g(M) {
|
|
2745
2744
|
if (n.value) {
|
|
2746
|
-
const x =
|
|
2745
|
+
const x = S();
|
|
2747
2746
|
f.value = x;
|
|
2748
2747
|
}
|
|
2749
|
-
o.value = void 0,
|
|
2748
|
+
o.value = void 0, r.value = null, c.value = null, d.value = null, v.value = null, s.value = null, p.value = null, document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", g);
|
|
2750
2749
|
}
|
|
2751
2750
|
function m() {
|
|
2752
|
-
document.addEventListener("mousemove",
|
|
2751
|
+
document.addEventListener("mousemove", $), document.addEventListener("mouseup", g);
|
|
2753
2752
|
}
|
|
2754
2753
|
function T(M) {
|
|
2755
|
-
M instanceof MouseEvent && M.button === 2 || b.value && (M.stopPropagation(), M.preventDefault(), o.value =
|
|
2754
|
+
M instanceof MouseEvent && M.button === 2 || b.value && (M.stopPropagation(), M.preventDefault(), o.value = G.fromEvent(M), p.value = M.target, w(M), m());
|
|
2756
2755
|
}
|
|
2757
2756
|
function O(M) {
|
|
2758
2757
|
return n.value = M, i(ue, null, [i("div", {
|
|
2759
|
-
class: "
|
|
2758
|
+
class: "fv-resizable-handle fv-resizable-n",
|
|
2760
2759
|
type: "n",
|
|
2761
2760
|
onMousedown: (x) => T(x)
|
|
2762
2761
|
}, null), i("div", {
|
|
2763
|
-
class: "
|
|
2762
|
+
class: "fv-resizable-handle fv-resizable-e",
|
|
2764
2763
|
type: "e",
|
|
2765
2764
|
onMousedown: (x) => T(x)
|
|
2766
2765
|
}, null), i("div", {
|
|
2767
|
-
class: "
|
|
2766
|
+
class: "fv-resizable-handle fv-resizable-s",
|
|
2768
2767
|
type: "s",
|
|
2769
2768
|
onMousedown: (x) => T(x)
|
|
2770
2769
|
}, null), i("div", {
|
|
2771
|
-
class: "
|
|
2770
|
+
class: "fv-resizable-handle fv-resizable-w",
|
|
2772
2771
|
type: "w",
|
|
2773
2772
|
onMousedown: (x) => T(x)
|
|
2774
2773
|
}, null), i("div", {
|
|
2775
|
-
class: "
|
|
2774
|
+
class: "fv-resizable-handle fv-resizable-ne",
|
|
2776
2775
|
type: "ne",
|
|
2777
2776
|
onMousedown: (x) => T(x)
|
|
2778
2777
|
}, null), i("div", {
|
|
2779
|
-
class: "
|
|
2778
|
+
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
2780
2779
|
type: "se",
|
|
2781
2780
|
onMousedown: (x) => T(x)
|
|
2782
2781
|
}, null), i("div", {
|
|
2783
|
-
class: "
|
|
2782
|
+
class: "fv-resizable-handle fv-resizable-sw",
|
|
2784
2783
|
type: "sw",
|
|
2785
2784
|
onMousedown: (x) => T(x)
|
|
2786
2785
|
}, null), i("div", {
|
|
2787
|
-
class: "
|
|
2786
|
+
class: "fv-resizable-handle fv-resizable-nw",
|
|
2788
2787
|
type: "nw",
|
|
2789
2788
|
onMousedown: (x) => T(x)
|
|
2790
2789
|
}, null)]);
|
|
2791
2790
|
}
|
|
2792
|
-
function
|
|
2793
|
-
const x = a.value || document.body, E = _.getCurrent(x),
|
|
2794
|
-
M && (h.value =
|
|
2791
|
+
function P(M = !0) {
|
|
2792
|
+
const x = a.value || document.body, E = _.getCurrent(x), W = n.value;
|
|
2793
|
+
M && (h.value = S(), h.value.transform = W.style.transform), E && W && (d.value = E, W.style.height = d.value.height - 14 + "px", W.style.width = d.value.width - 14 + "px", W.style.left = "7px", W.style.top = "7px", W.style.transform = "", f.value = {
|
|
2795
2794
|
size: d.value,
|
|
2796
2795
|
position: {
|
|
2797
2796
|
x: 0,
|
|
2798
2797
|
y: 0
|
|
2799
2798
|
}
|
|
2800
|
-
}, b.value = !1,
|
|
2799
|
+
}, b.value = !1, I.value = !0);
|
|
2801
2800
|
}
|
|
2802
|
-
function
|
|
2801
|
+
function Y() {
|
|
2803
2802
|
var M, x;
|
|
2804
2803
|
if (h.value) {
|
|
2805
2804
|
const E = {
|
|
2806
2805
|
width: h.value.size.width || 0,
|
|
2807
2806
|
height: h.value.size.height || 0
|
|
2808
|
-
},
|
|
2807
|
+
}, W = {
|
|
2809
2808
|
x: (window.innerWidth - E.width) / 2,
|
|
2810
2809
|
y: (window.innerHeight - E.height) / 2
|
|
2811
2810
|
};
|
|
2812
|
-
(M = d.value) == null || M.set(E), (x =
|
|
2813
|
-
const
|
|
2814
|
-
|
|
2811
|
+
(M = d.value) == null || M.set(E), (x = v.value) == null || x.set(W);
|
|
2812
|
+
const H = n.value;
|
|
2813
|
+
H.style.height = E.height + "px", H.style.width = E.width + "px", H.style.left = `${W.x}px`, H.style.top = `${W.y}px`, H.style.transform = "", f.value = {
|
|
2815
2814
|
size: E,
|
|
2816
|
-
position:
|
|
2817
|
-
}, b.value = e.draggable,
|
|
2815
|
+
position: W
|
|
2816
|
+
}, b.value = e.draggable, I.value = !1;
|
|
2818
2817
|
}
|
|
2819
2818
|
}
|
|
2820
2819
|
function D() {
|
|
@@ -2831,7 +2830,7 @@ function da(e, t) {
|
|
|
2831
2830
|
}
|
|
2832
2831
|
function k() {
|
|
2833
2832
|
const M = () => {
|
|
2834
|
-
|
|
2833
|
+
I.value ? P(!1) : D();
|
|
2835
2834
|
};
|
|
2836
2835
|
return window.addEventListener("resize", M), () => {
|
|
2837
2836
|
window.removeEventListener("resize", M);
|
|
@@ -2842,325 +2841,364 @@ function da(e, t) {
|
|
|
2842
2841
|
renderResizeBar: O,
|
|
2843
2842
|
boundingElement: a,
|
|
2844
2843
|
resizedEventParam: f,
|
|
2845
|
-
maximize:
|
|
2846
|
-
restore:
|
|
2844
|
+
maximize: P,
|
|
2845
|
+
restore: Y,
|
|
2847
2846
|
allowDrag: b,
|
|
2848
|
-
isMaximized:
|
|
2847
|
+
isMaximized: I,
|
|
2849
2848
|
unWindowResizeHandle: z
|
|
2850
2849
|
};
|
|
2851
2850
|
}
|
|
2852
|
-
function
|
|
2853
|
-
const
|
|
2854
|
-
|
|
2855
|
-
|
|
2851
|
+
function ba(e, t, n) {
|
|
2852
|
+
const a = l(), o = l(e.draggable), r = l(e.lockAxis), c = l(), d = l(), v = l(!1), s = l(new G(0, 0)), p = l(new G(0, 0)), u = l(new G(0, 0)), f = l(new G(0, 0));
|
|
2853
|
+
A(() => n.value, (S) => {
|
|
2854
|
+
c.value.style.cursor = S ? "move" : "default";
|
|
2855
|
+
});
|
|
2856
|
+
function h(S, g) {
|
|
2857
|
+
if (g.tagName === "BUTTON")
|
|
2856
2858
|
return !1;
|
|
2857
|
-
if (
|
|
2859
|
+
if (g === S)
|
|
2858
2860
|
return !0;
|
|
2859
|
-
for (const
|
|
2860
|
-
if (
|
|
2861
|
+
for (const m in g.children)
|
|
2862
|
+
if (g.children.hasOwnProperty(m) && h(S, g.children[m]))
|
|
2861
2863
|
return !0;
|
|
2862
2864
|
return !1;
|
|
2863
2865
|
}
|
|
2864
|
-
function h() {
|
|
2865
|
-
var m, T;
|
|
2866
|
-
let y = v.value.x + s.value.x, B = v.value.y + s.value.y;
|
|
2867
|
-
o.value === "x" ? (y = ((m = p.value) == null ? void 0 : m.x) || 0, v.value.x = 0) : o.value === "y" && (B = ((T = p.value) == null ? void 0 : T.y) || 0, v.value.y = 0);
|
|
2868
|
-
const S = `translate3d(${Math.round(y)}px, ${Math.round(B)}px, 0px)`;
|
|
2869
|
-
n.value && (n.value.style.transform = S), r.value.x = y, r.value.y = B;
|
|
2870
|
-
}
|
|
2871
2866
|
function b() {
|
|
2872
|
-
|
|
2867
|
+
var T, O;
|
|
2868
|
+
let S = u.value.x + p.value.x, g = u.value.y + p.value.y;
|
|
2869
|
+
r.value === "x" ? (S = ((T = s.value) == null ? void 0 : T.x) || 0, u.value.x = 0) : r.value === "y" && (g = ((O = s.value) == null ? void 0 : O.y) || 0, u.value.y = 0);
|
|
2870
|
+
const m = `translate3d(${Math.round(S)}px, ${Math.round(g)}px, 0px)`;
|
|
2871
|
+
a.value && (a.value.style.transform = m), f.value.x = S, f.value.y = g;
|
|
2872
|
+
}
|
|
2873
|
+
function I() {
|
|
2874
|
+
if (!d.value || !a.value)
|
|
2873
2875
|
return null;
|
|
2874
|
-
const
|
|
2875
|
-
top:
|
|
2876
|
-
right:
|
|
2877
|
-
bottom:
|
|
2878
|
-
left:
|
|
2876
|
+
const S = d.value.getBoundingClientRect(), g = a.value.getBoundingClientRect(), m = {
|
|
2877
|
+
top: S.top < g.top,
|
|
2878
|
+
right: S.right > g.right,
|
|
2879
|
+
bottom: S.bottom > g.bottom,
|
|
2880
|
+
left: S.left < g.left
|
|
2879
2881
|
};
|
|
2880
|
-
return
|
|
2882
|
+
return m.top || (u.value.y -= g.top - S.top), m.bottom || (u.value.y -= g.bottom - S.bottom), m.right || (u.value.x -= g.right - S.right), m.left || (u.value.x -= g.left - S.left), b(), m;
|
|
2881
2883
|
}
|
|
2882
|
-
function
|
|
2883
|
-
|
|
2884
|
+
function y(S) {
|
|
2885
|
+
S && (s.value && S.subtract(s.value), u.value.set(S), b(), I());
|
|
2884
2886
|
}
|
|
2885
|
-
function
|
|
2886
|
-
|
|
2887
|
-
}
|
|
2888
|
-
function w() {
|
|
2889
|
-
var y;
|
|
2890
|
-
d.value && (d.value = !1, s.value.add(v.value), v.value.reset(), (y = n.value) == null || y.classList.remove("ng-dragging"), document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", w));
|
|
2887
|
+
function w(S) {
|
|
2888
|
+
v.value && o.value && (S.stopPropagation(), S.preventDefault(), y(G.fromEvent(S, c.value)));
|
|
2891
2889
|
}
|
|
2892
2890
|
function F() {
|
|
2893
|
-
|
|
2891
|
+
var S;
|
|
2892
|
+
v.value && (v.value = !1, p.value.add(u.value), u.value.reset(), (S = a.value) == null || S.classList.remove("ng-dragging"), document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", F));
|
|
2894
2893
|
}
|
|
2895
|
-
function
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2894
|
+
function R() {
|
|
2895
|
+
!v.value && c.value && (v.value = !0, c.value.classList.add("ng-dragging"), document.addEventListener("mousemove", w), document.addEventListener("mouseup", F));
|
|
2896
|
+
}
|
|
2897
|
+
function j() {
|
|
2898
|
+
if (a.value) {
|
|
2899
|
+
const S = G.getTransformInfo(a.value);
|
|
2900
|
+
p.value.set(S);
|
|
2899
2901
|
return;
|
|
2900
2902
|
}
|
|
2901
|
-
|
|
2903
|
+
p.value.reset();
|
|
2902
2904
|
}
|
|
2903
|
-
function
|
|
2904
|
-
if (
|
|
2905
|
+
function B(S) {
|
|
2906
|
+
if (!n.value || S instanceof MouseEvent && S.button === 2)
|
|
2905
2907
|
return;
|
|
2906
|
-
const
|
|
2907
|
-
|
|
2908
|
-
}
|
|
2909
|
-
function
|
|
2910
|
-
if (
|
|
2911
|
-
if (
|
|
2908
|
+
const g = S.target || S.srcElement;
|
|
2909
|
+
c.value !== void 0 && g && !h(g, c.value) || o.value !== !1 && (document.body.click(), S.stopPropagation(), S.preventDefault(), s.value = G.fromEvent(S, a.value), j(), R());
|
|
2910
|
+
}
|
|
2911
|
+
function $(S, g, m) {
|
|
2912
|
+
if (o.value && g) {
|
|
2913
|
+
if (S)
|
|
2914
|
+
c.value = S;
|
|
2915
|
+
else if (e.dragHandle) {
|
|
2912
2916
|
if (e.dragHandle instanceof HTMLElement)
|
|
2913
|
-
|
|
2917
|
+
c.value = e.dragHandle;
|
|
2914
2918
|
else if (typeof e.dragHandle == "string") {
|
|
2915
|
-
const
|
|
2916
|
-
|
|
2919
|
+
const T = g.querySelector(e.dragHandle);
|
|
2920
|
+
T && (c.value = T);
|
|
2917
2921
|
}
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
|
-
n.value = B, c.value = S, u.value.classList.add("ng-draggable"), u.value.addEventListener("mousedown", j);
|
|
2922
|
+
}
|
|
2923
|
+
a.value = g, d.value = m, c.value.classList.add("ng-draggable"), c.value.addEventListener("mousedown", B);
|
|
2921
2924
|
}
|
|
2922
2925
|
}
|
|
2923
2926
|
return {
|
|
2924
|
-
registerDraggle:
|
|
2925
|
-
resetTranslate:
|
|
2927
|
+
registerDraggle: $,
|
|
2928
|
+
resetTranslate: j
|
|
2926
2929
|
};
|
|
2927
2930
|
}
|
|
2928
|
-
function
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2931
|
+
function Fe(e, t) {
|
|
2932
|
+
if (e) {
|
|
2933
|
+
const n = (a) => {
|
|
2934
|
+
a.key.toLowerCase() === e.toLowerCase() && t({ event: a, key: e });
|
|
2935
|
+
};
|
|
2936
|
+
return document.addEventListener("keydown", n), () => {
|
|
2937
|
+
document.removeEventListener("keydown", n);
|
|
2938
|
+
};
|
|
2932
2939
|
}
|
|
2933
|
-
n.value && document.addEventListener("keydown", a);
|
|
2934
2940
|
}
|
|
2935
|
-
|
|
2941
|
+
function wa(e, t) {
|
|
2942
|
+
const n = l(e.enableEsc);
|
|
2943
|
+
let a = null;
|
|
2944
|
+
return n.value ? (a = Fe("Escape", (o) => {
|
|
2945
|
+
t.emit("esc", { event: o.event, type: "esc" });
|
|
2946
|
+
}), {
|
|
2947
|
+
remove: a
|
|
2948
|
+
}) : null;
|
|
2949
|
+
}
|
|
2950
|
+
function Sa(e, t) {
|
|
2951
|
+
const n = l(e.enableEnter);
|
|
2952
|
+
let a = null;
|
|
2953
|
+
return n.value ? (a = Fe("Enter", (o) => {
|
|
2954
|
+
t.emit("enter", { event: o.event, type: "enter" });
|
|
2955
|
+
}), {
|
|
2956
|
+
remove: a
|
|
2957
|
+
}) : null;
|
|
2958
|
+
}
|
|
2959
|
+
const ke = /* @__PURE__ */ U({
|
|
2936
2960
|
name: "FModal",
|
|
2937
|
-
props:
|
|
2938
|
-
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc"],
|
|
2961
|
+
props: ya,
|
|
2962
|
+
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
|
|
2939
2963
|
setup(e, t) {
|
|
2940
|
-
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue),
|
|
2941
|
-
function
|
|
2942
|
-
o.value = !1, t.emit("update:modelValue", !1), V != null && t.emit(V ? "accept" : "cancel"), t.emit("closed",
|
|
2964
|
+
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue), r = l(""), c = l(e.class), d = l(e.fitContent), v = l(e.showHeader), s = l(""), p = l(e.showCloseButton), u = l(e.showMaxButton), f = l(!1), h = l(""), b = l(""), I = l(""), y = l(e.showButtons), w = l(e.title), F = l(e.reiszeable), R = l(e.containment || null), j = l();
|
|
2965
|
+
function B(C, V) {
|
|
2966
|
+
o.value = !1, t.emit("update:modelValue", !1), V != null && t.emit(V ? "accept" : "cancel"), t.emit("closed", C);
|
|
2943
2967
|
}
|
|
2944
|
-
const
|
|
2968
|
+
const $ = [{
|
|
2945
2969
|
name: "cancel",
|
|
2946
2970
|
text: "取消",
|
|
2947
|
-
class: "btn btn-
|
|
2948
|
-
handle: (
|
|
2949
|
-
|
|
2971
|
+
class: "btn btn-secondary",
|
|
2972
|
+
handle: (C) => {
|
|
2973
|
+
B(C, !1);
|
|
2950
2974
|
}
|
|
2951
2975
|
}, {
|
|
2952
2976
|
name: "accept",
|
|
2953
2977
|
text: "确定",
|
|
2954
2978
|
class: "btn btn-primary",
|
|
2955
|
-
handle: (
|
|
2956
|
-
|
|
2979
|
+
handle: (C) => {
|
|
2980
|
+
B(C, !0);
|
|
2957
2981
|
}
|
|
2958
|
-
}],
|
|
2959
|
-
renderResizeBar:
|
|
2982
|
+
}], S = l(e.buttons && e.buttons.length ? e.buttons : $), g = L(() => !!s.value), m = L(() => !!y.value && !!S.value), T = l(), O = l(), P = l(!1), {
|
|
2983
|
+
renderResizeBar: Y,
|
|
2960
2984
|
maximize: D,
|
|
2961
2985
|
restore: k,
|
|
2962
2986
|
boundingElement: z,
|
|
2963
2987
|
resizedEventParam: M,
|
|
2964
2988
|
allowDrag: x,
|
|
2965
2989
|
unWindowResizeHandle: E
|
|
2966
|
-
} =
|
|
2967
|
-
registerDraggle:
|
|
2968
|
-
} =
|
|
2969
|
-
A(() => e.title, (
|
|
2970
|
-
|
|
2971
|
-
}), A(() => e.modelValue, (
|
|
2972
|
-
|
|
2973
|
-
}), A(() => e.showHeader, (
|
|
2974
|
-
|
|
2975
|
-
}), A(() => e.showButtons, (
|
|
2976
|
-
|
|
2977
|
-
}), A(() => M.value, (
|
|
2978
|
-
const ne =
|
|
2990
|
+
} = ga(e), {
|
|
2991
|
+
registerDraggle: W
|
|
2992
|
+
} = ba(e, t, x);
|
|
2993
|
+
A(() => e.title, (C, V) => {
|
|
2994
|
+
C !== V && (w.value = C);
|
|
2995
|
+
}), A(() => e.modelValue, (C, V) => {
|
|
2996
|
+
C !== V && (o.value = C);
|
|
2997
|
+
}), A(() => e.showHeader, (C, V) => {
|
|
2998
|
+
C !== V && (v.value = C);
|
|
2999
|
+
}), A(() => e.showButtons, (C, V) => {
|
|
3000
|
+
C !== V && (y.value = C);
|
|
3001
|
+
}), A(() => M.value, (C, V) => {
|
|
3002
|
+
const ne = C || {}, ae = V || {};
|
|
2979
3003
|
JSON.stringify(ne) !== JSON.stringify(ae) && t.emit("resize", {
|
|
2980
|
-
newSize:
|
|
3004
|
+
newSize: C,
|
|
2981
3005
|
oldSize: V
|
|
2982
3006
|
});
|
|
2983
3007
|
});
|
|
2984
|
-
function
|
|
2985
|
-
const
|
|
2986
|
-
(!
|
|
3008
|
+
function H() {
|
|
3009
|
+
const C = document.querySelectorAll(".farris-modal").length;
|
|
3010
|
+
(!C || C - 1 <= 0) && document.body.classList.remove("modal-open"), j.value && j.value.classList.remove("show");
|
|
2987
3011
|
}
|
|
2988
|
-
const te =
|
|
2989
|
-
const
|
|
3012
|
+
const te = L(() => (o.value ? document.body.classList.add("modal-open") : H(), o.value)), $e = L(() => {
|
|
3013
|
+
const C = {
|
|
2990
3014
|
modal: !0,
|
|
2991
3015
|
"farris-modal": !0,
|
|
2992
3016
|
fade: !0
|
|
2993
3017
|
};
|
|
2994
|
-
return
|
|
2995
|
-
}),
|
|
3018
|
+
return C["f-modal-fitContent"] = !!d.value, C.show = !!te.value, C;
|
|
3019
|
+
}), Oe = L(() => {
|
|
2996
3020
|
var ne;
|
|
2997
|
-
const
|
|
3021
|
+
const C = {
|
|
2998
3022
|
"modal-dialog": !0
|
|
2999
3023
|
}, V = (ne = c.value) == null ? void 0 : ne.split(" ");
|
|
3000
|
-
return V == null || V.reduce((ae,
|
|
3001
|
-
}),
|
|
3024
|
+
return V == null || V.reduce((ae, Qe) => (ae[Qe] = !0, ae), C), C;
|
|
3025
|
+
}), Ae = L(() => ({
|
|
3002
3026
|
position: "absolute",
|
|
3003
3027
|
top: `${(window.innerHeight - a.value) / 2}px`,
|
|
3004
3028
|
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
3005
3029
|
width: `${n.value}px`,
|
|
3006
3030
|
height: d.value ? "auto" : `${a.value}px`
|
|
3007
|
-
})),
|
|
3031
|
+
})), je = L(() => ({
|
|
3008
3032
|
"modal-content": !0,
|
|
3009
|
-
"modal-content-has-header":
|
|
3010
|
-
})),
|
|
3011
|
-
const
|
|
3012
|
-
display:
|
|
3033
|
+
"modal-content-has-header": v.value
|
|
3034
|
+
})), Ve = L(() => {
|
|
3035
|
+
const C = {
|
|
3036
|
+
display: v.value ? "" : "none"
|
|
3013
3037
|
};
|
|
3014
|
-
return
|
|
3015
|
-
}),
|
|
3038
|
+
return C["pointer-events"] = x.value ? "auto" : "none", C;
|
|
3039
|
+
}), ze = L(() => ({
|
|
3016
3040
|
"f-icon": !0,
|
|
3017
3041
|
modal_maximize: !0,
|
|
3018
|
-
modalrevert:
|
|
3019
|
-
})),
|
|
3042
|
+
modalrevert: P.value
|
|
3043
|
+
})), He = L(() => ({
|
|
3020
3044
|
"modal-body": !0,
|
|
3021
3045
|
"f-utils-flex-column": h.value === "iframe"
|
|
3022
3046
|
}));
|
|
3023
|
-
function
|
|
3047
|
+
function Ne() {
|
|
3024
3048
|
return {};
|
|
3025
3049
|
}
|
|
3026
|
-
const
|
|
3027
|
-
const
|
|
3028
|
-
textAlgin:
|
|
3029
|
-
}, V =
|
|
3030
|
-
return Object.assign(
|
|
3050
|
+
const Pe = L(() => {
|
|
3051
|
+
const C = {
|
|
3052
|
+
textAlgin: I.value
|
|
3053
|
+
}, V = Ne();
|
|
3054
|
+
return Object.assign(C, V);
|
|
3031
3055
|
});
|
|
3032
|
-
function
|
|
3033
|
-
if (
|
|
3034
|
-
|
|
3056
|
+
function ge(C) {
|
|
3057
|
+
if (C.stopPropagation(), P.value) {
|
|
3058
|
+
P.value = !1, k();
|
|
3035
3059
|
return;
|
|
3036
3060
|
}
|
|
3037
|
-
D(),
|
|
3061
|
+
D(), P.value = !0;
|
|
3038
3062
|
}
|
|
3039
|
-
async function
|
|
3040
|
-
|
|
3063
|
+
async function Ge(C, V) {
|
|
3064
|
+
C.handle && await C.handle(V, C) && t.emit("closed", V);
|
|
3041
3065
|
}
|
|
3042
|
-
function
|
|
3043
|
-
|
|
3066
|
+
function qe(C) {
|
|
3067
|
+
C.width && (n.value = C.width), C.height && (a.value = C.height), C.buttons && (S.value = C.buttons), C.title && (w.value = C.title);
|
|
3044
3068
|
}
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3069
|
+
let se = null, re = null;
|
|
3070
|
+
Q(() => {
|
|
3071
|
+
O.value && !R.value && (R.value = O.value.parentElement, z.value = R.value, W(T.value, O.value, z.value)), te.value && document.body.classList.add("modal-open"), se = wa(e, t), re = Sa(e, t);
|
|
3072
|
+
}), Ce(() => {
|
|
3073
|
+
H(), E && E(), se && se.remove(), re && re.remove();
|
|
3049
3074
|
}), t.expose({
|
|
3050
3075
|
modalElementRef: O,
|
|
3051
|
-
updateModalOptions:
|
|
3052
|
-
close:
|
|
3076
|
+
updateModalOptions: qe,
|
|
3077
|
+
close: B,
|
|
3078
|
+
maxDialog: ge
|
|
3053
3079
|
});
|
|
3054
|
-
function
|
|
3080
|
+
function Ue() {
|
|
3055
3081
|
return i("ul", null, [f.value && i("li", {
|
|
3056
3082
|
class: "f-btn-icon f-bare"
|
|
3057
3083
|
}, [i("span", {
|
|
3058
3084
|
class: "f-icon modal_minimize"
|
|
3059
|
-
}, null)]),
|
|
3060
|
-
onClick:
|
|
3085
|
+
}, null)]), u.value && i("li", {
|
|
3086
|
+
onClick: ge,
|
|
3061
3087
|
class: "f-btn-icon f-bare",
|
|
3062
3088
|
style: "pointer-events: auto;"
|
|
3063
3089
|
}, [i("span", {
|
|
3064
|
-
class:
|
|
3065
|
-
}, null)]),
|
|
3090
|
+
class: ze.value
|
|
3091
|
+
}, null)]), p.value && i("li", {
|
|
3066
3092
|
class: "f-btn-icon f-bare",
|
|
3067
|
-
onClick: (
|
|
3093
|
+
onClick: (C) => B(C, !1),
|
|
3068
3094
|
style: "pointer-events: auto;"
|
|
3069
3095
|
}, [i("span", {
|
|
3070
3096
|
class: "f-icon modal_close"
|
|
3071
3097
|
}, null)])]);
|
|
3072
3098
|
}
|
|
3073
|
-
function
|
|
3099
|
+
function Xe() {
|
|
3074
3100
|
return i("div", {
|
|
3075
3101
|
class: "modal-footer",
|
|
3076
|
-
style:
|
|
3077
|
-
}, [
|
|
3078
|
-
name:
|
|
3102
|
+
style: Pe.value
|
|
3103
|
+
}, [S.value && S.value.map((C) => i("button", {
|
|
3104
|
+
name: C.name,
|
|
3079
3105
|
type: "button",
|
|
3080
|
-
class:
|
|
3106
|
+
class: C.class + (C.iconClass ? " btn-icontext" : ""),
|
|
3081
3107
|
onClick: (V) => {
|
|
3082
|
-
|
|
3108
|
+
Ge(C, V);
|
|
3083
3109
|
}
|
|
3084
|
-
}, [!!
|
|
3085
|
-
class:
|
|
3086
|
-
}, null),
|
|
3110
|
+
}, [!!C.iconClass && i("i", {
|
|
3111
|
+
class: C.iconClass
|
|
3112
|
+
}, null), C.text]))]);
|
|
3087
3113
|
}
|
|
3088
|
-
|
|
3114
|
+
function Ye() {
|
|
3115
|
+
return i("div", {
|
|
3116
|
+
ref: T,
|
|
3117
|
+
class: "modal-header",
|
|
3118
|
+
style: Ve.value
|
|
3119
|
+
}, [i("div", {
|
|
3120
|
+
class: "modal-title"
|
|
3121
|
+
}, [g.value && i("span", {
|
|
3122
|
+
class: s.value,
|
|
3123
|
+
style: "margin-right: 8px"
|
|
3124
|
+
}, null), i("span", {
|
|
3125
|
+
class: "modal-title-label"
|
|
3126
|
+
}, [w.value])]), i("div", {
|
|
3127
|
+
class: "actions"
|
|
3128
|
+
}, [Ue()])]);
|
|
3129
|
+
}
|
|
3130
|
+
function Je(C) {
|
|
3131
|
+
C.stopPropagation();
|
|
3132
|
+
}
|
|
3133
|
+
return () => i(tt, {
|
|
3089
3134
|
to: "body"
|
|
3090
3135
|
}, {
|
|
3091
|
-
default: () => {
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
title: u.value,
|
|
3121
|
-
class: "f-utils-fill",
|
|
3122
|
-
width: "100%",
|
|
3123
|
-
frameborder: "0",
|
|
3124
|
-
src: b.value
|
|
3125
|
-
}, null)]), m.value && Ge()]), !d.value && F.value && O.value && X(O.value)])])];
|
|
3126
|
-
}
|
|
3136
|
+
default: () => [te.value && i(nt, {
|
|
3137
|
+
name: "fade",
|
|
3138
|
+
appear: !0
|
|
3139
|
+
}, {
|
|
3140
|
+
default: () => {
|
|
3141
|
+
var C, V;
|
|
3142
|
+
return [i("div", {
|
|
3143
|
+
class: $e.value,
|
|
3144
|
+
style: "display: block",
|
|
3145
|
+
ref: j,
|
|
3146
|
+
onClick: Je
|
|
3147
|
+
}, [i("div", {
|
|
3148
|
+
id: r.value,
|
|
3149
|
+
class: Oe.value,
|
|
3150
|
+
style: Ae.value,
|
|
3151
|
+
ref: O
|
|
3152
|
+
}, [i("div", {
|
|
3153
|
+
class: je.value
|
|
3154
|
+
}, [v.value && Ye(), i("div", {
|
|
3155
|
+
class: He.value
|
|
3156
|
+
}, [(V = (C = t.slots).default) == null ? void 0 : V.call(C), h.value === "iframe" && i("iframe", {
|
|
3157
|
+
title: r.value,
|
|
3158
|
+
class: "f-utils-fill",
|
|
3159
|
+
width: "100%",
|
|
3160
|
+
frameborder: "0",
|
|
3161
|
+
src: b.value
|
|
3162
|
+
}, null)]), m.value && Xe()]), !d.value && F.value && O.value && Y(O.value)])])];
|
|
3163
|
+
}
|
|
3164
|
+
})]
|
|
3127
3165
|
});
|
|
3128
3166
|
}
|
|
3129
3167
|
});
|
|
3130
|
-
function
|
|
3168
|
+
function We(e) {
|
|
3131
3169
|
if (e.content && e.content.render)
|
|
3132
3170
|
return e.content.render;
|
|
3133
3171
|
if (e.render && typeof e.render == "function")
|
|
3134
3172
|
return e.render;
|
|
3135
3173
|
}
|
|
3136
|
-
function
|
|
3174
|
+
function Ca(e) {
|
|
3137
3175
|
const t = document.createElement("div");
|
|
3138
3176
|
t.style.display = "contents";
|
|
3139
|
-
const n =
|
|
3177
|
+
const n = lt({
|
|
3140
3178
|
setup(a, o) {
|
|
3141
|
-
|
|
3179
|
+
Ce(() => {
|
|
3142
3180
|
document.body.removeChild(t);
|
|
3143
3181
|
});
|
|
3144
|
-
const
|
|
3182
|
+
const r = l(), c = l(e.class || ""), d = l(!!e.showButtons), v = l(!!e.showHeader), s = l(e.showCloseButton == null ? !0 : e.showCloseButton), p = l(!0), u = l(e.title || ""), f = e.acceptCallback || (() => {
|
|
3145
3183
|
}), h = e.rejectCallback || (() => {
|
|
3146
3184
|
}), b = e.closedCallback || ((F) => {
|
|
3147
|
-
}),
|
|
3148
|
-
}),
|
|
3149
|
-
|
|
3185
|
+
}), I = e.resizeHandle || ((F) => {
|
|
3186
|
+
}), y = We(e), w = (F) => {
|
|
3187
|
+
p.value = !1, n.unmount(), b(F);
|
|
3150
3188
|
};
|
|
3151
|
-
return
|
|
3189
|
+
return Q(() => {
|
|
3152
3190
|
}), o.expose({
|
|
3153
|
-
modalRef:
|
|
3154
|
-
}), () => i(
|
|
3155
|
-
ref:
|
|
3191
|
+
modalRef: r
|
|
3192
|
+
}), () => i(ke, {
|
|
3193
|
+
ref: r,
|
|
3156
3194
|
class: c.value,
|
|
3157
|
-
modelValue:
|
|
3158
|
-
"onUpdate:modelValue": (F) =>
|
|
3159
|
-
title:
|
|
3195
|
+
modelValue: p.value,
|
|
3196
|
+
"onUpdate:modelValue": (F) => p.value = F,
|
|
3197
|
+
title: u.value,
|
|
3160
3198
|
width: e.width,
|
|
3161
3199
|
height: e.height,
|
|
3162
3200
|
buttons: e.buttons,
|
|
3163
|
-
"show-header":
|
|
3201
|
+
"show-header": v.value,
|
|
3164
3202
|
"show-buttons": d.value,
|
|
3165
3203
|
"show-close-button": s.value,
|
|
3166
3204
|
"show-max-button": !1,
|
|
@@ -3168,22 +3206,22 @@ function va(e) {
|
|
|
3168
3206
|
onCancel: h,
|
|
3169
3207
|
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
3170
3208
|
onClosed: w,
|
|
3171
|
-
onResize:
|
|
3209
|
+
onResize: I
|
|
3172
3210
|
}, {
|
|
3173
|
-
default: () => [
|
|
3211
|
+
default: () => [y && y(n)]
|
|
3174
3212
|
});
|
|
3175
3213
|
}
|
|
3176
3214
|
});
|
|
3177
3215
|
return document.body.appendChild(t), n.mount(t), n;
|
|
3178
3216
|
}
|
|
3179
|
-
class
|
|
3217
|
+
class he {
|
|
3180
3218
|
constructor(t) {
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3219
|
+
N(this, "appContext", null);
|
|
3220
|
+
N(this, "modalRef", l());
|
|
3221
|
+
N(this, "activeModalIndex", l(0));
|
|
3222
|
+
N(this, "modalRefs", {});
|
|
3223
|
+
N(this, "isUseEscCloseModal", l(!1));
|
|
3224
|
+
N(this, "activeModalInstance", L(() => this.modalRefs[this.activeModalIndex.value]));
|
|
3187
3225
|
this.appContext = t ? t._context : null;
|
|
3188
3226
|
}
|
|
3189
3227
|
getCurrentModal() {
|
|
@@ -3195,29 +3233,29 @@ class me {
|
|
|
3195
3233
|
showButtons: !0,
|
|
3196
3234
|
showHeader: !0
|
|
3197
3235
|
}, t);
|
|
3198
|
-
return
|
|
3236
|
+
return Ca(n);
|
|
3199
3237
|
}
|
|
3200
3238
|
open(t) {
|
|
3201
3239
|
const n = document.createDocumentFragment();
|
|
3202
3240
|
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
3203
|
-
const a =
|
|
3241
|
+
const a = at(Object.assign({
|
|
3204
3242
|
title: "",
|
|
3205
3243
|
showButtons: !0,
|
|
3206
3244
|
showHeader: !0
|
|
3207
|
-
}, t)), o = l(!0),
|
|
3245
|
+
}, t)), o = l(!0), r = a.value.acceptCallback || (() => {
|
|
3208
3246
|
}), c = a.value.rejectCallback || (() => {
|
|
3209
3247
|
}), d = a.value.closedCallback || ((w, F) => {
|
|
3210
|
-
}),
|
|
3248
|
+
}), v = a.value.resizeHandle || ((w) => {
|
|
3211
3249
|
});
|
|
3212
3250
|
let s;
|
|
3213
|
-
const
|
|
3214
|
-
var
|
|
3251
|
+
const p = We(a.value), u = (w) => {
|
|
3252
|
+
var R;
|
|
3215
3253
|
o.value = !1;
|
|
3216
|
-
const F = (
|
|
3254
|
+
const F = (R = w == null ? void 0 : w.target) == null ? void 0 : R.classList.contains("modal_close");
|
|
3217
3255
|
d(w, this.isUseEscCloseModal.value ? "esc" : F ? "icon" : "button");
|
|
3218
3256
|
}, f = (w) => {
|
|
3219
|
-
|
|
3220
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value],
|
|
3257
|
+
u(w), s && fe(() => {
|
|
3258
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], ce(null, n), s = null, this.modalRef.value = null, this.modalRefs) {
|
|
3221
3259
|
const F = Object.keys(this.modalRefs);
|
|
3222
3260
|
F.length > 0 ? this.activeModalIndex.value = Math.max(...F) : this.activeModalIndex.value = 0;
|
|
3223
3261
|
}
|
|
@@ -3226,22 +3264,22 @@ class me {
|
|
|
3226
3264
|
}, h = (w) => {
|
|
3227
3265
|
var F;
|
|
3228
3266
|
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((F = this.activeModalInstance.value) == null || F.close(w == null ? void 0 : w.event));
|
|
3229
|
-
}, b = () => i(
|
|
3267
|
+
}, b = () => i(ke, Ie({
|
|
3230
3268
|
ref: this.modalRef,
|
|
3231
3269
|
modelValue: o.value,
|
|
3232
3270
|
"onUpdate:modelValue": (w) => o.value = w
|
|
3233
3271
|
}, a.value, {
|
|
3234
|
-
onAccept:
|
|
3272
|
+
onAccept: r,
|
|
3235
3273
|
onCancel: c,
|
|
3236
3274
|
onClosed: f,
|
|
3237
|
-
onResize:
|
|
3275
|
+
onResize: v,
|
|
3238
3276
|
onEsc: h
|
|
3239
3277
|
}), {
|
|
3240
|
-
default: () => [
|
|
3278
|
+
default: () => [p && p()]
|
|
3241
3279
|
});
|
|
3242
3280
|
return s = ((w) => {
|
|
3243
|
-
const F =
|
|
3244
|
-
return F.appContext = this.appContext,
|
|
3281
|
+
const F = ot(b, w);
|
|
3282
|
+
return F.appContext = this.appContext, ce(F, n), F;
|
|
3245
3283
|
})({
|
|
3246
3284
|
...a.value
|
|
3247
3285
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
@@ -3250,7 +3288,7 @@ class me {
|
|
|
3250
3288
|
a.value = {
|
|
3251
3289
|
...a.value,
|
|
3252
3290
|
...w
|
|
3253
|
-
}, s &&
|
|
3291
|
+
}, s && ce(it(s, {
|
|
3254
3292
|
...a
|
|
3255
3293
|
}), n);
|
|
3256
3294
|
},
|
|
@@ -3259,99 +3297,91 @@ class me {
|
|
|
3259
3297
|
};
|
|
3260
3298
|
}
|
|
3261
3299
|
}
|
|
3262
|
-
function
|
|
3263
|
-
var
|
|
3300
|
+
function Ia(e, t, n) {
|
|
3301
|
+
var j;
|
|
3264
3302
|
function a() {
|
|
3265
3303
|
}
|
|
3266
|
-
const o = "",
|
|
3304
|
+
const o = "", r = "", c = l();
|
|
3267
3305
|
function d() {
|
|
3268
3306
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
3269
3307
|
}
|
|
3270
|
-
function
|
|
3308
|
+
function v() {
|
|
3271
3309
|
return !1;
|
|
3272
3310
|
}
|
|
3273
3311
|
function s() {
|
|
3274
3312
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
3275
3313
|
}
|
|
3276
|
-
function
|
|
3314
|
+
function p() {
|
|
3277
3315
|
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
3278
3316
|
}
|
|
3279
|
-
function
|
|
3280
|
-
if (!
|
|
3317
|
+
function u(B) {
|
|
3318
|
+
if (!B || !B.value)
|
|
3281
3319
|
return null;
|
|
3282
|
-
if (
|
|
3283
|
-
return
|
|
3284
|
-
const
|
|
3320
|
+
if (B.value.schema && B.value.schema.type === "component")
|
|
3321
|
+
return B.value;
|
|
3322
|
+
const $ = l(B == null ? void 0 : B.value.parent), S = u($);
|
|
3285
3323
|
return S || null;
|
|
3286
3324
|
}
|
|
3287
|
-
function f(
|
|
3288
|
-
const { componentInstance:
|
|
3289
|
-
return
|
|
3325
|
+
function f(B = t) {
|
|
3326
|
+
const { componentInstance: $, designerItemElementRef: S } = B;
|
|
3327
|
+
return !$ || !$.value ? null : $.value.canMove ? S : f(B.parent);
|
|
3290
3328
|
}
|
|
3291
|
-
function h(
|
|
3329
|
+
function h(B) {
|
|
3292
3330
|
return !!n;
|
|
3293
3331
|
}
|
|
3294
3332
|
function b() {
|
|
3295
3333
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
3296
3334
|
}
|
|
3297
|
-
function
|
|
3298
|
-
}
|
|
3299
|
-
function g(y, B) {
|
|
3335
|
+
function I() {
|
|
3300
3336
|
}
|
|
3301
|
-
function
|
|
3302
|
-
const { componentType: S } = y;
|
|
3303
|
-
let m = de(S, y, B);
|
|
3304
|
-
const T = S.toLowerCase().replace("-", "_");
|
|
3305
|
-
return m && !m.id && m.type === S && (m.id = `${T}_${Math.random().toString().slice(2, 6)}`), m;
|
|
3337
|
+
function y(B, $) {
|
|
3306
3338
|
}
|
|
3307
|
-
function
|
|
3308
|
-
const
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
return O && !O.id && O.type === S && (O.id = `${H}_${Math.random().toString().slice(2, 6)}`), O;
|
|
3339
|
+
function w(B, $) {
|
|
3340
|
+
const { componentType: S } = B;
|
|
3341
|
+
let g = Ee(S, B, $);
|
|
3342
|
+
const m = S.toLowerCase().replace("-", "_");
|
|
3343
|
+
return g && !g.id && g.type === S && (g.id = `${m}_${Math.random().toString().slice(2, 6)}`), g;
|
|
3313
3344
|
}
|
|
3314
|
-
function
|
|
3345
|
+
function F(B) {
|
|
3315
3346
|
}
|
|
3316
|
-
function
|
|
3347
|
+
function R(...B) {
|
|
3317
3348
|
}
|
|
3318
3349
|
return c.value = {
|
|
3319
3350
|
canMove: d(),
|
|
3320
|
-
canSelectParent:
|
|
3351
|
+
canSelectParent: v(),
|
|
3321
3352
|
canDelete: s(),
|
|
3322
|
-
canNested: !
|
|
3353
|
+
canNested: !p(),
|
|
3323
3354
|
contents: t == null ? void 0 : t.schema.contents,
|
|
3324
3355
|
elementRef: e,
|
|
3325
|
-
parent: (
|
|
3356
|
+
parent: (j = t == null ? void 0 : t.parent) == null ? void 0 : j.componentInstance,
|
|
3326
3357
|
schema: t == null ? void 0 : t.schema,
|
|
3327
3358
|
styles: o,
|
|
3328
|
-
designerClass:
|
|
3359
|
+
designerClass: r,
|
|
3329
3360
|
canAccepts: h,
|
|
3330
|
-
getBelongedComponentInstance:
|
|
3361
|
+
getBelongedComponentInstance: u,
|
|
3331
3362
|
getDraggableDesignItemElement: f,
|
|
3332
3363
|
getDraggingDisplayText: b,
|
|
3333
|
-
getPropConfig:
|
|
3334
|
-
getDragScopeElement:
|
|
3335
|
-
onAcceptMovedChildElement:
|
|
3336
|
-
|
|
3337
|
-
onChildElementMovedOut: L,
|
|
3364
|
+
getPropConfig: R,
|
|
3365
|
+
getDragScopeElement: I,
|
|
3366
|
+
onAcceptMovedChildElement: y,
|
|
3367
|
+
onChildElementMovedOut: F,
|
|
3338
3368
|
addNewChildComponentSchema: w,
|
|
3339
3369
|
updateDragAndDropRules: a,
|
|
3340
3370
|
triggerBelongedComponentToMoveWhenMoved: l(!1),
|
|
3341
3371
|
triggerBelongedComponentToDeleteWhenDeleted: l(!1)
|
|
3342
3372
|
}, c;
|
|
3343
3373
|
}
|
|
3344
|
-
const
|
|
3374
|
+
const Ma = /* @__PURE__ */ U({
|
|
3345
3375
|
name: "FResponseLayoutEditorSettingDesign",
|
|
3346
|
-
props:
|
|
3376
|
+
props: me,
|
|
3347
3377
|
emits: [],
|
|
3348
3378
|
setup(e, t) {
|
|
3349
|
-
const n = l(e.initialState), a = l(e.width), o = l(e.height),
|
|
3350
|
-
|
|
3351
|
-
|
|
3379
|
+
const n = l(e.initialState), a = l(e.width), o = l(e.height), r = l(), c = Se("design-item-context"), d = Ia(r, c);
|
|
3380
|
+
Q(() => {
|
|
3381
|
+
r.value.componentInstance = d;
|
|
3352
3382
|
}), t.expose(d.value);
|
|
3353
|
-
function
|
|
3354
|
-
const s =
|
|
3383
|
+
function v() {
|
|
3384
|
+
const s = he.show({
|
|
3355
3385
|
// title: '响应式列宽编辑器',
|
|
3356
3386
|
render: () => i(ie, {
|
|
3357
3387
|
initialState: n,
|
|
@@ -3378,18 +3408,18 @@ const ha = /* @__PURE__ */ q({
|
|
|
3378
3408
|
});
|
|
3379
3409
|
}
|
|
3380
3410
|
return () => i("div", {
|
|
3381
|
-
ref:
|
|
3411
|
+
ref: r,
|
|
3382
3412
|
class: "f-column-width-setting-button",
|
|
3383
|
-
onClick:
|
|
3413
|
+
onClick: v
|
|
3384
3414
|
}, [i("div", {
|
|
3385
3415
|
class: "f-icon f-icon-add"
|
|
3386
3416
|
}, null), i("div", {
|
|
3387
3417
|
class: "f-column-width-setting-button-name"
|
|
3388
3418
|
}, [i("span", {
|
|
3389
3419
|
class: "f-column-width-setting-button-center"
|
|
3390
|
-
}, [
|
|
3420
|
+
}, [q("高级设置")])])]);
|
|
3391
3421
|
}
|
|
3392
|
-
}),
|
|
3422
|
+
}), xa = {
|
|
3393
3423
|
width: { Type: Number, default: 400 },
|
|
3394
3424
|
type: { Type: String, default: "info" },
|
|
3395
3425
|
title: { Type: String, default: "" },
|
|
@@ -3399,15 +3429,15 @@ const ha = /* @__PURE__ */ q({
|
|
|
3399
3429
|
exceptionInfo: { Type: Object, default: null },
|
|
3400
3430
|
promptEditorType: { Type: String, default: "text-area" }
|
|
3401
3431
|
};
|
|
3402
|
-
function
|
|
3432
|
+
function ye() {
|
|
3403
3433
|
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
3404
3434
|
}
|
|
3405
|
-
async function
|
|
3435
|
+
async function Ea(e) {
|
|
3406
3436
|
if (!navigator.clipboard)
|
|
3407
|
-
throw
|
|
3437
|
+
throw ye();
|
|
3408
3438
|
return navigator.clipboard.writeText(e);
|
|
3409
3439
|
}
|
|
3410
|
-
async function
|
|
3440
|
+
async function Da(e) {
|
|
3411
3441
|
const t = document.createElement("span");
|
|
3412
3442
|
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
3413
3443
|
const n = window.getSelection(), a = window.document.createRange();
|
|
@@ -3418,33 +3448,33 @@ async function ba(e) {
|
|
|
3418
3448
|
} finally {
|
|
3419
3449
|
n == null || n.removeAllRanges(), window.document.body.removeChild(t);
|
|
3420
3450
|
}
|
|
3421
|
-
if (!o) throw
|
|
3451
|
+
if (!o) throw ye();
|
|
3422
3452
|
}
|
|
3423
|
-
async function
|
|
3453
|
+
async function Ba(e) {
|
|
3424
3454
|
try {
|
|
3425
|
-
await
|
|
3455
|
+
await Ea(e);
|
|
3426
3456
|
} catch (t) {
|
|
3427
3457
|
try {
|
|
3428
|
-
await
|
|
3458
|
+
await Da(e);
|
|
3429
3459
|
} catch (n) {
|
|
3430
|
-
throw n || t ||
|
|
3460
|
+
throw n || t || ye();
|
|
3431
3461
|
}
|
|
3432
3462
|
}
|
|
3433
3463
|
}
|
|
3434
|
-
function
|
|
3464
|
+
function Ta() {
|
|
3435
3465
|
async function e(t) {
|
|
3436
|
-
await
|
|
3466
|
+
await Ba(t);
|
|
3437
3467
|
}
|
|
3438
3468
|
return { onCopy: e };
|
|
3439
3469
|
}
|
|
3440
|
-
function
|
|
3441
|
-
const o = l(14),
|
|
3470
|
+
function La(e, t, n, a) {
|
|
3471
|
+
const o = l(14), r = l(140), c = l(""), d = l(a.value.length), v = L(() => a.value), s = L(() => ({
|
|
3442
3472
|
"font-size": `${o.value}px`,
|
|
3443
3473
|
height: "100%"
|
|
3444
3474
|
}));
|
|
3445
|
-
function
|
|
3446
|
-
if (
|
|
3447
|
-
const f =
|
|
3475
|
+
function p(u) {
|
|
3476
|
+
if (u.currentTarget) {
|
|
3477
|
+
const f = u.currentTarget.value || "";
|
|
3448
3478
|
d.value = f.length;
|
|
3449
3479
|
}
|
|
3450
3480
|
}
|
|
@@ -3454,25 +3484,25 @@ function Ca(e, t, n, a) {
|
|
|
3454
3484
|
class: "form-control",
|
|
3455
3485
|
style: s.value,
|
|
3456
3486
|
rows: "4",
|
|
3457
|
-
maxlength:
|
|
3458
|
-
onInput: (
|
|
3459
|
-
}, [
|
|
3487
|
+
maxlength: r.value,
|
|
3488
|
+
onInput: (u) => p(u)
|
|
3489
|
+
}, [v.value]), i("span", {
|
|
3460
3490
|
class: "textarea-wordcount",
|
|
3461
3491
|
title: c.value,
|
|
3462
3492
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
3463
|
-
}, [d.value + " / " +
|
|
3493
|
+
}, [d.value + " / " + r.value])]);
|
|
3464
3494
|
}
|
|
3465
|
-
function
|
|
3466
|
-
const o =
|
|
3495
|
+
function Ra(e, t, n, a) {
|
|
3496
|
+
const o = La(e, t, n, a), r = /* @__PURE__ */ new Map([["text-area", o]]);
|
|
3467
3497
|
function c(d) {
|
|
3468
|
-
return
|
|
3498
|
+
return r.get(d) || null;
|
|
3469
3499
|
}
|
|
3470
3500
|
return { getEditorRender: c };
|
|
3471
3501
|
}
|
|
3472
|
-
function
|
|
3502
|
+
function Fa() {
|
|
3473
3503
|
const e = l(!1), t = l("复制成功");
|
|
3474
3504
|
return {
|
|
3475
|
-
feedbackStyle:
|
|
3505
|
+
feedbackStyle: L(() => {
|
|
3476
3506
|
const a = {
|
|
3477
3507
|
position: "absolute",
|
|
3478
3508
|
left: "50%",
|
|
@@ -3495,96 +3525,96 @@ function Ia() {
|
|
|
3495
3525
|
toShowFeedback: e
|
|
3496
3526
|
};
|
|
3497
3527
|
}
|
|
3498
|
-
function
|
|
3528
|
+
function ka(e, t) {
|
|
3499
3529
|
const n = t.getEditorRender(e.promptEditorType);
|
|
3500
3530
|
return () => n && n();
|
|
3501
3531
|
}
|
|
3502
|
-
function
|
|
3503
|
-
const t = l(3), n = l(480), a =
|
|
3504
|
-
const
|
|
3532
|
+
function Wa(e) {
|
|
3533
|
+
const t = l(3), n = l(480), a = L(() => !!e.value && !!e.value.date), o = L(() => `发生时间 : ${e.value && e.value.date || ""}`), r = L(() => !!e.value && !!e.value.detail), c = L(() => {
|
|
3534
|
+
const y = `${n.value}px`;
|
|
3505
3535
|
return {
|
|
3506
3536
|
overflow: "hidden",
|
|
3507
3537
|
"text-overflow": "ellipsis",
|
|
3508
3538
|
display: "-webkit-box",
|
|
3509
3539
|
"-webkit-box-orient": "vertical",
|
|
3510
3540
|
"-webkit-line-clamp": t.value,
|
|
3511
|
-
"max-height":
|
|
3541
|
+
"max-height": y
|
|
3512
3542
|
};
|
|
3513
|
-
}), d =
|
|
3514
|
-
const
|
|
3543
|
+
}), d = L(() => e.value && e.value.detail || ""), v = L(() => !0), s = l(!1), p = l("展开"), u = l("收起"), f = L(() => {
|
|
3544
|
+
const y = {
|
|
3515
3545
|
display: "block",
|
|
3516
3546
|
color: "#2A87FF"
|
|
3517
3547
|
};
|
|
3518
|
-
return
|
|
3548
|
+
return y["text-align"] = s.value ? "" : "right", y;
|
|
3519
3549
|
});
|
|
3520
|
-
function h(
|
|
3550
|
+
function h(y, w) {
|
|
3521
3551
|
s.value = !s.value, t.value = s.value ? 20 : 3;
|
|
3522
3552
|
}
|
|
3523
|
-
function b(
|
|
3553
|
+
function b(y) {
|
|
3524
3554
|
return h();
|
|
3525
3555
|
}
|
|
3526
|
-
function
|
|
3556
|
+
function I(y) {
|
|
3527
3557
|
return h();
|
|
3528
3558
|
}
|
|
3529
3559
|
return () => i("div", {
|
|
3530
3560
|
class: "toast-msg-detail"
|
|
3531
|
-
}, [a.value && i("div", null, [o.value]),
|
|
3561
|
+
}, [a.value && i("div", null, [o.value]), r.value && i("div", {
|
|
3532
3562
|
id: "exception_error_msg",
|
|
3533
3563
|
ref: "exceptionMessageRef",
|
|
3534
3564
|
style: c.value
|
|
3535
|
-
}, [
|
|
3565
|
+
}, [q("详细信息 : "), i("span", {
|
|
3536
3566
|
innerHTML: d.value
|
|
3537
|
-
}, null)]),
|
|
3567
|
+
}, null)]), v.value && i("span", {
|
|
3538
3568
|
style: f.value
|
|
3539
3569
|
}, [s.value && i("span", {
|
|
3540
3570
|
onClick: b,
|
|
3541
3571
|
style: "cursor: pointer;"
|
|
3542
|
-
}, [
|
|
3543
|
-
onClick:
|
|
3572
|
+
}, [u.value]), !s.value && i("span", {
|
|
3573
|
+
onClick: I,
|
|
3544
3574
|
style: "cursor: pointer;"
|
|
3545
|
-
}, [
|
|
3575
|
+
}, [p.value])])]);
|
|
3546
3576
|
}
|
|
3547
|
-
function
|
|
3577
|
+
function $a(e) {
|
|
3548
3578
|
return () => i("p", {
|
|
3549
3579
|
class: "toast-msg-detail",
|
|
3550
3580
|
innerHTML: e.value
|
|
3551
3581
|
}, null);
|
|
3552
3582
|
}
|
|
3553
|
-
function
|
|
3554
|
-
const o = l(e.exceptionInfo),
|
|
3583
|
+
function Oa(e, t, n, a) {
|
|
3584
|
+
const o = l(e.exceptionInfo), r = L(() => {
|
|
3555
3585
|
const f = {
|
|
3556
3586
|
"f-icon": !0
|
|
3557
3587
|
}, h = `f-icon-${t.value}`;
|
|
3558
3588
|
return f[h] = !0, f;
|
|
3559
|
-
}), c =
|
|
3560
|
-
function
|
|
3561
|
-
return s.value ?
|
|
3589
|
+
}), c = L(() => n.value || o.value && o.value.message), d = L(() => a.value), v = L(() => !!a.value), s = L(() => !!o.value);
|
|
3590
|
+
function p() {
|
|
3591
|
+
return s.value ? Wa(o) : v.value ? $a(d) : () => null;
|
|
3562
3592
|
}
|
|
3563
|
-
const
|
|
3593
|
+
const u = p();
|
|
3564
3594
|
return () => i(ue, null, [i("div", {
|
|
3565
3595
|
class: "float-left modal-tips-iconwrap"
|
|
3566
3596
|
}, [i("span", {
|
|
3567
|
-
class:
|
|
3597
|
+
class: r.value
|
|
3568
3598
|
}, null)]), i("div", {
|
|
3569
3599
|
class: "modal-tips-content"
|
|
3570
3600
|
}, [i("p", {
|
|
3571
3601
|
class: "toast-msg-title",
|
|
3572
3602
|
innerHTML: c.value
|
|
3573
|
-
}, null),
|
|
3603
|
+
}, null), u()])]);
|
|
3574
3604
|
}
|
|
3575
|
-
function
|
|
3605
|
+
function Aa(e, t, n) {
|
|
3576
3606
|
const {
|
|
3577
3607
|
onCopy: a
|
|
3578
3608
|
} = t, {
|
|
3579
3609
|
toShowFeedback: o
|
|
3580
|
-
} = n,
|
|
3610
|
+
} = n, r = l("复制成功"), c = l("复制详细信息"), d = l(e.exceptionInfo || {
|
|
3581
3611
|
date: "",
|
|
3582
3612
|
message: "",
|
|
3583
3613
|
detail: ""
|
|
3584
|
-
}),
|
|
3585
|
-
function s(
|
|
3586
|
-
a(
|
|
3587
|
-
|
|
3614
|
+
}), v = L(() => d.value && d.value.detail || "");
|
|
3615
|
+
function s(p) {
|
|
3616
|
+
a(v.value).catch((u) => {
|
|
3617
|
+
r.value = "复制失败";
|
|
3588
3618
|
}).finally(() => {
|
|
3589
3619
|
o.value = !0, setTimeout(() => {
|
|
3590
3620
|
o.value = !1;
|
|
@@ -3598,97 +3628,97 @@ function Ta(e, t, n) {
|
|
|
3598
3628
|
style: "cursor: pointer;"
|
|
3599
3629
|
}, [c.value])]);
|
|
3600
3630
|
}
|
|
3601
|
-
function
|
|
3602
|
-
const o = l(e.type),
|
|
3603
|
-
function w(
|
|
3631
|
+
function ja(e, t, n, a) {
|
|
3632
|
+
const o = l(e.type), r = l([]), c = l(e.exceptionInfo), d = l(e.okButtonText), v = l(e.cancelButtonText), s = l(!0), p = l(!0), u = L(() => !!(r.value && r.value.length)), f = L(() => c.value && c.value.date && c.value.message && c.value.detail), h = L(() => !(r.value && r.value.length) && (d.value || v.value)), b = L(() => p.value && d.value), I = L(() => s.value && v.value), y = Aa(e, n, a);
|
|
3633
|
+
function w(R) {
|
|
3604
3634
|
o.value === "question" && t.emit("reject"), t.emit("close");
|
|
3605
3635
|
}
|
|
3606
|
-
function F(
|
|
3636
|
+
function F(R) {
|
|
3607
3637
|
o.value === "question" && t.emit("accept"), t.emit("close");
|
|
3608
3638
|
}
|
|
3609
3639
|
return () => i("div", {
|
|
3610
3640
|
class: "modal-footer"
|
|
3611
|
-
}, [f.value &&
|
|
3641
|
+
}, [f.value && y(), h.value && I.value && i("button", {
|
|
3612
3642
|
type: "button",
|
|
3613
3643
|
class: "btn btn-secondary btn-lg",
|
|
3614
3644
|
onClick: w
|
|
3615
|
-
}, [
|
|
3645
|
+
}, [v.value]), h.value && b.value && i("button", {
|
|
3616
3646
|
type: "button",
|
|
3617
3647
|
class: "btn btn-primary btn-lg",
|
|
3618
3648
|
onClick: F
|
|
3619
|
-
}, [d.value]),
|
|
3649
|
+
}, [d.value]), u.value && r.value.length && r.value.map((R) => i("button", {
|
|
3620
3650
|
type: "button",
|
|
3621
|
-
onClick:
|
|
3622
|
-
class:
|
|
3623
|
-
}, [
|
|
3624
|
-
class:
|
|
3625
|
-
}, null),
|
|
3651
|
+
onClick: R.handle,
|
|
3652
|
+
class: R.class
|
|
3653
|
+
}, [R.iconClass && i("span", {
|
|
3654
|
+
class: R.iconClass
|
|
3655
|
+
}, null), R.text]))]);
|
|
3626
3656
|
}
|
|
3627
|
-
const oe = /* @__PURE__ */
|
|
3657
|
+
const oe = /* @__PURE__ */ U({
|
|
3628
3658
|
name: "FMessageBox",
|
|
3629
|
-
props:
|
|
3659
|
+
props: xa,
|
|
3630
3660
|
emits: ["accept", "reject", "close"],
|
|
3631
3661
|
setup(e, t) {
|
|
3632
|
-
const n = l(e.type), a = l(e.title), o = l(e.detail),
|
|
3633
|
-
const
|
|
3662
|
+
const n = l(e.type), a = l(e.title), o = l(e.detail), r = L(() => {
|
|
3663
|
+
const y = {
|
|
3634
3664
|
"modal-tips": !0,
|
|
3635
3665
|
"d-flex": !0,
|
|
3636
3666
|
"flex-row": !0
|
|
3637
3667
|
}, w = `messager-type-${n.value}`;
|
|
3638
|
-
return
|
|
3639
|
-
}), c =
|
|
3640
|
-
const
|
|
3641
|
-
return n.value === "prompt" ?
|
|
3642
|
-
}), d =
|
|
3643
|
-
feedbackStyle:
|
|
3644
|
-
feedbackMessage:
|
|
3668
|
+
return y[w] = !0, y;
|
|
3669
|
+
}), c = L(() => {
|
|
3670
|
+
const y = {};
|
|
3671
|
+
return n.value === "prompt" ? y.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (y.padding = "0.5rem 1.5rem 1rem 1.5rem"), y;
|
|
3672
|
+
}), d = Ta(), v = Ra(e, n, a, o), s = Fa(), {
|
|
3673
|
+
feedbackStyle: p,
|
|
3674
|
+
feedbackMessage: u
|
|
3645
3675
|
} = s;
|
|
3646
3676
|
function f() {
|
|
3647
3677
|
return i("div", {
|
|
3648
|
-
style:
|
|
3649
|
-
}, [
|
|
3678
|
+
style: p.value
|
|
3679
|
+
}, [u.value]);
|
|
3650
3680
|
}
|
|
3651
3681
|
function h() {
|
|
3652
3682
|
switch (n.value) {
|
|
3653
3683
|
case "prompt":
|
|
3654
|
-
return
|
|
3684
|
+
return ka(e, v);
|
|
3655
3685
|
default:
|
|
3656
|
-
return
|
|
3686
|
+
return Oa(e, n, a, o);
|
|
3657
3687
|
}
|
|
3658
3688
|
}
|
|
3659
|
-
const b = h(),
|
|
3689
|
+
const b = h(), I = ja(e, t, d, s);
|
|
3660
3690
|
return () => i("div", {
|
|
3661
3691
|
class: "farris-messager"
|
|
3662
3692
|
}, [i("section", {
|
|
3663
|
-
class:
|
|
3693
|
+
class: r.value,
|
|
3664
3694
|
style: c.value
|
|
3665
|
-
}, [b()]),
|
|
3695
|
+
}, [b()]), I(), f()]);
|
|
3666
3696
|
}
|
|
3667
3697
|
});
|
|
3668
|
-
class
|
|
3698
|
+
class J {
|
|
3669
3699
|
static show(t) {
|
|
3670
|
-
let n = new
|
|
3700
|
+
let n = new he();
|
|
3671
3701
|
const a = Z({
|
|
3672
3702
|
...t
|
|
3673
|
-
}), o = !1,
|
|
3674
|
-
}),
|
|
3703
|
+
}), o = !1, r = a.type === "error" || a.type === "prompt", c = a.type === "error" ? "错误提示" : a.type === "prompt" && a.title || "", d = a.acceptCallback || (() => {
|
|
3704
|
+
}), v = a.rejectCallback || (() => {
|
|
3675
3705
|
});
|
|
3676
3706
|
let s = null;
|
|
3677
|
-
const
|
|
3707
|
+
const p = () => {
|
|
3678
3708
|
s && (s == null || s.destroy(), n = null);
|
|
3679
3709
|
};
|
|
3680
3710
|
s = n == null ? void 0 : n.open({
|
|
3681
3711
|
class: "modal-message modal-message-type-info",
|
|
3682
3712
|
title: c,
|
|
3683
3713
|
showButtons: o,
|
|
3684
|
-
showHeader:
|
|
3714
|
+
showHeader: r,
|
|
3685
3715
|
width: a.width || 400,
|
|
3686
3716
|
fitContent: !0,
|
|
3687
3717
|
showMaxButton: !1,
|
|
3688
|
-
render: () => i(oe,
|
|
3718
|
+
render: () => i(oe, Ie(a, {
|
|
3689
3719
|
onAccept: d,
|
|
3690
|
-
onReject:
|
|
3691
|
-
onClose:
|
|
3720
|
+
onReject: v,
|
|
3721
|
+
onClose: p
|
|
3692
3722
|
}), null)
|
|
3693
3723
|
});
|
|
3694
3724
|
}
|
|
@@ -3700,7 +3730,7 @@ class Y {
|
|
|
3700
3730
|
okButtonText: "知道了",
|
|
3701
3731
|
cancelButtonText: ""
|
|
3702
3732
|
});
|
|
3703
|
-
|
|
3733
|
+
J.show(a);
|
|
3704
3734
|
}
|
|
3705
3735
|
static warning(t, n) {
|
|
3706
3736
|
const a = Z({
|
|
@@ -3710,7 +3740,7 @@ class Y {
|
|
|
3710
3740
|
okButtonText: "知道了",
|
|
3711
3741
|
cancelButtonText: ""
|
|
3712
3742
|
});
|
|
3713
|
-
|
|
3743
|
+
J.show(a);
|
|
3714
3744
|
}
|
|
3715
3745
|
static success(t, n) {
|
|
3716
3746
|
const a = Z({
|
|
@@ -3720,7 +3750,7 @@ class Y {
|
|
|
3720
3750
|
okButtonText: "关闭",
|
|
3721
3751
|
cancelButtonText: ""
|
|
3722
3752
|
});
|
|
3723
|
-
|
|
3753
|
+
J.show(a);
|
|
3724
3754
|
}
|
|
3725
3755
|
static error(t, n, a) {
|
|
3726
3756
|
const o = Z({
|
|
@@ -3734,7 +3764,7 @@ class Y {
|
|
|
3734
3764
|
detail: n
|
|
3735
3765
|
}
|
|
3736
3766
|
});
|
|
3737
|
-
|
|
3767
|
+
J.show(o);
|
|
3738
3768
|
}
|
|
3739
3769
|
static prompt(t, n) {
|
|
3740
3770
|
const a = Z({
|
|
@@ -3744,10 +3774,10 @@ class Y {
|
|
|
3744
3774
|
okButtonText: "确定",
|
|
3745
3775
|
cancelButtonText: "取消"
|
|
3746
3776
|
});
|
|
3747
|
-
|
|
3777
|
+
J.show(a);
|
|
3748
3778
|
}
|
|
3749
3779
|
static question(t, n, a, o) {
|
|
3750
|
-
const
|
|
3780
|
+
const r = Z({
|
|
3751
3781
|
type: "question",
|
|
3752
3782
|
title: t,
|
|
3753
3783
|
detail: n,
|
|
@@ -3756,40 +3786,40 @@ class Y {
|
|
|
3756
3786
|
acceptCallback: a,
|
|
3757
3787
|
rejectCallback: o
|
|
3758
3788
|
});
|
|
3759
|
-
|
|
3789
|
+
J.show(r);
|
|
3760
3790
|
}
|
|
3761
3791
|
}
|
|
3762
3792
|
oe.install = (e) => {
|
|
3763
|
-
e.component(oe.name, oe), e.provide("FMessageBoxService",
|
|
3793
|
+
e.component(oe.name, oe), e.provide("FMessageBoxService", J);
|
|
3764
3794
|
};
|
|
3765
|
-
const
|
|
3795
|
+
const de = /* @__PURE__ */ U({
|
|
3766
3796
|
name: "FResponseLayoutEditorSetting",
|
|
3767
|
-
props:
|
|
3797
|
+
props: me,
|
|
3768
3798
|
emits: ["change"],
|
|
3769
3799
|
setup(e, t) {
|
|
3770
|
-
const n = l(e.
|
|
3771
|
-
A(() => e.
|
|
3772
|
-
n.value =
|
|
3800
|
+
const n = l(e.initialState), a = l(e.width), o = l(e.height);
|
|
3801
|
+
A(() => e.initialState, (v) => {
|
|
3802
|
+
n.value = v;
|
|
3773
3803
|
});
|
|
3774
|
-
function
|
|
3775
|
-
t.emit("change", s),
|
|
3804
|
+
function r(v, s) {
|
|
3805
|
+
n.value.importData = s, t.emit("change", s), v && v.unmount();
|
|
3776
3806
|
}
|
|
3777
|
-
function c(
|
|
3778
|
-
|
|
3807
|
+
function c(v) {
|
|
3808
|
+
v && v.unmount();
|
|
3779
3809
|
}
|
|
3780
3810
|
function d() {
|
|
3781
3811
|
if (!n.value.defaultState || !n.value.importData) {
|
|
3782
|
-
const
|
|
3783
|
-
|
|
3812
|
+
const v = n.value.message || "只可以在响应式表单组件中调整响应式布局配置";
|
|
3813
|
+
J.info(v, "");
|
|
3784
3814
|
return;
|
|
3785
3815
|
}
|
|
3786
|
-
|
|
3787
|
-
render: (
|
|
3816
|
+
he.show({
|
|
3817
|
+
render: (v) => i(ie, {
|
|
3788
3818
|
initialState: n,
|
|
3789
3819
|
width: a.value,
|
|
3790
3820
|
height: o.value,
|
|
3791
|
-
onClose: () => c(
|
|
3792
|
-
onSubmit: (s) =>
|
|
3821
|
+
onClose: () => c(v),
|
|
3822
|
+
onSubmit: (s) => r(v, s)
|
|
3793
3823
|
}, null),
|
|
3794
3824
|
width: 900,
|
|
3795
3825
|
height: 500,
|
|
@@ -3801,27 +3831,60 @@ const re = /* @__PURE__ */ q({
|
|
|
3801
3831
|
return () => i("div", {
|
|
3802
3832
|
class: "f-column-width-setting-button",
|
|
3803
3833
|
onClick: d
|
|
3804
|
-
}, [i("
|
|
3834
|
+
}, [i("i", {
|
|
3805
3835
|
class: "f-icon f-icon-add"
|
|
3806
3836
|
}, null), i("div", {
|
|
3807
3837
|
class: "f-column-width-setting-button-name"
|
|
3808
3838
|
}, [i("span", {
|
|
3809
3839
|
class: "f-column-width-setting-button-center"
|
|
3810
|
-
}, [
|
|
3840
|
+
}, [q("高级设置")])])]);
|
|
3811
3841
|
}
|
|
3812
|
-
})
|
|
3842
|
+
});
|
|
3843
|
+
class Ga {
|
|
3844
|
+
constructor() {
|
|
3845
|
+
/** 控件标题 */
|
|
3846
|
+
N(this, "label", "");
|
|
3847
|
+
/** 控件id */
|
|
3848
|
+
N(this, "id", "");
|
|
3849
|
+
/** 每个控件占用的栅格数 */
|
|
3850
|
+
N(this, "columnInSM", 12);
|
|
3851
|
+
N(this, "columnInMD", 6);
|
|
3852
|
+
N(this, "columnInLG", 3);
|
|
3853
|
+
N(this, "columnInEL", 2);
|
|
3854
|
+
/** 每个控件占用的列数 */
|
|
3855
|
+
N(this, "displayWidthInSM", 1);
|
|
3856
|
+
N(this, "displayWidthInMD", 1);
|
|
3857
|
+
N(this, "displayWidthInLG", 1);
|
|
3858
|
+
N(this, "displayWidthInEL", 1);
|
|
3859
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
3860
|
+
N(this, "displayColumnCountAtBreakPoint", "md");
|
|
3861
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
3862
|
+
N(this, "tagRow", 0);
|
|
3863
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
3864
|
+
N(this, "showTopBorder", 0);
|
|
3865
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
3866
|
+
N(this, "group", 1);
|
|
3867
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
3868
|
+
N(this, "isSupportedClass", !0);
|
|
3869
|
+
/** 控件所在分组id(设计器用的) */
|
|
3870
|
+
N(this, "fieldSetId", "");
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
const qa = {
|
|
3813
3874
|
install(e) {
|
|
3814
|
-
e.component(ie.name, ie), e.component(
|
|
3875
|
+
e.component(ie.name, ie), e.component(de.name, de);
|
|
3815
3876
|
},
|
|
3816
3877
|
register(e, t, n, a) {
|
|
3817
|
-
e["response-layout-editor-setting"] =
|
|
3878
|
+
e["response-layout-editor-setting"] = de, t["response-layout-editor-setting"] = we;
|
|
3818
3879
|
},
|
|
3819
3880
|
registerDesigner(e, t, n) {
|
|
3820
|
-
e["response-layout-editor-setting"] =
|
|
3881
|
+
e["response-layout-editor-setting"] = Ma, t["response-layout-editor-setting"] = we;
|
|
3821
3882
|
}
|
|
3822
3883
|
};
|
|
3823
3884
|
export {
|
|
3885
|
+
Ga as ResponseFormLayoutContext,
|
|
3824
3886
|
ie as ResponseLayoutEditor,
|
|
3825
|
-
|
|
3826
|
-
|
|
3887
|
+
de as ResponseLayoutEditorSetting,
|
|
3888
|
+
qa as default,
|
|
3889
|
+
ct as responseLayoutEditorProps
|
|
3827
3890
|
};
|