cnhis-design-vue 3.1.36 → 3.1.37-beta.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.
- package/es/components/big-table/src/BigTable.vue.d.ts +9 -3
- package/es/components/big-table/src/BigTable.vue2.js +5 -8
- package/es/components/big-table/src/components/edit-form/edit-time.js +6 -1
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +22 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +22 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +11 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +11 -0
- package/es/components/form-render/index.d.ts +11 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +12 -1
- package/es/components/form-render/src/FormRender.vue.js +11 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +11 -0
- package/es/components/form-render/src/components/renderer/formItem.js +16 -13
- package/es/components/form-render/src/constants/index.d.ts +12 -0
- package/es/components/form-render/src/constants/index.js +14 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +0 -4
- package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +7 -0
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +84 -0
- package/es/components/form-render/src/types/index.d.ts +17 -0
- package/es/components/iho-table/index.d.ts +9 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +9 -0
- package/es/components/iho-table/src/IhoTable.vue.js +9 -4
- package/es/components/iho-table/src/constants/index.js +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.js +15 -21
- package/es/components/iho-table/src/types/index.d.ts +2 -2
- package/es/components/iho-table/src/utils/index.d.ts +3 -2
- package/es/components/iho-table/src/utils/index.js +5 -2
- package/es/components/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +11 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +11 -0
- package/package.json +2 -2
- package/es/shared/utils/clickoutside.d.ts +0 -18
- package/es/shared/utils/clickoutside.js +0 -52
- package/es/shared/utils/state.d.ts +0 -29
- package/es/shared/utils/state.js +0 -44
package/es/shared/utils/state.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ref, onBeforeUpdate, computed, unref } from 'vue';
|
|
2
|
-
|
|
3
|
-
function useState(initValue) {
|
|
4
|
-
const state = ref(initValue);
|
|
5
|
-
const getState = (isRef) => isRef ? state : unref(state);
|
|
6
|
-
return [getState, (val) => state.value = val];
|
|
7
|
-
}
|
|
8
|
-
function useRef() {
|
|
9
|
-
return useState(null)[0];
|
|
10
|
-
}
|
|
11
|
-
function useRefs() {
|
|
12
|
-
const itemRefs = /* @__PURE__ */ new Set();
|
|
13
|
-
const setItemRef = (el) => el && itemRefs.add(el);
|
|
14
|
-
onBeforeUpdate(() => itemRefs.clear());
|
|
15
|
-
return [itemRefs, setItemRef];
|
|
16
|
-
}
|
|
17
|
-
function useRefsArray() {
|
|
18
|
-
let itemRefs = [];
|
|
19
|
-
const setItemRef = (el) => {
|
|
20
|
-
itemRefs.push(el);
|
|
21
|
-
};
|
|
22
|
-
onBeforeUpdate(() => {
|
|
23
|
-
itemRefs = [];
|
|
24
|
-
});
|
|
25
|
-
return [itemRefs, setItemRef];
|
|
26
|
-
}
|
|
27
|
-
function isWritableComputedOptions(arg) {
|
|
28
|
-
return typeof arg === "object" && Reflect.has(arg || {}, "set");
|
|
29
|
-
}
|
|
30
|
-
function useComputed(arg) {
|
|
31
|
-
const data = isWritableComputedOptions(arg) ? computed(arg) : computed(arg);
|
|
32
|
-
const getData = (isRef) => isRef ? data : data.value;
|
|
33
|
-
if (!isWritableComputedOptions(arg)) {
|
|
34
|
-
return getData;
|
|
35
|
-
}
|
|
36
|
-
return [getData, (val) => data.value = val];
|
|
37
|
-
}
|
|
38
|
-
function getRefs(obj) {
|
|
39
|
-
const result = {};
|
|
40
|
-
Object.entries(obj).forEach(([k, fn]) => result[k] = fn(true));
|
|
41
|
-
return result;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { getRefs, useComputed, useRef, useRefs, useRefsArray, useState };
|