@gct-paas/v-ben 0.1.6-dev.9 → 6.0.0-dev.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.
- package/README.md +127 -0
- package/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +2 -1
- package/es/_virtual/_rolldown/runtime.mjs +13 -0
- package/es/components/index.mjs +1 -0
- package/es/components/v-ben-button/src/BasicButton.vue_vue_type_script_setup_true_lang.mjs +0 -1
- package/es/components/v-ben-button/src/PopConfirmButton.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/v-ben-table/index.d.ts +2 -0
- package/es/components/v-ben-table/index.mjs +1 -0
- package/es/components/v-ben-table/src/BasicTable.vue.d.ts +49 -25
- package/es/components/v-ben-table/src/BasicTable.vue.mjs +34 -16
- package/es/components/v-ben-table/src/BasicTable.vue_vue_type_script_lang.mjs +113 -17
- package/es/components/v-ben-table/src/BasicTable.vue_vue_type_style_index_0_lang.css +81 -0
- package/es/components/v-ben-table/src/components/TableAction.vue_vue_type_script_setup_true_lang.mjs +4 -10
- package/es/components/v-ben-table/src/components/TableAction.vue_vue_type_style_index_0_lang.css +13 -12
- package/es/components/v-ben-table/src/components/TableActionAuto.vue_vue_type_script_setup_true_lang.mjs +3 -3
- package/es/components/v-ben-table/src/components/TableActionAuto.vue_vue_type_style_index_0_lang.css +13 -12
- package/es/components/v-ben-table/src/components/TableHeader.vue.d.ts +2 -0
- package/es/components/v-ben-table/src/components/TableHeader.vue.mjs +13 -0
- package/es/components/v-ben-table/src/components/TableHeader.vue_vue_type_script_lang.mjs +5 -0
- package/es/components/v-ben-table/src/components/TableHeader.vue_vue_type_style_index_0_lang.css +9 -0
- package/es/components/v-ben-table/src/const.d.ts +12 -0
- package/es/components/v-ben-table/src/const.mjs +14 -0
- package/es/components/v-ben-table/src/hooks/useColumns.d.ts +8 -0
- package/es/components/v-ben-table/src/hooks/useColumns.mjs +180 -0
- package/es/components/v-ben-table/src/hooks/usePagination.d.ts +10 -0
- package/es/components/v-ben-table/src/hooks/usePagination.mjs +63 -0
- package/es/components/v-ben-table/src/hooks/useTable.d.ts +6 -0
- package/es/components/v-ben-table/src/hooks/useTable.mjs +21 -0
- package/es/components/v-ben-table/src/hooks/useTableExpand.d.ts +9 -0
- package/es/components/v-ben-table/src/hooks/useTableExpand.mjs +62 -0
- package/es/components/v-ben-table/src/hooks/useTableHeader.d.ts +4 -0
- package/es/components/v-ben-table/src/hooks/useTableHeader.mjs +11 -0
- package/es/components/v-ben-table/src/hooks/useTableRowDrag.d.ts +7 -0
- package/es/components/v-ben-table/src/hooks/useTableRowDrag.mjs +148 -0
- package/es/components/v-ben-table/src/hooks/useTableScroll.d.ts +17 -0
- package/es/components/v-ben-table/src/hooks/useTableScroll.mjs +126 -0
- package/es/components/v-ben-table/src/props.d.ts +8 -1
- package/es/components/v-ben-table/src/props.mjs +46 -1
- package/es/components/v-ben-table/src/types/pagination.d.ts +1 -1
- package/es/components/v-ben-table/src/types/table.d.ts +16 -0
- package/es/components/v-ben-table/src/utils/dom-utils.d.ts +13 -0
- package/es/components/v-ben-table/src/utils/dom-utils.mjs +36 -0
- package/es/components/v-ben-table/src/utils/tsxHelper.d.ts +13 -0
- package/es/components/v-ben-table/src/utils/tsxHelper.mjs +17 -0
- package/es/hooks/useDesign.mjs +10 -0
- package/es/hooks/useRefs.d.ts +5 -0
- package/es/hooks/useRefs.mjs +17 -0
- package/es/index.d.ts +2 -0
- package/es/index.mjs +4 -1
- package/es/locale/auto-register.d.ts +2 -0
- package/es/locale/auto-register.mjs +13 -0
- package/es/locale/sys/component.d.ts +6 -0
- package/es/locale/sys/component.mjs +6 -0
- package/es/locale/sys.mjs +9 -0
- package/es/setup-app.d.ts +2 -0
- package/es/setup-app.mjs +7 -0
- package/es/types/sortablejs.d.ts +24 -0
- package/package.json +8 -8
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Slots } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* @description: Get slot to prevent empty error
|
|
4
|
+
*/
|
|
5
|
+
export declare function getSlot(slots: Slots, slot?: string, data?: IObject): import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>[] | null;
|
|
8
|
+
/**
|
|
9
|
+
* extends slots
|
|
10
|
+
* @param slots
|
|
11
|
+
* @param excludeKeys
|
|
12
|
+
*/
|
|
13
|
+
export declare function extendSlots(slots: Slots, excludeKeys?: string[]): IObject;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isFunction } from "../../../../utils/is.mjs";
|
|
2
|
+
//#region src/components/v-ben-table/src/utils/tsxHelper.tsx
|
|
3
|
+
/**
|
|
4
|
+
* @description: Get slot to prevent empty error
|
|
5
|
+
*/
|
|
6
|
+
function getSlot(slots, slot = "default", data) {
|
|
7
|
+
if (!slots || !Reflect.has(slots, slot)) return null;
|
|
8
|
+
if (!isFunction(slots[slot])) {
|
|
9
|
+
console.error(`${slot} is not a function!`);
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const slotFn = slots[slot];
|
|
13
|
+
if (!slotFn) return null;
|
|
14
|
+
return slotFn(data);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { getSlot };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { onBeforeUpdate, shallowRef } from "vue";
|
|
2
|
+
//#region src/hooks/useRefs.ts
|
|
3
|
+
function useRefs() {
|
|
4
|
+
const refs = shallowRef([]);
|
|
5
|
+
onBeforeUpdate(() => {
|
|
6
|
+
refs.value = [];
|
|
7
|
+
});
|
|
8
|
+
const setRefs = (index) => (el) => {
|
|
9
|
+
refs.value[index] = el;
|
|
10
|
+
};
|
|
11
|
+
return {
|
|
12
|
+
refs,
|
|
13
|
+
setRefs
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { useRefs };
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -2,11 +2,14 @@ import { is, isArray, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyStr,
|
|
|
2
2
|
import BasicTable_default from "./components/v-ben-table/src/BasicTable.vue.mjs";
|
|
3
3
|
import TableAction_default from "./components/v-ben-table/src/components/TableAction.vue.mjs";
|
|
4
4
|
import TableActionAuto_default from "./components/v-ben-table/src/components/TableActionAuto.vue.mjs";
|
|
5
|
+
import { useTable } from "./components/v-ben-table/src/hooks/useTable.mjs";
|
|
5
6
|
import custom_button_default from "./components/v-ben-button/src/custom-button.vue.mjs";
|
|
6
7
|
import { Button, PopConfirmButton } from "./components/v-ben-button/index.mjs";
|
|
7
8
|
import { Dropdown } from "./components/v-ben-dropdown/index.mjs";
|
|
8
9
|
import "./components/index.mjs";
|
|
10
|
+
import { useRefs } from "./hooks/useRefs.mjs";
|
|
11
|
+
import { vBenSetupApp } from "./setup-app.mjs";
|
|
9
12
|
//#region src/index.ts
|
|
10
13
|
function run() {}
|
|
11
14
|
//#endregion
|
|
12
|
-
export { BasicTable_default as BasicTable, Button, custom_button_default as CustomButton, Dropdown, PopConfirmButton, TableAction_default as TableAction, TableActionAuto_default as TableActionAuto, is, isArray, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyStr, isFunction, isMap, isNull, isNullAndUnDef, isNullOrUnDef, isNumber, isObject, isPromise, isRegExp, isString, isUnDef, isUrl, isWindow, run };
|
|
15
|
+
export { BasicTable_default as BasicTable, Button, custom_button_default as CustomButton, Dropdown, PopConfirmButton, TableAction_default as TableAction, TableActionAuto_default as TableActionAuto, is, isArray, isBoolean, isDate, isDef, isElement, isEmpty, isEmptyStr, isFunction, isMap, isNull, isNullAndUnDef, isNullOrUnDef, isNumber, isObject, isPromise, isRegExp, isString, isUnDef, isUrl, isWindow, run, useRefs, useTable, vBenSetupApp };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { component_exports } from "./sys/component.mjs";
|
|
2
|
+
import { sys_exports } from "./sys.mjs";
|
|
3
|
+
//#region src/locale/auto-register.ts
|
|
4
|
+
var localeModules = /* @__PURE__ */ Object.assign({
|
|
5
|
+
"./sys/component.ts": component_exports,
|
|
6
|
+
"./sys.ts": sys_exports
|
|
7
|
+
});
|
|
8
|
+
/** 注册 v-ben 包的 locale 多语言资源 */
|
|
9
|
+
function registerVBenLocale() {
|
|
10
|
+
_gct.i18nUtil.autoRegisterLocale(localeModules);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { registerVBenLocale };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys/component.ts
|
|
3
|
+
var component_exports = /* @__PURE__ */ __exportAll({ default: () => component_default });
|
|
4
|
+
var component_default = { table: { index: "序号" } };
|
|
5
|
+
//#endregion
|
|
6
|
+
export { component_exports };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/locale/sys.ts
|
|
3
|
+
var sys_exports = /* @__PURE__ */ __exportAll({ default: () => sys_default });
|
|
4
|
+
var sys_default = {
|
|
5
|
+
okText: "确认",
|
|
6
|
+
cancelText: "取消"
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { sys_exports };
|
package/es/setup-app.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare module 'sortablejs' {
|
|
2
|
+
interface SortableEvent {
|
|
3
|
+
item: HTMLElement;
|
|
4
|
+
related?: HTMLElement;
|
|
5
|
+
willInsertAfter?: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface SortableOptions {
|
|
9
|
+
group?: string;
|
|
10
|
+
animation?: number;
|
|
11
|
+
handle?: string;
|
|
12
|
+
dataIdAttr?: string;
|
|
13
|
+
filter?: string;
|
|
14
|
+
onStart?: (evt: SortableEvent) => void;
|
|
15
|
+
onMove?: (evt: SortableEvent) => boolean;
|
|
16
|
+
onEnd?: () => void | Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default class Sortable {
|
|
20
|
+
static create(el: HTMLElement, options?: SortableOptions): Sortable;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
toArray(): string[];
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/v-ben",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "6.0.0-dev.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台历史 v-ben 内容",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -32,23 +32,23 @@
|
|
|
32
32
|
"author": "gct",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons-vue": "^6.1.0",
|
|
35
|
-
"@gct-paas/api": "^0.
|
|
35
|
+
"@gct-paas/api": "^6.0.0-dev.2",
|
|
36
36
|
"@gct-paas/platform-icons": "^0.0.2",
|
|
37
37
|
"@icon-park/vue-next": "^1.4.2",
|
|
38
38
|
"@vueuse/core": "^14.1.0",
|
|
39
|
-
"ant-design-vue": "
|
|
39
|
+
"ant-design-vue": "npm:@gct-paas/ant-design-vue@3.2.21",
|
|
40
40
|
"lodash-es": "^4.17.23",
|
|
41
41
|
"sortablejs": "^1.15.7",
|
|
42
42
|
"vue": "^3.5.30",
|
|
43
43
|
"vue-types": "^6.0.0",
|
|
44
|
-
"@gct-paas/core": "0.
|
|
45
|
-
"@gct-paas/scss": "0.
|
|
44
|
+
"@gct-paas/core": "6.0.0-dev.2",
|
|
45
|
+
"@gct-paas/scss": "6.0.0-dev.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@gct-paas/api": "^0.
|
|
48
|
+
"@gct-paas/api": "^6.0.0-dev.2",
|
|
49
49
|
"vue": ">=3",
|
|
50
|
-
"@gct-paas/core": "0.
|
|
51
|
-
"@gct-paas/scss": "0.
|
|
50
|
+
"@gct-paas/core": "6.0.0-dev.2",
|
|
51
|
+
"@gct-paas/scss": "6.0.0-dev.2"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
|