@dfsj/components 3.1.0 → 3.1.2
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/CHANGELOG.md +21 -3
- package/dist/components/Boards/index.d.ts +2 -2
- package/dist/components/Boards/src/Boards.vue.d.ts +21 -0
- package/dist/components/Boards/src/Boards.vue2.js +132 -31
- package/dist/components/Boards/src/props.d.ts +20 -0
- package/dist/components/Boards/src/props.js +19 -1
- package/dist/components/Editor/src/Editor.vue2.js +2 -3
- package/dist/components/Form/src/Form.vue2.js +16 -4
- package/dist/components/Modal/src/BasicModal.vue.d.ts +37 -2
- package/dist/components/Modal/src/BasicModal.vue2.js +11 -11
- package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +9 -0
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +17 -10
- package/dist/components/Modal/src/hooks/useModalDrag.js +2 -7
- package/dist/components/Modal/src/props.d.ts +18 -1
- package/dist/components/Modal/src/props.js +4 -0
- package/dist/components/Modal/src/utils/index.js +2 -2
- package/dist/components/NodeAxis/index.d.ts +6 -0
- package/dist/components/NodeAxis/src/AbstractNodeProvider.d.ts +15 -0
- package/dist/components/NodeAxis/src/AbstractNodeProvider.js +23 -0
- package/dist/components/NodeAxis/src/BCanvasNodeRender.d.ts +19 -0
- package/dist/components/NodeAxis/src/CanvasNodeRender.d.ts +28 -0
- package/dist/components/NodeAxis/src/CanvasNodeRender.js +400 -0
- package/dist/components/NodeAxis/src/NodeAxis.d.ts +12 -0
- package/dist/components/NodeAxis/src/NodeAxis.vue.d.ts +17 -0
- package/dist/components/NodeAxis/src/NodeAxis.vue.js +5 -0
- package/dist/components/NodeAxis/src/NodeAxis.vue2.js +68 -0
- package/dist/components/NodeAxis/src/NodeModel.d.ts +24 -0
- package/dist/components/NodeAxis/src/NodeModel.js +64 -0
- package/dist/components/NodeAxis/src/NodeProvider.d.ts +15 -0
- package/dist/components/NodeAxis/src/NodeRender.d.ts +17 -0
- package/dist/components/NodeAxis/src/NodeRender.js +30 -0
- package/dist/components/NodeAxis/src/NullLayerProvider.d.ts +23 -0
- package/dist/components/NodeAxis/src/NullLayerProvider.js +88 -0
- package/dist/components/NodeAxis/src/NullProvider.d.ts +17 -0
- package/dist/components/NodeAxis/src/NullProvider.js +67 -0
- package/dist/components/NodeAxis/src/TimerNodePlayer.d.ts +19 -0
- package/dist/components/NodeAxis/src/TimerNodePlayer.js +150 -0
- package/dist/components/NodeAxis/src/config/node-axis.options.d.ts +54 -0
- package/dist/components/NodeAxis/src/config/node-axis.options.js +56 -0
- package/dist/components/NodeAxis/src/enum/index.d.ts +15 -0
- package/dist/components/NodeAxis/src/enum/index.js +20 -0
- package/dist/components/NodeAxis/src/interface/NodePlayer.d.ts +9 -0
- package/dist/components/NodeAxis/src/interface/NodeProvider.d.ts +15 -0
- package/dist/components/NodeAxis/src/utils/assign.d.ts +1 -0
- package/dist/components/NodeAxis/src/utils/assign.js +43 -0
- package/dist/components/Stateful/src/Stateful.vue2.js +15 -8
- package/dist/components/Visual/index.d.ts +3 -0
- package/dist/components/Visual/src/BufferLayerPlayer.d.ts +27 -0
- package/dist/components/Visual/src/BufferLayerPlayer.js +293 -0
- package/dist/components/Visual/src/ResolvableLayerProvider.d.ts +36 -0
- package/dist/components/Visual/src/ResolvableLayerProvider.js +255 -0
- package/dist/components/Visual/src/config/default.manager.d.ts +6 -0
- package/dist/components/Visual/src/config/default.manager.js +7 -0
- package/dist/components/Visual/src/config/default.provider.d.ts +17 -0
- package/dist/components/Visual/src/config/default.provider.js +18 -0
- package/dist/components/Visual/src/interface/Disposable.d.ts +3 -0
- package/dist/components/Visual/src/interface/LayerFactory.d.ts +5 -0
- package/dist/components/Visual/src/interface/LayerManager.d.ts +8 -0
- package/dist/components/Visual/src/interface/LayerPlayer.d.ts +10 -0
- package/dist/components/Visual/src/interface/LayerProvider.d.ts +7 -0
- package/dist/components/Visual/src/interface/LayerResolver.d.ts +13 -0
- package/dist/components/Visual/src/mapping.d.ts +5 -0
- package/dist/components/Visual/src/mapping.js +7 -0
- package/dist/components/Visual/src/resolvers/IntervalResolver.d.ts +30 -0
- package/dist/components/Visual/src/resolvers/IntervalResolver.js +170 -0
- package/dist/components/Visual/src/resolvers/tools.resolver.d.ts +4 -0
- package/dist/components/Visual/src/resolvers/tools.resolver.js +145 -0
- package/dist/components/Visual/src/utils/NodeMath.d.ts +13 -0
- package/dist/components/Visual/src/utils/NodeMath.js +101 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -1
- package/dist/index.min.css +3 -3
- package/dist/node_modules/.pnpm/@vueuse_core@10.7.2_vue@3.4.21/node_modules/@vueuse/core/index.js +175 -4
- package/dist/node_modules/.pnpm/@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js +8 -2
- package/package.json +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
# Change Log
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## 3.1.2 (2024-06-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* (components) 增加时间轴导出 ([ca11a1f](http://10.10.12.18/dfsj/dfsj/commits/ca11a1f00f0e963b4c4f483fae3cacd76f65d522))
|
|
12
|
+
* (template) 增加要素图标 ([f6d046b](http://10.10.12.18/dfsj/dfsj/commits/f6d046b4e3805a115477516deae719dca54cac3f))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [3.1.1](https://gitee.com/verdaccio/ec/compare/@dfsj/components@3.1.0...@dfsj/components@3.1.1) (2024-05-21)
|
|
2
20
|
|
|
3
|
-
|
|
21
|
+
**Note:** Version bump only for package @dfsj/components
|
|
4
22
|
|
|
5
23
|
# [3.1.0](https://gitee.com/verdaccio/ec/compare/@dfsj/components@3.0.2...@dfsj/components@3.1.0) (2024-05-15)
|
|
6
24
|
|
|
@@ -259,4 +277,4 @@ All notable changes to this project will be documented in this file. See [Conven
|
|
|
259
277
|
|
|
260
278
|
## [1.1.3](https://gitee.com/verdaccio/ec/compare/@dfsj/components@1.1.2...@dfsj/components@1.1.3) (2023-06-11)
|
|
261
279
|
|
|
262
|
-
**Note:** Version bump only for package @dfsj/components
|
|
280
|
+
**Note:** Version bump only for package @dfsj/components
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { BoardItem, BoardState } from './src/props';
|
|
2
|
-
import { BoardProps } from './src/props';
|
|
2
|
+
import { BoardProps, BoardPosition } from './src/props';
|
|
3
3
|
import Boards from './src/Boards.vue';
|
|
4
|
-
export { BoardProps, BoardState, BoardItem, Boards };
|
|
4
|
+
export { BoardProps, BoardState, BoardItem, Boards, BoardPosition };
|
|
@@ -11,6 +11,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
state: string;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
+
customStyle: {
|
|
15
|
+
type: () => import("./props").CustomStyle;
|
|
16
|
+
default: () => {
|
|
17
|
+
margin: any[];
|
|
18
|
+
fixed: any[];
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
14
22
|
}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
23
|
[key: string]: any;
|
|
16
24
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,8 +34,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
34
|
state: string;
|
|
27
35
|
};
|
|
28
36
|
};
|
|
37
|
+
customStyle: {
|
|
38
|
+
type: () => import("./props").CustomStyle;
|
|
39
|
+
default: () => {
|
|
40
|
+
margin: any[];
|
|
41
|
+
fixed: any[];
|
|
42
|
+
color: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
29
45
|
}>>, {
|
|
30
46
|
position: string;
|
|
31
47
|
board: import("./props").BoardState;
|
|
48
|
+
customStyle: {
|
|
49
|
+
margin: any[];
|
|
50
|
+
fixed: any[];
|
|
51
|
+
color: string;
|
|
52
|
+
};
|
|
32
53
|
}, {}>;
|
|
33
54
|
export default _default;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
3
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
|
+
import { defineComponent, toRefs, ref, computed, unref, onMounted, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, withModifiers, createVNode, Fragment, withCtx, renderList, createBlock, toDisplayString, withDirectives, resolveDynamicComponent, markRaw, normalizeProps, guardReactiveProps, vShow, mergeProps, defineAsyncComponent } from 'vue';
|
|
5
|
+
import { BoardProps, BoardPosition } from './props.js';
|
|
6
|
+
import '../../Icon/src/Icon.vue.js';
|
|
7
|
+
import '../../Icon/src/SvgIcon.vue.js';
|
|
8
|
+
import { useElementBounding } from '../../../node_modules/.pnpm/@vueuse_core@10.7.2_vue@3.4.21/node_modules/@vueuse/core/index.js';
|
|
9
|
+
import { isString } from '../../../utils/is.js';
|
|
10
|
+
import script$1 from '../../Icon/src/Icon.vue2.js';
|
|
3
11
|
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
14
|
var _hoisted_1 = {
|
|
5
15
|
"class": "custom-label"
|
|
6
16
|
};
|
|
@@ -18,9 +28,23 @@ var script = defineComponent({
|
|
|
18
28
|
setup: function setup(__props) {
|
|
19
29
|
var cache = new Map();
|
|
20
30
|
var props = __props;
|
|
31
|
+
var _toRefs = toRefs(props),
|
|
32
|
+
position = _toRefs.position,
|
|
33
|
+
board = _toRefs.board,
|
|
34
|
+
customStyle = _toRefs.customStyle;
|
|
21
35
|
var isAsyncComponent = function isAsyncComponent(component) {
|
|
22
36
|
return !!(component && component.__asyncLoader);
|
|
23
37
|
};
|
|
38
|
+
var el = ref(null);
|
|
39
|
+
var _useElementBounding = useElementBounding(el),
|
|
40
|
+
top = _useElementBounding.top,
|
|
41
|
+
right = _useElementBounding.right,
|
|
42
|
+
bottom = _useElementBounding.bottom,
|
|
43
|
+
left = _useElementBounding.left;
|
|
44
|
+
var color = computed(function () {
|
|
45
|
+
var _customStyle$value$co;
|
|
46
|
+
return (_customStyle$value$co = customStyle.value.color) !== null && _customStyle$value$co !== void 0 ? _customStyle$value$co : '#11848f';
|
|
47
|
+
});
|
|
24
48
|
function resolve(source) {
|
|
25
49
|
var component = cache.get(source);
|
|
26
50
|
if (component == null) {
|
|
@@ -33,56 +57,133 @@ var script = defineComponent({
|
|
|
33
57
|
return component;
|
|
34
58
|
}
|
|
35
59
|
function tabClick(id) {
|
|
36
|
-
|
|
37
|
-
props.board.index = id === null || id === void 0 ? void 0 : id.index;
|
|
60
|
+
board.value.index = id === null || id === void 0 ? void 0 : id.index;
|
|
38
61
|
}
|
|
39
62
|
var toggle = function toggle() {
|
|
40
|
-
|
|
63
|
+
board.value.state = board.value.state === 'spread' ? 'minify' : 'spread';
|
|
41
64
|
};
|
|
42
65
|
var icon = computed(function () {
|
|
43
|
-
if (
|
|
66
|
+
if (board.value.state == 'hidden') return null;
|
|
44
67
|
return 'ic:round-chevron-right';
|
|
45
68
|
});
|
|
69
|
+
var tabPosition = computed(function () {
|
|
70
|
+
var mapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BoardPosition.EAST, 'right'), BoardPosition.WEST, 'left'), BoardPosition.SOUTH, 'top'), BoardPosition.TOP, 'top');
|
|
71
|
+
return mapping === null || mapping === void 0 ? void 0 : mapping[position.value];
|
|
72
|
+
});
|
|
73
|
+
var transform = computed(function () {
|
|
74
|
+
var _transform = '';
|
|
75
|
+
if (board.value.state == 'spread') {
|
|
76
|
+
_transform = '';
|
|
77
|
+
} else {
|
|
78
|
+
if (position.value == BoardPosition.WEST) {
|
|
79
|
+
_transform = "translateX(-".concat(right.value, "px)");
|
|
80
|
+
} else if (position.value == BoardPosition.EAST) {
|
|
81
|
+
_transform = "translateX(".concat(window.innerWidth - left.value, "px)");
|
|
82
|
+
} else if (position.value == BoardPosition.SOUTH) {
|
|
83
|
+
_transform = "translateY(".concat(window.innerHeight - top.value, "px)");
|
|
84
|
+
} else if (position.value == BoardPosition.TOP) {
|
|
85
|
+
_transform = "translateY(-".concat(bottom.value, "px)");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return _transform;
|
|
89
|
+
});
|
|
90
|
+
var getStyle = computed(function () {
|
|
91
|
+
var _customStyle$value$fi;
|
|
92
|
+
var fixed = {};
|
|
93
|
+
var margin = '';
|
|
94
|
+
if (((_customStyle$value$fi = customStyle.value.fixed) === null || _customStyle$value$fi === void 0 ? void 0 : _customStyle$value$fi.length) != 4) {
|
|
95
|
+
customStyle.value.fixed = [0, 0, 0, 0];
|
|
96
|
+
}
|
|
97
|
+
if (isString(customStyle.value.margin)) {
|
|
98
|
+
margin = customStyle.value.margin;
|
|
99
|
+
} else {
|
|
100
|
+
var _customStyle$value$ma;
|
|
101
|
+
if (((_customStyle$value$ma = customStyle.value.margin) === null || _customStyle$value$ma === void 0 ? void 0 : _customStyle$value$ma.length) != 4) {
|
|
102
|
+
customStyle.value.margin = [0, 0, 0, 0];
|
|
103
|
+
margin = _toConsumableArray(unref(customStyle).margin).join(' ');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
var _customStyle$value$fi2 = _slicedToArray(customStyle.value.fixed, 4),
|
|
107
|
+
t = _customStyle$value$fi2[0],
|
|
108
|
+
r = _customStyle$value$fi2[1],
|
|
109
|
+
b = _customStyle$value$fi2[2],
|
|
110
|
+
l = _customStyle$value$fi2[3];
|
|
111
|
+
if ([BoardPosition.EAST, BoardPosition.WEST].includes(position.value)) {
|
|
112
|
+
fixed = {
|
|
113
|
+
top: t || 0,
|
|
114
|
+
bottom: b || 0
|
|
115
|
+
};
|
|
116
|
+
} else if ([BoardPosition.FULL].includes(position.value)) {
|
|
117
|
+
fixed = {
|
|
118
|
+
top: t || 0,
|
|
119
|
+
bottom: b || 0,
|
|
120
|
+
left: l || 0,
|
|
121
|
+
right: r || 0
|
|
122
|
+
};
|
|
123
|
+
} else if ([BoardPosition.TOP].includes(position.value)) {
|
|
124
|
+
fixed = {
|
|
125
|
+
top: t || 0,
|
|
126
|
+
left: l || 0,
|
|
127
|
+
right: r || 0
|
|
128
|
+
};
|
|
129
|
+
} else {
|
|
130
|
+
fixed = {
|
|
131
|
+
left: l || 0,
|
|
132
|
+
right: r || 0
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
return _objectSpread(_objectSpread({}, fixed), {}, {
|
|
136
|
+
margin: margin,
|
|
137
|
+
transform: transform.value
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
onMounted(function () {
|
|
141
|
+
var _el$value;
|
|
142
|
+
el === null || el === void 0 || (_el$value = el.value) === null || _el$value === void 0 || (_el$value = _el$value.style) === null || _el$value === void 0 || _el$value.setProperty('--board-tab-color', color.value);
|
|
143
|
+
});
|
|
46
144
|
watch(function () {
|
|
47
|
-
return
|
|
48
|
-
}, function (
|
|
49
|
-
|
|
50
|
-
|
|
145
|
+
return customStyle.value.color;
|
|
146
|
+
}, function () {
|
|
147
|
+
var _el$value2;
|
|
148
|
+
el === null || el === void 0 || (_el$value2 = el.value) === null || _el$value2 === void 0 || (_el$value2 = _el$value2.style) === null || _el$value2 === void 0 || _el$value2.setProperty('--board-tab-color', color.value);
|
|
149
|
+
}, {
|
|
150
|
+
deep: true
|
|
151
|
+
});
|
|
51
152
|
return function (_ctx, _cache) {
|
|
52
|
-
var
|
|
53
|
-
var _component_Icon = resolveComponent("Icon");
|
|
153
|
+
var _unref2;
|
|
54
154
|
var _component_el_tab_pane = resolveComponent("el-tab-pane");
|
|
55
155
|
var _component_el_tabs = resolveComponent("el-tabs");
|
|
56
156
|
return openBlock(), createElementBlock("div", {
|
|
57
|
-
"class": normalizeClass([prefixCls,
|
|
58
|
-
style:
|
|
59
|
-
|
|
60
|
-
|
|
157
|
+
"class": normalizeClass([prefixCls, unref(board).state, unref(position), 'p-2']),
|
|
158
|
+
style: normalizeStyle(getStyle.value),
|
|
159
|
+
ref_key: "el",
|
|
160
|
+
ref: el
|
|
61
161
|
}, [createElementVNode("span", {
|
|
62
162
|
onClick: withModifiers(toggle, ["stop"]),
|
|
63
163
|
"class": normalizeClass(['board--wing', {
|
|
64
164
|
hidden: !icon.value
|
|
65
|
-
}])
|
|
66
|
-
|
|
67
|
-
|
|
165
|
+
}])
|
|
166
|
+
}, [createVNode(unref(script$1), {
|
|
167
|
+
size: 26,
|
|
68
168
|
icon: icon.value
|
|
69
169
|
}, null, 8, ["icon"])], 2), createElementVNode("div", {
|
|
70
170
|
"class": normalizeClass("".concat(prefixCls, "__layout h-full flex"))
|
|
71
|
-
}, [
|
|
171
|
+
}, [unref(board).items.length > 1 ? (openBlock(), createElementBlock(Fragment, {
|
|
72
172
|
key: 0
|
|
73
173
|
}, [createElementVNode("div", null, [createVNode(_component_el_tabs, {
|
|
74
174
|
"class": "multiple-toggle-tab",
|
|
75
|
-
modelValue:
|
|
175
|
+
modelValue: unref(board).value,
|
|
76
176
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
|
|
77
|
-
return
|
|
177
|
+
return unref(board).value = $event;
|
|
78
178
|
}),
|
|
79
179
|
onTabClick: tabClick,
|
|
80
|
-
"tab-position":
|
|
180
|
+
"tab-position": tabPosition.value,
|
|
181
|
+
"data-content": unref(customStyle).color
|
|
81
182
|
}, {
|
|
82
183
|
"default": withCtx(function () {
|
|
83
|
-
return [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
184
|
+
return [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(board).items, function (b, i) {
|
|
84
185
|
return openBlock(), createBlock(_component_el_tab_pane, {
|
|
85
|
-
key: b === null || b === void 0 ? void 0 : b.
|
|
186
|
+
key: b === null || b === void 0 ? void 0 : b.id,
|
|
86
187
|
name: b.id,
|
|
87
188
|
label: b.label
|
|
88
189
|
}, {
|
|
@@ -94,18 +195,18 @@ var script = defineComponent({
|
|
|
94
195
|
}), 128))];
|
|
95
196
|
}),
|
|
96
197
|
_: 1
|
|
97
|
-
}, 8, ["modelValue"])]), createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList((
|
|
198
|
+
}, 8, ["modelValue", "tab-position", "data-content"])]), createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList((_unref2 = unref(board)) === null || _unref2 === void 0 ? void 0 : _unref2.items, function (item) {
|
|
98
199
|
return openBlock(), createElementBlock("div", {
|
|
99
200
|
key: item.id,
|
|
100
201
|
"class": normalizeClass(["board--panel-container", {
|
|
101
|
-
active:
|
|
202
|
+
active: unref(board).value === item.id
|
|
102
203
|
}])
|
|
103
|
-
}, [withDirectives((openBlock(), createBlock(resolveDynamicComponent(markRaw(resolve(item.content))), normalizeProps(guardReactiveProps(item.props)), null, 16)), [[vShow,
|
|
104
|
-
}), 128))])], 64)) : (openBlock(), createElementBlock("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
204
|
+
}, [withDirectives((openBlock(), createBlock(resolveDynamicComponent(markRaw(resolve(item.content))), normalizeProps(guardReactiveProps(item.props)), null, 16)), [[vShow, unref(board).value === item.id]])], 2);
|
|
205
|
+
}), 128))])], 64)) : (openBlock(), createElementBlock("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(board).items, function (item) {
|
|
105
206
|
return withDirectives((openBlock(), createBlock(resolveDynamicComponent(markRaw(resolve(item.content))), normalizeProps(mergeProps({
|
|
106
207
|
key: item.id
|
|
107
|
-
}, item.props)), null, 16)), [[vShow,
|
|
108
|
-
}), 128))]))], 2)],
|
|
208
|
+
}, item.props)), null, 16)), [[vShow, unref(board).value === item.id]]);
|
|
209
|
+
}), 128))]))], 2)], 6);
|
|
109
210
|
};
|
|
110
211
|
}
|
|
111
212
|
});
|
|
@@ -11,6 +11,18 @@ export type BoardState = {
|
|
|
11
11
|
index: number;
|
|
12
12
|
value: string | number;
|
|
13
13
|
};
|
|
14
|
+
export type CustomStyle = {
|
|
15
|
+
margin?: [string | number, string | number, string | number, string | number];
|
|
16
|
+
fixed?: [string | number, string | number, string | number, string | number];
|
|
17
|
+
color?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare enum BoardPosition {
|
|
20
|
+
EAST = "east",
|
|
21
|
+
TOP = "top",
|
|
22
|
+
WEST = "west",
|
|
23
|
+
SOUTH = "south",
|
|
24
|
+
FULL = "full"
|
|
25
|
+
}
|
|
14
26
|
export declare const BoardProps: {
|
|
15
27
|
position: import("vue-types").VueTypeDef<string> & {
|
|
16
28
|
default: string;
|
|
@@ -24,4 +36,12 @@ export declare const BoardProps: {
|
|
|
24
36
|
state: string;
|
|
25
37
|
};
|
|
26
38
|
};
|
|
39
|
+
customStyle: {
|
|
40
|
+
type: () => CustomStyle;
|
|
41
|
+
default: () => {
|
|
42
|
+
margin: any[];
|
|
43
|
+
fixed: any[];
|
|
44
|
+
color: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
27
47
|
};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import propTypes from '../../../utils/propTypes.js';
|
|
2
2
|
|
|
3
|
+
var BoardPosition;
|
|
4
|
+
(function (BoardPosition) {
|
|
5
|
+
BoardPosition["EAST"] = "east";
|
|
6
|
+
BoardPosition["TOP"] = "top";
|
|
7
|
+
BoardPosition["WEST"] = "west";
|
|
8
|
+
BoardPosition["SOUTH"] = "south";
|
|
9
|
+
BoardPosition["FULL"] = "full";
|
|
10
|
+
})(BoardPosition || (BoardPosition = {}));
|
|
3
11
|
var BoardProps = {
|
|
4
12
|
position: propTypes.oneOf(['east', 'top', 'west', 'south', 'full']).def('east'),
|
|
5
13
|
board: {
|
|
@@ -12,7 +20,17 @@ var BoardProps = {
|
|
|
12
20
|
state: 'spread'
|
|
13
21
|
};
|
|
14
22
|
}
|
|
23
|
+
},
|
|
24
|
+
customStyle: {
|
|
25
|
+
type: Object,
|
|
26
|
+
"default": function _default() {
|
|
27
|
+
return {
|
|
28
|
+
margin: [],
|
|
29
|
+
fixed: [],
|
|
30
|
+
color: 'red'
|
|
31
|
+
};
|
|
32
|
+
}
|
|
15
33
|
}
|
|
16
34
|
};
|
|
17
35
|
|
|
18
|
-
export { BoardProps };
|
|
36
|
+
export { BoardPosition, BoardProps };
|
|
@@ -44,9 +44,7 @@ var script = defineComponent({
|
|
|
44
44
|
}, function (val) {
|
|
45
45
|
if (val === unref(valueHtml)) return;
|
|
46
46
|
valueHtml.value = val;
|
|
47
|
-
}, {
|
|
48
|
-
immediate: true
|
|
49
|
-
});
|
|
47
|
+
}, {});
|
|
50
48
|
watch(function () {
|
|
51
49
|
return valueHtml.value;
|
|
52
50
|
}, function (val) {
|
|
@@ -54,6 +52,7 @@ var script = defineComponent({
|
|
|
54
52
|
});
|
|
55
53
|
var handleCreated = function handleCreated(editor) {
|
|
56
54
|
editorRef.value = editor;
|
|
55
|
+
valueHtml.value = props.modelValue;
|
|
57
56
|
};
|
|
58
57
|
var editorConfig = computed(function () {
|
|
59
58
|
return Object.assign({
|
|
@@ -163,7 +163,7 @@ var script = defineComponent({
|
|
|
163
163
|
options = _context.sent;
|
|
164
164
|
setSchema([{
|
|
165
165
|
field: item.field,
|
|
166
|
-
path: item.component === ComponentNameEnum.TREE_SELECT ? 'componentProps.data' : 'componentProps.options',
|
|
166
|
+
path: item.component === ComponentNameEnum.TREE_SELECT || item.component === ComponentNameEnum.TRANSFER ? 'componentProps.data' : 'componentProps.options',
|
|
167
167
|
value: options
|
|
168
168
|
}]);
|
|
169
169
|
case 4:
|
|
@@ -293,7 +293,7 @@ var script = defineComponent({
|
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
295
|
var Comp = function Comp() {
|
|
296
|
-
var _item$componentProps5;
|
|
296
|
+
var _item$componentProps5, _item$componentProps6;
|
|
297
297
|
var itemVal = computed({
|
|
298
298
|
get: function get$1() {
|
|
299
299
|
return get(formModel.value, item.field);
|
|
@@ -302,7 +302,19 @@ var script = defineComponent({
|
|
|
302
302
|
set(formModel.value, item.field, val);
|
|
303
303
|
}
|
|
304
304
|
});
|
|
305
|
-
return createVNode(Com, mergeProps({
|
|
305
|
+
return item.component === ComponentNameEnum.UPLOAD ? createVNode(Com, mergeProps({
|
|
306
|
+
"file-list": itemVal.value,
|
|
307
|
+
"onUpdate:file-list": function onUpdateFileList($event) {
|
|
308
|
+
return itemVal.value = $event;
|
|
309
|
+
},
|
|
310
|
+
"ref": function ref(el) {
|
|
311
|
+
return setComponentRefMap(el, item.field);
|
|
312
|
+
}
|
|
313
|
+
}, autoSetPlaceholder && setTextPlaceholder(item), setComponentProps(item), {
|
|
314
|
+
"style": ((_item$componentProps5 = item.componentProps) === null || _item$componentProps5 === void 0 ? void 0 : _item$componentProps5.style) || {
|
|
315
|
+
width: '100%'
|
|
316
|
+
}
|
|
317
|
+
}), slotsMap) : createVNode(Com, mergeProps({
|
|
306
318
|
"modelValue": itemVal.value,
|
|
307
319
|
"onUpdate:modelValue": function onUpdateModelValue($event) {
|
|
308
320
|
return itemVal.value = $event;
|
|
@@ -311,7 +323,7 @@ var script = defineComponent({
|
|
|
311
323
|
return setComponentRefMap(el, item.field);
|
|
312
324
|
}
|
|
313
325
|
}, autoSetPlaceholder && setTextPlaceholder(item), setComponentProps(item), {
|
|
314
|
-
"style": ((_item$
|
|
326
|
+
"style": ((_item$componentProps6 = item.componentProps) === null || _item$componentProps6 === void 0 ? void 0 : _item$componentProps6.style) || {}
|
|
315
327
|
}), slotsMap);
|
|
316
328
|
};
|
|
317
329
|
return createVNode(Fragment, null, [Comp()]);
|
|
@@ -39,6 +39,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
39
|
type: BooleanConstructor;
|
|
40
40
|
default: boolean;
|
|
41
41
|
};
|
|
42
|
+
background: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
42
46
|
maximizer: {
|
|
43
47
|
type: BooleanConstructor;
|
|
44
48
|
default: boolean;
|
|
@@ -101,7 +105,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
105
|
type: NumberConstructor;
|
|
102
106
|
default: () => number;
|
|
103
107
|
};
|
|
104
|
-
sizes:
|
|
108
|
+
sizes: {
|
|
109
|
+
(arrayLength: number): (string | number)[];
|
|
110
|
+
(...items: (string | number)[]): (string | number)[];
|
|
111
|
+
new (arrayLength: number): (string | number)[];
|
|
112
|
+
new (...items: (string | number)[]): (string | number)[];
|
|
113
|
+
isArray(arg: any): arg is any[];
|
|
114
|
+
readonly prototype: any[];
|
|
115
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
116
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
117
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
118
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
119
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
120
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
121
|
+
};
|
|
105
122
|
offset: ObjectConstructor;
|
|
106
123
|
overflow: StringConstructor;
|
|
107
124
|
modally: BooleanConstructor;
|
|
@@ -164,6 +181,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
164
181
|
type: BooleanConstructor;
|
|
165
182
|
default: boolean;
|
|
166
183
|
};
|
|
184
|
+
background: {
|
|
185
|
+
type: StringConstructor;
|
|
186
|
+
default: string;
|
|
187
|
+
};
|
|
167
188
|
maximizer: {
|
|
168
189
|
type: BooleanConstructor;
|
|
169
190
|
default: boolean;
|
|
@@ -226,7 +247,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
226
247
|
type: NumberConstructor;
|
|
227
248
|
default: () => number;
|
|
228
249
|
};
|
|
229
|
-
sizes:
|
|
250
|
+
sizes: {
|
|
251
|
+
(arrayLength: number): (string | number)[];
|
|
252
|
+
(...items: (string | number)[]): (string | number)[];
|
|
253
|
+
new (arrayLength: number): (string | number)[];
|
|
254
|
+
new (...items: (string | number)[]): (string | number)[];
|
|
255
|
+
isArray(arg: any): arg is any[];
|
|
256
|
+
readonly prototype: any[];
|
|
257
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
258
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
259
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
260
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
261
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
262
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
263
|
+
};
|
|
230
264
|
offset: ObjectConstructor;
|
|
231
265
|
overflow: StringConstructor;
|
|
232
266
|
modally: BooleanConstructor;
|
|
@@ -257,6 +291,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
257
291
|
onCancel: (...args: any[]) => any;
|
|
258
292
|
onSubmit: (...args: any[]) => any;
|
|
259
293
|
header: boolean;
|
|
294
|
+
background: string;
|
|
260
295
|
maximizer: boolean;
|
|
261
296
|
closer: boolean;
|
|
262
297
|
maximum: any;
|
|
@@ -38,7 +38,6 @@ var script = defineComponent({
|
|
|
38
38
|
watch(function () {
|
|
39
39
|
return visible.value;
|
|
40
40
|
}, function (value) {
|
|
41
|
-
console.log('.....', value);
|
|
42
41
|
innerVisible.value = value;
|
|
43
42
|
}, {
|
|
44
43
|
deep: true
|
|
@@ -80,7 +79,6 @@ var script = defineComponent({
|
|
|
80
79
|
var bodyStyle = computed(function () {
|
|
81
80
|
return toBodyStyle(props, locator, maximum);
|
|
82
81
|
});
|
|
83
|
-
console.log('--titleAftertitleAfter-', props);
|
|
84
82
|
var getBindValue = computed(function () {
|
|
85
83
|
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, attrs), slots), props), {}, {
|
|
86
84
|
onSwitch: onSwitch,
|
|
@@ -103,8 +101,11 @@ var script = defineComponent({
|
|
|
103
101
|
var _slotFn = props === null || props === void 0 ? void 0 : props.title;
|
|
104
102
|
return (_slot !== null && _slot !== void 0 ? _slot : isFunction(_slotFn)) ? _slotFn === null || _slotFn === void 0 ? void 0 : _slotFn() : _slotFn;
|
|
105
103
|
};
|
|
104
|
+
var hasMover = computed(function () {
|
|
105
|
+
return !!(slots !== null && slots !== void 0 && slots['mover']);
|
|
106
|
+
});
|
|
106
107
|
return function () {
|
|
107
|
-
var _props$animation, _props$animation2;
|
|
108
|
+
var _props$animation, _props$animation2, _slots$mover, _slots$default;
|
|
108
109
|
return innerVisible.value ? createVNode("div", {
|
|
109
110
|
"class": "component modal dialog component-modal-page-wrap ".concat(mainClass.value),
|
|
110
111
|
"style": mainStyle.value
|
|
@@ -123,9 +124,11 @@ var script = defineComponent({
|
|
|
123
124
|
return getTitleBefore();
|
|
124
125
|
},
|
|
125
126
|
icon: function icon() {
|
|
126
|
-
return createVNode(script$3, {
|
|
127
|
+
return props.headerIcon ? createVNode(script$3, {
|
|
128
|
+
"color": "white",
|
|
129
|
+
"size": 26,
|
|
127
130
|
"icon": props.headerIcon
|
|
128
|
-
}, null);
|
|
131
|
+
}, null) : null;
|
|
129
132
|
},
|
|
130
133
|
title: function title() {
|
|
131
134
|
return getTitle();
|
|
@@ -135,12 +138,9 @@ var script = defineComponent({
|
|
|
135
138
|
}
|
|
136
139
|
}), createVNode("div", {
|
|
137
140
|
"class": "modal--content component-modal-content"
|
|
138
|
-
}, {
|
|
139
|
-
"
|
|
140
|
-
|
|
141
|
-
return (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
|
142
|
-
}
|
|
143
|
-
}), withDirectives(createVNode(script$1, null, null), [[resolveDirective("bind"), getBindValue]])])];
|
|
141
|
+
}, [hasMover.value && createVNode("div", {
|
|
142
|
+
"class": "mover ".concat(moverClass)
|
|
143
|
+
}, [(_slots$mover = slots.mover) === null || _slots$mover === void 0 ? void 0 : _slots$mover.call(slots)]), (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]), withDirectives(createVNode(script$1, null, null), [[resolveDirective("bind"), getBindValue]])])];
|
|
144
144
|
}
|
|
145
145
|
})]) : null;
|
|
146
146
|
};
|
|
@@ -3,6 +3,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
type: BooleanConstructor;
|
|
4
4
|
default: boolean;
|
|
5
5
|
};
|
|
6
|
+
background: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
6
10
|
maximizer: {
|
|
7
11
|
type: BooleanConstructor;
|
|
8
12
|
default: boolean;
|
|
@@ -67,6 +71,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
67
71
|
type: BooleanConstructor;
|
|
68
72
|
default: boolean;
|
|
69
73
|
};
|
|
74
|
+
background: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
70
78
|
maximizer: {
|
|
71
79
|
type: BooleanConstructor;
|
|
72
80
|
default: boolean;
|
|
@@ -126,6 +134,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
126
134
|
};
|
|
127
135
|
}>>, {
|
|
128
136
|
header: boolean;
|
|
137
|
+
background: string;
|
|
129
138
|
maximizer: boolean;
|
|
130
139
|
closer: boolean;
|
|
131
140
|
maximum: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, createElementVNode,
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createCommentVNode, createElementVNode, renderSlot, createBlock, withModifiers } from 'vue';
|
|
2
2
|
import { headerProps } from '../props.js';
|
|
3
3
|
import '../../../Icon/src/Icon.vue.js';
|
|
4
4
|
import { moverClass } from '../config.js';
|
|
@@ -23,20 +23,23 @@ var _hoisted_4 = {
|
|
|
23
23
|
var _hoisted_5 = {
|
|
24
24
|
"class": "modal-header-right-control-wrap"
|
|
25
25
|
};
|
|
26
|
-
var _hoisted_6 = {
|
|
27
|
-
key: 0,
|
|
28
|
-
"class": "header--control"
|
|
29
|
-
};
|
|
30
26
|
var script = defineComponent({
|
|
31
27
|
__name: 'ModalHeader',
|
|
32
28
|
props: headerProps,
|
|
33
29
|
setup: function setup(__props) {
|
|
34
30
|
var props = __props;
|
|
31
|
+
var getStyle = computed(function () {
|
|
32
|
+
return {
|
|
33
|
+
background: props.background,
|
|
34
|
+
color: '#fff'
|
|
35
|
+
};
|
|
36
|
+
});
|
|
35
37
|
return function (_ctx, _cache) {
|
|
36
38
|
var _ctx$switcherIcon;
|
|
37
39
|
return !!_ctx.header ? (openBlock(), createElementBlock("div", {
|
|
38
40
|
key: 0,
|
|
39
41
|
"class": normalizeClass(['component-modal-header', unref(moverClass)]),
|
|
42
|
+
style: normalizeStyle(getStyle.value),
|
|
40
43
|
onDblclick: _cache[0] || (_cache[0] = function () {
|
|
41
44
|
return _ctx.onSwitch();
|
|
42
45
|
})
|
|
@@ -45,17 +48,21 @@ var script = defineComponent({
|
|
|
45
48
|
style: normalizeStyle({
|
|
46
49
|
'justify-content': props.titleAlign
|
|
47
50
|
})
|
|
48
|
-
}, [createCommentVNode(" 左侧的信息"), _ctx.$slots.headerBefore ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "headerBefore")])) : createCommentVNode("v-if", true), createCommentVNode("图标"), _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("v-if", true), createCommentVNode("文字"), _ctx.$slots.title ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("v-if", true), createCommentVNode("追加"), _ctx.$slots.headerAfter ? (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "headerAfter")])) : createCommentVNode("v-if", true)], 4), createCommentVNode(" 右侧的按钮"), createElementVNode("div", _hoisted_5, [!!_ctx.switcherIcon
|
|
51
|
+
}, [createCommentVNode(" 左侧的信息"), _ctx.$slots.headerBefore ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "headerBefore")])) : createCommentVNode("v-if", true), createCommentVNode("图标"), _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("v-if", true), createCommentVNode("文字"), _ctx.$slots.title ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "title")])) : createCommentVNode("v-if", true), createCommentVNode("追加"), _ctx.$slots.headerAfter ? (openBlock(), createElementBlock("div", _hoisted_4, [renderSlot(_ctx.$slots, "headerAfter")])) : createCommentVNode("v-if", true)], 4), createCommentVNode(" 右侧的按钮"), createElementVNode("div", _hoisted_5, [!!_ctx.switcherIcon ? (openBlock(), createBlock(script$1, {
|
|
52
|
+
key: 0,
|
|
49
53
|
"class": "cursor-pointer",
|
|
50
|
-
size:
|
|
54
|
+
size: 28,
|
|
55
|
+
color: "white",
|
|
51
56
|
onClick: withModifiers(_ctx.onSwitch, ["stop"]),
|
|
52
57
|
icon: (_ctx$switcherIcon = _ctx.switcherIcon) === null || _ctx$switcherIcon === void 0 ? void 0 : _ctx$switcherIcon[props.maximum].image
|
|
53
|
-
}, null, 8, ["onClick", "icon"]),
|
|
54
|
-
|
|
58
|
+
}, null, 8, ["onClick", "icon"])) : createCommentVNode("v-if", true), !!_ctx.closerIcon ? (openBlock(), createBlock(script$1, {
|
|
59
|
+
key: 1,
|
|
60
|
+
size: 28,
|
|
61
|
+
color: "white",
|
|
55
62
|
"class": "cursor-pointer",
|
|
56
63
|
onClick: withModifiers(_ctx.onClose, ["stop"]),
|
|
57
64
|
icon: _ctx.closerIcon.image
|
|
58
|
-
}, null, 8, ["onClick", "icon"])
|
|
65
|
+
}, null, 8, ["onClick", "icon"])) : createCommentVNode("v-if", true)])], 38)) : createCommentVNode("v-if", true);
|
|
59
66
|
};
|
|
60
67
|
}
|
|
61
68
|
});
|