@wg-song/bare 0.1.0 → 0.1.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/AGENTS.md +21 -1
- package/README.md +271 -56
- package/examples/role-management/RoleDetail.vue +41 -0
- package/examples/role-management/index.vue +115 -0
- package/examples/user-management/index.vue +87 -0
- package/index.cjs +8 -4
- package/index.css +1 -1
- package/index.mjs +1294 -1264
- package/index.umd.js +8 -4
- package/package.json +13 -12
- package/types.d.ts +71 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wg-song/bare",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Vue3 业务组件库 - Form / Table / Feedback 等多层结构支持",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.umd.js",
|
|
@@ -16,9 +16,18 @@
|
|
|
16
16
|
"vue": "^3.0.0",
|
|
17
17
|
"ant-design-vue": "^4.0.0",
|
|
18
18
|
"vxe-table": "^4.0.0",
|
|
19
|
-
"vxe-pc-ui": "^4.0.0",
|
|
20
19
|
"@ant-design/icons-vue": "^7.0.0",
|
|
21
|
-
"vue-router": "^4.0.0"
|
|
20
|
+
"vue-router": "^4.0.0 || ^5.0.0"
|
|
21
|
+
},
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./types.d.ts",
|
|
25
|
+
"import": "./index.mjs",
|
|
26
|
+
"require": "./index.cjs",
|
|
27
|
+
"default": "./index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./index.css": "./index.css",
|
|
30
|
+
"./index.umd.js": "./index.umd.js"
|
|
22
31
|
},
|
|
23
32
|
"keywords": [
|
|
24
33
|
"vue3",
|
|
@@ -34,13 +43,5 @@
|
|
|
34
43
|
"type": "git",
|
|
35
44
|
"url": ""
|
|
36
45
|
},
|
|
37
|
-
"types": "./types.d.ts"
|
|
38
|
-
"exports": {
|
|
39
|
-
".": {
|
|
40
|
-
"types": "./types.d.ts",
|
|
41
|
-
"import": "./index.mjs",
|
|
42
|
-
"require": "./index.cjs",
|
|
43
|
-
"default": "./index.mjs"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
+
"types": "./types.d.ts"
|
|
46
47
|
}
|
package/types.d.ts
CHANGED
|
@@ -2523,6 +2523,7 @@ interface ModalContext {
|
|
|
2523
2523
|
cancel: () => void;
|
|
2524
2524
|
}
|
|
2525
2525
|
interface CommonModalProps {
|
|
2526
|
+
open?: boolean;
|
|
2526
2527
|
title?: string;
|
|
2527
2528
|
width?: number | string;
|
|
2528
2529
|
maskClosable?: boolean;
|
|
@@ -2542,18 +2543,18 @@ interface DrawerProps extends CommonModalProps {
|
|
|
2542
2543
|
showFooter?: boolean;
|
|
2543
2544
|
}
|
|
2544
2545
|
|
|
2545
|
-
declare var
|
|
2546
|
-
declare var
|
|
2547
|
-
declare var
|
|
2546
|
+
declare var __VLS_13$1: {};
|
|
2547
|
+
declare var __VLS_15: {};
|
|
2548
|
+
declare var __VLS_18: {
|
|
2548
2549
|
close: (result?: any) => void;
|
|
2549
2550
|
cancel: () => void;
|
|
2550
2551
|
};
|
|
2551
2552
|
type __VLS_Slots$k = {} & {
|
|
2552
|
-
title?: (props: typeof
|
|
2553
|
+
title?: (props: typeof __VLS_13$1) => any;
|
|
2553
2554
|
} & {
|
|
2554
|
-
default?: (props: typeof
|
|
2555
|
+
default?: (props: typeof __VLS_15) => any;
|
|
2555
2556
|
} & {
|
|
2556
|
-
footer?: (props: typeof
|
|
2557
|
+
footer?: (props: typeof __VLS_18) => any;
|
|
2557
2558
|
};
|
|
2558
2559
|
declare const __VLS_base$k: vue.DefineComponent<ModalProps, {
|
|
2559
2560
|
open: () => void;
|
|
@@ -2561,14 +2562,17 @@ declare const __VLS_base$k: vue.DefineComponent<ModalProps, {
|
|
|
2561
2562
|
cancel: () => void;
|
|
2562
2563
|
visible: vue.Ref<boolean, boolean>;
|
|
2563
2564
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
2565
|
+
"update:open": (value: boolean) => any;
|
|
2564
2566
|
cancel: () => any;
|
|
2565
2567
|
ok: (result?: any) => any;
|
|
2566
2568
|
}, string, vue.PublicProps, Readonly<ModalProps> & Readonly<{
|
|
2569
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
2567
2570
|
onCancel?: (() => any) | undefined;
|
|
2568
2571
|
onOk?: ((result?: any) => any) | undefined;
|
|
2569
2572
|
}>, {
|
|
2570
2573
|
title: string;
|
|
2571
2574
|
width: number | string;
|
|
2575
|
+
open: boolean;
|
|
2572
2576
|
maskClosable: boolean;
|
|
2573
2577
|
destroyOnClose: boolean;
|
|
2574
2578
|
okText: string;
|
|
@@ -2586,18 +2590,18 @@ type __VLS_WithSlots$k<T, S> = T & {
|
|
|
2586
2590
|
};
|
|
2587
2591
|
};
|
|
2588
2592
|
|
|
2589
|
-
declare var
|
|
2590
|
-
declare var
|
|
2591
|
-
declare var
|
|
2593
|
+
declare var __VLS_12$3: {};
|
|
2594
|
+
declare var __VLS_14$1: {};
|
|
2595
|
+
declare var __VLS_17: {
|
|
2592
2596
|
close: (result?: any) => void;
|
|
2593
2597
|
cancel: () => void;
|
|
2594
2598
|
};
|
|
2595
2599
|
type __VLS_Slots$j = {} & {
|
|
2596
|
-
title?: (props: typeof
|
|
2600
|
+
title?: (props: typeof __VLS_12$3) => any;
|
|
2597
2601
|
} & {
|
|
2598
|
-
default?: (props: typeof
|
|
2602
|
+
default?: (props: typeof __VLS_14$1) => any;
|
|
2599
2603
|
} & {
|
|
2600
|
-
footer?: (props: typeof
|
|
2604
|
+
footer?: (props: typeof __VLS_17) => any;
|
|
2601
2605
|
};
|
|
2602
2606
|
declare const __VLS_base$j: vue.DefineComponent<DrawerProps, {
|
|
2603
2607
|
open: () => void;
|
|
@@ -2605,15 +2609,18 @@ declare const __VLS_base$j: vue.DefineComponent<DrawerProps, {
|
|
|
2605
2609
|
cancel: () => void;
|
|
2606
2610
|
visible: vue.Ref<boolean, boolean>;
|
|
2607
2611
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
2612
|
+
"update:open": (value: boolean) => any;
|
|
2608
2613
|
cancel: () => any;
|
|
2609
2614
|
ok: (result?: any) => any;
|
|
2610
2615
|
}, string, vue.PublicProps, Readonly<DrawerProps> & Readonly<{
|
|
2616
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
2611
2617
|
onCancel?: (() => any) | undefined;
|
|
2612
2618
|
onOk?: ((result?: any) => any) | undefined;
|
|
2613
2619
|
}>, {
|
|
2614
2620
|
title: string;
|
|
2615
2621
|
width: number | string;
|
|
2616
2622
|
showFooter: boolean;
|
|
2623
|
+
open: boolean;
|
|
2617
2624
|
maskClosable: boolean;
|
|
2618
2625
|
destroyOnClose: boolean;
|
|
2619
2626
|
placement: "top" | "right" | "bottom" | "left";
|
|
@@ -3683,6 +3690,57 @@ declare function useTableGrouping<T extends object>(sourceRows: Ref<T[]>, option
|
|
|
3683
3690
|
groupingPending: Ref<boolean, boolean>;
|
|
3684
3691
|
};
|
|
3685
3692
|
|
|
3693
|
+
interface PageShellProps<T = any> {
|
|
3694
|
+
/** 搜索字段 schemas;simple 模式下可传空数组 */
|
|
3695
|
+
searchSchemas?: any[];
|
|
3696
|
+
/** 列表数据加载器 */
|
|
3697
|
+
loader: (args: PageListLoaderArgs) => Promise<PageListFetchResult<T>>;
|
|
3698
|
+
/** 工具栏操作项,支持数组或函数 */
|
|
3699
|
+
toolbarActions?: ActionItem[] | ((ctx: PageListToolbarContext<T>) => ActionItem[]);
|
|
3700
|
+
/** 每页条数 */
|
|
3701
|
+
pageSize?: number;
|
|
3702
|
+
/** 可选每页条数 */
|
|
3703
|
+
pageSizes?: number[];
|
|
3704
|
+
/** 查询按钮文本 */
|
|
3705
|
+
searchText?: string;
|
|
3706
|
+
/** SearchForm 一行栅格列数 */
|
|
3707
|
+
gridColumns?: number;
|
|
3708
|
+
/** 是否显示「展开」高级区按钮 */
|
|
3709
|
+
showAdvanced?: boolean;
|
|
3710
|
+
/** 是否允许开启跨页勾选记忆 */
|
|
3711
|
+
showCheckboxReserve?: boolean;
|
|
3712
|
+
/** TableSettingsBar 中是否显示「列显示与顺序」按钮 */
|
|
3713
|
+
showColumnSettings?: boolean;
|
|
3714
|
+
/** 打开列设置面板回调 */
|
|
3715
|
+
onOpenColumnSettings?: () => void;
|
|
3716
|
+
/** 简易模式(关键词搜索 + 单行工具栏) */
|
|
3717
|
+
simple?: boolean;
|
|
3718
|
+
/** 简易搜索占位文案 */
|
|
3719
|
+
searchPlaceholder?: string;
|
|
3720
|
+
/** 简易搜索提交字段名,默认 keyword */
|
|
3721
|
+
keywordField?: string;
|
|
3722
|
+
/** 简易搜索区位置:start 左侧,end 右侧(默认) */
|
|
3723
|
+
searchPlacement?: 'start' | 'end';
|
|
3724
|
+
/** 简易搜索是否显示重置,默认 false;完整 SearchForm 默认 true */
|
|
3725
|
+
showReset?: boolean;
|
|
3726
|
+
/** 挂载后是否立即查询,默认 true */
|
|
3727
|
+
immediate?: boolean;
|
|
3728
|
+
/** 重置后是否重新查询;为兼容旧 PageShell 默认 true */
|
|
3729
|
+
refreshOnReset?: boolean;
|
|
3730
|
+
/** 是否显示表格/搜索设置区,默认 true */
|
|
3731
|
+
showSettings?: boolean;
|
|
3732
|
+
/** UI 偏好初始值 */
|
|
3733
|
+
uiDefaults?: PageListUiDefaults;
|
|
3734
|
+
/** 跨页勾选记忆初始值,默认 false */
|
|
3735
|
+
checkboxReserve?: boolean;
|
|
3736
|
+
/** 完整 SearchForm 补充配置(simple 模式下忽略) */
|
|
3737
|
+
searchOptions?: PageListSearchOptions;
|
|
3738
|
+
/** 注入表格的 vxe-grid 选项(会与 UI 偏好合并) */
|
|
3739
|
+
tableGridOptions?: Record<string, any>;
|
|
3740
|
+
/** 外部触发重载(值变化即重载) */
|
|
3741
|
+
trigger?: unknown;
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3686
3744
|
declare const PageShell: Component;
|
|
3687
3745
|
|
|
3688
3746
|
interface PageEditListProps<T = any> {
|
|
@@ -6013,4 +6071,4 @@ declare const _default: {
|
|
|
6013
6071
|
};
|
|
6014
6072
|
|
|
6015
6073
|
export { ACTION_ICON_PRESETS, ACTION_LABEL_ICON_MAP, _default$H as ActionIcon, BARE_TABLE_ACTION_SLOT, BARE_TABLE_LINK_SLOT, BARE_TABLE_TAG_SLOT, _default$g as Button, COL_PREF_KEY, COMPONENTS_CONFIG_KEY, _default$f as Col, DEFAULT_GRID_COLUMNS, DEFAULT_PAGE_LIST_OPTIONS, _default$e as Dialog, _default$x as DialogForm, _default$t as Drawer, _default$d as Dropdown, _default$c as DropdownMenuItem, _default$b as DropdownSplitButton, _default$G as FloatingActionBar, _default$F as FloatingBarMenuSwitch, _default$A as Form, _default$n as GroupingRuleBuilder, _default$a as Icon, _default$9 as Link, _default$5 as ListTabs, _default$u as Modal, PREFIX, _default$j as PageChildList, _default$m as PageEditList, _default$z as PageList, _default$1 as PageListTabs, _default$h as PageModalSlot, _default$i as PageModals, PageShell, _default$4 as PageTabs, _default$v as Pagination, _default$8 as Popconfirm, _default$7 as Popover, _default$C as SearchForm, _default$B as SearchFormSimple, _default$l as SplitPane, _default$k as SplitPaneLayout, _default$6 as Switch, _default$w as Table, _default$q as TableChild, _default$r as TableEdit, _default$p as TableGroup, _default$o as TableGroupPage, _default$s as TableRead, _default$y as TableSettingsBar, _default$5 as Tabs, _default$4 as TabsView, _default$3 as Tag, _default$E as ToolbarActionBar, _default$D as ToolbarActionButtonMenu, _default$2 as Tooltip, alert, colPrefByTableHttp, colPrefFromStore, confirm, createAmountFormatter, createCellAreaClipboardPair, createDictFormatter, createFormatTypeFormatter, createPageListUiState, _default as default, defineLoader, definePageList, definePageModals, enhanceColumns, formatAmountValue, formatCellDisplay, formatDateValue, formatDictLabel, getAppTableDefaults, getColDriver, getInternalLinkConfig, getInternalTagConfig, hydrateColTables, localColDriver, mapToOptions, mergePageListOptions, normalizeColumn, normalizeColumns, openDrawer, openModal, reconcileColPref, registerHttp, remoteColDriver, resolveActionIcon, resolveActionIconPresetKey, resolveColDriver, resolveTableRowKey, setAppPageListDefaults, setAppTableDefaults, setColDriver, setupColPref, setupModal, storeColDriver, useColPref, useComponentsConfig, useEditDirtyCheck, useFloatingAction, useForm, useModalContext, usePageList, usePageModalContext, usePageModals, useSearchForm, useTabState, useTabbedList, useTableActionIntegration, useTableGrouping, useTableAction as useTableRead };
|
|
6016
|
-
export type { ActionButtonMenuItem, ActionDisplayMode, ActionIconPresetKey, ActionItem, AddRowAt, AddRowOptions, AndGroup, AsyncComponentLoader, BareFormRule, BatchFillMode, BatchFillOptions, CellFormatType, ColBridgeApi, ColDriver, ColPref, ColPrefByTableHttpOptions, ColPrefGlobalConfig, ColProps, ColRemoteApi, ColumnRule, ComponentsGlobalConfig, CreateRowContext, CreateRowFactory, DataTableNode, DialogFormProps, DrawerProps, EditComponentType, FieldOption, FieldRangeProps, FieldRangeSchemaProps, FieldRangeSideConfig, FieldRule, FloatSearchFormEmits, FloatSearchFormInstance, FloatSearchFormProps, FormActionType, FormContext, FormEmits, FormField, FormProps, FormatCellDisplayOptions, GroupConfig, GroupField, GroupMode, GroupPerformanceOptions, GroupRenderMode, GroupRule, GroupSpanMeta, GroupTableNode, GroupingRuleBuilderEmits, GroupingRuleBuilderProps, HttpClient, InstallOptions, InternalLinkCellConfig, InternalTagCellConfig, KeyboardNavColumnConfig, TabItem as ListTab, TabsProps as ListTabsProps, ListToolbarSearchPlacement, ModalContext, ModalProps, ModelConfirmConfig, OptionItem, PageListConfig, PageListFetchFn, PageListFetchParams, PageListFetchResult, PageListFormField, PageListGlobalConfig, PageListLoader, PageListLoaderArgs, PageListLoaderConfig, PageListLoaderFn, PageListLoaderSource, PageListOptions, PageListPaginationOptions, PageListProps, PageListRowActions, PageListSearchOptions, PageListTab, PageListTableOptions, PageListTabsEmits, PageListTabsFetchFn, PageListTabsPlacement, PageListTabsProps, PageListToolbarActions, PageListToolbarContext, PageListUiDefaults, PageListUiState, PageModalConfig, PageModalContentInstance, PageModalContext, PageModalMode, PageModalsProps, PageTab, PageTabsBeforeChangePayload, PageTabsChangePayload, PageTabsProps, PaginationChangePayload, PaginationEmits, PaginationPageInfo, PaginationProps, PopConfirmConfig, PrefPathStore, RemoteColDriverOptions, SearchFormActionPlacement, SearchFormEmits, SearchFormFieldLayout, SearchFormInstance, SearchFormProps, SearchFormSimpleProps, SetupColPrefOptions, SplitPaneArea, SplitPaneCollapseSide, SplitPaneDirection, SplitPaneEmits, SplitPaneExpose, SplitPaneLayoutApi, SplitPaneLayoutSchema, SplitPaneProps, StoreColDriverOptions, SystemColumnInjector, TabItem, TableActionBtn, TableActionConfig, TableActionType, TableCapabilityFlags, TableCellComponentProps, TableChildActionBtn, TableChildActionConfig, TableChildColumn, TableChildEmits, TableChildProps, TableColumn, TableDictColumnFields, TableEditClipboardConfig, TableEditColumn, TableEditCopyPayload, TableEditMode, TableEditPastePayload, TableEditProps, TableExtension, TableExtensionContext, TableExtensionContribution, TableFormatType, TableFullInstance, TableGlobalConfig, TableGroupPageInstance, TableGroupPageProps, TableGroupProps, TableLinkColumnFields, TableNode, TableProps, TablePublicInstance, TableReadActionMode, TableReadProps, TableTagColumnFields, TabsEmits, TabsProps, TabsViewBeforeChangePayload, TabsViewChangePayload, TabsViewProps, TabsViewTab, UseColPrefOptions, UseFloatingActionOptions, UsePageListOptions, UsePageListReturn, UsePageModalsReturn, UseTabStateOptions, UseTabStateReturn, UseTabbedListOptions, UseTabbedListReturn, UseTableActionIntegrationOptions, UseTableGroupingOptions, UseTableActionOptions as UseTableReadOptions };
|
|
6074
|
+
export type { ActionButtonMenuItem, ActionDisplayMode, ActionIconPresetKey, ActionItem, AddRowAt, AddRowOptions, AndGroup, AsyncComponentLoader, BareFormRule, BatchFillMode, BatchFillOptions, CellFormatType, ColBridgeApi, ColDriver, ColPref, ColPrefByTableHttpOptions, ColPrefGlobalConfig, ColProps, ColRemoteApi, ColumnRule, ComponentsGlobalConfig, CreateRowContext, CreateRowFactory, DataTableNode, DialogFormProps, DrawerProps, EditComponentType, FieldOption, FieldRangeProps, FieldRangeSchemaProps, FieldRangeSideConfig, FieldRule, FloatSearchFormEmits, FloatSearchFormInstance, FloatSearchFormProps, FormActionType, FormContext, FormEmits, FormField, FormProps, FormatCellDisplayOptions, GroupConfig, GroupField, GroupMode, GroupPerformanceOptions, GroupRenderMode, GroupRule, GroupSpanMeta, GroupTableNode, GroupingRuleBuilderEmits, GroupingRuleBuilderProps, HttpClient, InstallOptions, InternalLinkCellConfig, InternalTagCellConfig, KeyboardNavColumnConfig, TabItem as ListTab, TabsProps as ListTabsProps, ListToolbarSearchPlacement, ModalContext, ModalProps, ModelConfirmConfig, OptionItem, PageListConfig, PageListFetchFn, PageListFetchParams, PageListFetchResult, PageListFormField, PageListGlobalConfig, PageListLoader, PageListLoaderArgs, PageListLoaderConfig, PageListLoaderFn, PageListLoaderSource, PageListOptions, PageListPaginationOptions, PageListProps, PageListRowActions, PageListSearchOptions, PageListTab, PageListTableOptions, PageListTabsEmits, PageListTabsFetchFn, PageListTabsPlacement, PageListTabsProps, PageListToolbarActions, PageListToolbarContext, PageListUiDefaults, PageListUiState, PageModalConfig, PageModalContentInstance, PageModalContext, PageModalMode, PageModalsProps, PageShellProps, PageTab, PageTabsBeforeChangePayload, PageTabsChangePayload, PageTabsProps, PaginationChangePayload, PaginationEmits, PaginationPageInfo, PaginationProps, PopConfirmConfig, PrefPathStore, RemoteColDriverOptions, SearchFormActionPlacement, SearchFormEmits, SearchFormFieldLayout, SearchFormInstance, SearchFormProps, SearchFormSimpleProps, SetupColPrefOptions, SplitPaneArea, SplitPaneCollapseSide, SplitPaneDirection, SplitPaneEmits, SplitPaneExpose, SplitPaneLayoutApi, SplitPaneLayoutSchema, SplitPaneProps, StoreColDriverOptions, SystemColumnInjector, TabItem, TableActionBtn, TableActionConfig, TableActionType, TableCapabilityFlags, TableCellComponentProps, TableChildActionBtn, TableChildActionConfig, TableChildColumn, TableChildEmits, TableChildProps, TableColumn, TableDictColumnFields, TableEditClipboardConfig, TableEditColumn, TableEditCopyPayload, TableEditMode, TableEditPastePayload, TableEditProps, TableExtension, TableExtensionContext, TableExtensionContribution, TableFormatType, TableFullInstance, TableGlobalConfig, TableGroupPageInstance, TableGroupPageProps, TableGroupProps, TableLinkColumnFields, TableNode, TableProps, TablePublicInstance, TableReadActionMode, TableReadProps, TableTagColumnFields, TabsEmits, TabsProps, TabsViewBeforeChangePayload, TabsViewChangePayload, TabsViewProps, TabsViewTab, UseColPrefOptions, UseFloatingActionOptions, UsePageListOptions, UsePageListReturn, UsePageModalsReturn, UseTabStateOptions, UseTabStateReturn, UseTabbedListOptions, UseTabbedListReturn, UseTableActionIntegrationOptions, UseTableGroupingOptions, UseTableActionOptions as UseTableReadOptions };
|