qy-better-lib 0.0.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 (185) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/LICENSE +24 -0
  3. package/README.md +2 -0
  4. package/index.html +13 -0
  5. package/package.json +37 -0
  6. package/packages/core/DOCUMENTATION.md +2681 -0
  7. package/packages/core/LICENSE +24 -0
  8. package/packages/core/package.json +67 -0
  9. package/packages/core/types/index.d.ts +39 -0
  10. package/packages/core/types/json.d.ts +4 -0
  11. package/packages/core/types/vue.shim.d.ts +5 -0
  12. package/packages/core/vitest.config.ts +15 -0
  13. package/packages/core/yarn.lock +1233 -0
  14. package/packages/hooks/DOCUMENTATION.md +634 -0
  15. package/packages/hooks/LICENSE +24 -0
  16. package/packages/hooks/__tests__/use-chart/index.test.ts +287 -0
  17. package/packages/hooks/__tests__/use-emit/index.test.ts +248 -0
  18. package/packages/hooks/__tests__/use-fullscreen/index.test.ts +162 -0
  19. package/packages/hooks/__tests__/use-image/index.test.ts +230 -0
  20. package/packages/hooks/__tests__/use-layout-flow/index.test.ts +382 -0
  21. package/packages/hooks/__tests__/use-mqtt/index.test.ts +392 -0
  22. package/packages/hooks/__tests__/use-print/index.test.ts +378 -0
  23. package/packages/hooks/__tests__/use-watermark/index.test.ts +277 -0
  24. package/packages/hooks/__tests__/use-websocket/index.test.ts +402 -0
  25. package/packages/hooks/package.json +104 -0
  26. package/packages/hooks/types/index.d.ts +1 -0
  27. package/packages/hooks/types/json.d.ts +4 -0
  28. package/packages/hooks/types/vue.shim.d.ts +5 -0
  29. package/packages/hooks/yarn.lock +1832 -0
  30. package/packages/lowcode/core/package.json +60 -0
  31. package/packages/lowcode/core/types/index.d.ts +1 -0
  32. package/packages/lowcode/core/types/json.d.ts +4 -0
  33. package/packages/lowcode/core/types/vue.shim.d.ts +5 -0
  34. package/packages/lowcode/core/vite.dist.min.config.js +40 -0
  35. package/packages/lowcode/core/vite.dist.min.config.js.map +1 -0
  36. package/packages/lowcode/core/vite.lib.config.js +74 -0
  37. package/packages/lowcode/core/vite.lib.config.js.map +1 -0
  38. package/packages/lowcode/core/yarn.lock +1132 -0
  39. package/packages/lowcode/mobile/package.json +63 -0
  40. package/packages/lowcode/mobile/types/index.d.ts +1 -0
  41. package/packages/lowcode/mobile/types/json.d.ts +4 -0
  42. package/packages/lowcode/mobile/types/vue.shim.d.ts +77 -0
  43. package/packages/lowcode/mobile/vite.config.js +11 -0
  44. package/packages/lowcode/mobile/vite.config.js.map +1 -0
  45. package/packages/lowcode/mobile/vite.dist.min.config.js +71 -0
  46. package/packages/lowcode/mobile/vite.dist.min.config.js.map +1 -0
  47. package/packages/lowcode/mobile/vite.lib.config.js +137 -0
  48. package/packages/lowcode/mobile/vite.lib.config.js.map +1 -0
  49. package/packages/lowcode/mobile/yarn.lock +3888 -0
  50. package/packages/lowcode/pc/package.json +64 -0
  51. package/packages/lowcode/pc/vite.config.js +11 -0
  52. package/packages/lowcode/pc/vite.config.js.map +1 -0
  53. package/packages/lowcode/pc/vite.dist.min.config.js +71 -0
  54. package/packages/lowcode/pc/vite.dist.min.config.js.map +1 -0
  55. package/packages/lowcode/pc/vite.lib.config.js +137 -0
  56. package/packages/lowcode/pc/vite.lib.config.js.map +1 -0
  57. package/packages/lowcode/pc/yarn.lock +4026 -0
  58. package/packages/pc_components/DOCUMENTATION.md +566 -0
  59. package/packages/pc_components/LICENSE +24 -0
  60. package/packages/pc_components/lib/commDialog/index.d.ts +3 -0
  61. package/packages/pc_components/lib/commDialog/index.js +8 -0
  62. package/packages/pc_components/lib/commDialog/src/index.vue.d.ts +102 -0
  63. package/packages/pc_components/lib/commDialog/src/index.vue.js +43 -0
  64. package/packages/pc_components/lib/commDialog/src/index.vue2.js +4 -0
  65. package/packages/pc_components/lib/commDialog/src/props.d.ts +49 -0
  66. package/packages/pc_components/lib/commDialog/src/props.js +48 -0
  67. package/packages/pc_components/lib/commDialog/src/type.d.ts +39 -0
  68. package/packages/pc_components/lib/commForm/index.d.ts +3 -0
  69. package/packages/pc_components/lib/commForm/index.js +8 -0
  70. package/packages/pc_components/lib/commForm/src/index.vue.d.ts +95 -0
  71. package/packages/pc_components/lib/commForm/src/index.vue.js +50 -0
  72. package/packages/pc_components/lib/commForm/src/index.vue2.js +4 -0
  73. package/packages/pc_components/lib/commForm/src/props.d.ts +49 -0
  74. package/packages/pc_components/lib/commForm/src/props.js +47 -0
  75. package/packages/pc_components/lib/commForm/src/type.d.ts +8 -0
  76. package/packages/pc_components/lib/contextMenu/index.d.ts +5 -0
  77. package/packages/pc_components/lib/contextMenu/index.js +8 -0
  78. package/packages/pc_components/lib/contextMenu/src/index.vue.d.ts +91 -0
  79. package/packages/pc_components/lib/contextMenu/src/index.vue.js +153 -0
  80. package/packages/pc_components/lib/contextMenu/src/index.vue2.js +4 -0
  81. package/packages/pc_components/lib/contextMenu/src/props.d.ts +32 -0
  82. package/packages/pc_components/lib/contextMenu/src/props.js +27 -0
  83. package/packages/pc_components/lib/contextMenu/src/type.d.ts +11 -0
  84. package/packages/pc_components/lib/describeView/index.d.ts +2 -0
  85. package/packages/pc_components/lib/describeView/index.js +7 -0
  86. package/packages/pc_components/lib/describeView/src/index.vue.d.ts +61 -0
  87. package/packages/pc_components/lib/describeView/src/index.vue.js +84 -0
  88. package/packages/pc_components/lib/describeView/src/index.vue2.js +4 -0
  89. package/packages/pc_components/lib/describeView/src/props.d.ts +35 -0
  90. package/packages/pc_components/lib/describeView/src/props.js +33 -0
  91. package/packages/pc_components/lib/describeView/src/type.d.ts +10 -0
  92. package/packages/pc_components/lib/index.d.ts +18 -0
  93. package/packages/pc_components/lib/index.js +40 -0
  94. package/packages/pc_components/lib/simpleVirtualList/index.d.ts +2 -0
  95. package/packages/pc_components/lib/simpleVirtualList/index.js +7 -0
  96. package/packages/pc_components/lib/simpleVirtualList/src/index.vue.d.ts +28 -0
  97. package/packages/pc_components/lib/simpleVirtualList/src/index.vue.js +101 -0
  98. package/packages/pc_components/lib/simpleVirtualList/src/index.vue2.js +4 -0
  99. package/packages/pc_components/lib/simpleVirtualList/src/type.d.ts +12 -0
  100. package/packages/pc_components/lib/styles/comm-form.scss +4 -0
  101. package/packages/pc_components/lib/styles/context-menu.scss +47 -0
  102. package/packages/pc_components/lib/styles/describe-view.scss +25 -0
  103. package/packages/pc_components/lib/styles/index.scss +6 -0
  104. package/packages/pc_components/lib/styles/simple-virtual-list.scss +25 -0
  105. package/packages/pc_components/lib/styles/table-extend.scss +100 -0
  106. package/packages/pc_components/lib/styles/text-button.scss +71 -0
  107. package/packages/pc_components/lib/tableExtend/index.d.ts +3 -0
  108. package/packages/pc_components/lib/tableExtend/index.js +7 -0
  109. package/packages/pc_components/lib/tableExtend/props.d.ts +130 -0
  110. package/packages/pc_components/lib/tableExtend/props.js +128 -0
  111. package/packages/pc_components/lib/tableExtend/src/colVisible.vue.d.ts +3 -0
  112. package/packages/pc_components/lib/tableExtend/src/colVisible.vue.js +128 -0
  113. package/packages/pc_components/lib/tableExtend/src/colVisible.vue2.js +4 -0
  114. package/packages/pc_components/lib/tableExtend/src/index.vue.d.ts +186 -0
  115. package/packages/pc_components/lib/tableExtend/src/index.vue.js +234 -0
  116. package/packages/pc_components/lib/tableExtend/src/index.vue2.js +4 -0
  117. package/packages/pc_components/lib/tableExtend/src/valueCol.vue.d.ts +24 -0
  118. package/packages/pc_components/lib/tableExtend/src/valueCol.vue.js +29 -0
  119. package/packages/pc_components/lib/tableExtend/src/valueCol.vue2.js +4 -0
  120. package/packages/pc_components/lib/tableExtend/type.d.ts +165 -0
  121. package/packages/pc_components/lib/tableExtend/type.js +9 -0
  122. package/packages/pc_components/lib/tableExtend/useTable.d.ts +27 -0
  123. package/packages/pc_components/lib/tableExtend/useTable.js +115 -0
  124. package/packages/pc_components/lib/textButton/index.d.ts +2 -0
  125. package/packages/pc_components/lib/textButton/index.js +7 -0
  126. package/packages/pc_components/lib/textButton/src/index.vue.d.ts +42 -0
  127. package/packages/pc_components/lib/textButton/src/index.vue.js +44 -0
  128. package/packages/pc_components/lib/textButton/src/index.vue2.js +4 -0
  129. package/packages/pc_components/lib/textButton/src/props.d.ts +23 -0
  130. package/packages/pc_components/lib/textButton/src/props.js +30 -0
  131. package/packages/pc_components/lib/textButton/src/type.d.ts +30 -0
  132. package/packages/pc_components/lib/utils/index.d.ts +77 -0
  133. package/packages/pc_components/lib/utils/index.js +124 -0
  134. package/packages/pc_components/package.json +73 -0
  135. package/packages/pc_components/types/index.d.ts +9 -0
  136. package/packages/pc_components/types/json.d.ts +4 -0
  137. package/packages/pc_components/types/vue.shim.d.ts +5 -0
  138. package/packages/pc_components/yarn.lock +1641 -0
  139. package/postcss.config.js +19 -0
  140. package/public/vite.svg +1 -0
  141. package/src/App.vue +37 -0
  142. package/src/api/index.ts +42 -0
  143. package/src/assets/vue.svg +1 -0
  144. package/src/document/core.md +2680 -0
  145. package/src/document/hooks.md +632 -0
  146. package/src/document/pc_components.md +566 -0
  147. package/src/locales/en.json +1 -0
  148. package/src/locales/zh-cn.json +1 -0
  149. package/src/main.ts +13 -0
  150. package/src/plugins/element-plus.ts +16 -0
  151. package/src/plugins/i18n.ts +17 -0
  152. package/src/plugins/index.ts +13 -0
  153. package/src/plugins/store.ts +12 -0
  154. package/src/router/index.ts +20 -0
  155. package/src/shared/chartType.ts +279 -0
  156. package/src/shared/const.ts +160 -0
  157. package/src/shared/lib.ts +129 -0
  158. package/src/shared/request.ts +255 -0
  159. package/src/shared/type.ts +48 -0
  160. package/src/shared/utils/date.ts +83 -0
  161. package/src/shared/utils/utils.ts +85 -0
  162. package/src/store/index.ts +22 -0
  163. package/src/store/modules/app.ts +17 -0
  164. package/src/store/modules/shared.ts +21 -0
  165. package/src/styles/index.scss +169 -0
  166. package/src/types/app.d.ts +23 -0
  167. package/src/types/echarts.d.ts +5 -0
  168. package/src/types/index.d.ts +1 -0
  169. package/src/types/json.d.ts +4 -0
  170. package/src/types/scss.d.ts +9 -0
  171. package/src/types/vue.shim.d.ts +5 -0
  172. package/src/views/docs/docs-content.vue +379 -0
  173. package/src/views/docs/docs-header.vue +130 -0
  174. package/src/views/docs/docs-sidebar.vue +76 -0
  175. package/src/views/docs/hooks.ts +600 -0
  176. package/src/views/docs/index.vue +30 -0
  177. package/src/views/docs/styles/docs-content.scss +106 -0
  178. package/src/views/docs/styles/docs-header.scss +20 -0
  179. package/src/views/docs/styles/docs-sidebar.scss +182 -0
  180. package/src/views/docs/styles/index.scss +14 -0
  181. package/src/views/docs/type.ts +101 -0
  182. package/src/views/index.vue +34 -0
  183. package/tsconfig.json +37 -0
  184. package/tsconfig.node.json +8 -0
  185. package/vite.config.ts +54 -0
@@ -0,0 +1,19 @@
1
+ import postcssPxToViewport from 'postcss-px-to-viewport-8-plugin';
2
+
3
+ export default {
4
+ plugins: [
5
+ postcssPxToViewport({
6
+ viewportWidth: 1920,
7
+ viewportHeight: 1080,
8
+ unitPrecision: 5,
9
+ viewportUnit: 'vw',
10
+ selectorBlackList: [],
11
+ mediaQuery: false,
12
+ replace: true,
13
+ exclude: /packages/,
14
+ landscape: false,
15
+ landscapeUnit: 'vw',
16
+ landscapeWidth: 1920
17
+ })
18
+ ]
19
+ };
@@ -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/src/App.vue ADDED
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <div class="app-container">
3
+ <router-view v-slot="{ Component }" :key="$route.fullPath">
4
+ <transition name="slide-left" mode="out-in">
5
+ <component v-if="appState.routeViewDisplay" :is="Component" />
6
+ </transition>
7
+ </router-view>
8
+ </div>
9
+ </template>
10
+
11
+ <script lang="ts" setup>
12
+ import { watch, nextTick, reactive } from 'vue';
13
+ import { useRoute } from 'vue-router';
14
+ import store from './store';
15
+
16
+ const route = useRoute();
17
+
18
+ const { state: appState } = store.app;
19
+
20
+ watch(() => route.fullPath, () => {
21
+ appState.routeViewDisplay = false;
22
+ nextTick(() => {
23
+ appState.routeViewDisplay = true;
24
+ })
25
+ })
26
+
27
+ window.__VUE_SHARED_STORE__ = store.shared.state;
28
+
29
+ </script>
30
+
31
+ <style lang="scss" scoped>
32
+ .app-container {
33
+ width: 100%;
34
+ height: 100vh;
35
+ overflow: hidden;
36
+ }
37
+ </style>
@@ -0,0 +1,42 @@
1
+ import request, { RequestOptions, ResponseType } from "@/shared/request";
2
+
3
+ interface HttpRequest {
4
+ /**Get请求 */
5
+ get: (url: string, params?: any, enrty?: string, options?: RequestOptions) => Promise<ResponseType>;
6
+ /**Post请求 */
7
+ post: (url: string, params?: any, enrty?: string, options?: RequestOptions) => Promise<ResponseType>;
8
+ }
9
+
10
+ /**
11
+ * 接口请求
12
+ * @param options 请求options
13
+ * @returns
14
+ */
15
+ export function httpRequest(options?: RequestOptions): HttpRequest {
16
+ function get(
17
+ url: string,
18
+ params: any = {},
19
+ enrty: string = "/api",
20
+ options?: RequestOptions
21
+ ): Promise<ResponseType> {
22
+ return request(options).get(`${enrty}${url}`, { params });
23
+ }
24
+
25
+ function post(
26
+ url: string,
27
+ params: any = {},
28
+ enrty: string = "/api",
29
+ options?: RequestOptions
30
+ ): Promise<ResponseType> {
31
+ return request(options).post(`${enrty}${url}`, params);
32
+ }
33
+
34
+ return {
35
+ get,
36
+ post,
37
+ };
38
+ }
39
+ const http = httpRequest();
40
+
41
+ /**用户列表/分页 */
42
+ export const get_user_list = (params: any) => http.post('/sys/user/page/list', params);
@@ -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="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>