@ctzy-web-client/plugin-component-vue 1.0.26 → 1.0.28

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 (233) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +11 -0
  2. package/es/advance-select/advance-operation.mjs +48 -51
  3. package/es/advance-select/advance-option.mjs +134 -164
  4. package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_daae7edd_lang.mjs +13 -0
  5. package/es/advance-select/advance-select.mjs +327 -370
  6. package/es/advance-select/events-helpers.mjs +9 -0
  7. package/es/advance-select/index.mjs +9 -0
  8. package/es/advance-select/use-advance-option.mjs +9 -0
  9. package/es/advance-select/use-advance-select.mjs +9 -0
  10. package/es/application-slot/application-slot.mjs +9 -0
  11. package/es/application-slot/breadcrumb-item.mjs +26 -20
  12. package/es/application-slot/header-tools-item.mjs +26 -20
  13. package/es/application-slot/index.mjs +9 -0
  14. package/es/breadcrumb-select/breadcrumb-select.mjs +123 -137
  15. package/es/breadcrumb-select/index.mjs +9 -0
  16. package/es/components.mjs +9 -0
  17. package/es/contextmenu/contextmenu-item.mjs +24 -19
  18. package/es/contextmenu/contextmenu.mjs +68 -73
  19. package/es/contextmenu/index.mjs +9 -0
  20. package/es/contextmenu/use-contextmenu.mjs +10 -1
  21. package/es/data-form/data-form-item.mjs +41 -49
  22. package/es/data-form/data-form.mjs +176 -213
  23. package/es/data-form/dynamic-component.mjs +9 -0
  24. package/es/data-form/form-components/Blots/AtBlot.mjs +9 -0
  25. package/es/data-form/form-components/bwa-date-picker.mjs +50 -51
  26. package/es/data-form/form-components/bwa-date-time-picker.mjs +55 -56
  27. package/es/data-form/form-components/bwa-input-float.mjs +48 -48
  28. package/es/data-form/form-components/bwa-input-integer.mjs +61 -68
  29. package/es/data-form/form-components/bwa-input.mjs +43 -43
  30. package/es/data-form/form-components/bwa-multi-select.mjs +40 -40
  31. package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +230 -555
  32. package/es/data-form/form-components/bwa-rich-text.mjs +326 -404
  33. package/es/data-form/form-components/bwa-select.mjs +81 -84
  34. package/es/data-form/form-components/bwa-textarea.mjs +38 -38
  35. package/es/data-form/form-components/bwa-upload.mjs +160 -173
  36. package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -35
  37. package/es/data-form/form-components/bwa-user-select.mjs +72 -86
  38. package/es/data-form/index.mjs +9 -0
  39. package/es/data-table/data-column-view.mjs +124 -146
  40. package/es/data-table/data-table-card.mjs +49 -48
  41. package/es/data-table/data-table-column.mjs +55 -58
  42. package/es/data-table/data-table.mjs +328 -404
  43. package/es/data-table/dynamic-component.mjs +9 -0
  44. package/es/data-table/index.mjs +9 -0
  45. package/es/data-table/use-datatable-drag.mjs +9 -0
  46. package/es/datatable-settings/datatable-settings.mjs +286 -328
  47. package/es/datatable-settings/index.mjs +9 -0
  48. package/es/date-range/date-picker.mjs +125 -131
  49. package/es/date-range/date-range.mjs +173 -216
  50. package/es/date-range/index.mjs +9 -0
  51. package/es/drag-list/constants.mjs +10 -0
  52. package/es/drag-list/drag-item.mjs +51 -56
  53. package/es/drag-list/drag-list.mjs +58 -60
  54. package/es/drag-list/index.mjs +9 -0
  55. package/es/drag-list/use-drag-list.mjs +10 -1
  56. package/es/dragable/constants.mjs +10 -0
  57. package/es/dragable/dragable-item.mjs +27 -23
  58. package/es/dragable/dragable-operation.mjs +33 -32
  59. package/es/dragable/dragable.mjs +33 -32
  60. package/es/dragable/index.mjs +9 -0
  61. package/es/dragable/use-dragable.mjs +9 -0
  62. package/es/filter-panel/conditions/condition.mjs +9 -0
  63. package/es/filter-panel/conditions/date-range-condition.mjs +51 -50
  64. package/es/filter-panel/conditions/department-condition/department-condition.mjs +82 -99
  65. package/es/filter-panel/conditions/department-condition/department-node.mjs +69 -73
  66. package/es/filter-panel/conditions/index.mjs +9 -0
  67. package/es/filter-panel/conditions/input-condition.mjs +88 -91
  68. package/es/filter-panel/conditions/multi-user-condition.mjs +66 -67
  69. package/es/filter-panel/conditions/multiple-menu-condition.mjs +44 -54
  70. package/es/filter-panel/conditions/single-menu-condition.mjs +71 -65
  71. package/es/filter-panel/conditions/single-user-condition.mjs +66 -67
  72. package/es/filter-panel/filter-panel-item.mjs +51 -55
  73. package/es/filter-panel/filter-panel.mjs +147 -156
  74. package/es/filter-panel/index.mjs +9 -0
  75. package/es/filter-panel/use-filter-panel-item.mjs +9 -0
  76. package/es/filter-panel/use-filter-panel.mjs +9 -0
  77. package/es/hooks/use-data/index.mjs +9 -0
  78. package/es/index.mjs +9 -0
  79. package/es/layout/index.mjs +9 -0
  80. package/es/layout/layout.mjs +87 -85
  81. package/es/make-installer.mjs +9 -0
  82. package/es/math/Rectangle.mjs +10 -0
  83. package/es/menu/index.mjs +9 -0
  84. package/es/menu/menu-item.mjs +65 -70
  85. package/es/menu/menu.mjs +64 -70
  86. package/es/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.mjs +680 -454
  87. package/es/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.mjs +108 -46
  88. package/es/panel/index.mjs +9 -0
  89. package/es/panel/panel.mjs +49 -53
  90. package/es/panel-tabs/index.mjs +9 -0
  91. package/es/panel-tabs/panel-tabs.mjs +9 -0
  92. package/es/pct-filter-panel/index.mjs +9 -0
  93. package/es/pct-filter-panel/pct-compents/index.mjs +9 -0
  94. package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +73 -75
  95. package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +77 -77
  96. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +357 -374
  97. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +149 -154
  98. package/es/pct-filter-panel/pct-filter-panel-item.mjs +52 -56
  99. package/es/pct-filter-panel/pct-filter-panel.mjs +235 -248
  100. package/es/pct-filter-panel/use-filter-panel-item.mjs +9 -0
  101. package/es/pct-filter-panel/use-filter-panel.mjs +9 -0
  102. package/es/plugins.css +1 -0
  103. package/es/plugins.mjs +9 -0
  104. package/es/progress/index.mjs +9 -0
  105. package/es/progress/progress-item.mjs +71 -81
  106. package/es/progress/progress.mjs +74 -78
  107. package/es/progress/use-progress.mjs +9 -0
  108. package/es/utils/db.mjs +9 -0
  109. package/es/utils.mjs +9 -0
  110. package/es/where-filter-panel/index.mjs +9 -1
  111. package/es/where-filter-panel/use-where-filter-panel.mjs +9 -0
  112. package/es/where-filter-panel/where-filter-panel.mjs +21 -15
  113. package/lib/_virtual/_plugin-vue_export-helper.js +11 -0
  114. package/lib/advance-select/advance-operation.js +47 -50
  115. package/lib/advance-select/advance-option.js +133 -163
  116. package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_daae7edd_lang.js +17 -0
  117. package/lib/advance-select/advance-select.js +326 -369
  118. package/lib/advance-select/events-helpers.js +9 -0
  119. package/lib/advance-select/index.js +9 -0
  120. package/lib/advance-select/use-advance-option.js +9 -0
  121. package/lib/advance-select/use-advance-select.js +9 -0
  122. package/lib/application-slot/application-slot.js +9 -0
  123. package/lib/application-slot/breadcrumb-item.js +25 -19
  124. package/lib/application-slot/header-tools-item.js +25 -19
  125. package/lib/application-slot/index.js +9 -0
  126. package/lib/breadcrumb-select/breadcrumb-select.js +122 -136
  127. package/lib/breadcrumb-select/index.js +9 -0
  128. package/lib/components.js +9 -0
  129. package/lib/contextmenu/contextmenu-item.js +23 -18
  130. package/lib/contextmenu/contextmenu.js +67 -72
  131. package/lib/contextmenu/index.js +9 -0
  132. package/lib/contextmenu/use-contextmenu.js +10 -1
  133. package/lib/data-form/data-form-item.js +40 -48
  134. package/lib/data-form/data-form.js +175 -212
  135. package/lib/data-form/dynamic-component.js +9 -0
  136. package/lib/data-form/form-components/Blots/AtBlot.js +9 -0
  137. package/lib/data-form/form-components/bwa-date-picker.js +49 -50
  138. package/lib/data-form/form-components/bwa-date-time-picker.js +54 -55
  139. package/lib/data-form/form-components/bwa-input-float.js +47 -47
  140. package/lib/data-form/form-components/bwa-input-integer.js +60 -67
  141. package/lib/data-form/form-components/bwa-input.js +42 -42
  142. package/lib/data-form/form-components/bwa-multi-select.js +39 -39
  143. package/lib/data-form/form-components/bwa-rich-text-tinymce.js +229 -554
  144. package/lib/data-form/form-components/bwa-rich-text.js +325 -403
  145. package/lib/data-form/form-components/bwa-select.js +80 -83
  146. package/lib/data-form/form-components/bwa-textarea.js +37 -37
  147. package/lib/data-form/form-components/bwa-upload.js +159 -172
  148. package/lib/data-form/form-components/bwa-user-multi-select.js +34 -34
  149. package/lib/data-form/form-components/bwa-user-select.js +71 -85
  150. package/lib/data-form/index.js +9 -0
  151. package/lib/data-table/data-column-view.js +124 -146
  152. package/lib/data-table/data-table-card.js +49 -48
  153. package/lib/data-table/data-table-column.js +54 -57
  154. package/lib/data-table/data-table.js +327 -403
  155. package/lib/data-table/dynamic-component.js +9 -0
  156. package/lib/data-table/index.js +9 -0
  157. package/lib/data-table/use-datatable-drag.js +9 -0
  158. package/lib/datatable-settings/datatable-settings.js +285 -327
  159. package/lib/datatable-settings/index.js +9 -0
  160. package/lib/date-range/date-picker.js +124 -130
  161. package/lib/date-range/date-range.js +172 -215
  162. package/lib/date-range/index.js +9 -0
  163. package/lib/drag-list/constants.js +10 -0
  164. package/lib/drag-list/drag-item.js +50 -55
  165. package/lib/drag-list/drag-list.js +57 -59
  166. package/lib/drag-list/index.js +9 -0
  167. package/lib/drag-list/use-drag-list.js +10 -1
  168. package/lib/dragable/constants.js +10 -0
  169. package/lib/dragable/dragable-item.js +26 -22
  170. package/lib/dragable/dragable-operation.js +32 -31
  171. package/lib/dragable/dragable.js +32 -31
  172. package/lib/dragable/index.js +9 -0
  173. package/lib/dragable/use-dragable.js +9 -0
  174. package/lib/filter-panel/conditions/condition.js +9 -0
  175. package/lib/filter-panel/conditions/date-range-condition.js +50 -49
  176. package/lib/filter-panel/conditions/department-condition/department-condition.js +81 -98
  177. package/lib/filter-panel/conditions/department-condition/department-node.js +68 -72
  178. package/lib/filter-panel/conditions/index.js +9 -0
  179. package/lib/filter-panel/conditions/input-condition.js +87 -90
  180. package/lib/filter-panel/conditions/multi-user-condition.js +65 -66
  181. package/lib/filter-panel/conditions/multiple-menu-condition.js +43 -53
  182. package/lib/filter-panel/conditions/single-menu-condition.js +70 -64
  183. package/lib/filter-panel/conditions/single-user-condition.js +65 -66
  184. package/lib/filter-panel/filter-panel-item.js +50 -54
  185. package/lib/filter-panel/filter-panel.js +146 -155
  186. package/lib/filter-panel/index.js +9 -0
  187. package/lib/filter-panel/use-filter-panel-item.js +9 -0
  188. package/lib/filter-panel/use-filter-panel.js +9 -0
  189. package/lib/hooks/use-data/index.js +9 -0
  190. package/lib/index.js +9 -0
  191. package/lib/layout/index.js +9 -0
  192. package/lib/layout/layout.js +86 -84
  193. package/lib/make-installer.js +9 -0
  194. package/lib/math/Rectangle.js +10 -0
  195. package/lib/menu/index.js +9 -0
  196. package/lib/menu/menu-item.js +64 -69
  197. package/lib/menu/menu.js +63 -69
  198. package/lib/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.js +685 -451
  199. package/lib/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.js +109 -44
  200. package/lib/panel/index.js +9 -0
  201. package/lib/panel/panel.js +48 -52
  202. package/lib/panel-tabs/index.js +9 -0
  203. package/lib/panel-tabs/panel-tabs.js +9 -0
  204. package/lib/pct-filter-panel/index.js +9 -0
  205. package/lib/pct-filter-panel/pct-compents/index.js +9 -0
  206. package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +72 -74
  207. package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +76 -76
  208. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +356 -373
  209. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +148 -153
  210. package/lib/pct-filter-panel/pct-filter-panel-item.js +51 -55
  211. package/lib/pct-filter-panel/pct-filter-panel.js +234 -247
  212. package/lib/pct-filter-panel/use-filter-panel-item.js +9 -0
  213. package/lib/pct-filter-panel/use-filter-panel.js +9 -0
  214. package/lib/plugins.css +1 -0
  215. package/lib/plugins.js +9 -0
  216. package/lib/progress/index.js +9 -0
  217. package/lib/progress/progress-item.js +70 -80
  218. package/lib/progress/progress.js +73 -77
  219. package/lib/progress/use-progress.js +9 -0
  220. package/lib/utils/db.js +9 -0
  221. package/lib/utils.js +9 -0
  222. package/lib/where-filter-panel/index.js +9 -0
  223. package/lib/where-filter-panel/use-where-filter-panel.js +9 -0
  224. package/lib/where-filter-panel/where-filter-panel.js +20 -14
  225. package/package.json +1 -1
  226. package/src/advance-select/advance-option.vue +13 -7
  227. package/src/advance-select/advance-select.vue +8 -1
  228. package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +10 -1
  229. package/style/index.css +1 -1
  230. package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +0 -7
  231. package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +0 -28
  232. package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +0 -12
  233. package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +0 -32
@@ -8,91 +8,77 @@ var bwaSelect = require('./bwa-select.js');
8
8
  var ElementPlus = require('element-plus');
9
9
  var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
10
10
 
11
- const _sfc_main = {
12
- __name: 'bwa-user-select',
13
- props: {
14
- modelValue: null,
15
- },
16
- emits: ['update:modelValue'],
17
- setup(__props, { emit }) {
18
-
19
- const props = __props;
20
-
21
- defineOptions({
22
- name: 'BwaUserSelect',
23
- inheritAttrs: false,
24
- });
25
-
26
-
27
-
28
-
29
-
30
- const attrs = vue.useAttrs();
31
-
32
- const userService = webBaseClientVue.useService('UserService');
33
-
34
- const loading = vue.ref(false);
35
-
36
- const modelValue = vue.computed({
37
- get: () => props.modelValue,
38
- set: (v) => {
39
- emit('update:modelValue', v);
40
- },
41
- });
42
-
43
- const options = vue.ref([]);
44
-
45
- const loadOptions = async (query, userIds = []) => {
46
- const _userService = vue.unref(userService);
47
-
48
- if (!_userService) {
49
- return;
50
- }
51
-
52
- try {
53
- loading.value = true;
54
- const userListResult = await _userService.getUserList({
55
- name: query,
56
- userIds,
57
- });
58
-
59
- if (userListResult.code != 0) {
60
- ElementPlus.ElMessage.error(userListResult.msg);
61
- return;
62
- }
63
-
64
- options.value = userListResult.data;
65
- } finally {
66
- loading.value = false;
67
- }
68
- };
69
-
70
- const handleRemote = loadOptions;
71
-
72
- loadOptions(
73
- '',
74
- Array.isArray(vue.unref(modelValue))
75
- ? vue.unref(modelValue)
76
- : vue.unref(modelValue)
77
- ? [vue.unref(modelValue)]
78
- : []
79
- );
80
-
81
- return (_ctx, _cache) => {
82
- return (vue.openBlock(), vue.createBlock(bwaSelect["default"], vue.mergeProps(vue.unref(attrs), {
83
- modelValue: vue.unref(modelValue),
84
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(modelValue) ? (modelValue).value = $event : null)),
85
- loading: loading.value,
86
- remote: "",
87
- filterable: "",
88
- clearable: "",
89
- "remote-method": vue.unref(handleRemote),
90
- options: options.value
91
- }), null, 16 /* FULL_PROPS */, ["modelValue", "loading", "remote-method", "options"]))
11
+ // Inject __name helper
12
+ if (typeof __name === 'undefined') {
13
+ function __name(obj, name) {
14
+ Object.defineProperty(obj, "name", {
15
+ value: name,
16
+ configurable: true
17
+ });
18
+ }
92
19
  }
93
- }
94
-
95
- };
96
- var UserSelect = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['__file',"bwa-user-select.vue"]]);
20
+ const __default__ = vue.defineComponent({
21
+ name: "BwaUserSelect",
22
+ inheritAttrs: false
23
+ });
24
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
25
+ props: {
26
+ modelValue: null
27
+ },
28
+ emits: ["update:modelValue"],
29
+ setup(__props, { emit: __emit }) {
30
+ ;
31
+ const props = __props;
32
+ const emit = __emit;
33
+ const attrs = vue.useAttrs();
34
+ const userService = webBaseClientVue.useService("UserService");
35
+ const loading = vue.ref(false);
36
+ const modelValue = vue.computed({
37
+ get: () => props.modelValue,
38
+ set: (v) => {
39
+ emit("update:modelValue", v);
40
+ }
41
+ });
42
+ const options = vue.ref([]);
43
+ const loadOptions = async (query, userIds = []) => {
44
+ const _userService = vue.unref(userService);
45
+ if (!_userService) {
46
+ return;
47
+ }
48
+ try {
49
+ loading.value = true;
50
+ const userListResult = await _userService.getUserList({
51
+ name: query,
52
+ userIds
53
+ });
54
+ if (userListResult.code != 0) {
55
+ ElementPlus.ElMessage.error(userListResult.msg);
56
+ return;
57
+ }
58
+ options.value = userListResult.data;
59
+ } finally {
60
+ loading.value = false;
61
+ }
62
+ };
63
+ const handleRemote = loadOptions;
64
+ loadOptions(
65
+ "",
66
+ Array.isArray(vue.unref(modelValue)) ? vue.unref(modelValue) : vue.unref(modelValue) ? [vue.unref(modelValue)] : []
67
+ );
68
+ return (_ctx, _cache) => {
69
+ return vue.openBlock(), vue.createBlock(bwaSelect["default"], vue.mergeProps(vue.unref(attrs), {
70
+ modelValue: modelValue.value,
71
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
72
+ loading: loading.value,
73
+ remote: "",
74
+ filterable: "",
75
+ clearable: "",
76
+ "remote-method": vue.unref(handleRemote),
77
+ options: options.value
78
+ }), null, 16, ["modelValue", "loading", "remote-method", "options"]);
79
+ };
80
+ }
81
+ });
82
+ var UserSelect = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["__file", "bwa-user-select.vue"]]);
97
83
 
98
84
  exports["default"] = UserSelect;
@@ -18,6 +18,15 @@ var bwaUserMultiSelect = require('./form-components/bwa-user-multi-select.js');
18
18
  var bwaUpload = require('./form-components/bwa-upload.js');
19
19
  var bwaRichText = require('./form-components/bwa-rich-text.js');
20
20
 
21
+ // Inject __name helper
22
+ if (typeof __name === 'undefined') {
23
+ function __name(obj, name) {
24
+ Object.defineProperty(obj, "name", {
25
+ value: name,
26
+ configurable: true
27
+ });
28
+ }
29
+ }
21
30
  const BwaDataForm = install.withInstall(dataForm["default"], {
22
31
  DataFormItem: dataFormItem["default"],
23
32
  DatePicker: bwaDatePicker["default"],
@@ -8,159 +8,137 @@ var icons = require('@element-plus/icons');
8
8
  var ElementPlus = require('element-plus');
9
9
  var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
10
10
 
11
- const _sfc_main = {
12
- name: 'BwaDataColumnView',
13
- props: {
14
- value: [String, Boolean, Number, Object, Array],
15
- type: {
16
- type: String,
17
- default: 'string',
18
- },
19
- template: {
20
- type: String,
21
- default: '',
22
- },
23
- //格式化规则
24
- rule: {
25
- type: String,
26
- default: '',
27
- },
28
- align: {
29
- type: String,
30
- default: '',
31
- },
32
- nowrap: {
33
- type: [Boolean, String],
34
- default: true,
35
- },
36
- copy: {
37
- type: [Boolean, String],
38
- default: false,
39
- },
40
- defaultValue: {
41
- type: String,
42
- default: '-',
43
- },
44
- },
45
- emits: ['update:modelValue'],
46
- components: { PictureFilled: icons.PictureFilled },
47
- setup(props) {
48
- const ns = webBaseClientVue.useNamespace('column-view');
49
-
50
- //显示类型
51
- const viewType = vue.computed(() => props.type.toLocaleLowerCase());
52
-
53
- //显示的值
54
- const viewValue = vue.computed(() => {
55
- //值 主要是要先转成字符串处理
56
- let value = props.value === 0 ? '0' : props.value ? props.value + '' : '';
57
- let type = viewType.value;
58
-
59
- if (['number', 'string'].includes(type)) {
60
- //是否追加...
61
- let isAppendChar = false;
62
-
63
- if (type === 'string' && props.rule && value) {
64
- isAppendChar = value.length > props.rule.replace('s:', '') * 1;
65
- }
66
-
67
- value = props.rule ? webBaseClientVue.str.formatByRule(value, props.rule) : value;
68
- value = value || props.defaultValue;
69
-
70
- if (isAppendChar) {
71
- value += '...';
72
- }
73
- } else if (type === 'date') {
74
- value = value
75
- ? webBaseClientVue.func.formatDate(new Date(value), props.rule || 'yyyy-MM-dd')
76
- : props.defaultValue;
77
- } else if (type === 'html') {
78
- value = value
79
- ? value.replace(/[\r\n|\r|\n]/g, '<br/>')
80
- : props.defaultValue;
81
- }
82
-
83
- //存在字符串模板的时候
84
- if (props.template) {
85
- value = props.template.replace('${value}', value);
86
- }
87
-
88
- return value;
89
- });
90
-
91
- //拷贝
92
- const copyHandle = (text) => {
93
- let input = document.createElement('input');
94
- input.value = text;
95
- document.body.appendChild(input);
96
- input.select();
97
- input.setSelectionRange(0, input.value.length),
98
- document.execCommand('Copy');
99
- document.body.removeChild(input);
100
- ElementPlus.ElMessage.info('复制成功!');
101
- };
102
-
103
- return { ns, viewType, viewValue, copyHandle };
104
- },
105
- };
106
-
11
+ // Inject __name helper
12
+ if (typeof __name === 'undefined') {
13
+ function __name(obj, name) {
14
+ Object.defineProperty(obj, "name", {
15
+ value: name,
16
+ configurable: true
17
+ });
18
+ }
19
+ }
20
+ const _sfc_main = {
21
+ name: "BwaDataColumnView",
22
+ props: {
23
+ value: [String, Boolean, Number, Object, Array],
24
+ type: {
25
+ type: String,
26
+ default: "string"
27
+ },
28
+ template: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ rule: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ align: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ nowrap: {
41
+ type: [Boolean, String],
42
+ default: true
43
+ },
44
+ copy: {
45
+ type: [Boolean, String],
46
+ default: false
47
+ },
48
+ defaultValue: {
49
+ type: String,
50
+ default: "-"
51
+ }
52
+ },
53
+ emits: ["update:modelValue"],
54
+ components: { PictureFilled: icons.PictureFilled },
55
+ setup(props) {
56
+ const ns = webBaseClientVue.useNamespace("column-view");
57
+ const viewType = vue.computed(() => props.type.toLocaleLowerCase());
58
+ const viewValue = vue.computed(() => {
59
+ let value = props.value === 0 ? "0" : props.value ? props.value + "" : "";
60
+ let type = viewType.value;
61
+ if (["number", "string"].includes(type)) {
62
+ let isAppendChar = false;
63
+ if (type === "string" && props.rule && value) {
64
+ isAppendChar = value.length > props.rule.replace("s:", "") * 1;
65
+ }
66
+ value = props.rule ? webBaseClientVue.str.formatByRule(value, props.rule) : value;
67
+ value = value || props.defaultValue;
68
+ if (isAppendChar) {
69
+ value += "...";
70
+ }
71
+ } else if (type === "date") {
72
+ value = value ? webBaseClientVue.func.formatDate(new Date(value), props.rule || "yyyy-MM-dd") : props.defaultValue;
73
+ } else if (type === "html") {
74
+ value = value ? value.replace(/[\r\n|\r|\n]/g, "<br/>") : props.defaultValue;
75
+ }
76
+ if (props.template) {
77
+ value = props.template.replace("${value}", value);
78
+ }
79
+ return value;
80
+ });
81
+ const copyHandle = (text) => {
82
+ let input = document.createElement("input");
83
+ input.value = text;
84
+ document.body.appendChild(input);
85
+ input.select();
86
+ input.setSelectionRange(0, input.value.length), document.execCommand("Copy");
87
+ document.body.removeChild(input);
88
+ ElementPlus.ElMessage.info("\u590D\u5236\u6210\u529F!");
89
+ };
90
+ return { ns, viewType, viewValue, copyHandle };
91
+ }
92
+ };
107
93
  const _hoisted_1 = ["innerHTML"];
108
-
109
94
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
110
95
  const _component_PictureFilled = vue.resolveComponent("PictureFilled");
111
96
  const _component_el_icon = vue.resolveComponent("el-icon");
112
97
  const _component_el_image = vue.resolveComponent("el-image");
113
-
114
- return (vue.openBlock(), vue.createElementBlock("span", {
98
+ return vue.openBlock(), vue.createElementBlock("span", {
115
99
  class: vue.normalizeClass([$setup.ns.b(), { nowrap: $props.nowrap }, $props.align])
116
100
  }, [
117
- ($setup.viewType == 'html')
118
- ? (vue.openBlock(), vue.createElementBlock("span", {
119
- key: 0,
120
- innerHTML: $setup.viewValue
121
- }, null, 8 /* PROPS */, _hoisted_1))
122
- : ($setup.viewType == 'image')
123
- ? (vue.openBlock(), vue.createBlock(_component_el_image, {
124
- key: 1,
125
- class: "image",
126
- style: { width: '100%', minHeight: '50px' },
127
- "z-index": 999,
128
- "preview-teleported": true,
129
- "preview-src-list": [$setup.viewValue],
130
- fit: "cover",
131
- src: $setup.viewValue,
132
- "hide-on-click-modal": true
133
- }, {
134
- placeholder: vue.withCtx(() => [
135
- vue.createVNode(_component_el_icon, { size: 50 }, {
136
- default: vue.withCtx(() => [
137
- vue.createVNode(_component_PictureFilled)
138
- ]),
139
- _: 1 /* STABLE */
140
- })
141
- ]),
142
- error: vue.withCtx(() => [
143
- vue.createVNode(_component_el_icon, { size: 50 }, {
144
- default: vue.withCtx(() => [
145
- vue.createVNode(_component_PictureFilled)
146
- ]),
147
- _: 1 /* STABLE */
148
- })
149
- ]),
150
- _: 1 /* STABLE */
151
- }, 8 /* PROPS */, ["preview-src-list", "src"]))
152
- : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
153
- vue.createTextVNode(vue.toDisplayString($setup.viewValue), 1 /* TEXT */)
154
- ], 64 /* STABLE_FRAGMENT */)),
155
- ($props.copy)
156
- ? (vue.openBlock(), vue.createElementBlock("div", {
157
- key: 3,
158
- class: "copy-btn",
159
- onClick: _cache[0] || (_cache[0] = $event => ($setup.copyHandle($setup.viewValue)))
160
- }, "复制"))
161
- : vue.createCommentVNode("v-if", true)
162
- ], 2 /* CLASS */))
101
+ $setup.viewType == "html" ? (vue.openBlock(), vue.createElementBlock("span", {
102
+ key: 0,
103
+ innerHTML: $setup.viewValue
104
+ }, null, 8, _hoisted_1)) : $setup.viewType == "image" ? (vue.openBlock(), vue.createBlock(_component_el_image, {
105
+ key: 1,
106
+ class: "image",
107
+ style: { width: "100%", minHeight: "50px" },
108
+ "z-index": 999,
109
+ "preview-teleported": true,
110
+ "preview-src-list": [$setup.viewValue],
111
+ fit: "cover",
112
+ src: $setup.viewValue,
113
+ "hide-on-click-modal": true
114
+ }, {
115
+ placeholder: vue.withCtx(() => [
116
+ vue.createVNode(_component_el_icon, { size: 50 }, {
117
+ default: vue.withCtx(() => [
118
+ vue.createVNode(_component_PictureFilled)
119
+ ]),
120
+ _: 1
121
+ })
122
+ ]),
123
+ error: vue.withCtx(() => [
124
+ vue.createVNode(_component_el_icon, { size: 50 }, {
125
+ default: vue.withCtx(() => [
126
+ vue.createVNode(_component_PictureFilled)
127
+ ]),
128
+ _: 1
129
+ })
130
+ ]),
131
+ _: 1
132
+ }, 8, ["preview-src-list", "src"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
133
+ vue.createTextVNode(vue.toDisplayString($setup.viewValue), 1)
134
+ ], 64)),
135
+ $props.copy ? (vue.openBlock(), vue.createElementBlock("div", {
136
+ key: 3,
137
+ class: "copy-btn",
138
+ onClick: _cache[0] || (_cache[0] = ($event) => $setup.copyHandle($setup.viewValue))
139
+ }, "\u590D\u5236")) : vue.createCommentVNode("v-if", true)
140
+ ], 2);
163
141
  }
164
- var DataColumnView = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['render',_sfc_render],['__file',"data-column-view.vue"]]);
142
+ var DataColumnView = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "data-column-view.vue"]]);
165
143
 
166
144
  exports["default"] = DataColumnView;
@@ -7,23 +7,27 @@ var webBaseClientVue = require('@ctzy-web-client/web-base-client-vue');
7
7
  var dynamicComponent = require('./dynamic-component.js');
8
8
  var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
9
9
 
10
- const _sfc_main = {
11
- name: 'BwaDataTableCard',
12
- components: { DynamicComponent: dynamicComponent["default"] },
13
- setup() {
14
- //创建dataTable
15
- const dataTable = vue.inject(webBaseClientVue.dataTableKey);
16
-
17
- const ns = webBaseClientVue.useNamespace('datatable');
18
-
19
- return { dataTable, ns };
20
- },
21
- };
22
-
10
+ // Inject __name helper
11
+ if (typeof __name === 'undefined') {
12
+ function __name(obj, name) {
13
+ Object.defineProperty(obj, "name", {
14
+ value: name,
15
+ configurable: true
16
+ });
17
+ }
18
+ }
19
+ const _sfc_main = {
20
+ name: "BwaDataTableCard",
21
+ components: { DynamicComponent: dynamicComponent["default"] },
22
+ setup() {
23
+ const dataTable = vue.inject(webBaseClientVue.dataTableKey);
24
+ const ns = webBaseClientVue.useNamespace("datatable");
25
+ return { dataTable, ns };
26
+ }
27
+ };
23
28
  const _hoisted_1 = { class: "left" };
24
29
  const _hoisted_2 = { class: "pagination-info" };
25
30
  const _hoisted_3 = { class: "right" };
26
-
27
31
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
28
32
  const _component_el_table_column = vue.resolveComponent("el-table-column");
29
33
  const _component_DynamicComponent = vue.resolveComponent("DynamicComponent");
@@ -31,9 +35,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
31
35
  const _component_el_pagination = vue.resolveComponent("el-pagination");
32
36
  const _component_el_card = vue.resolveComponent("el-card");
33
37
  const _directive_loading = vue.resolveDirective("loading");
34
-
35
38
  return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_card, {
36
- class: vue.normalizeClass($setup.ns.b('card'))
39
+ class: vue.normalizeClass($setup.ns.b("card"))
37
40
  }, vue.createSlots({
38
41
  default: vue.withCtx(() => [
39
42
  vue.createVNode(_component_el_table, {
@@ -53,11 +56,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
53
56
  type: "index",
54
57
  width: "60",
55
58
  align: "center",
56
- label: "编号"
59
+ label: "\u7F16\u53F7"
57
60
  }),
58
61
  vue.renderSlot(_ctx.$slots, "table-columns", { dataTable: $setup.dataTable }, () => [
59
62
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($setup.dataTable.getDisplayColumns(), (item) => {
60
- return (vue.openBlock(), vue.createBlock(_component_el_table_column, {
63
+ return vue.openBlock(), vue.createBlock(_component_el_table_column, {
61
64
  "column-key": item.attrName,
62
65
  key: item.attrName,
63
66
  label: item.title,
@@ -66,8 +69,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
66
69
  align: item.align
67
70
  }, {
68
71
  default: vue.withCtx(({ row, $index }) => [
69
- vue.renderSlot(_ctx.$slots, 'table-col-' + item.attrName, {
70
- row: row,
72
+ vue.renderSlot(_ctx.$slots, "table-col-" + item.attrName, {
73
+ row,
71
74
  index: $index,
72
75
  column: item,
73
76
  dataTable: $setup.dataTable
@@ -75,56 +78,54 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
75
78
  vue.createVNode(_component_DynamicComponent, {
76
79
  column: item,
77
80
  record: row
78
- }, null, 8 /* PROPS */, ["column", "record"])
81
+ }, null, 8, ["column", "record"])
79
82
  ])
80
83
  ]),
81
- _: 2 /* DYNAMIC */
82
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["column-key", "label", "prop", "min-width", "align"]))
83
- }), 128 /* KEYED_FRAGMENT */))
84
+ _: 2
85
+ }, 1032, ["column-key", "label", "prop", "min-width", "align"]);
86
+ }), 128))
84
87
  ])
85
88
  ]),
86
- _: 3 /* FORWARDED */
87
- }, 8 /* PROPS */, ["data", "row-key"]),
89
+ _: 3
90
+ }, 8, ["data", "row-key"]),
88
91
  vue.createElementVNode("div", {
89
- class: vue.normalizeClass($setup.ns.be('card', 'footer'))
92
+ class: vue.normalizeClass($setup.ns.be("card", "footer"))
90
93
  }, [
91
94
  vue.createElementVNode("div", _hoisted_1, [
92
95
  vue.createElementVNode("div", _hoisted_2, [
93
- vue.createTextVNode(" "),
94
- vue.createElementVNode("b", null, vue.toDisplayString($setup.dataTable.totalRecCount), 1 /* TEXT */),
95
- vue.createTextVNode("条记录 | 当前第"),
96
- vue.createElementVNode("b", null, vue.toDisplayString($setup.dataTable.pageNum), 1 /* TEXT */),
97
- vue.createTextVNode(" ")
96
+ _cache[1] || (_cache[1] = vue.createTextVNode(" \u5171", -1)),
97
+ vue.createElementVNode("b", null, vue.toDisplayString($setup.dataTable.totalRecCount), 1),
98
+ _cache[2] || (_cache[2] = vue.createTextVNode("\u6761\u8BB0\u5F55 | \u5F53\u524D\u7B2C", -1)),
99
+ vue.createElementVNode("b", null, vue.toDisplayString($setup.dataTable.pageNum), 1),
100
+ _cache[3] || (_cache[3] = vue.createTextVNode("\u9875 ", -1))
98
101
  ])
99
102
  ]),
100
103
  vue.createElementVNode("div", _hoisted_3, [
101
104
  vue.createVNode(_component_el_pagination, {
102
105
  "hide-on-single-page": true,
103
106
  currentPage: $setup.dataTable.pageNum,
104
- onCurrentChange: _cache[0] || (_cache[0] = $event => ($setup.dataTable.pageTo($event))),
107
+ onCurrentChange: _cache[0] || (_cache[0] = ($event) => $setup.dataTable.pageTo($event)),
105
108
  "page-size": $setup.dataTable.pageSize,
106
109
  background: "",
107
110
  layout: "prev, pager, next, jumper",
108
111
  total: $setup.dataTable.totalRecCount
109
- }, null, 8 /* PROPS */, ["currentPage", "page-size", "total"])
112
+ }, null, 8, ["currentPage", "page-size", "total"])
110
113
  ])
111
- ], 2 /* CLASS */)
114
+ ], 2)
112
115
  ]),
113
- _: 2 /* DYNAMIC */
116
+ _: 2
114
117
  }, [
115
- (_ctx.$slots.header)
116
- ? {
117
- name: "header",
118
- fn: vue.withCtx(() => [
119
- vue.renderSlot(_ctx.$slots, "header", { dataTable: $setup.dataTable })
120
- ]),
121
- key: "0"
122
- }
123
- : undefined
124
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["class"])), [
118
+ _ctx.$slots.header ? {
119
+ name: "header",
120
+ fn: vue.withCtx(() => [
121
+ vue.renderSlot(_ctx.$slots, "header", { dataTable: $setup.dataTable })
122
+ ]),
123
+ key: "0"
124
+ } : void 0
125
+ ]), 1032, ["class"])), [
125
126
  [_directive_loading, !$setup.dataTable.ready]
126
- ])
127
+ ]);
127
128
  }
128
- var dataTableCard = /*#__PURE__*/_pluginVue_exportHelper["default"](_sfc_main, [['render',_sfc_render],['__file',"data-table-card.vue"]]);
129
+ var dataTableCard = /* @__PURE__ */ _pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "data-table-card.vue"]]);
129
130
 
130
131
  exports["default"] = dataTableCard;