cnhis-design-vue 3.1.37-beta.0 → 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/README.md +123 -123
- package/es/components/big-table/src/BigTable.vue.d.ts +9 -3
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- 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/shortcut-setter/index.d.ts +11 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +11 -0
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -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
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface Binding {
|
|
2
|
-
expression: any;
|
|
3
|
-
value?: any;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* v-clickoutside
|
|
7
|
-
* @desc 点击元素外面才会触发的事件
|
|
8
|
-
* @example
|
|
9
|
-
* ```vue
|
|
10
|
-
* <div v-element-clickoutside="handleClose">
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
declare const _default: {
|
|
14
|
-
mounted(el: any, binding: Binding, vnode: any): void;
|
|
15
|
-
update(el: any, binding: Binding, vnode: any): void;
|
|
16
|
-
unmounted(el: any): void;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
const nodeList = [];
|
|
2
|
-
const ctx = "@@clickoutsideContext";
|
|
3
|
-
let startClick;
|
|
4
|
-
let seed = 0;
|
|
5
|
-
document.addEventListener("mousedown", (e) => startClick = e, false);
|
|
6
|
-
document.addEventListener(
|
|
7
|
-
"mouseup",
|
|
8
|
-
(e) => {
|
|
9
|
-
nodeList.forEach((node) => node[ctx].documentHandler(e, startClick));
|
|
10
|
-
},
|
|
11
|
-
false
|
|
12
|
-
);
|
|
13
|
-
function createDocumentHandler(el, binding, vnode) {
|
|
14
|
-
return function(mouseup = {}, mousedown = {}) {
|
|
15
|
-
if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target)))
|
|
16
|
-
return;
|
|
17
|
-
if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {
|
|
18
|
-
vnode.context[el[ctx].methodName]();
|
|
19
|
-
} else {
|
|
20
|
-
el[ctx].bindingFn && el[ctx].bindingFn();
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
var clickoutside = {
|
|
25
|
-
mounted(el, binding, vnode) {
|
|
26
|
-
nodeList.push(el);
|
|
27
|
-
const id = seed++;
|
|
28
|
-
el[ctx] = {
|
|
29
|
-
id,
|
|
30
|
-
documentHandler: createDocumentHandler(el, binding, vnode),
|
|
31
|
-
methodName: binding.expression,
|
|
32
|
-
bindingFn: binding.value
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
update(el, binding, vnode) {
|
|
36
|
-
el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);
|
|
37
|
-
el[ctx].methodName = binding.expression;
|
|
38
|
-
el[ctx].bindingFn = binding.value;
|
|
39
|
-
},
|
|
40
|
-
unmounted(el) {
|
|
41
|
-
let len = nodeList.length;
|
|
42
|
-
for (let i = 0; i < len; i++) {
|
|
43
|
-
if (nodeList[i][ctx].id === el[ctx].id) {
|
|
44
|
-
nodeList.splice(i, 1);
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
delete el[ctx];
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { clickoutside as default };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Ref, UnwrapRef, WritableComputedOptions, WritableComputedRef, ComputedRef } from 'vue';
|
|
2
|
-
interface GetState<T> {
|
|
3
|
-
(isRef: true): Ref<UnwrapRef<T>>;
|
|
4
|
-
(isRef?: false): UnwrapRef<T>;
|
|
5
|
-
}
|
|
6
|
-
export declare function useState<T>(initValue?: T): [GetState<T>, (val: UnwrapRef<T>) => UnwrapRef<T>];
|
|
7
|
-
export declare function useRef<T>(): GetState<T | null>;
|
|
8
|
-
/**
|
|
9
|
-
* v-for的ref引用
|
|
10
|
-
*/
|
|
11
|
-
export declare function useRefs<T>(): [Set<T>, (el: T) => void];
|
|
12
|
-
/**
|
|
13
|
-
* v-for的ref引用
|
|
14
|
-
* @return 数组
|
|
15
|
-
*/
|
|
16
|
-
export declare function useRefsArray<T>(): [T[], (el: T) => void];
|
|
17
|
-
interface GetComputed<T, R> {
|
|
18
|
-
(isRef: true): R;
|
|
19
|
-
(isRef: false): T;
|
|
20
|
-
(): T;
|
|
21
|
-
}
|
|
22
|
-
export declare function useComputed<T>(getter: WritableComputedOptions<T>['get']): GetComputed<T, ComputedRef<T>>;
|
|
23
|
-
export declare function useComputed<T>(options: WritableComputedOptions<T>): [GetComputed<T, WritableComputedRef<T>>, (val: T) => void];
|
|
24
|
-
/**
|
|
25
|
-
* 返回{ [key]: Ref }
|
|
26
|
-
* @params obj { [变量名]: useState或useComputed返回的getter函数 }
|
|
27
|
-
*/
|
|
28
|
-
export declare function getRefs(obj: Record<string, GetState<any> | GetComputed<any, any>>): Record<string, Ref<any>>;
|
|
29
|
-
export {};
|
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 };
|