@dfsj/components 3.7.2 → 4.0.0-alpha.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/CHANGELOG.md +61 -453
- package/README.md +101 -24
- package/dist/_virtual/_rollupPluginBabelHelpers.js +13 -0
- package/dist/components/Boards/src/Boards.vue.js +10 -4
- package/dist/components/Boards/src/Boards.vue2.js +10 -147
- package/dist/components/Boards/src/hooKs/useStyle.d.ts +16 -4
- package/dist/components/Boards/src/hooKs/useStyle.js +10 -99
- package/dist/components/Boards/src/props.d.ts +6 -22
- package/dist/components/Boards/src/props.js +10 -55
- package/dist/components/ClickOutSide/src/ClickOutSide.vue.js +10 -4
- package/dist/components/ClickOutSide/src/ClickOutSide.vue2.js +10 -25
- package/dist/components/Descriptions/src/Descriptions.vue.js +10 -4
- package/dist/components/Descriptions/src/Descriptions.vue2.js +10 -150
- package/dist/components/Editor/src/Editor.vue.js +10 -4
- package/dist/components/Editor/src/Editor.vue2.js +10 -137
- package/dist/components/Form/src/Form.vue.js +10 -4
- package/dist/components/Form/src/Form.vue2.js +10 -388
- package/dist/components/Form/src/components/useRenderCheckbox.js +10 -32
- package/dist/components/Form/src/components/useRenderRadio.js +10 -32
- package/dist/components/Form/src/components/useRenderSelect.js +10 -51
- package/dist/components/Form/src/helper/componentMap.js +10 -34
- package/dist/components/Form/src/helper/index.js +10 -108
- package/dist/components/Form/src/types/index.d.ts +80 -84
- package/dist/components/Form/src/types/index.js +10 -30
- package/dist/components/Form/src/useForm.js +10 -289
- package/dist/components/Highlight/src/Highlight.vue.js +10 -4
- package/dist/components/Highlight/src/Highlight.vue2.js +10 -61
- package/dist/components/Icon/src/Icon.vue.js +10 -4
- package/dist/components/Icon/src/Icon.vue2.js +10 -122
- package/dist/components/Icon/src/SvgIcon.vue.js +10 -6
- package/dist/components/Icon/src/SvgIcon.vue2.js +10 -44
- package/dist/components/Icon/src/SvgIcon.vue3.js +10 -13
- package/dist/components/InputPassword/src/InputPassword.vue.js +10 -4
- package/dist/components/InputPassword/src/InputPassword.vue2.js +10 -57
- package/dist/components/Modal/src/BasicModal.vue.js +10 -4
- package/dist/components/Modal/src/BasicModal.vue2.js +10 -154
- package/dist/components/Modal/src/components/ModalFooter.vue.js +10 -4
- package/dist/components/Modal/src/components/ModalFooter.vue2.js +10 -39
- package/dist/components/Modal/src/components/ModalHeader.vue.js +10 -4
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +10 -80
- package/dist/components/Modal/src/config.d.ts +3 -2
- package/dist/components/Modal/src/config.js +10 -28
- package/dist/components/Modal/src/hooks/useModalDrag.js +10 -109
- package/dist/components/Modal/src/hooks/useTimeout.js +10 -52
- package/dist/components/Modal/src/props.d.ts +16 -56
- package/dist/components/Modal/src/props.js +10 -130
- package/dist/components/Modal/src/utils/index.js +10 -85
- package/dist/components/NodeAxis/src/AbstractNodeProvider.js +10 -21
- package/dist/components/NodeAxis/src/CanvasNodeRender.d.ts +3 -12
- package/dist/components/NodeAxis/src/CanvasNodeRender.js +10 -411
- package/dist/components/NodeAxis/src/NodeAxis.vue.js +10 -4
- package/dist/components/NodeAxis/src/NodeAxis.vue2.js +10 -68
- package/dist/components/NodeAxis/src/NodeModel.js +10 -62
- package/dist/components/NodeAxis/src/NodeRender.js +10 -28
- package/dist/components/NodeAxis/src/NullLayerProvider.js +10 -86
- package/dist/components/NodeAxis/src/NullProvider.js +10 -65
- package/dist/components/NodeAxis/src/TimerNodePlayer.js +10 -148
- package/dist/components/NodeAxis/src/config/node-axis.options.js +10 -55
- package/dist/components/NodeAxis/src/enum/index.js +10 -19
- package/dist/components/NodeAxis/src/utils/assign.js +10 -42
- package/dist/components/Stateful/src/State.js +10 -78
- package/dist/components/Stateful/src/Stateful.vue.js +10 -4
- package/dist/components/Stateful/src/Stateful.vue2.js +10 -52
- package/dist/components/Stateful/src/props.d.ts +2 -6
- package/dist/components/Stateful/src/props.js +10 -28
- package/dist/components/Table/index.d.ts +3 -3
- package/dist/components/Table/src/Table.vue.js +10 -4
- package/dist/components/Table/src/Table.vue2.js +10 -583
- package/dist/components/Table/src/components/ColumnSetting.vue.js +10 -4
- package/dist/components/Table/src/components/ColumnSetting.vue2.js +10 -263
- package/dist/components/Table/src/components/TableActions.vue.js +10 -4
- package/dist/components/Table/src/components/TableActions.vue2.js +10 -107
- package/dist/components/Table/src/helper/index.js +10 -10
- package/dist/components/Table/src/types/index.d.ts +11 -13
- package/dist/components/Table/src/useTable.d.ts +36 -1
- package/dist/components/Table/src/useTable.js +10 -283
- package/dist/components/UnifyChart/src/ChartToolbox.vue.js +10 -4
- package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +10 -82
- package/dist/components/UnifyChart/src/UnifyChart.vue.js +10 -4
- package/dist/components/UnifyChart/src/UnifyChart.vue2.js +10 -57
- package/dist/components/UnifyChart/src/hooks/useLoader.js +10 -92
- package/dist/components/UnifyChart/src/hooks/useRender.d.ts +8 -13
- package/dist/components/UnifyChart/src/hooks/useRender.js +10 -49
- package/dist/components/UnifyChart/src/props.d.ts +13 -59
- package/dist/components/UnifyChart/src/props.js +10 -32
- package/dist/components/UnifyChart/src/useDownLoad.js +10 -26
- package/dist/components/Visual/src/BufferLayerPlayer.d.ts +9 -5
- package/dist/components/Visual/src/BufferLayerPlayer.js +10 -288
- package/dist/components/Visual/src/ResolvableLayerProvider.js +10 -252
- package/dist/components/Visual/src/config/default.manager.js +10 -6
- package/dist/components/Visual/src/config/default.provider.js +10 -17
- package/dist/components/Visual/src/mapping.js +10 -6
- package/dist/components/Visual/src/resolvers/IntervalResolver.js +10 -168
- package/dist/components/Visual/src/resolvers/tools.resolver.js +10 -151
- package/dist/components/Visual/src/utils/NodeMath.js +10 -99
- package/dist/components/Windows/src/ModalWrap.vue.js +10 -4
- package/dist/components/Windows/src/ModalWrap.vue2.js +10 -132
- package/dist/components/Windows/src/Windows.vue.js +10 -6
- package/dist/components/Windows/src/Windows.vue2.js +10 -55
- package/dist/components/Windows/src/Windows.vue3.js +10 -24
- package/dist/components/Windows/src/props.js +10 -8
- package/dist/directives/clickOutside.js +10 -70
- package/dist/directives/repeatClick.js +10 -28
- package/dist/directives/resizable.js +10 -195
- package/dist/index.d.ts +0 -2
- package/dist/index.js +11 -53
- package/dist/index.min.css +3 -3
- package/dist/themes/index.js +9 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/utils/index.js +10 -23
- package/package.json +53 -24
- package/dist/components/Boards/src/Boards.vue.d.ts +0 -102
- package/dist/components/ClickOutSide/src/ClickOutSide.vue.d.ts +0 -7
- package/dist/components/DatePicker/index.d.ts +0 -2
- package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +0 -16
- package/dist/components/DatePicker/src/composables/use-month-range-header.js +0 -52
- package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +0 -173
- package/dist/components/DatePicker/src/composables/use-range-picker.js +0 -99
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +0 -19
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.js +0 -5
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +0 -564
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +0 -16
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.js +0 -5
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +0 -210
- package/dist/components/DatePicker/src/index.d.ts +0 -224
- package/dist/components/DatePicker/src/index.js +0 -87
- package/dist/components/DatePicker/src/panel-utils.d.ts +0 -2
- package/dist/components/DatePicker/src/panel-utils.js +0 -25
- package/dist/components/Descriptions/src/Descriptions.vue.d.ts +0 -97
- package/dist/components/Editor/src/Editor.vue.d.ts +0 -51
- package/dist/components/Form/src/Form.vue.d.ts +0 -838
- package/dist/components/Highlight/src/Highlight.vue.d.ts +0 -41
- package/dist/components/Icon/src/Icon.vue.d.ts +0 -49
- package/dist/components/Icon/src/SvgIcon.vue.d.ts +0 -45
- package/dist/components/InputPassword/src/InputPassword.vue.d.ts +0 -27
- package/dist/components/Modal/src/BasicModal.vue.d.ts +0 -419
- package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +0 -86
- package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +0 -241
- package/dist/components/NodeAxis/src/BCanvasNodeRender.d.ts +0 -19
- package/dist/components/NodeAxis/src/NodeAxis.vue.d.ts +0 -17
- package/dist/components/Stateful/src/Stateful.vue.d.ts +0 -22
- package/dist/components/Table/src/Table.vue.d.ts +0 -1535
- package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +0 -30
- package/dist/components/Table/src/components/TableActions.vue.d.ts +0 -229
- package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +0 -46
- package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +0 -95
- package/dist/components/Video/index.d.ts +0 -2
- package/dist/components/Video/src/VideoPlayer.vue.d.ts +0 -60
- package/dist/components/Video/src/VideoPlayer.vue.js +0 -5
- package/dist/components/Video/src/VideoPlayer.vue2.js +0 -107
- package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +0 -34
- package/dist/components/Video/src/VideoPlayerToolbar.vue.js +0 -5
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +0 -65
- package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +0 -7
- package/dist/components/Video/src/abstract/Observable.d.ts +0 -6
- package/dist/components/Video/src/abstract/Observable.js +0 -89
- package/dist/components/Video/src/abstract/VideoControl.d.ts +0 -32
- package/dist/components/Video/src/abstract/VideoControl.js +0 -48
- package/dist/components/Video/src/control/DaHua.d.ts +0 -12
- package/dist/components/Video/src/control/DaHua.js +0 -154
- package/dist/components/Video/src/control/Hikvision.d.ts +0 -28
- package/dist/components/Video/src/control/Hikvision.js +0 -249
- package/dist/components/Video/src/control/VideoFactory.d.ts +0 -3
- package/dist/components/Video/src/control/VideoFactory.js +0 -31
- package/dist/components/Video/src/enums/CommonEnum.d.ts +0 -26
- package/dist/components/Video/src/enums/CommonEnum.js +0 -31
- package/dist/components/Windows/src/ModalWrap.vue.d.ts +0 -14
- package/dist/components/Windows/src/Windows.vue.d.ts +0 -21
- package/dist/components/src/components/Boards/src/hooKs/useStyle.d.ts +0 -9
- package/dist/components/src/components/DatePicker/src/composables/use-month-range-header.d.ts +0 -16
- package/dist/components/src/components/DatePicker/src/composables/use-range-picker.d.ts +0 -173
- package/dist/components/src/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +0 -19
- package/dist/components/src/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +0 -16
- package/dist/components/src/components/Descriptions/src/Descriptions.vue.d.ts +0 -97
- package/dist/components/src/components/Form/src/components/useRenderCheckbox.d.ts +0 -4
- package/dist/components/src/components/Form/src/components/useRenderRadio.d.ts +0 -4
- package/dist/components/src/components/Form/src/components/useRenderSelect.d.ts +0 -4
- package/dist/components/src/components/Form/src/helper/componentMap.d.ts +0 -5
- package/dist/components/src/components/Form/src/helper/index.d.ts +0 -7
- package/dist/components/src/components/InputPassword/src/InputPassword.vue.d.ts +0 -27
- package/dist/components/src/components/Modal/src/hooks/useTimeout.d.ts +0 -15
- package/dist/components/src/components/Modal/src/utils/index.d.ts +0 -3
- package/dist/components/src/components/NodeAxis/src/BCanvasNodeRender.d.ts +0 -19
- package/dist/components/src/components/NodeAxis/src/NodeAxis.d.ts +0 -12
- package/dist/components/src/components/NodeAxis/src/NodeAxis.vue.d.ts +0 -17
- package/dist/components/src/components/NodeAxis/src/TimerNodePlayer.d.ts +0 -19
- package/dist/components/src/components/NodeAxis/src/interface/NodePlayer.d.ts +0 -9
- package/dist/components/src/components/Table/src/components/ColumnSetting.vue.d.ts +0 -30
- package/dist/components/src/components/Table/src/components/TableActions.vue.d.ts +0 -96
- package/dist/components/src/components/Table/src/helper/index.d.ts +0 -2
- package/dist/components/src/components/Video/src/VideoPlayerToolbar.vue.d.ts +0 -34
- package/dist/components/src/components/Video/src/abstract/AbstractVideoControl.d.ts +0 -7
- package/dist/components/src/components/Video/src/abstract/Observable.d.ts +0 -6
- package/dist/components/src/components/Video/src/abstract/VideoControl.d.ts +0 -32
- package/dist/components/src/components/Video/src/control/DaHua.d.ts +0 -12
- package/dist/components/src/components/Video/src/control/Hikvision.d.ts +0 -28
- package/dist/components/src/components/Video/src/control/VideoFactory.d.ts +0 -3
- package/dist/components/src/components/Video/src/enums/CommonEnum.d.ts +0 -26
- package/dist/components/src/helper/lang.d.ts +0 -1
- package/dist/components/src/themes/index.d.ts +0 -1
- package/dist/components/src/utils/index.d.ts +0 -11
- package/dist/helper/lang.d.ts +0 -1
- package/dist/helper/lang.js +0 -546
- package/dist/node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/core/index.js +0 -335
- package/dist/node_modules/.pnpm/@vueuse_core@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/core/index.js +0 -393
- package/dist/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/shared/index.js +0 -40
- package/dist/node_modules/.pnpm/@vueuse_shared@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/shared/index.js +0 -53
|
@@ -1,87 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
4
10
|
|
|
5
|
-
var
|
|
6
|
-
var NullLayerProvider = /*#__PURE__*/function () {
|
|
7
|
-
function NullLayerProvider() {
|
|
8
|
-
_classCallCheck(this, NullLayerProvider);
|
|
9
|
-
}
|
|
10
|
-
return _createClass(NullLayerProvider, [{
|
|
11
|
-
key: "color",
|
|
12
|
-
value: function color(index) {
|
|
13
|
-
return "";
|
|
14
|
-
}
|
|
15
|
-
}, {
|
|
16
|
-
key: "count",
|
|
17
|
-
get: function get() {
|
|
18
|
-
return 0;
|
|
19
|
-
}
|
|
20
|
-
}, {
|
|
21
|
-
key: "dispose",
|
|
22
|
-
value: function dispose() {}
|
|
23
|
-
}, {
|
|
24
|
-
key: "extends",
|
|
25
|
-
value: function _extends(direction, minimum) {
|
|
26
|
-
return 0;
|
|
27
|
-
}
|
|
28
|
-
}, {
|
|
29
|
-
key: "extensible",
|
|
30
|
-
get: function get() {
|
|
31
|
-
return 0;
|
|
32
|
-
}
|
|
33
|
-
}, {
|
|
34
|
-
key: "extent",
|
|
35
|
-
get: function get() {
|
|
36
|
-
return [0, 0, 0];
|
|
37
|
-
}
|
|
38
|
-
}, {
|
|
39
|
-
key: "extract",
|
|
40
|
-
value: function extract(range, count, nodes) {
|
|
41
|
-
return [];
|
|
42
|
-
}
|
|
43
|
-
}, {
|
|
44
|
-
key: "find",
|
|
45
|
-
value: function find(query) {
|
|
46
|
-
return 0;
|
|
47
|
-
}
|
|
48
|
-
}, {
|
|
49
|
-
key: "format",
|
|
50
|
-
value: function format(index, type) {
|
|
51
|
-
return "暂无数据";
|
|
52
|
-
}
|
|
53
|
-
}, {
|
|
54
|
-
key: "get",
|
|
55
|
-
value: function get(index) {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
}, {
|
|
59
|
-
key: "getNodeInfo",
|
|
60
|
-
value: function getNodeInfo(index) {
|
|
61
|
-
return undefined;
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
key: "reset",
|
|
65
|
-
value: function reset() {}
|
|
66
|
-
}, {
|
|
67
|
-
key: "scale",
|
|
68
|
-
value: function scale(offset, range, length, direction) {
|
|
69
|
-
return [];
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
72
|
-
key: "sections",
|
|
73
|
-
get: function get() {
|
|
74
|
-
return undefined;
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
key: "activate",
|
|
78
|
-
value: function activate(action) {}
|
|
79
|
-
}, {
|
|
80
|
-
key: "yield",
|
|
81
|
-
value: function _yield() {}
|
|
82
|
-
}]);
|
|
83
|
-
}();
|
|
84
|
-
_NullLayerProvider = NullLayerProvider;
|
|
85
|
-
_defineProperty(NullLayerProvider, "SINGLETON", Object.seal(new _NullLayerProvider()));
|
|
86
|
-
|
|
87
|
-
export { NullLayerProvider as default };
|
|
11
|
+
import{createClass as e,defineProperty as n,classCallCheck as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";var u,r=function(){return e(function e(){t(this,e)},[{key:"color",value:function(e){return""}},{key:"count",get:function(){return 0}},{key:"dispose",value:function(){}},{key:"extends",value:function(e,n){return 0}},{key:"extensible",get:function(){return 0}},{key:"extent",get:function(){return[0,0,0]}},{key:"extract",value:function(e,n,t){return[]}},{key:"find",value:function(e){return 0}},{key:"format",value:function(e,n){return"暂无数据"}},{key:"get",value:function(e){}},{key:"getNodeInfo",value:function(e){}},{key:"reset",value:function(){}},{key:"scale",value:function(e,n,t,u){return[]}},{key:"sections",get:function(){}},{key:"activate",value:function(e){}},{key:"yield",value:function(){}}])}();u=r,n(r,"SINGLETON",Object.seal(new u));export{r as default};
|
|
@@ -1,66 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
4
10
|
|
|
5
|
-
var
|
|
6
|
-
var NullProvider = /*#__PURE__*/function () {
|
|
7
|
-
function NullProvider() {
|
|
8
|
-
_classCallCheck(this, NullProvider);
|
|
9
|
-
}
|
|
10
|
-
return _createClass(NullProvider, [{
|
|
11
|
-
key: "count",
|
|
12
|
-
get: function get() {
|
|
13
|
-
return 0;
|
|
14
|
-
}
|
|
15
|
-
}, {
|
|
16
|
-
key: "extensible",
|
|
17
|
-
get: function get() {
|
|
18
|
-
return 0;
|
|
19
|
-
}
|
|
20
|
-
}, {
|
|
21
|
-
key: "extent",
|
|
22
|
-
get: function get() {
|
|
23
|
-
return [0, 0, 0];
|
|
24
|
-
}
|
|
25
|
-
}, {
|
|
26
|
-
key: "extends",
|
|
27
|
-
value: function _extends(direction, minimum) {
|
|
28
|
-
return Promise.resolve(0);
|
|
29
|
-
}
|
|
30
|
-
}, {
|
|
31
|
-
key: "extract",
|
|
32
|
-
value: function extract(range, count, nodes) {
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
}, {
|
|
36
|
-
key: "color",
|
|
37
|
-
value: function color(index) {
|
|
38
|
-
return "";
|
|
39
|
-
}
|
|
40
|
-
}, {
|
|
41
|
-
key: "format",
|
|
42
|
-
value: function format(index, type) {
|
|
43
|
-
return "暂无数据";
|
|
44
|
-
}
|
|
45
|
-
}, {
|
|
46
|
-
key: "scale",
|
|
47
|
-
value: function scale(offset, range, length, direction) {
|
|
48
|
-
return [0, 0];
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
key: "sections",
|
|
52
|
-
get: function get() {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
}, {
|
|
56
|
-
key: "reset",
|
|
57
|
-
value: function reset() {}
|
|
58
|
-
}, {
|
|
59
|
-
key: "dispose",
|
|
60
|
-
value: function dispose() {}
|
|
61
|
-
}]);
|
|
62
|
-
}();
|
|
63
|
-
_NullProvider = NullProvider;
|
|
64
|
-
_defineProperty(NullProvider, "SINGLETON", Object.freeze(new _NullProvider()));
|
|
65
|
-
|
|
66
|
-
export { NullProvider as default };
|
|
11
|
+
import{createClass as e,defineProperty as n,classCallCheck as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";var r,u=function(){return e(function e(){t(this,e)},[{key:"count",get:function(){return 0}},{key:"extensible",get:function(){return 0}},{key:"extent",get:function(){return[0,0,0]}},{key:"extends",value:function(e,n){return Promise.resolve(0)}},{key:"extract",value:function(e,n,t){return[]}},{key:"color",value:function(e){return""}},{key:"format",value:function(e,n){return"暂无数据"}},{key:"scale",value:function(e,n,t,r){return[0,0]}},{key:"sections",get:function(){return null}},{key:"reset",value:function(){}},{key:"dispose",value:function(){}}])}();r=u,n(u,"SINGLETON",Object.freeze(new r));export{u as default};
|
|
@@ -1,149 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
8
10
|
|
|
9
|
-
var
|
|
10
|
-
function TimerNodePlayer(model, renderer, options) {
|
|
11
|
-
_classCallCheck(this, TimerNodePlayer);
|
|
12
|
-
_defineProperty(this, "renderer", void 0);
|
|
13
|
-
_defineProperty(this, "model", void 0);
|
|
14
|
-
_defineProperty(this, "timer", void 0);
|
|
15
|
-
_defineProperty(this, "options", void 0);
|
|
16
|
-
this.model = model;
|
|
17
|
-
this.renderer = renderer;
|
|
18
|
-
this.options = assign({}, play, options);
|
|
19
|
-
}
|
|
20
|
-
return _createClass(TimerNodePlayer, [{
|
|
21
|
-
key: "playing",
|
|
22
|
-
get: function get() {
|
|
23
|
-
return this.timer != null;
|
|
24
|
-
}
|
|
25
|
-
}, {
|
|
26
|
-
key: "play",
|
|
27
|
-
value: function play() {
|
|
28
|
-
var _this = this;
|
|
29
|
-
if (this.timer == null && this.model.provider.count) {
|
|
30
|
-
var interval = this.options.interval || 2000;
|
|
31
|
-
var loop = this.options.loop;
|
|
32
|
-
this.timer = setInterval(function () {
|
|
33
|
-
return _this.forward(loop);
|
|
34
|
-
}, interval);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}, {
|
|
38
|
-
key: "stop",
|
|
39
|
-
value: function stop() {
|
|
40
|
-
clearInterval(this.timer);
|
|
41
|
-
this.timer = null;
|
|
42
|
-
}
|
|
43
|
-
}, {
|
|
44
|
-
key: "reset",
|
|
45
|
-
value: function reset() {
|
|
46
|
-
this.stop();
|
|
47
|
-
this.renderer.reset();
|
|
48
|
-
}
|
|
49
|
-
}, {
|
|
50
|
-
key: "backward",
|
|
51
|
-
value: function backward(loop) {
|
|
52
|
-
var provider = this.model.provider,
|
|
53
|
-
count = provider.count;
|
|
54
|
-
var extent = this.model.extent,
|
|
55
|
-
index = extent[2];
|
|
56
|
-
if (count > 0) {
|
|
57
|
-
if (index <= 0) {
|
|
58
|
-
if ((provider.extensible & Extensible.HEAD) === Extensible.HEAD) {
|
|
59
|
-
var amount = provider["extends"](Direction.BACKWARD, extent[1] - extent[0]);
|
|
60
|
-
if (amount && typeof amount === "number") {
|
|
61
|
-
NodeMath.translation(this.model.nodes, amount - 1);
|
|
62
|
-
NodeMath.translation(extent, -1);
|
|
63
|
-
this.renderer.dataChange();
|
|
64
|
-
this.render(amount - 1);
|
|
65
|
-
}
|
|
66
|
-
} else if (loop) {
|
|
67
|
-
this.render(count - 1);
|
|
68
|
-
} else {
|
|
69
|
-
this.stop();
|
|
70
|
-
}
|
|
71
|
-
} else {
|
|
72
|
-
var center = Math.floor(extent[0] + (extent[1] - extent[0]) / 2);
|
|
73
|
-
if (index >= 0 && index <= center && extent[0] > 0) {
|
|
74
|
-
NodeMath.translation(extent, -1, 0, 2);
|
|
75
|
-
NodeMath.translation(this.model.nodes, -1);
|
|
76
|
-
}
|
|
77
|
-
this.render(index - 1);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, {
|
|
82
|
-
key: "forward",
|
|
83
|
-
value: function forward(loop) {
|
|
84
|
-
var provider = this.model.provider;
|
|
85
|
-
var extent = this.model.extent,
|
|
86
|
-
count = provider.count,
|
|
87
|
-
index = extent[2];
|
|
88
|
-
if (count > 0) {
|
|
89
|
-
if (index + 1 >= count) {
|
|
90
|
-
if ((provider.extensible & Extensible.TAIL) === Extensible.TAIL) {
|
|
91
|
-
var amount = provider["extends"](Direction.FORWARD, extent[1] - extent[0]);
|
|
92
|
-
if (amount && typeof amount === "number") {
|
|
93
|
-
this.render(index + 1);
|
|
94
|
-
}
|
|
95
|
-
} else if (loop) {
|
|
96
|
-
this.render(count - 1);
|
|
97
|
-
} else {
|
|
98
|
-
this.stop();
|
|
99
|
-
}
|
|
100
|
-
} else {
|
|
101
|
-
var center = Math.floor(extent[0] + (extent[1] - extent[0]) / 2);
|
|
102
|
-
if (index < count && index >= center && extent[1] < count) {
|
|
103
|
-
NodeMath.translation(extent, 1, 0, 2);
|
|
104
|
-
NodeMath.translation(this.model.nodes, 1);
|
|
105
|
-
}
|
|
106
|
-
this.render(index + 1);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}, {
|
|
111
|
-
key: "jump",
|
|
112
|
-
value: function jump(index) {
|
|
113
|
-
var provider = this.model.provider,
|
|
114
|
-
extent = this.model.extent,
|
|
115
|
-
count = provider.count,
|
|
116
|
-
range = extent[1] - extent[0];
|
|
117
|
-
if (index < 0) {
|
|
118
|
-
var totals = range * (Math.floor(-index / range) + 1);
|
|
119
|
-
var amount = provider["extends"](Direction.BACKWARD, totals);
|
|
120
|
-
if (amount != null && typeof amount === "number") {
|
|
121
|
-
index = Math.max(amount - -index, 0);
|
|
122
|
-
NodeMath.translation(this.model.nodes, amount);
|
|
123
|
-
this.renderer.dataChange();
|
|
124
|
-
}
|
|
125
|
-
} else if (index >= count) {
|
|
126
|
-
var _totals = range * (Math.floor((index - count) / range) + 1);
|
|
127
|
-
var _amount = provider["extends"](Direction.FORWARD, _totals);
|
|
128
|
-
if (_amount != null && typeof _amount === "number") {
|
|
129
|
-
index = Math.min(index, count + _amount - 1);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
var diff = index - extent[2],
|
|
133
|
-
dir = diff < 0 ? -1 : diff > 0 ? 1 : 0;
|
|
134
|
-
var step = diff < 0 ? Math.min(-diff, extent[0]) : Math.min(diff, provider.count - extent[1]);
|
|
135
|
-
if (step > 0) {
|
|
136
|
-
NodeMath.translation(extent, step * dir);
|
|
137
|
-
NodeMath.translation(this.model.nodes, step * dir);
|
|
138
|
-
}
|
|
139
|
-
this.render(index);
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
|
-
key: "render",
|
|
143
|
-
value: function render(index) {
|
|
144
|
-
this.renderer.render(index);
|
|
145
|
-
}
|
|
146
|
-
}]);
|
|
147
|
-
}();
|
|
148
|
-
|
|
149
|
-
export { TimerNodePlayer as default };
|
|
11
|
+
import{createClass as e,classCallCheck as t,defineProperty as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import i from"./utils/assign.js";import{play as n}from"./config/node-axis.options.js";import{Extensible as s,Direction as o}from"./enum/index.js";import a from"../../Visual/src/utils/NodeMath.js";var l=function(){return e(function e(s,o,a){t(this,e),r(this,"renderer",void 0),r(this,"model",void 0),r(this,"timer",void 0),r(this,"options",void 0),this.model=s,this.renderer=o,this.options=i({},n,a)},[{key:"playing",get:function(){return null!=this.timer}},{key:"play",value:function(){var e=this;if(null==this.timer&&this.model.provider.count){var t=this.options.interval||2e3,r=this.options.loop;this.timer=setInterval(function(){return e.forward(r)},t)}}},{key:"stop",value:function(){clearInterval(this.timer),this.timer=null}},{key:"reset",value:function(){this.stop(),this.renderer.reset()}},{key:"backward",value:function(e){var t=this.model.provider,r=t.count,i=this.model.extent,n=i[2];if(r>0)if(n<=0)if((t.extensible&s.HEAD)===s.HEAD){var l=t.extends(o.BACKWARD,i[1]-i[0]);l&&"number"==typeof l&&(a.translation(this.model.nodes,l-1),a.translation(i,-1),this.renderer.dataChange(),this.render(l-1))}else e?this.render(r-1):this.stop();else{var d=Math.floor(i[0]+(i[1]-i[0])/2);n>=0&&n<=d&&i[0]>0&&(a.translation(i,-1,0,2),a.translation(this.model.nodes,-1)),this.render(n-1)}}},{key:"forward",value:function(e){var t=this.model.provider,r=this.model.extent,i=t.count,n=r[2];if(i>0)if(n+1>=i)if((t.extensible&s.TAIL)===s.TAIL){var l=t.extends(o.FORWARD,r[1]-r[0]);l&&"number"==typeof l&&this.render(n+1)}else e?this.render(i-1):this.stop();else{var d=Math.floor(r[0]+(r[1]-r[0])/2);n<i&&n>=d&&r[1]<i&&(a.translation(r,1,0,2),a.translation(this.model.nodes,1)),this.render(n+1)}}},{key:"jump",value:function(e){var t=this.model.provider,r=this.model.extent,i=t.count,n=r[1]-r[0];if(e<0){var s=n*(Math.floor(-e/n)+1),l=t.extends(o.BACKWARD,s);null!=l&&"number"==typeof l&&(e=Math.max(l- -e,0),a.translation(this.model.nodes,l),this.renderer.dataChange())}else if(e>=i){var d=n*(Math.floor((e-i)/n)+1),h=t.extends(o.FORWARD,d);null!=h&&"number"==typeof h&&(e=Math.min(e,i+h-1))}var u=e-r[2],m=u<0?-1:u>0?1:0,f=u<0?Math.min(-u,r[0]):Math.min(u,t.count-r[1]);f>0&&(a.translation(r,f*m),a.translation(this.model.nodes,f*m)),this.render(e)}},{key:"render",value:function(e){this.renderer.render(e)}}])}();export{l as default};
|
|
@@ -1,56 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
enabled: true,
|
|
11
|
-
empty: "暂无数据..."
|
|
12
|
-
},
|
|
13
|
-
track: {
|
|
14
|
-
left: 10,
|
|
15
|
-
top: "50%",
|
|
16
|
-
right: 10,
|
|
17
|
-
height: 7,
|
|
18
|
-
color: "rgba(233,233,233,0.7)"
|
|
19
|
-
},
|
|
20
|
-
node: {
|
|
21
|
-
enabled: true,
|
|
22
|
-
size: 10,
|
|
23
|
-
count: 7,
|
|
24
|
-
minCount: 3,
|
|
25
|
-
color: "#fff",
|
|
26
|
-
outlineWidth: 0.5,
|
|
27
|
-
outlineColor: "#1ab7ff",
|
|
28
|
-
shadow: ""
|
|
29
|
-
},
|
|
30
|
-
cursor: {
|
|
31
|
-
size: 15,
|
|
32
|
-
color: "#1ab7ff",
|
|
33
|
-
outlineWidth: 0.5,
|
|
34
|
-
outlineColor: "#027BE3"
|
|
35
|
-
},
|
|
36
|
-
scale: {
|
|
37
|
-
enabled: false,
|
|
38
|
-
limit: [0, 100]
|
|
39
|
-
},
|
|
40
|
-
progress: {
|
|
41
|
-
enabled: true,
|
|
42
|
-
color: "rgba(66,63,68,0.6)"
|
|
43
|
-
},
|
|
44
|
-
label: {
|
|
45
|
-
enabled: true,
|
|
46
|
-
top: "75%",
|
|
47
|
-
font: "14px blob arial",
|
|
48
|
-
color: "#333"
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
var play = {
|
|
52
|
-
interval: 1500,
|
|
53
|
-
loop: false
|
|
54
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
55
10
|
|
|
56
|
-
|
|
11
|
+
var o={background:null,width:360,height:45,jump:!0,draggable:!0,translation:!0,edgeAdjust:"50%",overlay:{enabled:!0,empty:"暂无数据..."},track:{left:10,top:"50%",right:10,height:7,color:"rgba(233,233,233,0.7)"},node:{enabled:!0,size:10,count:7,minCount:3,color:"#fff",outlineWidth:.5,outlineColor:"#1ab7ff",shadow:""},cursor:{size:15,color:"#1ab7ff",outlineWidth:.5,outlineColor:"#027BE3"},scale:{enabled:!1,limit:[0,100]},progress:{enabled:!0,color:"rgba(66,63,68,0.6)"},label:{enabled:!0,top:"75%",font:"14px blob arial",color:"#333"}},e={interval:1500,loop:!1};export{e as play,o as render};
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Direction[Direction["FORWARD"] = 1] = "FORWARD";
|
|
11
|
-
Direction[Direction["BACKWARD"] = -1] = "BACKWARD";
|
|
12
|
-
})(Direction || (Direction = {}));
|
|
13
|
-
var TimeModes;
|
|
14
|
-
(function (TimeModes) {
|
|
15
|
-
TimeModes["DAILY"] = "daily";
|
|
16
|
-
TimeModes["INTERVAL"] = "interval";
|
|
17
|
-
TimeModes["STATISTIC"] = "statistic";
|
|
18
|
-
})(TimeModes || (TimeModes = {}));
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
19
10
|
|
|
20
|
-
|
|
11
|
+
var A=function(A){return A[A.NONE=0]="NONE",A[A.HEAD=1]="HEAD",A[A.TAIL=2]="TAIL",A[A.ALL=3]="ALL",A}({}),t=function(A){return A[A.FORWARD=1]="FORWARD",A[A.BACKWARD=-1]="BACKWARD",A}({}),n=function(A){return A.DAILY="daily",A.INTERVAL="interval",A.STATISTIC="statistic",A}({});export{t as Direction,A as Extensible,n as TimeModes};
|
|
@@ -1,43 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
2
10
|
|
|
3
|
-
function
|
|
4
|
-
if (_typeof(object) !== 'object' || object === null) {
|
|
5
|
-
return false;
|
|
6
|
-
}
|
|
7
|
-
if (Object.getPrototypeOf(object) === null) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
var proto = object;
|
|
11
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
12
|
-
proto = Object.getPrototypeOf(proto);
|
|
13
|
-
}
|
|
14
|
-
return Object.getPrototypeOf(object) === proto;
|
|
15
|
-
}
|
|
16
|
-
function clone(target, source) {
|
|
17
|
-
for (var key in source) {
|
|
18
|
-
var older = target[key],
|
|
19
|
-
newer = source[key];
|
|
20
|
-
if (older === newer && newer != null) continue;
|
|
21
|
-
if (newer && ordinary(newer)) {
|
|
22
|
-
target[key] = clone(ordinary(older) ? older : {}, newer);
|
|
23
|
-
} else if (newer && Array.isArray(newer)) {
|
|
24
|
-
target[key] = clone(Array.isArray(older) ? older : [], newer);
|
|
25
|
-
} else {
|
|
26
|
-
target[key] = newer;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return target;
|
|
30
|
-
}
|
|
31
|
-
function assign(target) {
|
|
32
|
-
if (target == null) {
|
|
33
|
-
return target;
|
|
34
|
-
}
|
|
35
|
-
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
36
|
-
sources[_key - 1] = arguments[_key];
|
|
37
|
-
}
|
|
38
|
-
return sources.reduce(function (last, source) {
|
|
39
|
-
return clone(last, source);
|
|
40
|
-
}, target);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { assign as default };
|
|
11
|
+
import{typeof as r}from"../../../../_virtual/_rollupPluginBabelHelpers.js";function t(t){if("object"!==r(t)||null===t)return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function e(r,n){for(var o in n){var u=r[o],l=n[o];u===l&&null!=l||(l&&t(l)?r[o]=e(t(u)?u:{},l):l&&Array.isArray(l)?r[o]=e(Array.isArray(u)?u:[],l):r[o]=l)}return r}function n(r){if(null==r)return r;for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return n.reduce(function(r,t){return e(r,t)},r)}export{n as default};
|
|
@@ -1,79 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
4
10
|
|
|
5
|
-
|
|
6
|
-
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
7
|
-
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
8
|
-
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
9
|
-
var StateEnum;
|
|
10
|
-
(function (StateEnum) {
|
|
11
|
-
StateEnum[StateEnum["NONE"] = 0] = "NONE";
|
|
12
|
-
StateEnum[StateEnum["ERRORED"] = 1] = "ERRORED";
|
|
13
|
-
StateEnum[StateEnum["LOADING"] = 2] = "LOADING";
|
|
14
|
-
StateEnum[StateEnum["EMPTY"] = 4] = "EMPTY";
|
|
15
|
-
StateEnum[StateEnum["FULL"] = 8] = "FULL";
|
|
16
|
-
StateEnum[StateEnum["COMPLETED"] = 16] = "COMPLETED";
|
|
17
|
-
})(StateEnum || (StateEnum = {}));
|
|
18
|
-
var _state = /*#__PURE__*/new WeakMap();
|
|
19
|
-
var State = /*#__PURE__*/function () {
|
|
20
|
-
function State() {
|
|
21
|
-
var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StateEnum.NONE;
|
|
22
|
-
_classCallCheck(this, State);
|
|
23
|
-
_classPrivateFieldInitSpec(this, _state, ref());
|
|
24
|
-
_classPrivateFieldGet(_state, this).value = init;
|
|
25
|
-
}
|
|
26
|
-
return _createClass(State, [{
|
|
27
|
-
key: "loading",
|
|
28
|
-
value: function loading() {
|
|
29
|
-
_classPrivateFieldGet(_state, this).value = StateEnum.LOADING;
|
|
30
|
-
}
|
|
31
|
-
}, {
|
|
32
|
-
key: "error",
|
|
33
|
-
value: function error() {
|
|
34
|
-
_classPrivateFieldGet(_state, this).value = StateEnum.ERRORED;
|
|
35
|
-
}
|
|
36
|
-
}, {
|
|
37
|
-
key: "merge",
|
|
38
|
-
value: function merge(state) {
|
|
39
|
-
_classPrivateFieldGet(_state, this).value |= state;
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
key: "remove",
|
|
43
|
-
value: function remove(state) {
|
|
44
|
-
_classPrivateFieldGet(_state, this).value &= ~(_classPrivateFieldGet(_state, this).value & state);
|
|
45
|
-
}
|
|
46
|
-
}, {
|
|
47
|
-
key: "completed",
|
|
48
|
-
value: function completed(isEmpty) {
|
|
49
|
-
_classPrivateFieldGet(_state, this).value &= ~(_classPrivateFieldGet(_state, this).value & StateEnum.LOADING);
|
|
50
|
-
_classPrivateFieldGet(_state, this).value |= StateEnum.COMPLETED;
|
|
51
|
-
_classPrivateFieldGet(_state, this).value |= isEmpty ? StateEnum.EMPTY : StateEnum.FULL;
|
|
52
|
-
}
|
|
53
|
-
}, {
|
|
54
|
-
key: "isLoading",
|
|
55
|
-
get: function get() {
|
|
56
|
-
return (_classPrivateFieldGet(_state, this).value & StateEnum.LOADING) === StateEnum.LOADING;
|
|
57
|
-
}
|
|
58
|
-
}, {
|
|
59
|
-
key: "state",
|
|
60
|
-
get: function get() {
|
|
61
|
-
return !!_classPrivateFieldGet(_state, this);
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
key: "stringify",
|
|
65
|
-
get: function get() {
|
|
66
|
-
if (toRaw(this).isLoading) {
|
|
67
|
-
return 'loading';
|
|
68
|
-
}
|
|
69
|
-
if (_classPrivateFieldGet(_state, this).value & StateEnum.ERRORED) {
|
|
70
|
-
return 'error';
|
|
71
|
-
}
|
|
72
|
-
if (_classPrivateFieldGet(_state, this).value & StateEnum.EMPTY) {
|
|
73
|
-
return 'empty';
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}]);
|
|
77
|
-
}();
|
|
78
|
-
|
|
79
|
-
export { StateEnum, State as default };
|
|
11
|
+
import{createClass as e,classPrivateFieldGet2 as t,classCallCheck as i,classPrivateFieldInitSpec as a}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{toRaw as u,ref as l}from"vue";var n=function(e){return e[e.NONE=0]="NONE",e[e.ERRORED=1]="ERRORED",e[e.LOADING=2]="LOADING",e[e.EMPTY=4]="EMPTY",e[e.FULL=8]="FULL",e[e.COMPLETED=16]="COMPLETED",e}({}),s=new WeakMap,r=function(){return e(function e(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.NONE;i(this,e),a(this,s,l()),t(s,this).value=u},[{key:"loading",value:function(){t(s,this).value=n.LOADING}},{key:"error",value:function(){t(s,this).value=n.ERRORED}},{key:"merge",value:function(e){t(s,this).value|=e}},{key:"remove",value:function(e){t(s,this).value&=~(t(s,this).value&e)}},{key:"completed",value:function(e){t(s,this).value&=~(t(s,this).value&n.LOADING),t(s,this).value|=n.COMPLETED,t(s,this).value|=e?n.EMPTY:n.FULL}},{key:"isLoading",get:function(){return(t(s,this).value&n.LOADING)===n.LOADING}},{key:"state",get:function(){return!!t(s,this)}},{key:"stringify",get:function(){return u(this).isLoading?"loading":t(s,this).value&n.ERRORED?"error":t(s,this).value&n.EMPTY?"empty":void 0}}])}();export{n as StateEnum,r as default};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
2
10
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { script as default };
|
|
11
|
+
import t from"./Stateful.vue2.js";t.__file="src/components/Stateful/src/Stateful.vue";export{t as default};
|
|
@@ -1,53 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.1
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-09 10:11:28
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
6
10
|
|
|
7
|
-
var
|
|
8
|
-
"class": "component stateful h-full w-full"
|
|
9
|
-
};
|
|
10
|
-
var _hoisted_2 = {
|
|
11
|
-
key: 0,
|
|
12
|
-
"class": "stateful--cover"
|
|
13
|
-
};
|
|
14
|
-
var _hoisted_3 = {
|
|
15
|
-
"class": "cover--box"
|
|
16
|
-
};
|
|
17
|
-
var script = defineComponent({
|
|
18
|
-
__name: 'Stateful',
|
|
19
|
-
props: statefulProps,
|
|
20
|
-
setup: function setup(__props) {
|
|
21
|
-
var props = __props;
|
|
22
|
-
var state = computed(function () {
|
|
23
|
-
if (isObject(props.value)) {
|
|
24
|
-
return props.value;
|
|
25
|
-
}
|
|
26
|
-
return props.value ? props.states[props.value] : null;
|
|
27
|
-
});
|
|
28
|
-
var getStyle = computed(function () {
|
|
29
|
-
var _state$value;
|
|
30
|
-
return {
|
|
31
|
-
color: (_state$value = state.value) === null || _state$value === void 0 ? void 0 : _state$value.color
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
return function (_ctx, _cache) {
|
|
35
|
-
var _state$value2, _state$value3, _state$value4, _state$value5, _state$value6, _state$value7;
|
|
36
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
|
|
37
|
-
"class": normalizeClass(["stateful--content h-full w-full", [_ctx.contentClass, {
|
|
38
|
-
cover: !!state.value
|
|
39
|
-
}]])
|
|
40
|
-
}, [renderSlot(_ctx.$slots, "default")], 2), state.value ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [(openBlock(), createBlock(resolveDynamicComponent(((_state$value2 = state.value) === null || _state$value2 === void 0 ? void 0 : _state$value2.tag) == 'Icon' ? script$1 : (_state$value3 = state.value) === null || _state$value3 === void 0 ? void 0 : _state$value3.tag), {
|
|
41
|
-
"class": "cover--icon",
|
|
42
|
-
icon: (_state$value4 = state.value) === null || _state$value4 === void 0 ? void 0 : _state$value4.image,
|
|
43
|
-
color: (_state$value5 = state.value) === null || _state$value5 === void 0 ? void 0 : _state$value5.color,
|
|
44
|
-
size: ((_state$value6 = state.value) === null || _state$value6 === void 0 ? void 0 : _state$value6.size) || '28'
|
|
45
|
-
}, null, 8, ["icon", "color", "size"])), createElementVNode("div", {
|
|
46
|
-
"class": "cover--text",
|
|
47
|
-
style: normalizeStyle(getStyle.value)
|
|
48
|
-
}, toDisplayString((_state$value7 = state.value) === null || _state$value7 === void 0 ? void 0 : _state$value7.label), 5)])])) : createCommentVNode("v-if", true)]);
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
export { script as default };
|
|
11
|
+
import{defineProperty as l}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{defineComponent as e,computed as o,openBlock as t,createElementBlock as r,normalizeClass as u,createElementVNode as n,renderSlot as a,createBlock as i,resolveDynamicComponent as c,normalizeStyle as v,toDisplayString as s,createCommentVNode as f}from"vue";import{isObject as d}from"@dfsj/utils";import"../../Icon/src/Icon.vue2.js";import{statefulProps as m}from"./props.js";import p from"../../Icon/src/Icon.vue.js";var _="dfsj-stateful",j=e({__name:"Stateful",props:m,setup:function(e){var m=e,j=o(function(){return d(m.value)?m.value:m.value?m.states[m.value]:null}),x=o(function(){var l;return{color:null===(l=j.value)||void 0===l?void 0:l.color}});return function(e,o){var d,m,b,y,I,g;return t(),r("div",{class:u([_,"relative flex-1 h-full w-full"])},[n("div",{class:u(["".concat(_,"__content"),"absolute inset-0 flex h-full w-full",e.contentClass,l({},"".concat(_,"__content--blurred"),!!j.value)])},[a(e.$slots,"default")],2),j.value?(t(),r("div",{key:0,class:u(["".concat(_,"__cover"),"absolute inset-0 flex items-center justify-center"])},[n("div",{class:u(["".concat(_,"__cover-box"),"relative flex items-center justify-center overflow-hidden"])},[(t(),i(c("Icon"==(null===(d=j.value)||void 0===d?void 0:d.tag)?p:null===(m=j.value)||void 0===m?void 0:m.tag),{class:u(["".concat(_,"__cover-icon"),"mr-10px"]),icon:null===(b=j.value)||void 0===b?void 0:b.image,color:null===(y=j.value)||void 0===y?void 0:y.color,size:(null===(I=j.value)||void 0===I?void 0:I.size)||"28"},null,8,["class","icon","color","size"])),n("div",{class:u(["".concat(_,"__cover-text")]),style:v(x.value)},s(null===(g=j.value)||void 0===g?void 0:g.label),7)],2)],2)):f("v-if",!0)],2)}}});export{j as default};
|