orion-design 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -0
- package/dist/components/Button/Button.vue.d.ts +2 -0
- package/dist/components/Button/index.d.ts +4 -0
- package/dist/components/Button/index.js +27 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Flex/Col.d.ts +4 -4
- package/dist/components/Flex/Item.d.ts +4 -4
- package/dist/components/Flex/Row.d.ts +4 -4
- package/dist/components/Flex/index.d.ts +4 -4
- package/dist/components/Flex/index.js +95 -127
- package/dist/components/Flex/index.js.map +1 -0
- package/dist/components/Form/Form.d.ts +21 -0
- package/dist/components/Form/Form.js +5 -0
- package/dist/components/Form/Form.js.map +1 -0
- package/dist/components/Form/Form.vue.d.ts +465 -0
- package/dist/components/Form/PasswordInput/PasswordInput.d.ts +15 -0
- package/dist/components/Form/PasswordInput/PasswordInput.js +2 -0
- package/dist/components/Form/PasswordInput/PasswordInput.js.map +1 -0
- package/dist/components/Form/PasswordInput/PasswordInput.vue.d.ts +3 -0
- package/dist/components/Form/PasswordInput/index.d.ts +1 -0
- package/dist/components/Form/PasswordInput/index.js +2 -0
- package/dist/components/Form/PasswordInput/index.js.map +1 -0
- package/dist/components/Form/StringInput/StringInput.d.ts +15 -0
- package/dist/components/Form/StringInput/StringInput.js +2 -0
- package/dist/components/Form/StringInput/StringInput.js.map +1 -0
- package/dist/components/Form/StringInput/StringInput.vue.d.ts +3 -0
- package/dist/components/Form/StringInput/index.d.ts +1 -0
- package/dist/components/Form/StringInput/index.js +2 -0
- package/dist/components/Form/StringInput/index.js.map +1 -0
- package/dist/components/Form/Textarea/Textarea.d.ts +16 -0
- package/dist/components/Form/Textarea/Textarea.js +2 -0
- package/dist/components/Form/Textarea/Textarea.js.map +1 -0
- package/dist/components/Form/Textarea/Textarea.vue.d.ts +3 -0
- package/dist/components/Form/Textarea/index.d.ts +1 -0
- package/dist/components/Form/Textarea/index.js +2 -0
- package/dist/components/Form/Textarea/index.js.map +1 -0
- package/dist/components/Form/hooks/useForm.d.ts +4 -0
- package/dist/components/Form/hooks/useForm.js +21 -0
- package/dist/components/Form/hooks/useForm.js.map +1 -0
- package/dist/components/Form/index.d.ts +273 -0
- package/dist/components/Form/index.js +194 -0
- package/dist/components/Form/index.js.map +1 -0
- package/dist/components/Modal/index.d.ts +1 -14
- package/dist/components/Modal/useModal.d.ts +1 -1
- package/dist/components/Modal/useModal.js +7 -7
- package/dist/components/Modal/useModal.js.map +1 -0
- package/dist/components/Pagetable/Pagetable.d.ts +79 -0
- package/dist/components/Pagetable/columns/PagetableDatecolumn.d.ts +88 -0
- package/dist/components/Pagetable/columns/PagetableStringcolumn.d.ts +62 -0
- package/dist/components/Pagetable/index.d.ts +60 -0
- package/dist/components/Pagetable/index.js +144 -0
- package/dist/components/Pagetable/index.js.map +1 -0
- package/dist/components/Pagetable/interface.d.ts +10 -0
- package/dist/components/Pagetable/interface.js +2 -0
- package/dist/components/Pagetable/interface.js.map +1 -0
- package/dist/components/Space/index.d.ts +9 -9
- package/dist/components/_util/arrays.d.ts +5 -0
- package/dist/components/_util/arrays.js +8 -0
- package/dist/components/_util/arrays.js.map +1 -0
- package/dist/components/_util/browser.d.ts +3 -0
- package/dist/components/_util/browser.js +9 -0
- package/dist/components/_util/browser.js.map +1 -0
- package/dist/components/_util/classNames.js +20 -27
- package/dist/components/_util/classNames.js.map +1 -0
- package/dist/components/_util/dom/aria.d.ts +30 -0
- package/dist/components/_util/dom/aria.js +46 -0
- package/dist/components/_util/dom/aria.js.map +1 -0
- package/dist/components/_util/dom/element.d.ts +3 -0
- package/dist/components/_util/dom/element.js +18 -0
- package/dist/components/_util/dom/element.js.map +1 -0
- package/dist/components/_util/dom/event.d.ts +6 -0
- package/dist/components/_util/dom/event.js +10 -0
- package/dist/components/_util/dom/event.js.map +1 -0
- package/dist/components/_util/dom/index.d.ts +6 -0
- package/dist/components/_util/dom/index.js +39 -0
- package/dist/components/_util/dom/index.js.map +1 -0
- package/dist/components/_util/dom/position.d.ts +7 -0
- package/dist/components/_util/dom/position.js +30 -0
- package/dist/components/_util/dom/position.js.map +1 -0
- package/dist/components/_util/dom/scroll.d.ts +11 -0
- package/dist/components/_util/dom/scroll.js +78 -0
- package/dist/components/_util/dom/scroll.js.map +1 -0
- package/dist/components/_util/dom/style.d.ts +9 -0
- package/dist/components/_util/dom/style.js +58 -0
- package/dist/components/_util/dom/style.js.map +1 -0
- package/dist/components/_util/easings.d.ts +1 -0
- package/dist/components/_util/easings.js +8 -0
- package/dist/components/_util/easings.js.map +1 -0
- package/dist/components/_util/error.d.ts +3 -0
- package/dist/components/_util/error.js +22 -0
- package/dist/components/_util/error.js.map +1 -0
- package/dist/components/_util/functions.d.ts +1 -0
- package/dist/components/_util/functions.js +6 -0
- package/dist/components/_util/functions.js.map +1 -0
- package/dist/components/_util/i18n.d.ts +1 -0
- package/dist/components/_util/i18n.js +5 -0
- package/dist/components/_util/i18n.js.map +1 -0
- package/dist/components/_util/index.d.ts +15 -0
- package/dist/components/_util/index.js +140 -0
- package/dist/components/_util/index.js.map +1 -0
- package/dist/components/_util/isValid.js +4 -4
- package/dist/components/_util/isValid.js.map +1 -0
- package/dist/components/_util/objects.d.ts +8 -0
- package/dist/components/_util/objects.js +17 -0
- package/dist/components/_util/objects.js.map +1 -0
- package/dist/components/_util/props-util/index.d.ts +4 -4
- package/dist/components/_util/props-util/index.js +23 -50
- package/dist/components/_util/props-util/index.js.map +1 -0
- package/dist/components/_util/props-util/initDefaultProps.d.ts +2 -2
- package/dist/components/_util/props-util/initDefaultProps.js +13 -24
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -0
- package/dist/components/_util/raf.d.ts +2 -0
- package/dist/components/_util/raf.js +7 -0
- package/dist/components/_util/raf.js.map +1 -0
- package/dist/components/_util/rand.d.ts +12 -0
- package/dist/components/_util/rand.js +6 -0
- package/dist/components/_util/rand.js.map +1 -0
- package/dist/components/_util/strings.d.ts +6 -0
- package/dist/components/_util/strings.js +11 -0
- package/dist/components/_util/strings.js.map +1 -0
- package/dist/components/_util/throttleByRaf.d.ts +4 -0
- package/dist/components/_util/throttleByRaf.js +16 -0
- package/dist/components/_util/throttleByRaf.js.map +1 -0
- package/dist/components/_util/type.d.ts +1 -1
- package/dist/components/_util/type.js +48 -65
- package/dist/components/_util/type.js.map +1 -0
- package/dist/components/_util/types.d.ts +10 -0
- package/dist/components/_util/types.js +25 -0
- package/dist/components/_util/types.js.map +1 -0
- package/dist/components/_util/typescript.d.ts +12 -0
- package/dist/components/_util/typescript.js +5 -0
- package/dist/components/_util/typescript.js.map +1 -0
- package/dist/components/_util/util.d.ts +1 -1
- package/dist/components/_util/util.js +46 -74
- package/dist/components/_util/util.js.map +1 -0
- package/dist/components/_util/vue/global-node.d.ts +3 -0
- package/dist/components/_util/vue/global-node.js +21 -0
- package/dist/components/_util/vue/global-node.js.map +1 -0
- package/dist/components/_util/vue/icon.d.ts +23 -0
- package/dist/components/_util/vue/icon.js +154 -0
- package/dist/components/_util/vue/icon.js.map +1 -0
- package/dist/components/_util/vue/index.d.ts +9 -0
- package/dist/components/_util/vue/index.js +44 -0
- package/dist/components/_util/vue/index.js.map +1 -0
- package/dist/components/_util/vue/install.d.ts +6 -0
- package/dist/components/_util/vue/install.js +21 -0
- package/dist/components/_util/vue/install.js.map +1 -0
- package/dist/components/_util/vue/props/index.d.ts +3 -0
- package/dist/components/_util/vue/props/index.js +9 -0
- package/dist/components/_util/vue/props/index.js.map +1 -0
- package/dist/components/_util/vue/props/runtime.d.ts +29 -0
- package/dist/components/_util/vue/props/runtime.js +37 -0
- package/dist/components/_util/vue/props/runtime.js.map +1 -0
- package/dist/components/_util/vue/props/types.d.ts +120 -0
- package/dist/components/_util/vue/props/types.js +2 -0
- package/dist/components/_util/vue/props/types.js.map +1 -0
- package/dist/components/_util/vue/props/util.d.ts +8 -0
- package/dist/components/_util/vue/props/util.js +2 -0
- package/dist/components/_util/vue/props/util.js.map +1 -0
- package/dist/components/_util/vue/refs.d.ts +3 -0
- package/dist/components/_util/vue/refs.js +12 -0
- package/dist/components/_util/vue/refs.js.map +1 -0
- package/dist/components/_util/vue/size.d.ts +2 -0
- package/dist/components/_util/vue/size.js +6 -0
- package/dist/components/_util/vue/size.js.map +1 -0
- package/dist/components/_util/vue/typescript.d.ts +5 -0
- package/dist/components/_util/vue/typescript.js +2 -0
- package/dist/components/_util/vue/typescript.js.map +1 -0
- package/dist/components/_util/vue/validator.d.ts +3 -0
- package/dist/components/_util/vue/validator.js +7 -0
- package/dist/components/_util/vue/validator.js.map +1 -0
- package/dist/components/_util/vue/vnode.d.ts +50 -0
- package/dist/components/_util/vue/vnode.js +68 -0
- package/dist/components/_util/vue/vnode.js.map +1 -0
- package/dist/components/_util/vue-types/index.d.ts +3 -3
- package/dist/components/_util/vue-types/index.js +275 -417
- package/dist/components/_util/vue-types/index.js.map +1 -0
- package/dist/components/components.d.ts +4 -0
- package/dist/components/components.js +18 -12
- package/dist/components/components.js.map +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +25 -24
- package/dist/components/index.js.map +1 -0
- package/dist/components-BZukhWDk.js +106 -0
- package/dist/components-BZukhWDk.js.map +1 -0
- package/dist/error/OrionError.js +7 -12
- package/dist/error/OrionError.js.map +1 -0
- package/dist/functions-DzLqXvGt.js +33 -0
- package/dist/functions-DzLqXvGt.js.map +1 -0
- package/dist/index-C8JNJPWW.js +8 -0
- package/dist/index-C8JNJPWW.js.map +1 -0
- package/dist/index.css +1 -44
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -14
- package/dist/index.js.map +1 -0
- package/dist/print/LodopFuncs.js +48 -111
- package/dist/print/LodopFuncs.js.map +1 -0
- package/dist/print/index.d.ts +2 -2
- package/dist/print/index.js +111 -220
- package/dist/print/index.js.map +1 -0
- package/dist/request/ErrorHandlerChain.js +17 -15
- package/dist/request/ErrorHandlerChain.js.map +1 -0
- package/dist/request/RequestFilterChain.d.ts +1 -1
- package/dist/request/RequestFilterChain.js +16 -14
- package/dist/request/RequestFilterChain.js.map +1 -0
- package/dist/request/ResponseParserChain.d.ts +1 -1
- package/dist/request/ResponseParserChain.js +17 -15
- package/dist/request/ResponseParserChain.js.map +1 -0
- package/dist/request/disivion/DateSerializer.js +25 -46
- package/dist/request/disivion/DateSerializer.js.map +1 -0
- package/dist/request/disivion/DivisionErrorHandler.d.ts +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +30 -52
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -0
- package/dist/request/disivion/DivisionResponseParser.d.ts +2 -2
- package/dist/request/disivion/DivisionResponseParser.js +13 -25
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -0
- package/dist/request/disivion/index.d.ts +3 -3
- package/dist/request/disivion/index.js +230 -480
- package/dist/request/disivion/index.js.map +1 -0
- package/dist/request/error/BizExceptionResponseError.d.ts +2 -2
- package/dist/request/error/BizExceptionResponseError.js +8 -15
- package/dist/request/error/BizExceptionResponseError.js.map +1 -0
- package/dist/request/error/ExceptionResponseError.d.ts +2 -2
- package/dist/request/error/ExceptionResponseError.js +8 -15
- package/dist/request/error/ExceptionResponseError.js.map +1 -0
- package/dist/request/error/ResponseError.d.ts +1 -1
- package/dist/request/error/ResponseError.js +7 -14
- package/dist/request/error/ResponseError.js.map +1 -0
- package/dist/request/error/SessionExceptionResponseError.d.ts +2 -2
- package/dist/request/error/SessionExceptionResponseError.js +8 -15
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -0
- package/dist/request/index.js +11 -17
- package/dist/request/index.js.map +1 -0
- package/dist/style/index.d.ts +0 -3
- package/dist/style/index.js +1 -0
- package/dist/style/index.js.map +1 -0
- package/dist/utils/DateUtil.js +36 -50
- package/dist/utils/DateUtil.js.map +1 -0
- package/dist/utils/NumberUtil.js +9 -8
- package/dist/utils/NumberUtil.js.map +1 -0
- package/dist/utils/cloneDeep.js +5 -1
- package/dist/utils/cloneDeep.js.map +1 -0
- package/dist/utils/delay.js +6 -4
- package/dist/utils/delay.js.map +1 -0
- package/dist/utils/functions.d.ts +1 -0
- package/dist/utils/functions.js +6 -0
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/index.js +15 -9
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/md5.js +121 -244
- package/dist/utils/md5.js.map +1 -0
- package/dist/utils/uuid.js +28 -58
- package/dist/utils/uuid.js.map +1 -0
- package/dist/utils/vue/install.d.ts +6 -0
- package/dist/utils/vue/install.js +21 -0
- package/dist/utils/vue/install.js.map +1 -0
- package/dist/utils/vue/typescript.d.ts +5 -0
- package/dist/utils/vue/typescript.js +2 -0
- package/dist/utils/vue/typescript.js.map +1 -0
- package/dist/version/index.d.ts +1 -1
- package/dist/version/index.js +5 -6
- package/dist/version/index.js.map +1 -0
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +5 -3
- package/dist/version/version.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/global.d.ts +6 -0
- package/package.json +52 -63
- package/dist/components-DhjIbmR3.js +0 -128
package/dist/version/index.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
export { version as default };
|
1
|
+
import r from "./version.js";
|
2
|
+
export {
|
3
|
+
r as default
|
4
|
+
};
|
5
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: "0.1.
|
1
|
+
declare const _default: "0.1.5";
|
2
2
|
export default _default;
|
package/dist/version/version.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../src/version/version.ts"],"sourcesContent":["export default '0.1.5';"],"names":["version"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/vite.svg
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/global.d.ts
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
declare module 'vue' {
|
2
2
|
export interface GlobalComponents {
|
3
|
+
// 布局
|
3
4
|
OSpace: typeof import('orion-design')['Space']
|
4
5
|
ORowflex: typeof import('orion-design')['Rowflex']
|
5
6
|
OColflex: typeof import('orion-design')['Colflex']
|
6
7
|
OFlexitem: typeof import('orion-design')['Flexitem']
|
8
|
+
|
9
|
+
// 表格
|
10
|
+
OPageTable: typeof import('orion-design')['PageTable']
|
11
|
+
|
12
|
+
// 反馈
|
7
13
|
OModal: typeof import('orion-design')['Modal']
|
8
14
|
}
|
9
15
|
}
|
package/package.json
CHANGED
@@ -1,63 +1,52 @@
|
|
1
|
-
{
|
2
|
-
"name": "orion-design",
|
3
|
-
"version": "0.1.
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"
|
7
|
-
"
|
8
|
-
|
9
|
-
"
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
"
|
14
|
-
"
|
15
|
-
|
16
|
-
|
17
|
-
"
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
"@
|
25
|
-
"@
|
26
|
-
"@
|
27
|
-
"@
|
28
|
-
"@
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
|
43
|
-
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
|
48
|
-
|
49
|
-
"
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
},
|
54
|
-
"peerDependencies": {
|
55
|
-
"axios": "^1.7.7",
|
56
|
-
"dayjs": "^1.11.13",
|
57
|
-
"decimal.js": "^10.4.3",
|
58
|
-
"element-plus": "^2.8.3",
|
59
|
-
"lodash-es": "^4.17.21",
|
60
|
-
"vue": "^3.0.0",
|
61
|
-
"vue-router": "^4.4.5"
|
62
|
-
}
|
63
|
-
}
|
1
|
+
{
|
2
|
+
"name": "orion-design",
|
3
|
+
"version": "0.1.5",
|
4
|
+
"main": "dist/index.js",
|
5
|
+
"type": "module",
|
6
|
+
"types": "dist/index.d.ts",
|
7
|
+
"files": [
|
8
|
+
"dist",
|
9
|
+
"global.d.ts"
|
10
|
+
],
|
11
|
+
"scripts": {
|
12
|
+
"dev": "vite build --mode dev --watch",
|
13
|
+
"build": "npm run version && vue-tsc && vite build",
|
14
|
+
"version": "node ./scripts/generate-version.cjs"
|
15
|
+
},
|
16
|
+
"dependencies": {
|
17
|
+
"js-base64": "^3.7.7",
|
18
|
+
"md5": "^2.3.0",
|
19
|
+
"uuid": "^10.0.0",
|
20
|
+
"vue": "^3.4.37",
|
21
|
+
"vue-types": "^5.1.3"
|
22
|
+
},
|
23
|
+
"devDependencies": {
|
24
|
+
"@types/md5": "^2.3.5",
|
25
|
+
"@types/node": "^22.7.4",
|
26
|
+
"@types/uuid": "^10.0.0",
|
27
|
+
"@vitejs/plugin-vue": "^5.1.2",
|
28
|
+
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
29
|
+
"axios": "^1.7.7",
|
30
|
+
"dayjs": "^1.11.13",
|
31
|
+
"decimal.js": "^10.4.3",
|
32
|
+
"element-plus": "^2.8.4",
|
33
|
+
"glob": "^11.0.0",
|
34
|
+
"lodash-es": "^4.17.21",
|
35
|
+
"sass-embedded": "^1.79.4",
|
36
|
+
"type-fest": "^4.26.1",
|
37
|
+
"typescript": "^5.5.3",
|
38
|
+
"vite": "^5.4.1",
|
39
|
+
"vite-plugin-dts": "^4.2.2",
|
40
|
+
"vue-router": "^4.4.5",
|
41
|
+
"vue-tsc": "^2.0.29"
|
42
|
+
},
|
43
|
+
"peerDependencies": {
|
44
|
+
"axios": "^1.7.7",
|
45
|
+
"dayjs": "^1.11.13",
|
46
|
+
"decimal.js": "^10.4.3",
|
47
|
+
"element-plus": "^2.8.3",
|
48
|
+
"lodash-es": "^4.17.21",
|
49
|
+
"vue": "^3.0.0",
|
50
|
+
"vue-router": "^4.4.5"
|
51
|
+
}
|
52
|
+
}
|
@@ -1,128 +0,0 @@
|
|
1
|
-
import { defineComponent, computed, createVNode, ref, shallowRef, provide, Fragment } from 'vue';
|
2
|
-
import { filterEmpty } from './components/_util/props-util/index.js';
|
3
|
-
import { withInstall, anyType } from './components/_util/type.js';
|
4
|
-
import { Colflex, Flexitem, Rowflex } from './components/Flex/index.js';
|
5
|
-
import { ElDialog } from 'element-plus';
|
6
|
-
import useModal from './components/Modal/useModal.js';
|
7
|
-
|
8
|
-
const spaceProps = () => ({
|
9
|
-
gutter: anyType(),
|
10
|
-
vertical: anyType()
|
11
|
-
});
|
12
|
-
const Space = defineComponent({
|
13
|
-
name: 'OSpace',
|
14
|
-
inheritAttrs: false,
|
15
|
-
props: spaceProps(),
|
16
|
-
slots: Object,
|
17
|
-
setup(props, {
|
18
|
-
slots,
|
19
|
-
attrs,
|
20
|
-
emit,
|
21
|
-
expose
|
22
|
-
}) {
|
23
|
-
const classes = computed(() => {
|
24
|
-
const {
|
25
|
-
vertical
|
26
|
-
} = props;
|
27
|
-
return ['orion-space', {
|
28
|
-
[`vertical`]: vertical === true || vertical === ''
|
29
|
-
}];
|
30
|
-
});
|
31
|
-
return () => {
|
32
|
-
const children = slots.default?.();
|
33
|
-
const items = filterEmpty(children);
|
34
|
-
const len = items.length;
|
35
|
-
if (len === 0) {
|
36
|
-
return null;
|
37
|
-
}
|
38
|
-
const gapStyle = {};
|
39
|
-
if (typeof props.gutter == 'string' && props.gutter) {
|
40
|
-
gapStyle.gap = props.gutter;
|
41
|
-
}
|
42
|
-
return createVNode("div", {
|
43
|
-
"class": [classes.value, attrs.class],
|
44
|
-
"style": [gapStyle, attrs.style]
|
45
|
-
}, [items.map(child => {
|
46
|
-
return createVNode("div", {
|
47
|
-
"class": ['orion-space-item']
|
48
|
-
}, [child]);
|
49
|
-
})]);
|
50
|
-
};
|
51
|
-
}
|
52
|
-
});
|
53
|
-
var index$1 = withInstall(Space);
|
54
|
-
|
55
|
-
const Modal = defineComponent({
|
56
|
-
name: 'OModal',
|
57
|
-
setup(props, {
|
58
|
-
slots,
|
59
|
-
attrs,
|
60
|
-
emit,
|
61
|
-
expose
|
62
|
-
}) {
|
63
|
-
const show = ref(false);
|
64
|
-
const title = ref();
|
65
|
-
const content = shallowRef();
|
66
|
-
const params = ref();
|
67
|
-
const width = ref();
|
68
|
-
const __resolve = ref();
|
69
|
-
const _open = async options => {
|
70
|
-
show.value = true;
|
71
|
-
title.value = options.title;
|
72
|
-
content.value = options.content;
|
73
|
-
if (options.params) {
|
74
|
-
params.value = options.params;
|
75
|
-
} else {
|
76
|
-
params.value = {};
|
77
|
-
}
|
78
|
-
if (options.width) {
|
79
|
-
width.value = options.width;
|
80
|
-
}
|
81
|
-
const promise = new Promise((resolve, reject) => {
|
82
|
-
__resolve.value = resolve;
|
83
|
-
});
|
84
|
-
return promise;
|
85
|
-
};
|
86
|
-
expose({
|
87
|
-
open: _open
|
88
|
-
});
|
89
|
-
const _close = options => {
|
90
|
-
const resolve = __resolve.value;
|
91
|
-
show.value = false;
|
92
|
-
title.value = undefined;
|
93
|
-
content.value = undefined;
|
94
|
-
params.value = undefined;
|
95
|
-
width.value = undefined;
|
96
|
-
__resolve.value = undefined;
|
97
|
-
resolve && resolve(options);
|
98
|
-
};
|
99
|
-
provide('$$Modal', {
|
100
|
-
close: _close
|
101
|
-
});
|
102
|
-
return () => {
|
103
|
-
const Children = content.value;
|
104
|
-
return show.value ? createVNode(ElDialog, {
|
105
|
-
"title": title.value,
|
106
|
-
"width": width.value,
|
107
|
-
"modelValue": show.value,
|
108
|
-
"beforeClose": _close,
|
109
|
-
"draggable": true
|
110
|
-
}, {
|
111
|
-
default: () => [createVNode(Children, params.value, null)]
|
112
|
-
}) : createVNode(Fragment, null, null);
|
113
|
-
};
|
114
|
-
}
|
115
|
-
});
|
116
|
-
var index = withInstall(Modal);
|
117
|
-
|
118
|
-
var components = /*#__PURE__*/Object.freeze({
|
119
|
-
__proto__: null,
|
120
|
-
Colflex: Colflex,
|
121
|
-
Flexitem: Flexitem,
|
122
|
-
Modal: index,
|
123
|
-
Rowflex: Rowflex,
|
124
|
-
Space: index$1,
|
125
|
-
useOModal: useModal
|
126
|
-
});
|
127
|
-
|
128
|
-
export { index as a, components as c, index$1 as i };
|