cnhis-design-vue 3.1.22-beta.5 → 3.1.22-beta.6
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.
- package/es/components/fabric-chart/index.d.ts +1 -0
- package/es/components/fabric-chart/src/FabricChart.js +3 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useCenter2.js +15 -3
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft2.js +7 -5
- package/es/components/fabric-chart/src/interface.d.ts +2 -0
- package/es/components/iho-table/index.d.ts +453 -348
- package/es/components/iho-table/index2.js +1 -0
- package/es/components/iho-table/src/IhoTable.js +23 -8
- package/es/components/iho-table/src/IhoTable.vue.d.ts +454 -348
- package/es/components/iho-table/src/components/IhoTableColumn.d.ts +2 -2
- package/es/components/iho-table/src/components/IhoTableColumn.js +22 -3
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -1
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +3 -2
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +59 -59
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +59 -59
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.js +5 -0
- package/es/components/iho-table/src/types/index.d.ts +4 -2
- package/es/components/iho-table/src/types/pluginType.d.ts +63 -62
- package/package.json +2 -2
- package/es/components/form-render/src/components/index.d.ts +0 -0
- package/es/components/form-render/src/components/index.js +0 -1
|
@@ -2,6 +2,7 @@ import { COMPONENT_NAMESPACE } from '../../shared/global/variable2.js';
|
|
|
2
2
|
import { safeComponentRegister } from '../../shared/utils/index2.js';
|
|
3
3
|
import script from './src/IhoTable.js';
|
|
4
4
|
import * as index from './src/plugins/index2.js';
|
|
5
|
+
import 'vue';
|
|
5
6
|
import 'lodash-es';
|
|
6
7
|
import './src/constants/index2.js';
|
|
7
8
|
import '../../shared/utils/tapable/SyncHook.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent, provide, ref, computed, resolveComponent, openBlock, createElementBlock, createVNode, mergeProps, unref, withCtx, Fragment, renderList, createBlock } from 'vue';
|
|
2
2
|
import { watchDebounced } from '@vueuse/shared';
|
|
3
|
+
import { isArray } from 'lodash-es';
|
|
3
4
|
import { InjectionIhoTableEmits, InjectionIhoTableConfig } from './constants/index2.js';
|
|
4
5
|
import { createTableHooks, applyTableEventHooks, applyTableConfigHooks, applyTableFieldHooks } from './hooks/tapHooks/index2.js';
|
|
5
|
-
import '
|
|
6
|
-
import IhoTableColumn from './components/IhoTableColumn.js';
|
|
6
|
+
import ColumnComponent from './components/IhoTableColumn.js';
|
|
7
7
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
|
|
8
8
|
|
|
9
9
|
const _hoisted_1 = { class: "iho-table" };
|
|
@@ -21,28 +21,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
setup(__props, { emit: emits }) {
|
|
22
22
|
const props = __props;
|
|
23
23
|
provide(InjectionIhoTableEmits, emits);
|
|
24
|
+
const vxeTableRef = ref();
|
|
24
25
|
const hooks = createTableHooks();
|
|
25
26
|
const configRef = ref({});
|
|
26
27
|
provide(InjectionIhoTableConfig, configRef);
|
|
28
|
+
function updateConfigRef(config) {
|
|
29
|
+
if (!config)
|
|
30
|
+
return;
|
|
31
|
+
configRef.value = applyTableConfigHooks(hooks, config);
|
|
32
|
+
}
|
|
27
33
|
const fieldListRef = ref([]);
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
function updateFieldListRef(fieldList, config) {
|
|
35
|
+
if (!isArray(fieldList) || !config)
|
|
36
|
+
return;
|
|
37
|
+
fieldListRef.value = applyTableFieldHooks(hooks, fieldList, config);
|
|
38
|
+
}
|
|
39
|
+
const eventHookHandler = applyTableEventHooks(hooks, configRef, vxeTableRef);
|
|
40
|
+
const bindProperties = computed(() => ({ ...configRef.value, ...eventHookHandler }));
|
|
30
41
|
watchDebounced(() => props.tableConfig, (config) => {
|
|
31
|
-
|
|
42
|
+
updateConfigRef(config);
|
|
43
|
+
updateFieldListRef(props.fieldList);
|
|
32
44
|
}, { immediate: true, flush: "post", deep: true, debounce: 50 });
|
|
33
45
|
watchDebounced(() => props.fieldList, (fieldList) => {
|
|
34
|
-
|
|
46
|
+
updateFieldListRef(fieldList, configRef.value);
|
|
35
47
|
}, { immediate: true, flush: "post", deep: true, debounce: 50 });
|
|
36
48
|
return (_ctx, _cache) => {
|
|
37
49
|
const _component_vxe_table = resolveComponent("vxe-table");
|
|
38
50
|
return openBlock(), createElementBlock("section", _hoisted_1, [
|
|
39
|
-
createVNode(_component_vxe_table, mergeProps(
|
|
51
|
+
createVNode(_component_vxe_table, mergeProps({
|
|
52
|
+
ref_key: "vxeTableRef",
|
|
53
|
+
ref: vxeTableRef
|
|
54
|
+
}, unref(bindProperties), {
|
|
40
55
|
eventHookHandler: "",
|
|
41
56
|
data: __props.tableData
|
|
42
57
|
}), {
|
|
43
58
|
default: withCtx(() => [
|
|
44
59
|
(openBlock(true), createElementBlock(Fragment, null, renderList(fieldListRef.value, (field) => {
|
|
45
|
-
return openBlock(), createBlock(unref(
|
|
60
|
+
return openBlock(), createBlock(unref(ColumnComponent), {
|
|
46
61
|
key: field.field,
|
|
47
62
|
field
|
|
48
63
|
}, null, 8, ["field"]);
|