@utogether/udp-core 1.0.0 → 1.0.1-beta.2

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 (144) hide show
  1. package/build/plugins.ts +8 -2
  2. package/dist/{403-B1R-4vXw.js → 403-BBQoJwTM.js} +9 -8
  3. package/dist/{404-fXPl8csw.js → 404-BbJPSIWM.js} +15 -14
  4. package/dist/{500-eI5842YB.js → 500-BtFL9R4M.js} +11 -10
  5. package/dist/{AuthorityInfo-CfVH6PaB.js → AuthorityInfo-DhiwCeLN.js} +1 -1
  6. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js → AuthorityInfo.vue_vue_type_style_index_0_lang-Duyweh89.js} +3 -3
  7. package/dist/{AuthorityPanel-BaLMwMgW.js → AuthorityPanel-BeBNiwqc.js} +1 -1
  8. package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js → AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js} +6 -6
  9. package/dist/{Company-CYC9Avfz.js → Company-CGqmslx-.js} +3 -3
  10. package/dist/{CompanyPanel-B4MzoqN_.js → CompanyPanel-hlDsxD-6.js} +10 -10
  11. package/dist/{Department-B4BNSiYx.js → Department-BZyJtacc.js} +3 -3
  12. package/dist/{DepartmentPanel-zJO89L2O.js → DepartmentPanel-D-a_EBFt.js} +23 -23
  13. package/dist/{DesignPanel-S8P0J97f.js → DesignPanel-Bl4luWDV.js} +1 -1
  14. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js → DesignPanel.vue_vue_type_style_index_0_lang-I8C3iGvz.js} +6 -6
  15. package/dist/{DictView-bIS5-rK-.js → DictView-B4a7Hs1X.js} +9 -9
  16. package/dist/InvOrganization-q4T3y8dQ.js +260 -0
  17. package/dist/{Org-kXHSjsgJ.js → Org-BTGTrAVz.js} +3 -3
  18. package/dist/{Preview-CRyiwUIR.js → Preview-pHD84xqI.js} +1 -1
  19. package/dist/{ReportDefine-WZYIx8Sm.js → ReportDefine-DnnCNQWS.js} +1 -1
  20. package/dist/{ReportDesign-D-7GKgpb.js → ReportDesign-BnI_Q4pg.js} +10 -10
  21. package/dist/{ReportQuery-BIIJny6w.js → ReportQuery-Dby2MmtM.js} +5 -5
  22. package/dist/{ReportQueryFrom-OoUl7N2O.js → ReportQueryFrom-Blm1N8P1.js} +1 -1
  23. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CnG_Ybnt.js} +6 -5
  24. package/dist/{ReportTemplate-Cfeq9US-.js → ReportTemplate-D65RXRY_.js} +11 -11
  25. package/dist/{Role-BwTV2QMH.js → Role-eFZoTpXc.js} +3 -3
  26. package/dist/{RoleAssign-De1JjOun.js → RoleAssign-D9-Y3UNz.js} +3 -3
  27. package/dist/{RolePanel-pUBXsqCM.js → RolePanel-CoUOc3sX.js} +1 -1
  28. package/dist/{RolePanel-E3RcdByM.js → RolePanel-DlFw6HSf.js} +1 -1
  29. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js → RolePanel.vue_vue_type_script_setup_true_lang-Clwk-MHw.js} +12 -12
  30. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js → RolePanel.vue_vue_type_script_setup_true_lang-DKHgNWQP.js} +4 -4
  31. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js → ScrollPanel.vue_vue_type_style_index_0_lang-M2FQJwPU.js} +8 -8
  32. package/dist/{Staff-Czm7A8vI.js → Staff-DFBLCsAd.js} +3 -3
  33. package/dist/StaffInfo-d2CK0oBA.js +4 -0
  34. package/dist/{StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js → StaffInfo.vue_vue_type_script_setup_true_lang-4m8wK9tq.js} +7 -7
  35. package/dist/{StaffPanel-CHk60LEz.js → StaffPanel-D6aWLKN3.js} +1 -1
  36. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js → StaffPanel.vue_vue_type_script_setup_true_lang-C7YT2CVb.js} +46 -49
  37. package/dist/{SysUser-BGwbttRn.js → SysUser-BdZvYxQH.js} +2 -2
  38. package/dist/{SysUserPanel-BCbKoLKt.js → SysUserPanel-BIVa6LLr.js} +1 -1
  39. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BsBKpYR7.js} +1 -2
  40. package/dist/{SystemMenu-BkqZSDKl.js → SystemMenu-C-5VKlHK.js} +51 -49
  41. package/dist/{UserInfo-BsyAcT2d.js → UserInfo-DqXCRZts.js} +1 -1
  42. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js → UserInfo.vue_vue_type_style_index_0_lang-N3TwfpPx.js} +13 -13
  43. package/dist/{childView-CyuLTUqC.js → childView-B2lSsqS3.js} +1 -1
  44. package/dist/{childView-CF83nhxb.js → childView-DRUNqgjI.js} +1 -1
  45. package/dist/{childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js → childView.vue_vue_type_style_index_0_lang-B9XBDDU_.js} +1 -1
  46. package/dist/{childView.vue_vue_type_style_index_0_lang-CNSgGda3.js → childView.vue_vue_type_style_index_0_lang-oGriyFTv.js} +6 -6
  47. package/dist/{code-rule-Bz-gnktN.js → code-rule-DZC9T6cl.js} +6 -6
  48. package/dist/core.es.js +4 -4
  49. package/dist/{cron-task-CIifSUdW.js → cron-task-BJwPeA5F.js} +11 -11
  50. package/dist/{frameView-_d2mqjjQ.js → frameView-C6wkvok-.js} +15 -14
  51. package/dist/index-DZc3qRTx.js +2650 -0
  52. package/dist/{layoutView-DLKVepB8.js → layoutView-CeJBpZb_.js} +658 -653
  53. package/dist/{login-LREiDfFU.js → login-BOxwzwdB.js} +26 -25
  54. package/dist/{lov-view-DDrIVILB.js → lov-view-DRF-99U4.js} +5 -5
  55. package/dist/{menuInfo-B1FUV-Sk.js → menuInfo-3Sjvs9nM.js} +1 -1
  56. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js → menuInfo.vue_vue_type_style_index_0_lang-DrQ560nm.js} +95 -94
  57. package/dist/pda-app-B9tn7jdv.js +696 -0
  58. package/dist/redirect-BqegffKC.js +15 -0
  59. package/dist/{resource-BCwx9fEv.js → resource-BqnxbQNe.js} +7 -7
  60. package/dist/{su-welcome-189A7N4r.js → su-welcome-VwifUK_O.js} +41 -40
  61. package/dist/{sys-config-BZ3sejow.js → sys-config-C0-gSBFO.js} +18 -18
  62. package/dist/udp-core.css +2 -2
  63. package/dist/{utogether-r08LNiIZ.js → utogether-Di1byIum.js} +6 -6
  64. package/package.json +18 -16
  65. package/src/App.vue +3 -3
  66. package/src/components/udp/form-upload.vue +183 -0
  67. package/src/components/udp/index.ts +4 -0
  68. package/src/components/udp/modal-form.vue +180 -0
  69. package/src/components/udp/utils.ts +40 -0
  70. package/src/main.ts +109 -108
  71. package/src/plugins/vxe-table/index.ts +53 -46
  72. package/src/plugins/vxe-table/render.tsx +604 -184
  73. package/src/utils/udp/useRender.ts +420 -0
  74. package/src/views/organization/inv-org/InvOrganization.vue +2 -1
  75. package/src/views/organization/staff/StaffInfo.vue +0 -30
  76. package/src/views/organization/staff/StaffPanel.vue +4 -3
  77. package/src/views/system/menu/AuthorityPanel.vue +2 -2
  78. package/src/views/system/menu/SystemMenu.vue +197 -191
  79. package/src/views/system/menu/menuInfo.vue +11 -6
  80. package/src/views/system/role/AuthorityInfo.vue +1 -19
  81. package/src/views/system/sysUser/SysUserPanel.vue +1 -1
  82. package/src/views/udev/dict/DictView.vue +2 -2
  83. package/src/views/uhome/components/menu-favorite.vue +1 -1
  84. package/src/views/uhome/su-welcome.vue +1 -1
  85. package/src/views/ulogin/login.vue +1 -1
  86. package/types/global.d.ts +0 -1
  87. package/vite.config.ts +9 -2
  88. package/dist/InvOrganization-MuM2jtsG.js +0 -66
  89. package/dist/StaffInfo-DJzvBuxy.js +0 -4
  90. package/dist/core.umd.js +0 -173
  91. package/dist/index-BKIw8tSn.js +0 -9195
  92. package/dist/pda-app-CRhVGijN.js +0 -2209
  93. package/dist/redirect-DiaNDu8F.js +0 -15
  94. package/src/assets/images/empty.png +0 -0
  95. package/src/assets/images/logo.png +0 -0
  96. package/src/components/ReCountTo/README.md +0 -2
  97. package/src/components/ReCountTo/index.ts +0 -18
  98. package/src/components/ReCountTo/src/normal/index.tsx +0 -165
  99. package/src/components/ReCountTo/src/normal/props.ts +0 -37
  100. package/src/components/ReCountTo/src/rebound/index.tsx +0 -67
  101. package/src/components/ReCountTo/src/rebound/props.ts +0 -14
  102. package/src/components/ReCountTo/src/rebound/rebound.css +0 -77
  103. package/src/components/ReCropper/index.ts +0 -14
  104. package/src/components/ReCropper/src/index.tsx +0 -141
  105. package/src/components/ReFlicker/index.css +0 -39
  106. package/src/components/ReFlicker/index.ts +0 -50
  107. package/src/components/ReFlop/index.ts +0 -14
  108. package/src/components/ReFlop/src/Filpper.tsx +0 -99
  109. package/src/components/ReFlop/src/filpper.css +0 -184
  110. package/src/components/ReFlop/src/index.vue +0 -126
  111. package/src/components/ReFlowChart/index.ts +0 -24
  112. package/src/components/ReFlowChart/src/Control.vue +0 -139
  113. package/src/components/ReFlowChart/src/DataDialog.vue +0 -12
  114. package/src/components/ReFlowChart/src/NodePanel.vue +0 -151
  115. package/src/components/ReFlowChart/src/adpterForTurbo.ts +0 -160
  116. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +0 -49
  117. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
  118. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +0 -61
  119. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +0 -58
  120. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +0 -47
  121. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
  122. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
  123. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
  124. package/src/components/ReFlowChart/src/config.ts +0 -62
  125. package/src/components/ReSplitPane/index.css +0 -49
  126. package/src/components/ReSplitPane/index.tsx +0 -119
  127. package/src/components/ReSplitPane/resizer.css +0 -45
  128. package/src/components/ReSplitPane/resizer.tsx +0 -30
  129. package/src/components/SuCommon/card/components/Card.vue +0 -148
  130. package/src/components/SuCommon/card/components/DialogForm.vue +0 -127
  131. package/src/components/SuCommon/card/index.vue +0 -142
  132. package/src/components/SuCommon/icon-select/index.vue +0 -241
  133. package/src/components/SuCommon/table/index.vue +0 -208
  134. package/src/components/SuCommon/utils/index.ts +0 -103
  135. package/src/components/SuCommon/utils/slot.tsx +0 -50
  136. package/src/views/components/contextmenu/basic.vue +0 -74
  137. package/src/views/components/contextmenu/context-menu.vue +0 -40
  138. package/src/views/components/contextmenu/menuDynamic.vue +0 -99
  139. package/src/views/components/contextmenu/menuGroup.vue +0 -71
  140. package/src/views/components/count-to/index.vue +0 -43
  141. package/src/views/components/cropping/index.vue +0 -59
  142. package/src/views/components/cropping/picture.jpeg +0 -0
  143. package/src/views/components/split-pane/index.vue +0 -82
  144. package/src/views/components/video/index.vue +0 -57
@@ -1,208 +0,0 @@
1
- <!--
2
- * @Author: levi7754 levi7754@163.com
3
- * @Date: 2023-08-31 17:54:43
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2024-06-22 10:14:16
6
- * @FilePath: /u-dp-lowcode/src/views/design/packages/contain-widgets/table/table-primary.vue
7
- * @Description: 默认表格
8
- -->
9
- <template>
10
- <vxe-grid ref="xgrid" class="w-full p-1 bg-white" v-bind="gridOptions" v-on="onEvent" />
11
- </template>
12
- <script setup lang="tsx">
13
- import { ref, toRaw, onBeforeMount, onMounted, getCurrentInstance, inject } from 'vue';
14
- import { formatGridItems, formatRules, successMessage, useRender, errorMessage } from '@utogether/utils';
15
- import { useI18n } from 'vue-i18n';
16
- import { clone } from 'xe-utils';
17
- import { getServiceApi } from '../../../api';
18
- import { columnButtons } from '../utils/slot';
19
- import { footerSumMethod, query } from '../utils';
20
-
21
- defineOptions({ name: 'WidgetTable', inheritAttrs: false });
22
-
23
- interface IProps {
24
- widget: IRecord;
25
- designMode: boolean;
26
- }
27
-
28
- const props = withDefaults(defineProps<IProps>(), {
29
- widget: (): IRecord => {
30
- return {};
31
- },
32
- designMode: true
33
- });
34
-
35
- const designer = inject<IRecord>('kdesigner');
36
-
37
- const instance = getCurrentInstance();
38
-
39
- const renderHook = useRender();
40
- const { t } = useI18n();
41
-
42
- const xgrid = ref(null);
43
-
44
- const gridOptions = ref({
45
- ...props.widget.props,
46
- // height: 560,
47
- proxyConfig: {
48
- form: true, // 启用表单代理
49
- autoLoad: props.widget.props.autoLoad,
50
- ajax: {
51
- query: ({ page, form }) => query(props.widget, form, page, getServiceApi())
52
- }
53
- }
54
- });
55
-
56
- const formaterItemRender = items => {
57
- if (!items.length) return [];
58
- items.forEach(item => {
59
- if (item.renderType === 'number') {
60
- item.itemRender = renderHook.renderNumber();
61
- } else if (['date'].includes(item.renderType)) {
62
- item.itemRender = renderHook.renderDate();
63
- } else if (item.renderType === 'switch') {
64
- item.itemRender = renderHook.renderSwitch();
65
- }
66
- });
67
-
68
- return items;
69
- };
70
-
71
- const initFormItem = () => {
72
- let formItems = clone(gridOptions.value.formConfig.items, true);
73
- const items = props.widget.props.columns.filter(
74
- f => f.searchable && (!formItems.length || !formItems.some(s => f.field === s.field))
75
- );
76
- const idx = formItems.findIndex(f => f.itemRender?.name === '$buttons');
77
- idx !== -1 && formItems.splice(idx, 1);
78
- items.length && formItems.push(...items);
79
- formItems = formaterItemRender(formItems);
80
- gridOptions.value.formConfig.items = formItems.length ? formatGridItems(formItems, null) : [];
81
- console.log(formItems);
82
- };
83
-
84
- const initColums = () => {
85
- gridOptions.value.columns.forEach(col => {
86
- if (col.field !== 'operate') {
87
- const events = col.editRender?.events ? Object.keys(col.editRender?.events) : [];
88
- events.forEach(event => {
89
- const actEvent = event.substring(2).toLowerCase();
90
- const body = col.editRender?.events[event];
91
- col.editRender.events[actEvent] = e => {
92
- new Function('event', 'columns', body)(e, gridOptions.value.columns);
93
- };
94
- });
95
- } else {
96
- col = columnButtons(gridOptions.value.operates, col, onRowBtnClick);
97
- }
98
- });
99
- console.log(gridOptions.value.columns);
100
- };
101
-
102
- /** 初始化必填验证 */
103
- const initEditRule = () => {
104
- gridOptions.value.editRules = formatRules(gridOptions.value.columns, t);
105
- console.log(gridOptions.value);
106
- };
107
- /** 表格合计 */
108
- const initFooterMethod = () => {
109
- if (!gridOptions.value.showFooter) return;
110
- const sumFields = gridOptions.value.columns.filter(f => f.sumcolumn).map(m => m.field);
111
- gridOptions.value.footerMethod = grid => footerSumMethod(grid, sumFields, gridOptions.value.decimal);
112
- };
113
-
114
- const initBasicProps = () => {
115
- gridOptions.value.height = window.innerHeight - 90;
116
- };
117
-
118
- const onRowBtnClick = (btn, row) => {
119
- console.log(btn, row);
120
- const { service } = btn;
121
- if (service.url) {
122
- const { beforeSend, method, url, respondSuccess } = service;
123
- let body = clone(row, true);
124
- if (beforeSend) {
125
- const fn = new Function('body', 'app', beforeSend);
126
- body = fn(row, designer.value, instance);
127
- }
128
- gridOptions.value.loading = true;
129
- getServiceApi()
130
- [method](url, body)
131
- .then(res => {
132
- if (respondSuccess) {
133
- const fn = new Function('respond', 'app', 'self', respondSuccess);
134
- fn(res, designer.value, instance);
135
- } else {
136
- successMessage();
137
- }
138
- xgrid.value.commitProxy('query');
139
- })
140
- .catch(() => {
141
- errorMessage();
142
- })
143
- .finally(() => {
144
- gridOptions.value.loading = false;
145
- });
146
- } else {
147
- // designer.value.onEvent(btn.onClick, { code: btn.code, row });
148
- // const app = designer.value.vinstance || instance;
149
- // console.log(app);
150
- new Function('code', 'row', 'app', btn.onClick)(btn.code, row, designer.value);
151
- }
152
- };
153
-
154
- const onEvent = {
155
- editActived: ({ row }) => {
156
- console.log(row);
157
- }
158
- };
159
-
160
- const initGridProps = () => {
161
- initBasicProps();
162
- initColums();
163
- initFooterMethod();
164
- initFormItem();
165
- initEditRule();
166
- };
167
-
168
- onBeforeMount(() => {
169
- initGridProps();
170
- console.log('onBeforeMount ==== ', props.widget.props);
171
- // console.log('onBeforeMount ==== ', gridOptions.value);
172
- // Object.assign(gridOptions.value, props.widget.props);
173
- });
174
-
175
- const refresh = () => {
176
- xgrid.value.commitProxy('query');
177
- };
178
-
179
- const getSelected = () => {
180
- const firstColumn = gridOptions.value.columns[0];
181
- if (firstColumn.type === 'checkbox') {
182
- return xgrid.value.getCheckboxRecords();
183
- } else if (firstColumn.type === 'radio') {
184
- return xgrid.value.getRadioRecord();
185
- }
186
- };
187
-
188
- const getTableData = () => {
189
- return xgrid.value.getTableData();
190
- };
191
-
192
- const getInstance = () => {
193
- return toRaw(xgrid.value);
194
- };
195
-
196
- defineExpose({
197
- refresh,
198
- getSelected,
199
- getTableData,
200
- getInstance
201
- });
202
-
203
- onMounted(() => {
204
- if (!props.designMode) {
205
- designer.value.eventHandle(null, 'onMounted', props.widget, instance);
206
- }
207
- });
208
- </script>
@@ -1,103 +0,0 @@
1
- /*
2
- * @Author: levi7754 levi7754@163.com
3
- * @Date: 2023-07-24 17:49:20
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2023-10-13 17:06:38
6
- * @FilePath: /u-dp-lowcode/src/views/design/utils/index.ts
7
- * @Description: 获取样式
8
- */
9
-
10
- import { clone, isString, toDateString, isEmpty } from 'xe-utils';
11
- import { cookies } from '@utogether/utils';
12
-
13
- const CKEY = 'kCookies_param';
14
-
15
- export const getStyle = el => {
16
- if (!el.type || el.type !== 'block') {
17
- return {
18
- width: (25 / 6) * el.props.width + '%'
19
- };
20
- } else {
21
- const style = { width: 0, height: 0 };
22
- const arr = el.props.style;
23
- if (el.props.divWidth) {
24
- style.width = el.props.divWidth;
25
- }
26
- if (el.props.divHeight) {
27
- style.height = el.props.divHeight;
28
- }
29
- if (arr && arr.length > 0) {
30
- arr.forEach(el => {
31
- style[el.label] = el.value;
32
- });
33
- }
34
- return style;
35
- }
36
- };
37
-
38
- /**
39
- * @param grid 表格数据
40
- * @param fields 合并字段列表
41
- * @param decimal 精度
42
- * @returns 合并数据
43
- */
44
- export const footerSumMethod = (grid, fields, decimal) => {
45
- return [
46
- grid.columns.map((column, columnIndex) => {
47
- if (columnIndex === 0) {
48
- return '合计';
49
- }
50
- if (fields.includes(column.property)) {
51
- const total = grid.data.reduce((prev, cur) => {
52
- return prev + Number(cur[column.property] || 0);
53
- }, 0);
54
- const ss = total ? Number(total.toFixed(decimal || 2)) : total;
55
- return ss;
56
- }
57
- return '';
58
- })
59
- ];
60
- };
61
-
62
- /** 查询服务 */
63
- export const query = (widget, form, page, http, fetchParam?) => {
64
- for (const i in form) {
65
- if (form[i] && isString(form[i])) {
66
- form[i] = form[i].trim();
67
- }
68
- }
69
- const params = {
70
- pageNum: page.currentPage,
71
- pageSize: page.pageSize
72
- };
73
- const commonParam = cookies.get(CKEY) ? JSON.parse(cookies.get(CKEY)) : {};
74
- Object.assign(params, commonParam, form, fetchParam || {});
75
- const query = formatDateRange(params, widget.props.formConfig.items);
76
- return http.get(widget.props.url, query);
77
- };
78
-
79
- const startFormatter = 'yyyy-MM-dd 00:00:00';
80
- const endFormatter = 'yyyy-MM-dd 23:59:59';
81
- const formatDateRange = (listQuery: any, formItems) => {
82
- const dateRanges = formItems.filter(
83
- f => f.itemRender?.name === '#SuDateRange' || f.itemRender?.props?.multiple || f.multiple
84
- );
85
- if (isEmpty(dateRanges)) return listQuery;
86
- const query = clone(listQuery, true);
87
- dateRanges.forEach((element: any) => {
88
- if (element.multiple || element.itemRender?.props?.multiple) {
89
- query[element.field] = query[element.field]?.join(',');
90
- } else {
91
- const val = query[element.field];
92
- if (val && element.toField) {
93
- query[element.fromField] = toDateString(val[0], startFormatter);
94
- query[element.toField] = toDateString(val[1], endFormatter);
95
- } else if (val) {
96
- query[`${element.field}From`] = toDateString(val[0], startFormatter);
97
- query[`${element.field}To`] = toDateString(val[1], endFormatter);
98
- }
99
- delete query[element.field];
100
- }
101
- });
102
- return query;
103
- };
@@ -1,50 +0,0 @@
1
- /*
2
- * @Author: levi7754 levi7754@163.com
3
- * @Date: 2023-09-21 16:26:11
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2023-09-23 10:59:43
6
- * @FilePath: /u-dp-lowcode/src/views/design/utils/slot.tsx
7
- * @Description: slot 工具函数
8
- */
9
- const systemStatus = ['primary', 'success', 'warning', 'danger'];
10
-
11
- export const columnButtons = (buttons, col, cb?) => {
12
- const count = buttons.length;
13
- if (count > 3) {
14
- const front2Buttons = buttons.filter((f, idx) => idx < 2);
15
- const dropdownButtons = buttons.filter((f, idx) => idx > 1);
16
- col.slots = {
17
- default: ({ row }) => {
18
- const btns = front2Buttons.map((btn, idx) => colButton(btn, row, idx, cb));
19
- const drop = (
20
- <vxe-button status="primary" transfer>
21
- {{
22
- default: () => '更多',
23
- dropdowns: () => dropdownButtons.map((btn, idx) => colButton(btn, row, idx, cb))
24
- }}
25
- </vxe-button>
26
- );
27
- btns.push(drop);
28
- return btns;
29
- }
30
- };
31
- } else {
32
- col.slots = {
33
- default: ({ row }) => buttons.map((btn, idx) => colButton(btn, row, idx, cb))
34
- };
35
- }
36
- return col;
37
- };
38
-
39
- const colButton = (btn, row, idx, cb) => {
40
- const statusIdx = idx % systemStatus.length;
41
- return (
42
- <vxe-button
43
- content={btn.name}
44
- auth={btn.code}
45
- icon={btn.icon}
46
- status={btn.status || systemStatus[statusIdx]}
47
- onClick={() => cb && cb(btn, row)}
48
- />
49
- );
50
- };
@@ -1,74 +0,0 @@
1
- <template>
2
- <div>
3
- <h1>基本使用</h1>
4
- <div v-contextmenu:contextmenu class="wrapper">
5
- <code>右键点击此区域</code>
6
- </div>
7
-
8
- <v-contextmenu ref="contextmenu">
9
- <v-contextmenu-item>GitHub</v-contextmenu-item>
10
- <v-contextmenu-item>GitLab</v-contextmenu-item>
11
-
12
- <v-contextmenu-divider />
13
-
14
- <v-contextmenu-submenu title="蔬菜菜">
15
- <v-contextmenu-item>土豆</v-contextmenu-item>
16
-
17
- <v-contextmenu-submenu title="青菜">
18
- <v-contextmenu-item>小油菜</v-contextmenu-item>
19
- <v-contextmenu-item>空心菜</v-contextmenu-item>
20
- </v-contextmenu-submenu>
21
-
22
- <v-contextmenu-item>黄瓜</v-contextmenu-item>
23
- </v-contextmenu-submenu>
24
-
25
- <v-contextmenu-item disabled>菠萝蜜</v-contextmenu-item>
26
-
27
- <v-contextmenu-divider />
28
-
29
- <v-contextmenu-item>哈密瓜</v-contextmenu-item>
30
- </v-contextmenu>
31
- </div>
32
- </template>
33
-
34
- <script lang="ts">
35
- import { defineComponent } from 'vue';
36
-
37
- import {
38
- directive,
39
- Contextmenu,
40
- ContextmenuItem,
41
- ContextmenuDivider,
42
- ContextmenuSubmenu,
43
- ContextmenuGroup
44
- } from 'v-contextmenu';
45
-
46
- export default defineComponent({
47
- name: 'ExampleSimple',
48
-
49
- components: {
50
- [Contextmenu.name]: Contextmenu,
51
- [ContextmenuItem.name]: ContextmenuItem,
52
- [ContextmenuDivider.name]: ContextmenuDivider,
53
- [ContextmenuSubmenu.name]: ContextmenuSubmenu,
54
- [ContextmenuGroup.name]: ContextmenuGroup
55
- },
56
-
57
- directives: {
58
- contextmenu: directive
59
- }
60
- });
61
- </script>
62
-
63
- <style scoped>
64
- .wrapper {
65
- display: flex;
66
- align-items: center;
67
- justify-content: center;
68
- width: 300px;
69
- height: 200px;
70
- background-color: rgb(90 167 164 / 20%);
71
- border: 3px dashed rgb(90 167 164 / 90%);
72
- border-radius: 8px;
73
- }
74
- </style>
@@ -1,40 +0,0 @@
1
- <!--
2
- * @Author: wei.li
3
- * @Date: 2022-10-17 11:26:28
4
- * @LastEditors: wei.li
5
- * @LastEditTime: 2022-11-30 07:58:05
6
- * @Description: file content
7
- -->
8
- <script setup lang="ts">
9
- import basic from './basic.vue';
10
- import menuGroup from './menuGroup.vue';
11
- import menuDynamic from './menuDynamic.vue';
12
- import 'v-contextmenu/dist/themes/default.css';
13
- defineOptions({
14
- name: 'ContextMenu'
15
- });
16
- </script>
17
-
18
- <template>
19
- <el-card>
20
- <template #header>
21
- <div class="card-header">
22
- <span class="font-medium">右键菜单组件</span>
23
- </div>
24
- </template>
25
- <el-row :gutter="24">
26
- <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="10">
27
- <!-- 基本使用 -->
28
- <basic />
29
- </el-col>
30
- <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="10">
31
- <!-- 按钮组 -->
32
- <menuGroup />
33
- </el-col>
34
- <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="10">
35
- <!-- 动态菜单 -->
36
- <menuDynamic />
37
- </el-col>
38
- </el-row>
39
- </el-card>
40
- </template>
@@ -1,99 +0,0 @@
1
- <template>
2
- <div>
3
- <h1>动态菜单</h1>
4
- <div v-contextmenu:contextmenu class="wrapper">
5
- <code>右键点击此区域</code>
6
- </div>
7
-
8
- <v-contextmenu ref="contextmenu">
9
- <v-contextmenu-group title="操作">
10
- <v-contextmenu-item :hide-on-click="false" @click="extra.push('item')"
11
- >添加菜单</v-contextmenu-item
12
- >
13
- <v-contextmenu-item :hide-on-click="false" @click="extra.push('group')"
14
- >添加菜单组</v-contextmenu-item
15
- >
16
- <v-contextmenu-item :hide-on-click="false" @click="extra.push('submenu')"
17
- >添加子菜单</v-contextmenu-item
18
- >
19
- <v-contextmenu-item :hide-on-click="false" @click="extra.pop()">删除</v-contextmenu-item>
20
- </v-contextmenu-group>
21
-
22
- <template v-for="(item, index) of extra" :key="index">
23
- <v-contextmenu-divider />
24
-
25
- <v-contextmenu-group v-if="item === 'group'" :title="`菜单组 ${index + 1}`">
26
- <v-contextmenu-item>菜单1</v-contextmenu-item>
27
- <v-contextmenu-item>菜单2</v-contextmenu-item>
28
- <v-contextmenu-item>菜单3</v-contextmenu-item>
29
- </v-contextmenu-group>
30
-
31
- <v-contextmenu-submenu v-else-if="item === 'submenu'" :title="`子菜单 ${index + 1}`">
32
- <v-contextmenu-item>菜单1</v-contextmenu-item>
33
- <v-contextmenu-item>菜单2</v-contextmenu-item>
34
- <v-contextmenu-item>菜单3</v-contextmenu-item>
35
- </v-contextmenu-submenu>
36
-
37
- <v-contextmenu-item v-else>菜单 {{ index + 1 }}</v-contextmenu-item>
38
- </template>
39
- </v-contextmenu>
40
- </div>
41
- </template>
42
-
43
- <script lang="ts">
44
- import { defineComponent } from 'vue';
45
-
46
- import {
47
- directive,
48
- Contextmenu,
49
- ContextmenuItem,
50
- ContextmenuDivider,
51
- ContextmenuSubmenu,
52
- ContextmenuGroup
53
- } from 'v-contextmenu';
54
-
55
- export default defineComponent({
56
- name: 'ExampleDynamic',
57
-
58
- components: {
59
- [Contextmenu.name]: Contextmenu,
60
- [ContextmenuItem.name]: ContextmenuItem,
61
- [ContextmenuDivider.name]: ContextmenuDivider,
62
- [ContextmenuSubmenu.name]: ContextmenuSubmenu,
63
- [ContextmenuGroup.name]: ContextmenuGroup
64
- },
65
-
66
- directives: {
67
- contextmenu: directive
68
- },
69
-
70
- data() {
71
- return {
72
- extra: []
73
- };
74
- },
75
-
76
- methods: {
77
- addItem(type = 'item') {
78
- this.extra.push(type);
79
- },
80
- removeItem() {
81
- this.extra.pop();
82
- }
83
- }
84
- });
85
- </script>
86
-
87
- <style scoped>
88
- .wrapper {
89
- display: flex;
90
- align-items: center;
91
- justify-content: center;
92
- width: 300px;
93
- height: 200px;
94
- margin-bottom: 30px;
95
- background-color: rgb(90 167 164 / 20%);
96
- border: 3px dashed rgb(90 167 164 / 90%);
97
- border-radius: 8px;
98
- }
99
- </style>
@@ -1,71 +0,0 @@
1
- <template>
2
- <div>
3
- <h1>按钮组</h1>
4
- <div v-contextmenu:contextmenu class="wrapper">
5
- <code>右键点击此区域</code>
6
- </div>
7
-
8
- <v-contextmenu ref="contextmenu">
9
- <v-contextmenu-item>菜单</v-contextmenu-item>
10
-
11
- <v-contextmenu-group>
12
- <v-contextmenu-item>Github</v-contextmenu-item>
13
- <v-contextmenu-item>Codepen</v-contextmenu-item>
14
- <v-contextmenu-item disabled>Alipay</v-contextmenu-item>
15
- <v-contextmenu-item>Wechat</v-contextmenu-item>
16
- </v-contextmenu-group>
17
-
18
- <v-contextmenu-divider />
19
-
20
- <v-contextmenu-group title="按钮组">
21
- <v-contextmenu-item>菜单1</v-contextmenu-item>
22
- <v-contextmenu-item>菜单2</v-contextmenu-item>
23
- <v-contextmenu-item disabled>菜单3</v-contextmenu-item>
24
- </v-contextmenu-group>
25
- </v-contextmenu>
26
- </div>
27
- </template>
28
-
29
- <script lang="ts">
30
- import { defineComponent } from 'vue';
31
-
32
- import {
33
- directive,
34
- Contextmenu,
35
- ContextmenuItem,
36
- ContextmenuDivider,
37
- ContextmenuSubmenu,
38
- ContextmenuGroup
39
- } from 'v-contextmenu';
40
-
41
- const ExampleSFC = defineComponent({
42
- name: 'ExampleSFC',
43
-
44
- components: {
45
- [Contextmenu.name]: Contextmenu,
46
- [ContextmenuItem.name]: ContextmenuItem,
47
- [ContextmenuDivider.name]: ContextmenuDivider,
48
- [ContextmenuSubmenu.name]: ContextmenuSubmenu,
49
- [ContextmenuGroup.name]: ContextmenuGroup
50
- },
51
-
52
- directives: {
53
- contextmenu: directive
54
- }
55
- });
56
-
57
- export default ExampleSFC;
58
- </script>
59
-
60
- <style scoped>
61
- .wrapper {
62
- display: flex;
63
- align-items: center;
64
- justify-content: center;
65
- width: 300px;
66
- height: 200px;
67
- background-color: rgb(90 167 164 / 20%);
68
- border: 3px dashed rgb(90 167 164 / 90%);
69
- border-radius: 8px;
70
- }
71
- </style>
@@ -1,43 +0,0 @@
1
- <script setup lang="ts">
2
- import { ReNormalCountTo, ReboundCountTo } from '@/components/ReCountTo';
3
- </script>
4
-
5
- <template>
6
- <el-card>
7
- <template #header>
8
- <div class="card-header">
9
- <span class="font-medium">数字动画组件</span>
10
- </div>
11
- </template>
12
- <div class="flex items-center">
13
- <ReNormalCountTo
14
- prefix="$"
15
- :duration="1000"
16
- :color="'#409EFF'"
17
- :fontSize="'2em'"
18
- :startVal="1"
19
- :endVal="1000"
20
- />
21
- <ul class="flex ml-8">
22
- <ReboundCountTo
23
- v-for="(num, inx) of [1, 6, 6, 6]"
24
- :key="inx"
25
- :i="num"
26
- :blur="inx"
27
- :delay="inx + 1"
28
- />
29
- </ul>
30
- </div>
31
- </el-card>
32
- </template>
33
-
34
- <style lang="scss" scoped>
35
- .flex {
36
- display: flex;
37
- }
38
-
39
- :deep(.el-card) {
40
- margin-bottom: 10px;
41
- text-align: center;
42
- }
43
- </style>