@dfsj/components 3.0.0
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 +203 -0
- package/LICENSE +22 -0
- package/README.md +27 -0
- package/dist/components/Boards/index.d.ts +4 -0
- package/dist/components/Boards/src/Boards.vue.d.ts +33 -0
- package/dist/components/Boards/src/Boards.vue.js +5 -0
- package/dist/components/Boards/src/Boards.vue2.js +113 -0
- package/dist/components/Boards/src/props.d.ts +27 -0
- package/dist/components/Boards/src/props.js +18 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +16 -0
- package/dist/components/DatePicker/src/composables/use-month-range-header.js +52 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +100 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.js +99 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +19 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.js +5 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +564 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +16 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.js +5 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +210 -0
- package/dist/components/DatePicker/src/index.d.ts +196 -0
- package/dist/components/DatePicker/src/index.js +87 -0
- package/dist/components/DatePicker/src/panel-utils.d.ts +2 -0
- package/dist/components/DatePicker/src/panel-utils.js +25 -0
- package/dist/components/Editor/index.d.ts +6 -0
- package/dist/components/Editor/src/Editor.vue.d.ts +50 -0
- package/dist/components/Editor/src/Editor.vue.js +5 -0
- package/dist/components/Editor/src/Editor.vue2.js +138 -0
- package/dist/components/Form/index.d.ts +16 -0
- package/dist/components/Form/src/Form.vue.d.ts +164 -0
- package/dist/components/Form/src/Form.vue.js +5 -0
- package/dist/components/Form/src/Form.vue2.js +378 -0
- package/dist/components/Form/src/components/useRenderCheckbox.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderCheckbox.js +33 -0
- package/dist/components/Form/src/components/useRenderRadio.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderRadio.js +33 -0
- package/dist/components/Form/src/components/useRenderSelect.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderSelect.js +52 -0
- package/dist/components/Form/src/helper/componentMap.d.ts +5 -0
- package/dist/components/Form/src/helper/componentMap.js +35 -0
- package/dist/components/Form/src/helper/index.d.ts +7 -0
- package/dist/components/Form/src/helper/index.js +109 -0
- package/dist/components/Form/src/types/index.d.ts +533 -0
- package/dist/components/Form/src/types/index.js +31 -0
- package/dist/components/Form/src/useForm.d.ts +1 -0
- package/dist/components/Form/src/useForm.js +290 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/Highlight/src/Highlight.vue.d.ts +41 -0
- package/dist/components/Highlight/src/Highlight.vue.js +5 -0
- package/dist/components/Highlight/src/Highlight.vue2.js +62 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/Icon/src/Icon.vue.d.ts +49 -0
- package/dist/components/Icon/src/Icon.vue.js +5 -0
- package/dist/components/Icon/src/Icon.vue2.js +123 -0
- package/dist/components/Icon/src/SvgIcon.vue.d.ts +45 -0
- package/dist/components/Icon/src/SvgIcon.vue.js +7 -0
- package/dist/components/Icon/src/SvgIcon.vue2.js +45 -0
- package/dist/components/Icon/src/SvgIcon.vue3.js +14 -0
- package/dist/components/InputPassword/index.d.ts +2 -0
- package/dist/components/InputPassword/src/InputPassword.vue.d.ts +27 -0
- package/dist/components/InputPassword/src/InputPassword.vue.js +5 -0
- package/dist/components/InputPassword/src/InputPassword.vue2.js +58 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/src/BasicModal.vue.d.ts +280 -0
- package/dist/components/Modal/src/BasicModal.vue.js +5 -0
- package/dist/components/Modal/src/BasicModal.vue2.js +150 -0
- package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +86 -0
- package/dist/components/Modal/src/components/ModalFooter.vue.js +5 -0
- package/dist/components/Modal/src/components/ModalFooter.vue2.js +30 -0
- package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +142 -0
- package/dist/components/Modal/src/components/ModalHeader.vue.js +5 -0
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +63 -0
- package/dist/components/Modal/src/config.d.ts +24 -0
- package/dist/components/Modal/src/config.js +25 -0
- package/dist/components/Modal/src/hooks/useModalDrag.d.ts +24 -0
- package/dist/components/Modal/src/hooks/useModalDrag.js +108 -0
- package/dist/components/Modal/src/hooks/useTimeout.d.ts +15 -0
- package/dist/components/Modal/src/hooks/useTimeout.js +53 -0
- package/dist/components/Modal/src/props.d.ts +131 -0
- package/dist/components/Modal/src/props.js +107 -0
- package/dist/components/Modal/src/utils/index.d.ts +3 -0
- package/dist/components/Modal/src/utils/index.js +86 -0
- package/dist/components/Stateful/index.d.ts +4 -0
- package/dist/components/Stateful/src/State.d.ts +20 -0
- package/dist/components/Stateful/src/State.js +82 -0
- package/dist/components/Stateful/src/Stateful.vue.d.ts +44 -0
- package/dist/components/Stateful/src/Stateful.vue.js +5 -0
- package/dist/components/Stateful/src/Stateful.vue2.js +46 -0
- package/dist/components/Stateful/src/props.d.ts +39 -0
- package/dist/components/Stateful/src/props.js +29 -0
- package/dist/components/Table/index.d.ts +14 -0
- package/dist/components/Table/src/Table.vue.d.ts +537 -0
- package/dist/components/Table/src/Table.vue.js +5 -0
- package/dist/components/Table/src/Table.vue2.js +582 -0
- package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +30 -0
- package/dist/components/Table/src/components/ColumnSetting.vue.js +5 -0
- package/dist/components/Table/src/components/ColumnSetting.vue2.js +264 -0
- package/dist/components/Table/src/components/TableActions.vue.d.ts +20 -0
- package/dist/components/Table/src/components/TableActions.vue.js +5 -0
- package/dist/components/Table/src/components/TableActions.vue2.js +108 -0
- package/dist/components/Table/src/helper/index.d.ts +2 -0
- package/dist/components/Table/src/helper/index.js +11 -0
- package/dist/components/Table/src/types/index.d.ts +87 -0
- package/dist/components/Table/src/useTable.d.ts +1 -0
- package/dist/components/Table/src/useTable.js +284 -0
- package/dist/components/UnifyChart/index.d.ts +4 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +63 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue.js +5 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +83 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +185 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue.js +5 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue2.js +54 -0
- package/dist/components/UnifyChart/src/hooks/useLoader.d.ts +11 -0
- package/dist/components/UnifyChart/src/hooks/useRender.d.ts +24 -0
- package/dist/components/UnifyChart/src/hooks/useRender.js +49 -0
- package/dist/components/UnifyChart/src/props.d.ts +145 -0
- package/dist/components/UnifyChart/src/props.js +33 -0
- package/dist/components/Video/index.d.ts +2 -0
- package/dist/components/Video/src/VideoPlayer.vue.d.ts +60 -0
- package/dist/components/Video/src/VideoPlayer.vue.js +5 -0
- package/dist/components/Video/src/VideoPlayer.vue2.js +107 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +34 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue.js +5 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +65 -0
- package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +7 -0
- package/dist/components/Video/src/abstract/Observable.d.ts +6 -0
- package/dist/components/Video/src/abstract/Observable.js +89 -0
- package/dist/components/Video/src/abstract/VideoControl.d.ts +32 -0
- package/dist/components/Video/src/abstract/VideoControl.js +50 -0
- package/dist/components/Video/src/control/DaHua.d.ts +12 -0
- package/dist/components/Video/src/control/DaHua.js +156 -0
- package/dist/components/Video/src/control/Hikvision.d.ts +28 -0
- package/dist/components/Video/src/control/Hikvision.js +251 -0
- package/dist/components/Video/src/control/VideoFactory.d.ts +3 -0
- package/dist/components/Video/src/control/VideoFactory.js +32 -0
- package/dist/components/Video/src/enums/CommonEnum.d.ts +26 -0
- package/dist/components/Video/src/enums/CommonEnum.js +31 -0
- package/dist/components/Windows/index.d.ts +4 -0
- package/dist/components/Windows/src/ModalWrap.vue.d.ts +14 -0
- package/dist/components/Windows/src/ModalWrap.vue.js +5 -0
- package/dist/components/Windows/src/ModalWrap.vue2.js +90 -0
- package/dist/components/Windows/src/Windows.vue.d.ts +18 -0
- package/dist/components/Windows/src/Windows.vue.js +7 -0
- package/dist/components/Windows/src/Windows.vue2.js +51 -0
- package/dist/components/Windows/src/Windows.vue3.js +22 -0
- package/dist/components/Windows/src/props.d.ts +20 -0
- package/dist/components/Windows/src/props.js +9 -0
- package/dist/directives/clickOutside.d.ts +3 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/repeatClick.d.ts +3 -0
- package/dist/helper/lang.d.ts +1 -0
- package/dist/helper/lang.js +546 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +36 -0
- package/dist/index.min.css +6 -0
- package/dist/node_modules/.pnpm/@vueuse_core@10.7.2_vue@3.4.21/node_modules/@vueuse/core/index.js +268 -0
- package/dist/node_modules/.pnpm/@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js +34 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.js +24 -0
- package/dist/utils/is.d.ts +25 -0
- package/dist/utils/is.js +36 -0
- package/dist/utils/propTypes.d.ts +10 -0
- package/dist/utils/propTypes.js +35 -0
- package/dist/utils/tsxHelper.d.ts +5 -0
- package/dist/utils/tsxHelper.js +18 -0
- package/package.json +64 -0
package/dist/node_modules/.pnpm/@vueuse_core@10.7.2_vue@3.4.21/node_modules/@vueuse/core/index.js
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
|
+
import '@babel/runtime/helpers/typeof';
|
|
3
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
4
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
7
|
+
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
8
|
+
import { tryOnScopeDispose, toValue, noop, isObject, isClient } from '../../../../@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js';
|
|
9
|
+
export { getLifeCycleTarget, tryOnUnmounted } from '../../../../@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js';
|
|
10
|
+
import { computed, ref, watch, getCurrentInstance, onMounted } from 'vue';
|
|
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; }
|
|
14
|
+
function unrefElement(elRef) {
|
|
15
|
+
var _a;
|
|
16
|
+
var plain = toValue(elRef);
|
|
17
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
18
|
+
}
|
|
19
|
+
var defaultWindow = isClient ? window : void 0;
|
|
20
|
+
var defaultDocument = isClient ? window.document : void 0;
|
|
21
|
+
function useEventListener() {
|
|
22
|
+
var target;
|
|
23
|
+
var events;
|
|
24
|
+
var listeners;
|
|
25
|
+
var options;
|
|
26
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
27
|
+
args[_key3] = arguments[_key3];
|
|
28
|
+
}
|
|
29
|
+
if (typeof args[0] === "string" || Array.isArray(args[0])) {
|
|
30
|
+
events = args[0];
|
|
31
|
+
listeners = args[1];
|
|
32
|
+
options = args[2];
|
|
33
|
+
target = defaultWindow;
|
|
34
|
+
} else {
|
|
35
|
+
target = args[0];
|
|
36
|
+
events = args[1];
|
|
37
|
+
listeners = args[2];
|
|
38
|
+
options = args[3];
|
|
39
|
+
}
|
|
40
|
+
if (!target) return noop;
|
|
41
|
+
if (!Array.isArray(events)) events = [events];
|
|
42
|
+
if (!Array.isArray(listeners)) listeners = [listeners];
|
|
43
|
+
var cleanups = [];
|
|
44
|
+
var cleanup = function cleanup() {
|
|
45
|
+
cleanups.forEach(function (fn) {
|
|
46
|
+
return fn();
|
|
47
|
+
});
|
|
48
|
+
cleanups.length = 0;
|
|
49
|
+
};
|
|
50
|
+
var register = function register(el, event, listener, options2) {
|
|
51
|
+
el.addEventListener(event, listener, options2);
|
|
52
|
+
return function () {
|
|
53
|
+
return el.removeEventListener(event, listener, options2);
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
var stopWatch = watch(function () {
|
|
57
|
+
return [unrefElement(target), toValue(options)];
|
|
58
|
+
}, function (_ref5) {
|
|
59
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
60
|
+
el = _ref6[0],
|
|
61
|
+
options2 = _ref6[1];
|
|
62
|
+
cleanup();
|
|
63
|
+
if (!el) return;
|
|
64
|
+
var optionsClone = isObject(options2) ? _objectSpread({}, options2) : options2;
|
|
65
|
+
cleanups.push.apply(cleanups, _toConsumableArray(events.flatMap(function (event) {
|
|
66
|
+
return listeners.map(function (listener) {
|
|
67
|
+
return register(el, event, listener, optionsClone);
|
|
68
|
+
});
|
|
69
|
+
})));
|
|
70
|
+
}, {
|
|
71
|
+
immediate: true,
|
|
72
|
+
flush: "post"
|
|
73
|
+
});
|
|
74
|
+
var stop = function stop() {
|
|
75
|
+
stopWatch();
|
|
76
|
+
cleanup();
|
|
77
|
+
};
|
|
78
|
+
tryOnScopeDispose(stop);
|
|
79
|
+
return stop;
|
|
80
|
+
}
|
|
81
|
+
function useMounted() {
|
|
82
|
+
var isMounted = ref(false);
|
|
83
|
+
if (getCurrentInstance()) {
|
|
84
|
+
onMounted(function () {
|
|
85
|
+
isMounted.value = true;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return isMounted;
|
|
89
|
+
}
|
|
90
|
+
function useSupported(callback) {
|
|
91
|
+
var isMounted = useMounted();
|
|
92
|
+
return computed(function () {
|
|
93
|
+
isMounted.value;
|
|
94
|
+
return Boolean(callback());
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
var eventHandlers = ["fullscreenchange", "webkitfullscreenchange", "webkitendfullscreen", "mozfullscreenchange", "MSFullscreenChange"];
|
|
98
|
+
function useFullscreen(target) {
|
|
99
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
100
|
+
var _options$document6 = options.document,
|
|
101
|
+
document = _options$document6 === void 0 ? defaultDocument : _options$document6,
|
|
102
|
+
_options$autoExit = options.autoExit,
|
|
103
|
+
autoExit = _options$autoExit === void 0 ? false : _options$autoExit;
|
|
104
|
+
var targetRef = computed(function () {
|
|
105
|
+
var _a;
|
|
106
|
+
return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector("html");
|
|
107
|
+
});
|
|
108
|
+
var isFullscreen = ref(false);
|
|
109
|
+
var requestMethod = computed(function () {
|
|
110
|
+
return ["requestFullscreen", "webkitRequestFullscreen", "webkitEnterFullscreen", "webkitEnterFullScreen", "webkitRequestFullScreen", "mozRequestFullScreen", "msRequestFullscreen"].find(function (m) {
|
|
111
|
+
return document && m in document || targetRef.value && m in targetRef.value;
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
var exitMethod = computed(function () {
|
|
115
|
+
return ["exitFullscreen", "webkitExitFullscreen", "webkitExitFullScreen", "webkitCancelFullScreen", "mozCancelFullScreen", "msExitFullscreen"].find(function (m) {
|
|
116
|
+
return document && m in document || targetRef.value && m in targetRef.value;
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
var fullscreenEnabled = computed(function () {
|
|
120
|
+
return ["fullScreen", "webkitIsFullScreen", "webkitDisplayingFullscreen", "mozFullScreen", "msFullscreenElement"].find(function (m) {
|
|
121
|
+
return document && m in document || targetRef.value && m in targetRef.value;
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
var fullscreenElementMethod = ["fullscreenElement", "webkitFullscreenElement", "mozFullScreenElement", "msFullscreenElement"].find(function (m) {
|
|
125
|
+
return document && m in document;
|
|
126
|
+
});
|
|
127
|
+
var isSupported = useSupported(function () {
|
|
128
|
+
return targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0;
|
|
129
|
+
});
|
|
130
|
+
var isCurrentElementFullScreen = function isCurrentElementFullScreen() {
|
|
131
|
+
if (fullscreenElementMethod) return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;
|
|
132
|
+
return false;
|
|
133
|
+
};
|
|
134
|
+
var isElementFullScreen = function isElementFullScreen() {
|
|
135
|
+
if (fullscreenEnabled.value) {
|
|
136
|
+
if (document && document[fullscreenEnabled.value] != null) {
|
|
137
|
+
return document[fullscreenEnabled.value];
|
|
138
|
+
} else {
|
|
139
|
+
var target2 = targetRef.value;
|
|
140
|
+
if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {
|
|
141
|
+
return Boolean(target2[fullscreenEnabled.value]);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return false;
|
|
146
|
+
};
|
|
147
|
+
function exit() {
|
|
148
|
+
return _exit.apply(this, arguments);
|
|
149
|
+
}
|
|
150
|
+
function _exit() {
|
|
151
|
+
_exit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
|
|
152
|
+
var target2;
|
|
153
|
+
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
154
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
155
|
+
case 0:
|
|
156
|
+
if (!(!isSupported.value || !isFullscreen.value)) {
|
|
157
|
+
_context25.next = 2;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
return _context25.abrupt("return");
|
|
161
|
+
case 2:
|
|
162
|
+
if (!exitMethod.value) {
|
|
163
|
+
_context25.next = 12;
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
if (!((document == null ? void 0 : document[exitMethod.value]) != null)) {
|
|
167
|
+
_context25.next = 8;
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
_context25.next = 6;
|
|
171
|
+
return document[exitMethod.value]();
|
|
172
|
+
case 6:
|
|
173
|
+
_context25.next = 12;
|
|
174
|
+
break;
|
|
175
|
+
case 8:
|
|
176
|
+
target2 = targetRef.value;
|
|
177
|
+
if (!((target2 == null ? void 0 : target2[exitMethod.value]) != null)) {
|
|
178
|
+
_context25.next = 12;
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
_context25.next = 12;
|
|
182
|
+
return target2[exitMethod.value]();
|
|
183
|
+
case 12:
|
|
184
|
+
isFullscreen.value = false;
|
|
185
|
+
case 13:
|
|
186
|
+
case "end":
|
|
187
|
+
return _context25.stop();
|
|
188
|
+
}
|
|
189
|
+
}, _callee25);
|
|
190
|
+
}));
|
|
191
|
+
return _exit.apply(this, arguments);
|
|
192
|
+
}
|
|
193
|
+
function enter() {
|
|
194
|
+
return _enter.apply(this, arguments);
|
|
195
|
+
}
|
|
196
|
+
function _enter() {
|
|
197
|
+
_enter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
|
|
198
|
+
var target2;
|
|
199
|
+
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
200
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
201
|
+
case 0:
|
|
202
|
+
if (!(!isSupported.value || isFullscreen.value)) {
|
|
203
|
+
_context26.next = 2;
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
return _context26.abrupt("return");
|
|
207
|
+
case 2:
|
|
208
|
+
if (!isElementFullScreen()) {
|
|
209
|
+
_context26.next = 5;
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
_context26.next = 5;
|
|
213
|
+
return exit();
|
|
214
|
+
case 5:
|
|
215
|
+
target2 = targetRef.value;
|
|
216
|
+
if (!(requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null)) {
|
|
217
|
+
_context26.next = 10;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
_context26.next = 9;
|
|
221
|
+
return target2[requestMethod.value]();
|
|
222
|
+
case 9:
|
|
223
|
+
isFullscreen.value = true;
|
|
224
|
+
case 10:
|
|
225
|
+
case "end":
|
|
226
|
+
return _context26.stop();
|
|
227
|
+
}
|
|
228
|
+
}, _callee26);
|
|
229
|
+
}));
|
|
230
|
+
return _enter.apply(this, arguments);
|
|
231
|
+
}
|
|
232
|
+
function toggle() {
|
|
233
|
+
return _toggle.apply(this, arguments);
|
|
234
|
+
}
|
|
235
|
+
function _toggle() {
|
|
236
|
+
_toggle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
|
|
237
|
+
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
238
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
239
|
+
case 0:
|
|
240
|
+
_context27.next = 2;
|
|
241
|
+
return isFullscreen.value ? exit() : enter();
|
|
242
|
+
case 2:
|
|
243
|
+
case "end":
|
|
244
|
+
return _context27.stop();
|
|
245
|
+
}
|
|
246
|
+
}, _callee27);
|
|
247
|
+
}));
|
|
248
|
+
return _toggle.apply(this, arguments);
|
|
249
|
+
}
|
|
250
|
+
var handlerCallback = function handlerCallback() {
|
|
251
|
+
var isElementFullScreenValue = isElementFullScreen();
|
|
252
|
+
if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) isFullscreen.value = isElementFullScreenValue;
|
|
253
|
+
};
|
|
254
|
+
useEventListener(document, eventHandlers, handlerCallback, false);
|
|
255
|
+
useEventListener(function () {
|
|
256
|
+
return unrefElement(targetRef);
|
|
257
|
+
}, eventHandlers, handlerCallback, false);
|
|
258
|
+
if (autoExit) tryOnScopeDispose(exit);
|
|
259
|
+
return {
|
|
260
|
+
isSupported: isSupported,
|
|
261
|
+
isFullscreen: isFullscreen,
|
|
262
|
+
enter: enter,
|
|
263
|
+
exit: exit,
|
|
264
|
+
toggle: toggle
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export { defaultDocument, defaultWindow, isClient, isObject, noop, toValue, tryOnScopeDispose, unrefElement, useEventListener, useFullscreen, useMounted, useSupported };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
|
+
import '@babel/runtime/helpers/asyncToGenerator';
|
|
3
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
4
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
5
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import '@babel/runtime/regenerator';
|
|
7
|
+
import { getCurrentScope, onScopeDispose, unref, onUnmounted, getCurrentInstance } from 'vue';
|
|
8
|
+
|
|
9
|
+
function tryOnScopeDispose(fn) {
|
|
10
|
+
if (getCurrentScope()) {
|
|
11
|
+
onScopeDispose(fn);
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
function toValue(r) {
|
|
17
|
+
return typeof r === "function" ? r() : unref(r);
|
|
18
|
+
}
|
|
19
|
+
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
20
|
+
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
21
|
+
var toString = Object.prototype.toString;
|
|
22
|
+
var isObject = function isObject(val) {
|
|
23
|
+
return toString.call(val) === "[object Object]";
|
|
24
|
+
};
|
|
25
|
+
var noop = function noop() {};
|
|
26
|
+
function getLifeCycleTarget(target) {
|
|
27
|
+
return target || getCurrentInstance();
|
|
28
|
+
}
|
|
29
|
+
function tryOnUnmounted(fn, target) {
|
|
30
|
+
var instance = getLifeCycleTarget(target);
|
|
31
|
+
if (instance) onUnmounted(fn, target);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { getLifeCycleTarget, isClient, isObject, noop, toValue, tryOnScopeDispose, tryOnUnmounted };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.scss";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>;
|
|
2
|
+
export type Fn = any;
|
|
3
|
+
export type ComponentRef<T extends abstract new (...args: any) => any> = InstanceType<T>;
|
|
4
|
+
export type Nullable<T> = T | null;
|
|
5
|
+
export type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;
|
|
6
|
+
export type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger';
|
|
7
|
+
export type TimeoutHandle = ReturnType<typeof setTimeout>;
|
|
8
|
+
export type IntervalHandle = ReturnType<typeof setInterval>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fn, Recordable } from '../types';
|
|
2
|
+
export declare const withInstall: <T>(component: T, alias?: string) => T & Plugin;
|
|
3
|
+
export declare const humpToUnderline: (str: string) => string;
|
|
4
|
+
export declare const underlineToHump: (str: string) => string;
|
|
5
|
+
export declare const humpToDash: (str: string) => string;
|
|
6
|
+
export declare const setCssVar: (prop: string, val: any, dom?: HTMLElement) => void;
|
|
7
|
+
export declare const findIndex: <T = Recordable>(ary: T[], fn: Fn) => number;
|
|
8
|
+
export declare const trim: (str: string) => string;
|
|
9
|
+
export declare function formatTime(time: Date | number | string, fmt: string): string;
|
|
10
|
+
export declare function toAnyString(): string;
|
|
11
|
+
export declare function firstUpperCase(str: string): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var humpToDash = function humpToDash(str) {
|
|
2
|
+
return str.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
3
|
+
};
|
|
4
|
+
var findIndex = function findIndex(ary, fn) {
|
|
5
|
+
if (ary.findIndex) {
|
|
6
|
+
return ary.findIndex(fn);
|
|
7
|
+
}
|
|
8
|
+
var index = -1;
|
|
9
|
+
ary.some(function (item, i, ary) {
|
|
10
|
+
var ret = fn(item, i, ary);
|
|
11
|
+
if (ret) {
|
|
12
|
+
index = i;
|
|
13
|
+
return ret;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return index;
|
|
17
|
+
};
|
|
18
|
+
function firstUpperCase(str) {
|
|
19
|
+
return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {
|
|
20
|
+
return L.toUpperCase();
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { findIndex, firstUpperCase, humpToDash };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const is: (val: unknown, type: string) => boolean;
|
|
2
|
+
export declare const isDef: <T = unknown>(val?: T) => val is T;
|
|
3
|
+
export declare const isUnDef: <T = unknown>(val?: T) => val is T;
|
|
4
|
+
export declare const isObject: (val: any) => val is Record<any, any>;
|
|
5
|
+
export declare const isEmpty: <T = unknown>(val: T) => val is T;
|
|
6
|
+
export declare const isDate: (val: unknown) => val is Date;
|
|
7
|
+
export declare const isNull: (val: unknown) => val is null;
|
|
8
|
+
export declare const isNullAndUnDef: (val: unknown) => val is null;
|
|
9
|
+
export declare const isNullOrUnDef: (val: unknown) => val is null;
|
|
10
|
+
export declare const isNumber: (val: unknown) => val is number;
|
|
11
|
+
export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
|
12
|
+
export declare const isString: (val: unknown) => val is string;
|
|
13
|
+
export declare const isFunction: (val: unknown) => val is Function;
|
|
14
|
+
export declare const isBoolean: (val: unknown) => val is boolean;
|
|
15
|
+
export declare const isRegExp: (val: unknown) => val is RegExp;
|
|
16
|
+
export declare const isArray: (val: any) => val is any[];
|
|
17
|
+
export declare const isWindow: (val: any) => val is Window;
|
|
18
|
+
export declare const isElement: (val: unknown) => val is Element;
|
|
19
|
+
export declare const isMap: (val: unknown) => val is Map<any, any>;
|
|
20
|
+
export declare const isServer: boolean;
|
|
21
|
+
export declare const isClient: boolean;
|
|
22
|
+
export declare const isUrl: (path: string) => boolean;
|
|
23
|
+
export declare const isDark: () => boolean;
|
|
24
|
+
export declare const isImgPath: (path: string) => boolean;
|
|
25
|
+
export declare const isEmptyVal: (val: any) => boolean;
|
package/dist/utils/is.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var toString = Object.prototype.toString;
|
|
2
|
+
var is = function is(val, type) {
|
|
3
|
+
return toString.call(val) === "[object ".concat(type, "]");
|
|
4
|
+
};
|
|
5
|
+
var isObject = function isObject(val) {
|
|
6
|
+
return val !== null && is(val, 'Object');
|
|
7
|
+
};
|
|
8
|
+
var isEmpty = function isEmpty(val) {
|
|
9
|
+
if (isArray(val) || isString(val)) {
|
|
10
|
+
return val.length === 0;
|
|
11
|
+
}
|
|
12
|
+
if (val instanceof Map || val instanceof Set) {
|
|
13
|
+
return val.size === 0;
|
|
14
|
+
}
|
|
15
|
+
if (isObject(val)) {
|
|
16
|
+
return Object.keys(val).length === 0;
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
};
|
|
20
|
+
var isNumber = function isNumber(val) {
|
|
21
|
+
return is(val, 'Number');
|
|
22
|
+
};
|
|
23
|
+
var isString = function isString(val) {
|
|
24
|
+
return is(val, 'String');
|
|
25
|
+
};
|
|
26
|
+
var isFunction = function isFunction(val) {
|
|
27
|
+
return typeof val === 'function';
|
|
28
|
+
};
|
|
29
|
+
var isArray = function isArray(val) {
|
|
30
|
+
return val && Array.isArray(val);
|
|
31
|
+
};
|
|
32
|
+
var isEmptyVal = function isEmptyVal(val) {
|
|
33
|
+
return val === '' || val === null || val === undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { is, isArray, isEmpty, isEmptyVal, isFunction, isNumber, isObject, isString };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VueTypesInterface, VueTypeValidableDef } from 'vue-types';
|
|
2
|
+
import { CSSProperties } from 'vue';
|
|
3
|
+
type PropTypes = VueTypesInterface & {
|
|
4
|
+
readonly style: VueTypeValidableDef<CSSProperties>;
|
|
5
|
+
};
|
|
6
|
+
declare const newPropTypes: PropTypes;
|
|
7
|
+
declare class propTypes extends newPropTypes {
|
|
8
|
+
static get style(): VueTypeValidableDef<any, import("vue-types/dist/types").ValidatorFunction<any>>;
|
|
9
|
+
}
|
|
10
|
+
export default propTypes;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
|
+
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
|
+
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
4
|
+
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
5
|
+
import _inherits from '@babel/runtime/helpers/inherits';
|
|
6
|
+
import { createTypes, toValidableType } from 'vue-types';
|
|
7
|
+
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
|
+
var newPropTypes = createTypes({
|
|
11
|
+
func: undefined,
|
|
12
|
+
bool: undefined,
|
|
13
|
+
string: undefined,
|
|
14
|
+
number: undefined,
|
|
15
|
+
object: undefined,
|
|
16
|
+
integer: undefined
|
|
17
|
+
});
|
|
18
|
+
var propTypes = /*#__PURE__*/function (_newPropTypes) {
|
|
19
|
+
_inherits(propTypes, _newPropTypes);
|
|
20
|
+
function propTypes() {
|
|
21
|
+
_classCallCheck(this, propTypes);
|
|
22
|
+
return _callSuper(this, propTypes, arguments);
|
|
23
|
+
}
|
|
24
|
+
_createClass(propTypes, null, [{
|
|
25
|
+
key: "style",
|
|
26
|
+
get: function get() {
|
|
27
|
+
return toValidableType('style', {
|
|
28
|
+
type: [String, Object]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}]);
|
|
32
|
+
return propTypes;
|
|
33
|
+
}(newPropTypes);
|
|
34
|
+
|
|
35
|
+
export { propTypes as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isFunction } from './is.js';
|
|
2
|
+
|
|
3
|
+
var getSlot = function getSlot(slots) {
|
|
4
|
+
var slot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
|
|
5
|
+
var data = arguments.length > 2 ? arguments[2] : undefined;
|
|
6
|
+
if (!slots || !Reflect.has(slots, slot)) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
if (!isFunction(slots[slot])) {
|
|
10
|
+
console.error("".concat(slot, " is not a function!"));
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
var slotFn = slots[slot];
|
|
14
|
+
if (!slotFn) return null;
|
|
15
|
+
return slotFn(data);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { getSlot };
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dfsj/components",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "通用的vue组件;包括专业组件、原子级组件",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"vue3",
|
|
8
|
+
"component"
|
|
9
|
+
],
|
|
10
|
+
"author": "yangbo <1747837358@qq.com>",
|
|
11
|
+
"homepage": "",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"directories": {
|
|
15
|
+
"lib": "lib",
|
|
16
|
+
"test": "__tests__"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"CHANGELOG.md"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "node ./__tests__/component.test.js",
|
|
26
|
+
"watch": "rollup --config ./rollup.config.ts --configPlugin typescript -w",
|
|
27
|
+
"build": "rollup --config ./rollup.config.ts --configPlugin typescript"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@dfsj/rollup": "workspace:^",
|
|
31
|
+
"@types/lodash-es": "^4.17.12",
|
|
32
|
+
"@types/node": "^20.11.3",
|
|
33
|
+
"@unocss/transformer-variant-group": "^0.58.6",
|
|
34
|
+
"@vueuse/core": "^10.5.0",
|
|
35
|
+
"element-plus": "^2.6.1",
|
|
36
|
+
"unocss": "^0.58.6",
|
|
37
|
+
"vue": "^3.4.21"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"element-plus": "^2.6.1",
|
|
41
|
+
"vue": "^3.4.21"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@babel/runtime": "^7.24.0",
|
|
45
|
+
"@dfsj/echarts": "^3.0.0",
|
|
46
|
+
"@dfsj/utils": "^3.0.0",
|
|
47
|
+
"@element-plus/icons-vue": "^2.3.1",
|
|
48
|
+
"@iconify/iconify": "^3.1.1",
|
|
49
|
+
"@wangeditor/editor": "^5.1.23",
|
|
50
|
+
"@wangeditor/editor-for-vue": "^5.1.10",
|
|
51
|
+
"@zxcvbn-ts/core": "^3.0.4",
|
|
52
|
+
"dayjs": "^1.11.7",
|
|
53
|
+
"lodash-es": "^4.17.21",
|
|
54
|
+
"vue-draggable-plus": "^0.3.5",
|
|
55
|
+
"vue-types": "^5.0.2"
|
|
56
|
+
},
|
|
57
|
+
"gitHead": "9a2fe7ed1e52959d2655a684ff2ef1e94d72a738",
|
|
58
|
+
"module": "dist/index.js",
|
|
59
|
+
"browser": "dist/index.js",
|
|
60
|
+
"types": "dist/index.d.ts",
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
}
|
|
64
|
+
}
|