@dfsj/components 3.7.2-alpha.6 → 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.
Files changed (157) hide show
  1. package/CHANGELOG.md +61 -453
  2. package/README.md +101 -24
  3. package/dist/_virtual/_rollupPluginBabelHelpers.js +13 -0
  4. package/dist/components/Boards/src/Boards.vue.js +10 -4
  5. package/dist/components/Boards/src/Boards.vue2.js +10 -152
  6. package/dist/components/Boards/src/hooKs/useStyle.d.ts +13 -5
  7. package/dist/components/Boards/src/hooKs/useStyle.js +10 -104
  8. package/dist/components/Boards/src/props.d.ts +5 -23
  9. package/dist/components/Boards/src/props.js +10 -56
  10. package/dist/components/ClickOutSide/src/ClickOutSide.vue.js +10 -4
  11. package/dist/components/ClickOutSide/src/ClickOutSide.vue2.js +10 -25
  12. package/dist/components/Descriptions/src/Descriptions.vue.js +10 -4
  13. package/dist/components/Descriptions/src/Descriptions.vue2.js +10 -150
  14. package/dist/components/Editor/src/Editor.vue.js +10 -4
  15. package/dist/components/Editor/src/Editor.vue2.js +10 -137
  16. package/dist/components/Form/src/Form.vue.js +10 -4
  17. package/dist/components/Form/src/Form.vue2.js +10 -394
  18. package/dist/components/Form/src/components/useRenderCheckbox.js +10 -32
  19. package/dist/components/Form/src/components/useRenderRadio.js +10 -32
  20. package/dist/components/Form/src/components/useRenderSelect.js +10 -51
  21. package/dist/components/Form/src/helper/componentMap.js +10 -32
  22. package/dist/components/Form/src/helper/index.js +10 -108
  23. package/dist/components/Form/src/types/index.d.ts +80 -84
  24. package/dist/components/Form/src/types/index.js +10 -30
  25. package/dist/components/Form/src/useForm.js +10 -289
  26. package/dist/components/Highlight/src/Highlight.vue.js +10 -4
  27. package/dist/components/Highlight/src/Highlight.vue2.js +10 -61
  28. package/dist/components/Icon/src/Icon.vue.js +10 -4
  29. package/dist/components/Icon/src/Icon.vue2.js +10 -122
  30. package/dist/components/Icon/src/SvgIcon.vue.js +10 -6
  31. package/dist/components/Icon/src/SvgIcon.vue2.js +10 -44
  32. package/dist/components/Icon/src/SvgIcon.vue3.js +10 -13
  33. package/dist/components/InputPassword/src/InputPassword.vue.js +10 -4
  34. package/dist/components/InputPassword/src/InputPassword.vue2.js +10 -57
  35. package/dist/components/Modal/src/BasicModal.vue.js +10 -4
  36. package/dist/components/Modal/src/BasicModal.vue2.js +10 -154
  37. package/dist/components/Modal/src/components/ModalFooter.vue.js +10 -4
  38. package/dist/components/Modal/src/components/ModalFooter.vue2.js +10 -39
  39. package/dist/components/Modal/src/components/ModalHeader.vue.js +10 -4
  40. package/dist/components/Modal/src/components/ModalHeader.vue2.js +10 -80
  41. package/dist/components/Modal/src/config.d.ts +3 -2
  42. package/dist/components/Modal/src/config.js +10 -28
  43. package/dist/components/Modal/src/hooks/useModalDrag.js +10 -109
  44. package/dist/components/Modal/src/hooks/useTimeout.js +10 -52
  45. package/dist/components/Modal/src/props.d.ts +16 -56
  46. package/dist/components/Modal/src/props.js +10 -130
  47. package/dist/components/Modal/src/utils/index.js +10 -85
  48. package/dist/components/NodeAxis/src/AbstractNodeProvider.js +10 -21
  49. package/dist/components/NodeAxis/src/CanvasNodeRender.d.ts +3 -12
  50. package/dist/components/NodeAxis/src/CanvasNodeRender.js +10 -411
  51. package/dist/components/NodeAxis/src/NodeAxis.vue.js +10 -4
  52. package/dist/components/NodeAxis/src/NodeAxis.vue2.js +10 -68
  53. package/dist/components/NodeAxis/src/NodeModel.js +10 -62
  54. package/dist/components/NodeAxis/src/NodeRender.js +10 -28
  55. package/dist/components/NodeAxis/src/NullLayerProvider.js +10 -86
  56. package/dist/components/NodeAxis/src/NullProvider.js +10 -65
  57. package/dist/components/NodeAxis/src/TimerNodePlayer.js +10 -148
  58. package/dist/components/NodeAxis/src/config/node-axis.options.js +10 -55
  59. package/dist/components/NodeAxis/src/enum/index.js +10 -19
  60. package/dist/components/NodeAxis/src/utils/assign.js +10 -42
  61. package/dist/components/Stateful/src/State.js +10 -78
  62. package/dist/components/Stateful/src/Stateful.vue.js +10 -4
  63. package/dist/components/Stateful/src/Stateful.vue2.js +10 -52
  64. package/dist/components/Stateful/src/props.d.ts +2 -6
  65. package/dist/components/Stateful/src/props.js +10 -28
  66. package/dist/components/Table/index.d.ts +3 -3
  67. package/dist/components/Table/src/Table.vue.js +10 -4
  68. package/dist/components/Table/src/Table.vue2.js +10 -583
  69. package/dist/components/Table/src/components/ColumnSetting.vue.js +10 -4
  70. package/dist/components/Table/src/components/ColumnSetting.vue2.js +10 -263
  71. package/dist/components/Table/src/components/TableActions.vue.js +10 -4
  72. package/dist/components/Table/src/components/TableActions.vue2.js +10 -107
  73. package/dist/components/Table/src/helper/index.js +10 -10
  74. package/dist/components/Table/src/types/index.d.ts +11 -13
  75. package/dist/components/Table/src/useTable.d.ts +36 -1
  76. package/dist/components/Table/src/useTable.js +10 -283
  77. package/dist/components/UnifyChart/src/ChartToolbox.vue.js +10 -4
  78. package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +10 -82
  79. package/dist/components/UnifyChart/src/UnifyChart.vue.js +10 -4
  80. package/dist/components/UnifyChart/src/UnifyChart.vue2.js +10 -57
  81. package/dist/components/UnifyChart/src/hooks/useLoader.js +10 -92
  82. package/dist/components/UnifyChart/src/hooks/useRender.d.ts +8 -13
  83. package/dist/components/UnifyChart/src/hooks/useRender.js +10 -49
  84. package/dist/components/UnifyChart/src/props.d.ts +13 -59
  85. package/dist/components/UnifyChart/src/props.js +10 -32
  86. package/dist/components/UnifyChart/src/useDownLoad.js +10 -26
  87. package/dist/components/Visual/src/BufferLayerPlayer.js +10 -309
  88. package/dist/components/Visual/src/ResolvableLayerProvider.js +10 -252
  89. package/dist/components/Visual/src/config/default.manager.js +10 -6
  90. package/dist/components/Visual/src/config/default.provider.js +10 -17
  91. package/dist/components/Visual/src/mapping.js +10 -6
  92. package/dist/components/Visual/src/resolvers/IntervalResolver.js +10 -168
  93. package/dist/components/Visual/src/resolvers/tools.resolver.js +10 -151
  94. package/dist/components/Visual/src/utils/NodeMath.js +10 -99
  95. package/dist/components/Windows/src/ModalWrap.vue.js +10 -4
  96. package/dist/components/Windows/src/ModalWrap.vue2.js +10 -132
  97. package/dist/components/Windows/src/Windows.vue.js +10 -6
  98. package/dist/components/Windows/src/Windows.vue2.js +10 -55
  99. package/dist/components/Windows/src/Windows.vue3.js +10 -24
  100. package/dist/components/Windows/src/props.js +10 -8
  101. package/dist/directives/clickOutside.js +10 -70
  102. package/dist/directives/repeatClick.js +10 -28
  103. package/dist/directives/resizable.js +10 -195
  104. package/dist/index.d.ts +0 -1
  105. package/dist/index.js +11 -52
  106. package/dist/index.min.css +3 -3
  107. package/dist/themes/index.js +9 -0
  108. package/dist/types/index.d.ts +3 -3
  109. package/dist/utils/index.js +10 -23
  110. package/package.json +54 -25
  111. package/dist/components/Boards/src/Boards.vue.d.ts +0 -104
  112. package/dist/components/ClickOutSide/src/ClickOutSide.vue.d.ts +0 -7
  113. package/dist/components/Descriptions/src/Descriptions.vue.d.ts +0 -97
  114. package/dist/components/Editor/src/Editor.vue.d.ts +0 -51
  115. package/dist/components/Form/src/Form.vue.d.ts +0 -838
  116. package/dist/components/Highlight/src/Highlight.vue.d.ts +0 -41
  117. package/dist/components/Icon/src/Icon.vue.d.ts +0 -49
  118. package/dist/components/Icon/src/SvgIcon.vue.d.ts +0 -45
  119. package/dist/components/InputPassword/src/InputPassword.vue.d.ts +0 -27
  120. package/dist/components/Modal/src/BasicModal.vue.d.ts +0 -419
  121. package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +0 -86
  122. package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +0 -241
  123. package/dist/components/NodeAxis/src/BCanvasNodeRender.d.ts +0 -19
  124. package/dist/components/NodeAxis/src/BCanvasNodeRender.js +0 -344
  125. package/dist/components/NodeAxis/src/NodeAxis.vue.d.ts +0 -17
  126. package/dist/components/Stateful/src/Stateful.vue.d.ts +0 -22
  127. package/dist/components/Table/src/Table.vue.d.ts +0 -1535
  128. package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +0 -30
  129. package/dist/components/Table/src/components/TableActions.vue.d.ts +0 -229
  130. package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +0 -46
  131. package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +0 -95
  132. package/dist/components/Video/index.d.ts +0 -2
  133. package/dist/components/Video/src/VideoPlayer.vue.d.ts +0 -60
  134. package/dist/components/Video/src/VideoPlayer.vue.js +0 -5
  135. package/dist/components/Video/src/VideoPlayer.vue2.js +0 -107
  136. package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +0 -34
  137. package/dist/components/Video/src/VideoPlayerToolbar.vue.js +0 -5
  138. package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +0 -65
  139. package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +0 -7
  140. package/dist/components/Video/src/abstract/Observable.d.ts +0 -6
  141. package/dist/components/Video/src/abstract/Observable.js +0 -89
  142. package/dist/components/Video/src/abstract/VideoControl.d.ts +0 -32
  143. package/dist/components/Video/src/abstract/VideoControl.js +0 -48
  144. package/dist/components/Video/src/control/DaHua.d.ts +0 -12
  145. package/dist/components/Video/src/control/DaHua.js +0 -154
  146. package/dist/components/Video/src/control/Hikvision.d.ts +0 -28
  147. package/dist/components/Video/src/control/Hikvision.js +0 -249
  148. package/dist/components/Video/src/control/VideoFactory.d.ts +0 -3
  149. package/dist/components/Video/src/control/VideoFactory.js +0 -31
  150. package/dist/components/Video/src/enums/CommonEnum.d.ts +0 -26
  151. package/dist/components/Video/src/enums/CommonEnum.js +0 -31
  152. package/dist/components/Windows/src/ModalWrap.vue.d.ts +0 -14
  153. package/dist/components/Windows/src/Windows.vue.d.ts +0 -21
  154. package/dist/helper/lang.d.ts +0 -1
  155. package/dist/helper/lang.js +0 -546
  156. package/dist/node_modules/.pnpm/@vueuse_core@13.9.0_vue@3.5.20_typescript@5.9.2_/node_modules/@vueuse/core/index.js +0 -393
  157. package/dist/node_modules/.pnpm/@vueuse_shared@13.9.0_vue@3.5.20_typescript@5.9.2_/node_modules/@vueuse/shared/index.js +0 -53
package/README.md CHANGED
@@ -1,27 +1,104 @@
1
- # 功能
2
- ```shell
3
- 提供常见的基础组件。
4
- 1、表格 Table
5
- 2、表单 Form
6
- 3、窗口 Windows
7
- 4、模态框 Modal
8
- 5、提示框 Toast
9
- 6、切换 Tabs
10
- 7、加载状态 Loading
11
- 8、二维码 Qrcode
12
- 9、时间/相对时间 DatePicker
13
- 10、富文本框 Editor
1
+ # @dfsj/components
2
+
3
+ > 基于 Element Plus 的通用业务组件库,包含 Table/Form/BasicModal/Windows/Boards 等高级封装组件
4
+
5
+ [![version](https://img.shields.io/npm/v/@dfsj/components.svg)](https://www.npmjs.com/package/@dfsj/components)
6
+ [![license](https://img.shields.io/npm/l/@dfsj/components.svg)](https://github.com/by1773/ec/blob/main/packages/components/LICENSE)
7
+
8
+ ## 简介
9
+
10
+ @dfsj/components 是基于 Element Plus 的通用业务组件库,提供 Table、Form、Modal、Windows、Boards 等高级封装组件,通过 Schema 驱动和 Hooks 配合大幅提升中后台表单表格场景的开发效率。
11
+
12
+ ## 主要功能
13
+
14
+ - **Table 表格** - 自动分页、列配置、行选择、操作列、图片预览
15
+ - **Form 表单** - Schema 驱动表单,支持联动校验、20+ 表单组件类型
16
+ - **BasicModal 弹窗** - 拖拽/全屏/自定义按钮/可收起
17
+ - **Windows 窗口** - 多窗口管理器,可拖拽缩放
18
+ - **Boards 抽屉** - 侧边抽屉管理器,支持宽度调整
19
+ - **Editor 富文本** - 基于 WangEditor 封装
20
+ - **UnifyChart 图表** - 通用图表容器
21
+ - **Highlight 高亮** - 高亮选择组件
22
+ - **InputPassword 密码** - 密码强度检测组件
23
+ - **Descriptions 描述** - 描述列表组件
24
+ - **ClickOutSide 点击外部** - 点击区域外检测组件
25
+ - **NodeAxis 时间轴** - 时间轴节点组件
26
+ - **Visual 播放器** - 可视化播放器组件
27
+
28
+ ## 安装
29
+
30
+ ```bash
31
+ pnpm add @dfsj/components
14
32
  ```
15
- # 安装
16
- ```shell
17
- yarn add @dfsj/components
33
+
34
+ ## 快速开始
35
+
36
+ ```vue
37
+ <template>
38
+ <Table :columns="columns" :data="data" :pagination="true" />
39
+ </template>
40
+
41
+ <script setup lang="ts">
42
+ import { Table, useTable } from '@dfsj/components'
43
+
44
+ const columns = [
45
+ { field: 'name', label: '名称' },
46
+ { field: 'age', label: '年龄' }
47
+ ]
48
+
49
+ const [register, { getList }] = useTable({
50
+ fetchDataApi: () => api.getList()
51
+ })
52
+ </script>
18
53
  ```
19
- ## 使用
20
-
21
- ```
22
- ES6语法,参照示例与类型提示使用
54
+
55
+ ## 主要导出
56
+
57
+ | 导出名 | 类型 | 说明 |
58
+ |:------|:-----|:-----|
59
+ | `Table` | `Component` | 高级表格组件 (useTable 配合) |
60
+ | `Form` | `Component` | Schema 驱动表单组件 |
61
+ | `BasicModal` | `Component` | 弹窗组件(导出名为 BasicModal) |
62
+ | `Windows` | `Component` | 窗口管理器组件 |
63
+ | `Boards` | `Component` | 抽屉管理器组件 |
64
+ | `Editor` | `Component` | 富文本编辑器组件 |
65
+ | `UnifyChart` | `Component` | 统一图表容器组件 |
66
+ | `Highlight` | `Component` | 高亮选择组件 |
67
+ | `InputPassword` | `Component` | 密码强度输入框 |
68
+ | `Descriptions` | `Component` | 描述列表组件 |
69
+ | `ClickOutSide` | `Component` | 点击外部检测组件 |
70
+ | `NodeAxis` | `Component` | 时间轴节点组件 |
71
+ | `Visual` | `Component` | 可视化播放器组件 |
72
+ | `useTable` | `Function` | 表格逻辑 Hook (泛型支持) |
73
+ | `useForm` | `Function` | 表单逻辑 Hook |
74
+
75
+ > 完整 API 文档请查看 [在线文档站](../docs/zh/components/table.md)
76
+
77
+ ## 使用要求
78
+
79
+ | 环境 | 要求 |
80
+ |:-----|:-----|
81
+ | Node.js | >=18.12.0 |
82
+ | Vue | >=3.5 |
83
+ | Element Plus | >=2.11 |
84
+
85
+ ## 开发指南
86
+
87
+ ```bash
88
+ git clone http://10.10.12.18/dfsj/dfsj
89
+ pnpm install
90
+ cd packages/components
91
+ pnpm watch
23
92
  ```
24
- ## 维护
25
- ```shell
26
- yangbo
27
- ```
93
+
94
+ ## 文档
95
+
96
+ - [快速开始](../docs/zh/guide/get-start.md)
97
+ - [完整API文档](../docs/zh/components/global.md)
98
+ - [更新日志](./CHANGELOG.md)
99
+
100
+ ## 许可证
101
+
102
+ [MIT](../../LICENSE)
103
+
104
+ Copyright (c) 2022 - present yangbo
@@ -0,0 +1,13 @@
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
+ */
10
+
11
+ function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function e(t){if(Array.isArray(t))return t}function r(e){if(Array.isArray(e))return t(e)}function n(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)})}}function u(t,e,r){return e=h(e),I(t,O()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function c(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return t.get(n(t,e))}function s(t,e,r){c(t,e),e.set(t,r)}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,B(n.key),n)}}function p(t,e,r){return e&&y(t.prototype,e),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function b(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=H(t))||e){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function v(t,e,r){return(e=B(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=G(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},d.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&R(t,e)}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(O=function(){return!!t})()}function j(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function w(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw o}}return u}}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?S(Object(r),!0).forEach(function(e){v(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function A(t,e){if(null==t)return{};var r,n,o=E(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function E(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}function I(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return o(t)}function _(){
12
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
13
+ var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof u?n:u,f=Object.create(c.prototype);return C(f,"_invoke",function(r,n,o){var i,u,c,f=0,l=o||[],s=!1,y={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return i=e,u=0,c=t,y.n=r,a}};function p(r,n){for(u=r,c=n,e=0;!s&&f&&!o&&e<l.length;e++){var o,i=l[e],p=y.p,b=i[2];r>3?(o=b===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=r<2&&p<i[1])?(u=0,y.v=n,y.n=i[1]):p<b&&(o=r<3||i[0]>n||n>b)&&(i[4]=r,i[5]=n,y.n=b,u=0))}if(o||r>1)return a;throw s=!0,n}return function(o,l,b){if(f>1)throw TypeError("Generator is already running");for(s&&1===l&&p(l,b),u=l,c=b;(e=u<2?t:c)||!s;){i||(u?u<3?(u>1&&(y.n=-1),p(u,c)):y.n=c:y.v=c);try{if(f=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(s=y.n<0)?c:r.call(n,y))!==a)break}catch(e){i=t,u=1,c=e}finally{f=1}}return{value:e,done:s}}}(r,o,i),!0),f}var a={};function u(){}function c(){}function f(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(C(e={},n,function(){return this}),e),s=f.prototype=u.prototype=Object.create(l);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,C(t,o,"GeneratorFunction")),t.prototype=Object.create(s),t}return c.prototype=f,C(s,"constructor",f),C(f,"constructor",c),c.displayName="GeneratorFunction",C(f,o,"GeneratorFunction"),C(s),C(s,o,"Generator"),C(s,n,function(){return this}),C(s,"toString",function(){return"[object Generator]"}),(_=function(){return{w:i,m:y}})()}function C(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}C=function(t,e,r,n){function i(e,r){C(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},C(t,e,r,n)}function R(t,e){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},R(t,e)}function x(t,r){return e(t)||w(t,r)||H(t,r)||g()}function G(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function k(t,e,r,n){var o=d(h(t.prototype),e,r);return"function"==typeof o?function(t){return o.apply(r,t)}:o}function D(t){return r(t)||j(t)||H(t)||P()}function F(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function B(t){var e=F(t,"string");return"symbol"==typeof e?e:e+""}function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function H(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}export{t as arrayLikeToArray,e as arrayWithHoles,r as arrayWithoutHoles,n as assertClassBrand,o as assertThisInitialized,a as asyncToGenerator,u as callSuper,c as checkPrivateRedeclaration,f as classCallCheck,l as classPrivateFieldGet2,s as classPrivateFieldInitSpec,p as createClass,b as createForOfIteratorHelper,v as defineProperty,d as get,h as getPrototypeOf,m as inherits,O as isNativeReflectConstruct,j as iterableToArray,w as iterableToArrayLimit,g as nonIterableRest,P as nonIterableSpread,T as objectSpread2,A as objectWithoutProperties,E as objectWithoutPropertiesLoose,I as possibleConstructorReturn,_ as regenerator,C as regeneratorDefine,R as setPrototypeOf,x as slicedToArray,G as superPropBase,k as superPropGet,D as toConsumableArray,F as toPrimitive,B as toPropertyKey,W as typeof,H as unsupportedIterableToArray};
@@ -1,5 +1,11 @@
1
- import script from './Boards.vue2.js';
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
- script.__file = "src/components/Boards/src/Boards.vue";
4
-
5
- export { script as default };
11
+ import o from"./Boards.vue2.js";o.__file="src/components/Boards/src/Boards.vue";export{o as default};
@@ -1,153 +1,11 @@
1
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import { defineComponent, ref, toRefs, computed, watchEffect, toRaw, unref, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, withModifiers, createVNode, createCommentVNode, createElementVNode, withCtx, Fragment, renderList, createBlock, toDisplayString, KeepAlive, resolveDynamicComponent, markRaw, mergeProps, renderSlot, defineAsyncComponent } from 'vue';
3
- import { BoardProps, BoardPositionEnum } from './props.js';
4
- import '../../Icon/src/Icon.vue.js';
5
- import '../../Icon/src/SvgIcon.vue.js';
6
- import { useStyle } from './hooKs/useStyle.js';
7
- import vResizable from '../../../directives/resizable.js';
8
- import script$1 from '../../Icon/src/Icon.vue2.js';
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
+ */
9
10
 
10
- 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; }
11
- 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; }
12
- var _hoisted_1 = ["id"];
13
- var _hoisted_2 = {
14
- key: 0
15
- };
16
- var _hoisted_3 = {
17
- "class": "custom-label"
18
- };
19
- var _hoisted_4 = {
20
- "class": "board--panels box-border h-full flex-1 w-full min-w-0 overflow-hidden"
21
- };
22
- var prefixCls = "ec-component-board-container-page-wrap";
23
- var script = defineComponent({
24
- __name: 'Boards',
25
- props: BoardProps,
26
- setup: function setup(__props) {
27
- var cache = new Map();
28
- var props = __props;
29
- var el = ref(null);
30
- var _toRefs = toRefs(props),
31
- resizable = _toRefs.resizable,
32
- display = _toRefs.display,
33
- customId = _toRefs.customId;
34
- var resized = ref(false);
35
- var _useStyle = useStyle(props, resized),
36
- getStyle = _useStyle.getStyle,
37
- position = _useStyle.position,
38
- board = _useStyle.board,
39
- customStyle = _useStyle.customStyle;
40
- var isAsyncComponent = function isAsyncComponent(component) {
41
- return !!(component && component.__asyncLoader);
42
- };
43
- var color = computed(function () {
44
- var _customStyle$value$co;
45
- return (_customStyle$value$co = customStyle.value.color) !== null && _customStyle$value$co !== void 0 ? _customStyle$value$co : '#11848f';
46
- });
47
- function resolve(source) {
48
- var component = cache.get(source);
49
- if (component == null) {
50
- if (isAsyncComponent(source)) {
51
- cache.set(source, component = source);
52
- } else {
53
- cache.set(source, component = defineAsyncComponent(source));
54
- }
55
- }
56
- return component;
57
- }
58
- function tabClick(id) {
59
- board.value.index = id === null || id === void 0 ? void 0 : id.index;
60
- }
61
- var toggle = function toggle() {
62
- return board.value.state = board.value.state === 'spread' ? 'minify' : 'spread';
63
- };
64
- var icon = computed(function () {
65
- var _board$value$items;
66
- return board.value.state == 'hidden' || ((_board$value$items = board.value.items) === null || _board$value$items === void 0 ? void 0 : _board$value$items.length) == 0 ? null : 'mdi:chevron-right';
67
- });
68
- var tabPosition = computed(function () {
69
- var mapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BoardPositionEnum.EAST, 'right'), BoardPositionEnum.WEST, 'left'), BoardPositionEnum.SOUTH, 'bottom'), BoardPositionEnum.TOP, 'top');
70
- return mapping === null || mapping === void 0 ? void 0 : mapping[position.value];
71
- });
72
- watchEffect(function () {
73
- var _el$value;
74
- return el === null || el === void 0 || (_el$value = el.value) === null || _el$value === void 0 || (_el$value = _el$value.style) === null || _el$value === void 0 ? void 0 : _el$value.setProperty('--board-tab-color', color.value);
75
- });
76
- var handlesMapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BoardPositionEnum.EAST, ['l']), BoardPositionEnum.WEST, ['r']), BoardPositionEnum.TOP, ['b']), BoardPositionEnum.SOUTH, ['t']);
77
- var handles = computed(function () {
78
- var _handlesMapping$toRaw;
79
- return (_handlesMapping$toRaw = handlesMapping === null || handlesMapping === void 0 ? void 0 : handlesMapping[toRaw(unref(position))]) !== null && _handlesMapping$toRaw !== void 0 ? _handlesMapping$toRaw : [];
80
- });
81
- var getResizable = computed(function () {
82
- return _objectSpread(_objectSpread({}, resizable.value), {}, {
83
- display: display.value,
84
- handles: handles.value
85
- });
86
- });
87
- return function (_ctx, _cache) {
88
- var _unref2;
89
- var _component_el_tab_pane = resolveComponent("el-tab-pane");
90
- var _component_el_tabs = resolveComponent("el-tabs");
91
- return withDirectives((openBlock(), createElementBlock("div", {
92
- "class": normalizeClass([prefixCls, unref(display), unref(board).state, unref(position), 'p-2 box-border']),
93
- style: normalizeStyle(unref(getStyle)),
94
- ref_key: "el",
95
- ref: el,
96
- onResize: _cache[1] || (_cache[1] = function ($event) {
97
- return resized.value = true;
98
- }),
99
- id: unref(customId)
100
- }, [unref(board).items.length ? (openBlock(), createElementBlock("span", {
101
- key: 0,
102
- onClick: withModifiers(toggle, ["stop"]),
103
- "class": normalizeClass(['board--wing', {
104
- hidden: !icon.value
105
- }])
106
- }, [createVNode(unref(script$1), {
107
- size: 26,
108
- icon: icon.value
109
- }, null, 8, ["icon"])], 2)) : createCommentVNode("v-if", true), createElementVNode("div", {
110
- "class": normalizeClass("".concat(prefixCls, "__layout overflow-hidden h-full flex"))
111
- }, [unref(board).items.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_el_tabs, {
112
- "class": "multiple-toggle-tab",
113
- modelValue: unref(board).value,
114
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
115
- return unref(board).value = $event;
116
- }),
117
- onTabClick: tabClick,
118
- "tab-position": tabPosition.value,
119
- "data-content": unref(customStyle).color
120
- }, {
121
- "default": withCtx(function () {
122
- return [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(board).items, function (b, i) {
123
- return openBlock(), createBlock(_component_el_tab_pane, {
124
- key: b === null || b === void 0 ? void 0 : b.id,
125
- name: b.id,
126
- label: b.label
127
- }, {
128
- label: withCtx(function () {
129
- return [createElementVNode("div", _hoisted_3, toDisplayString(b.label), 1)];
130
- }),
131
- _: 2
132
- }, 1032, ["name", "label"]);
133
- }), 128))];
134
- }),
135
- _: 1
136
- }, 8, ["modelValue", "tab-position", "data-content"])])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList((_unref2 = unref(board)) === null || _unref2 === void 0 ? void 0 : _unref2.items, function (item) {
137
- return openBlock(), createElementBlock("div", {
138
- key: item.id,
139
- "class": normalizeClass(["board--panel-container", {
140
- active: unref(board).value === item.id
141
- }])
142
- }, [(openBlock(), createBlock(KeepAlive, null, [unref(board).value === item.id ? (openBlock(), createBlock(resolveDynamicComponent(markRaw(resolve(item.content))), mergeProps({
143
- key: 0,
144
- ref_for: true
145
- }, item.props), null, 16)) : createCommentVNode("v-if", true)], 1024))], 2);
146
- }), 128))]), createCommentVNode(" <div class=\"flex-1 w-full min-w-0 box-border h-full overflow-hidden\">"), createCommentVNode(" <div class=\"board&#45;&#45;panels box-border h-full flex-1 w-full min-w-0 overflow-hidden\">"), createCommentVNode(" <template v-for=\"item in board.items\" :key=\"item.id\">"), createCommentVNode(" <component"), createCommentVNode(" v-show=\"board.value === item.id\""), createCommentVNode(" :is=\"markRaw(resolve(item.content))\""), createCommentVNode(" v-bind=\"item.props\">"), createCommentVNode(" </component>"), createCommentVNode(" </template>"), createCommentVNode(" </div>"), createCommentVNode(" </div>")], 2), props.slotVisible ? renderSlot(_ctx.$slots, "default", {
147
- key: 1
148
- }) : createCommentVNode("v-if", true)], 46, _hoisted_1)), [[unref(vResizable), getResizable.value]]);
149
- };
150
- }
151
- });
152
-
153
- export { script as default };
11
+ import{defineProperty as e,objectSpread2 as l}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{defineComponent as n,computed as o,ref as t,toRefs as a,watchEffect as i,toRaw as r,unref as u,resolveComponent as s,withDirectives as d,openBlock as c,createElementBlock as v,normalizeClass as f,normalizeStyle as m,withModifiers as p,createVNode as b,createCommentVNode as _,createElementVNode as h,withCtx as y,Fragment as w,renderList as x,createBlock as k,toDisplayString as g,KeepAlive as S,resolveDynamicComponent as T,markRaw as j,mergeProps as z,renderSlot as I,defineAsyncComponent as P}from"vue";import{BoardProps as E,BoardPositionEnum as O}from"./props.js";import"../../Icon/src/Icon.vue2.js";import{useStyle as V}from"./hooKs/useStyle.js";import H from"../../../directives/resizable.js";import U from"../../Icon/src/Icon.vue.js";var A=["id"],B={key:0},C="dfsj-boards",R=n({__name:"Boards",props:E,setup:function(n){var E=o(function(){return e(e(e({},"".concat(C,"--").concat($.value),!0),"".concat(C,"--").concat(N.value.state),!0),"".concat(C,"--").concat(J.value),!0)}),R=new Map,W=n,K=t(null),L=a(W),M=L.resizable,$=L.display,q=L.customId,D=t(!1),F=V(W,D),G=F.getStyle,J=F.position,N=F.board,Q=F.customStyle,X=o(function(){var e;return null!==(e=Q.value.color)&&void 0!==e?e:"#11848f"});function Y(e){N.value.index=null==e?void 0:e.index}var Z=function(){return N.value.state="spread"===N.value.state?"minify":"spread"},ee=o(function(){var e;return"hidden"==N.value.state||0==(null===(e=N.value.items)||void 0===e?void 0:e.length)?null:"mdi:chevron-right"}),le=o(function(){var l=e(e(e(e({},O.EAST,"right"),O.WEST,"left"),O.SOUTH,"bottom"),O.TOP,"top");return null==l?void 0:l[J.value]});i(function(){var e;return null==K||null===(e=K.value)||void 0===e||null===(e=e.style)||void 0===e?void 0:e.setProperty("--board-tab-color",X.value)});var ne=e(e(e(e({},O.EAST,["l"]),O.WEST,["r"]),O.TOP,["b"]),O.SOUTH,["t"]),oe=o(function(){var e;return null!==(e=null==ne?void 0:ne[r(u(J))])&&void 0!==e?e:[]}),te=o(function(){return l(l({},M.value),{},{display:$.value,handles:oe.value})});return function(e,l){var n,o=s("el-tab-pane"),t=s("el-tabs");return d((c(),v("div",{class:f([C,E.value,"fixed z-100 bg-white p-2 box-border"]),style:m(u(G)),ref_key:"el",ref:K,onResize:l[1]||(l[1]=function(e){return D.value=!0}),id:u(q)},[u(N).items.length?(c(),v("span",{key:0,onClick:p(Z,["stop"]),class:f(["".concat(C,"__wing"),{hidden:!ee.value}])},[b(u(U),{size:26,icon:ee.value},null,8,["icon"])],2)):_("v-if",!0),h("div",{class:f("".concat(C,"__layout overflow-hidden h-full flex"))},[u(N).items.length>1?(c(),v("div",B,[b(t,{class:f("".concat(C,"__tabs")),modelValue:u(N).value,"onUpdate:modelValue":l[0]||(l[0]=function(e){return u(N).value=e}),onTabClick:Y,"tab-position":le.value,"data-content":u(Q).color},{default:y(function(){return[(c(!0),v(w,null,x(u(N).items,function(e,l){return c(),k(o,{key:null==e?void 0:e.id,name:e.id,label:e.label},{label:y(function(){return[h("div",{class:f("".concat(C,"__tab-label"))},g(e.label),3)]}),_:2},1032,["name","label"])}),128))]}),_:1},8,["class","modelValue","tab-position","data-content"])])):_("v-if",!0),h("div",{class:f("".concat(C,"__panels box-border h-full flex-1 w-full min-w-0 overflow-hidden"))},[(c(!0),v(w,null,x(null===(n=u(N))||void 0===n?void 0:n.items,function(e){return c(),v("div",{key:e.id,class:f(["".concat(C,"__panel-container"),{active:u(N).value===e.id}])},[(c(),k(S,null,[u(N).value===e.id?(c(),k(T(j((l=e.content,n=R.get(l),null==n&&(function(e){return!(!e||!e.__asyncLoader)}(l)?R.set(l,n=l):R.set(l,n=P(l))),n))),z({key:0,ref_for:!0},e.props),null,16)):_("v-if",!0)],1024))],2);var l,n}),128))],2),_(' <div class="flex-1 w-full min-w-0 box-border h-full overflow-hidden">'),_(' <div class="board&#45;&#45;panels box-border h-full flex-1 w-full min-w-0 overflow-hidden">'),_(' <template v-for="item in board.items" :key="item.id">'),_(" <component"),_(' v-show="board.value === item.id"'),_(' :is="markRaw(resolve(item.content))"'),_(' v-bind="item.props">'),_(" </component>"),_(" </template>"),_(" </div>"),_(" </div>")],2),W.slotVisible?I(e.$slots,"default",{key:1}):_("v-if",!0)],46,A)),[[u(H),te.value]])}}});export{R as default};
@@ -1,13 +1,21 @@
1
- export declare function useStyle(props: any, resized: any): {
2
- position: import("vue").Ref<any, any>;
3
- board: import("vue").Ref<any, any>;
4
- customStyle: import("vue").Ref<any, any>;
1
+ import { type Ref } from 'vue';
2
+ import { BoardPositionEnum, type BoardCustomStyle, type BoardState } from '../props';
3
+ interface UseStyleProps {
4
+ position: BoardPositionEnum;
5
+ board: BoardState;
6
+ customStyle: BoardCustomStyle;
7
+ }
8
+ export declare function useStyle(props: UseStyleProps, resized: Ref<boolean>): {
9
+ position: Ref<BoardPositionEnum, BoardPositionEnum>;
10
+ board: Ref<BoardState, BoardState>;
11
+ customStyle: Ref<BoardCustomStyle, BoardCustomStyle>;
5
12
  getStyle: import("vue").ComputedRef<{
6
13
  margin: string;
7
14
  transform: string;
8
15
  } | {
9
16
  margin: string;
10
17
  transform: string;
11
- width: any;
18
+ width: string;
12
19
  }>;
13
20
  };
21
+ export {};
@@ -1,105 +1,11 @@
1
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
- import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
- import { toRefs, computed, unref } from 'vue';
5
- import { BoardPositionEnum } from '../props.js';
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
- 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; }
8
- 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; }
9
- function useStyle(props, resized) {
10
- var _toRefs = toRefs(props),
11
- position = _toRefs.position,
12
- board = _toRefs.board,
13
- customStyle = _toRefs.customStyle;
14
- var margin = computed(function () {
15
- var _customStyle$value, _customStyle$value2;
16
- if (((_customStyle$value = customStyle.value) === null || _customStyle$value === void 0 || (_customStyle$value = _customStyle$value.margin) === null || _customStyle$value === void 0 ? void 0 : _customStyle$value.length) != 4) {
17
- return [0, 0, 0, 0];
18
- }
19
- return (_customStyle$value2 = customStyle.value) === null || _customStyle$value2 === void 0 ? void 0 : _customStyle$value2.margin;
20
- });
21
- var marginCssStr = computed(function () {
22
- return _toConsumableArray(unref(margin.value)).join(' ');
23
- });
24
- var fixed = computed(function () {
25
- var _customStyle$value$fi, _customStyle$value3;
26
- if (((_customStyle$value$fi = customStyle.value.fixed) === null || _customStyle$value$fi === void 0 ? void 0 : _customStyle$value$fi.length) != 4) {
27
- return [0, 0, 0, 0];
28
- }
29
- return (_customStyle$value3 = customStyle.value) === null || _customStyle$value3 === void 0 ? void 0 : _customStyle$value3.fixed;
30
- });
31
- var getTransform = computed(function () {
32
- var transform = '';
33
- if (board.value.state !== 'spread') {
34
- if (position.value == BoardPositionEnum.WEST) {
35
- var _calc = margin.value[3] ? "calc( -100% - ".concat(margin.value[3]) : '-100%';
36
- transform = "translateX( ".concat(_calc, ")");
37
- } else if (position.value == BoardPositionEnum.EAST) {
38
- var _calc2 = margin.value[1] ? "calc( 100% + ".concat(margin.value[1]) : '100%';
39
- transform = "translateX( ".concat(_calc2, ")");
40
- } else if (position.value == BoardPositionEnum.SOUTH) {
41
- var _calc3 = margin.value[2] ? "calc( 100% + ".concat(margin.value[2]) : '100%';
42
- transform = "translateY(".concat(_calc3, ")");
43
- } else if (position.value == BoardPositionEnum.TOP) {
44
- var _calc4 = margin.value[0] ? "calc( - 100% - ".concat(margin.value[0]) : '-100%';
45
- transform = "translateY(".concat(_calc4, ")");
46
- }
47
- }
48
- return transform;
49
- });
50
- var getStyle = computed(function () {
51
- var _customStyle$value4;
52
- var _fixed = {};
53
- var _fixed$value = _slicedToArray(fixed.value, 4),
54
- t = _fixed$value[0],
55
- r = _fixed$value[1],
56
- b = _fixed$value[2],
57
- l = _fixed$value[3];
58
- switch (position.value) {
59
- case BoardPositionEnum.EAST:
60
- case BoardPositionEnum.WEST:
61
- _fixed = {
62
- top: t || 0,
63
- bottom: b || 0
64
- };
65
- break;
66
- case BoardPositionEnum.FULL:
67
- _fixed = {
68
- top: t || 0,
69
- bottom: b || 0,
70
- left: l || 0,
71
- right: r || 0
72
- };
73
- break;
74
- case BoardPositionEnum.TOP:
75
- _fixed = {
76
- top: t || 0,
77
- left: l || 0,
78
- right: r || 0
79
- };
80
- break;
81
- default:
82
- _fixed = {
83
- left: l || 0,
84
- right: r || 0
85
- };
86
- break;
87
- }
88
- return resized.value ? _objectSpread(_objectSpread({}, _fixed), {}, {
89
- margin: marginCssStr.value,
90
- transform: getTransform.value
91
- }) : _objectSpread(_objectSpread({}, _fixed), {}, {
92
- margin: marginCssStr.value,
93
- transform: getTransform.value,
94
- width: ((_customStyle$value4 = customStyle.value) === null || _customStyle$value4 === void 0 ? void 0 : _customStyle$value4.width) || 'auto'
95
- });
96
- });
97
- return {
98
- position: position,
99
- board: board,
100
- customStyle: customStyle,
101
- getStyle: getStyle
102
- };
103
- }
104
-
105
- export { useStyle };
11
+ import{toConsumableArray as a,slicedToArray as e,objectSpread2 as t}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{toRefs as l,computed as r,unref as o}from"vue";import{BoardPositionEnum as u}from"../props.js";function n(n,v){var i=l(n),c=i.position,s=i.board,f=i.customStyle,d=r(function(){var a,e;return 4!=(null===(a=f.value)||void 0===a||null===(a=a.margin)||void 0===a?void 0:a.length)?[0,0,0,0]:null===(e=f.value)||void 0===e?void 0:e.margin}),m=r(function(){return a(o(d.value)).join(" ")}),p=r(function(){var a,e;return 4!=(null===(a=f.value.fixed)||void 0===a?void 0:a.length)?[0,0,0,0]:null===(e=f.value)||void 0===e?void 0:e.fixed}),g=r(function(){var a="";if("spread"!==s.value.state)if(c.value==u.WEST){var e=d.value[3]?"calc( -100% - ".concat(d.value[3]):"-100%";a="translateX( ".concat(e,")")}else if(c.value==u.EAST){var t=d.value[1]?"calc( 100% + ".concat(d.value[1]):"100%";a="translateX( ".concat(t,")")}else if(c.value==u.SOUTH){var l=d.value[2]?"calc( 100% + ".concat(d.value[2]):"100%";a="translateY(".concat(l,")")}else if(c.value==u.TOP){var r=d.value[0]?"calc( - 100% - ".concat(d.value[0]):"-100%";a="translateY(".concat(r,")")}return a}),b=r(function(){var a,l={},r=e(p.value,4),o=r[0],n=r[1],i=r[2],s=r[3];switch(c.value){case u.EAST:case u.WEST:l={top:o||0,bottom:i||0};break;case u.FULL:l={top:o||0,bottom:i||0,left:s||0,right:n||0};break;case u.TOP:l={top:o||0,left:s||0,right:n||0};break;default:l={left:s||0,right:n||0}}return v.value?t(t({},l),{},{margin:m.value,transform:g.value}):t(t({},l),{},{margin:m.value,transform:g.value,width:(null===(a=f.value)||void 0===a?void 0:a.width)||"auto"})});return{position:c,board:s,customStyle:f,getStyle:b}}export{n as useStyle};
@@ -43,12 +43,8 @@ export declare enum BoardPositionEnum {
43
43
  }
44
44
  export type BoardPosition = typeof BoardPositionEnum[keyof typeof BoardPositionEnum];
45
45
  export declare const BoardProps: {
46
- position: import("vue-types").VueTypeDef<"east" | "top" | "west" | "south" | "full"> & {
47
- default: "east" | "top" | "west" | "south" | "full";
48
- };
49
- display: import("vue-types").VueTypeDef<"fixed" | "absolute"> & {
50
- default: "fixed" | "absolute";
51
- };
46
+ position: any;
47
+ display: any;
52
48
  resizable: {
53
49
  type: PropType<ResizableConfig>;
54
50
  default: () => {
@@ -67,26 +63,12 @@ export declare const BoardProps: {
67
63
  };
68
64
  board: {
69
65
  type: PropType<BoardState>;
70
- default: () => {
71
- items: any[];
72
- index: number;
73
- value: any;
74
- state: string;
75
- };
66
+ default: () => BoardState;
76
67
  };
77
68
  customStyle: {
78
69
  type: PropType<BoardCustomStyle>;
79
- default: () => {
80
- margin: any[];
81
- fixed: any[];
82
- color: string;
83
- width: string;
84
- };
85
- };
86
- customId: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
87
- default: string;
88
- } & {
89
- default: string;
70
+ default: () => BoardCustomStyle;
90
71
  };
72
+ customId: any;
91
73
  };
92
74
  export {};
@@ -1,57 +1,11 @@
1
- import propTypes from 'vue-types';
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
- var BoardPositionEnum;
4
- (function (BoardPositionEnum) {
5
- BoardPositionEnum["EAST"] = "east";
6
- BoardPositionEnum["TOP"] = "top";
7
- BoardPositionEnum["WEST"] = "west";
8
- BoardPositionEnum["SOUTH"] = "south";
9
- BoardPositionEnum["FULL"] = "full";
10
- })(BoardPositionEnum || (BoardPositionEnum = {}));
11
- var BoardProps = {
12
- position: propTypes.oneOf(['east', 'top', 'west', 'south', 'full']).def('east'),
13
- display: propTypes.oneOf(['fixed', 'absolute']).def('fixed'),
14
- resizable: {
15
- type: Object,
16
- "default": function _default() {
17
- return {
18
- minWidth: 10,
19
- maxWidth: window.innerWidth,
20
- minHeight: 10,
21
- maxHeight: window.innerHeight,
22
- handleWidth: 8,
23
- handleZIndex: 100,
24
- disable: false
25
- };
26
- }
27
- },
28
- slotVisible: {
29
- type: Boolean,
30
- "default": true
31
- },
32
- board: {
33
- type: Object,
34
- "default": function _default() {
35
- return {
36
- items: [],
37
- index: 0,
38
- value: null,
39
- state: 'spread'
40
- };
41
- }
42
- },
43
- customStyle: {
44
- type: Object,
45
- "default": function _default() {
46
- return {
47
- margin: [],
48
- fixed: [],
49
- color: 'red',
50
- width: '30rem'
51
- };
52
- }
53
- },
54
- customId: propTypes.string.def('')
55
- };
56
-
57
- export { BoardPositionEnum, BoardProps };
11
+ import e from"vue-types";var t=function(e){return e.EAST="east",e.TOP="top",e.WEST="west",e.SOUTH="south",e.FULL="full",e}({}),i={position:e.oneOf(["east","top","west","south","full"]).def("east"),display:e.oneOf(["fixed","absolute"]).def("fixed"),resizable:{type:Object,default:function(){return{minWidth:10,maxWidth:window.innerWidth,minHeight:10,maxHeight:window.innerHeight,handleWidth:8,handleZIndex:100,disable:!1}}},slotVisible:{type:Boolean,default:!0},board:{type:Object,default:function(){return{items:[],index:0,value:null,state:"spread"}}},customStyle:{type:Object,default:function(){return{margin:[],fixed:[],color:"red",width:"30rem"}}},customId:e.string.def("")};export{t as BoardPositionEnum,i as BoardProps};
@@ -1,5 +1,11 @@
1
- import script from './ClickOutSide.vue2.js';
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
- script.__file = "src/components/ClickOutSide/src/ClickOutSide.vue";
4
-
5
- export { script as default };
11
+ import e from"./ClickOutSide.vue2.js";e.__file="src/components/ClickOutSide/src/ClickOutSide.vue";export{e as default};