Migrate old admin modules and local crud deps

Port pages for data forms, score admin, student maintenance,
vacation records, menu routing, and workbench. Add team switching,
dynamic menu loading, viewport scaling, and bundled local fast-crud
packages.
This commit is contained in:
2026-11-02 12:21:25 +08:00
parent 47dd605067
commit 792131228a
232 changed files with 60676 additions and 604 deletions
+166
View File
@@ -0,0 +1,166 @@
import "./fs-button.less";
/**
* 按钮,支持el-button/a-button的配置
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* 文字
*/
text: {
type: StringConstructor;
default: string;
required: false;
};
/**
* 图标
*/
icon: {
type: (FunctionConstructor | ObjectConstructor | StringConstructor)[];
default: string;
required: false;
};
/**
* 右边的图标
*/
iconRight: {
type: (FunctionConstructor | ObjectConstructor | StringConstructor)[];
default: string;
required: false;
};
/**
* 是否圆形按钮,text需配置为null
*/
circle: {
type: BooleanConstructor;
default: boolean;
required: false;
};
/**
* tooltip配置,为空不显示tooltip
*/
tooltip: {
type: ObjectConstructor;
default: any;
};
/**
* badge配置,为空不显示badge
* `{count:0,dot:"show"}`
*/
badge: {
type: ObjectConstructor;
default: any;
required: false;
};
/**
* x-button的配置,当x-button的配置与fs-button的配置有冲突时可以配置在此处
* 比如:n-button的text
*/
buttonProps: {
type: ObjectConstructor;
default: any;
};
/**
* 自定义的className
*/
className: {
type: (ArrayConstructor | ObjectConstructor | StringConstructor)[];
default: any;
required: false;
};
/**
* 是否加载中
*/
loading: {
type: BooleanConstructor;
default: any;
required: false;
};
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* 文字
*/
text: {
type: StringConstructor;
default: string;
required: false;
};
/**
* 图标
*/
icon: {
type: (FunctionConstructor | ObjectConstructor | StringConstructor)[];
default: string;
required: false;
};
/**
* 右边的图标
*/
iconRight: {
type: (FunctionConstructor | ObjectConstructor | StringConstructor)[];
default: string;
required: false;
};
/**
* 是否圆形按钮,text需配置为null
*/
circle: {
type: BooleanConstructor;
default: boolean;
required: false;
};
/**
* tooltip配置,为空不显示tooltip
*/
tooltip: {
type: ObjectConstructor;
default: any;
};
/**
* badge配置,为空不显示badge
* `{count:0,dot:"show"}`
*/
badge: {
type: ObjectConstructor;
default: any;
required: false;
};
/**
* x-button的配置,当x-button的配置与fs-button的配置有冲突时可以配置在此处
* 比如:n-button的text
*/
buttonProps: {
type: ObjectConstructor;
default: any;
};
/**
* 自定义的className
*/
className: {
type: (ArrayConstructor | ObjectConstructor | StringConstructor)[];
default: any;
required: false;
};
/**
* 是否加载中
*/
loading: {
type: BooleanConstructor;
default: any;
required: false;
};
}>> & Readonly<{
onClick?: (...args: any[]) => any;
}>, {
circle: boolean;
text: string;
icon: string | Function | Record<string, any>;
iconRight: string | Function | Record<string, any>;
tooltip: Record<string, any>;
badge: Record<string, any>;
buttonProps: Record<string, any>;
className: string | Record<string, any> | unknown[];
loading: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
+44
View File
@@ -0,0 +1,44 @@
/**
* icon组件
* antdv的icon需要手动引入才能生效
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* icon名称
*/
icon: {
type: StringConstructor;
default: any;
require: boolean;
};
baseUrl: {
type: StringConstructor;
default: string;
};
size: {
type: StringConstructor;
default: string;
};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* icon名称
*/
icon: {
type: StringConstructor;
default: any;
require: boolean;
};
baseUrl: {
type: StringConstructor;
default: string;
};
size: {
type: StringConstructor;
default: string;
};
}>> & Readonly<{}>, {
size: string;
icon: string;
baseUrl: string;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
@@ -0,0 +1,22 @@
import "./fs-dialog.less";
/**
* 对话框
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
open: {};
fullscreen: {};
zIndex: {};
appendTo: {};
}>, () => string, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "mounted" | "opened" | "closed" | "inner-change")[], "open" | "mounted" | "opened" | "closed" | "inner-change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
open: {};
fullscreen: {};
zIndex: {};
appendTo: {};
}>> & Readonly<{
onMounted?: (...args: any[]) => any;
onOpen?: (...args: any[]) => any;
onOpened?: (...args: any[]) => any;
onClosed?: (...args: any[]) => any;
"onInner-change"?: (...args: any[]) => any;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
@@ -0,0 +1,45 @@
import { PropType } from "vue";
import { EditableCell, EditableProps } from "../../../d";
/**
* 可编辑单元格组件
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* 组件配置
*/
item: {};
scope: {};
index: {};
editableId: {};
columnKey: {};
editableCell: {
type: PropType<EditableCell>;
};
editableOpts: {
type: PropType<EditableProps>;
};
slots: {};
disabled: {};
readonly: {};
}>, () => void, {}, {}, {
getTargetRef(): any;
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* 组件配置
*/
item: {};
scope: {};
index: {};
editableId: {};
columnKey: {};
editableCell: {
type: PropType<EditableCell>;
};
editableOpts: {
type: PropType<EditableProps>;
};
slots: {};
disabled: {};
readonly: {};
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
@@ -0,0 +1,4 @@
import { EditableTable } from "../../../d";
export declare function useEditable(props: any, ctx: any, tableRef: any): {
editable: EditableTable;
};
@@ -0,0 +1,3 @@
import Schema from "async-validator";
import { EditableCell } from "../../../d";
export declare function createValidator(editableCells: Record<string, EditableCell>): Schema;
+45
View File
@@ -0,0 +1,45 @@
import { PropType } from "vue";
import { ConditionalRenderProps } from "../../d";
/**
* 单元格显示组件
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
item: {};
/**
* scope
*/
scope: {
default(): {};
};
/**
* 插槽
*/
slots: {};
/**
* 条件渲染,符合条件的情况下优先渲染
*/
conditionalRender: {
type: PropType<ConditionalRenderProps<any>>;
};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
item: {};
/**
* scope
*/
scope: {
default(): {};
};
/**
* 插槽
*/
slots: {};
/**
* 条件渲染,符合条件的情况下优先渲染
*/
conditionalRender: {
type: PropType<ConditionalRenderProps<any>>;
};
}>> & Readonly<{}>, {
scope: unknown;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
@@ -0,0 +1,72 @@
import "./fs-form-wrapper.less";
/**
* 表单对话框|抽屉
* 暴露方法:
* open(options)
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* 表单配置
* {
* wrapper:{ //表单包装配置
* is: 'el-dialog'//el-dialog|a-modal|el-drawer|a-drawer,
* draggable: false, //是否支持拖动
* inner:false //是否在页面内部打开
* }
* ...FsForm配置
* }
*/
options: {};
/**
* 插槽
*/
slots: {};
/**
* 是否在内部打开对话框
*/
inner: {};
/**
* 内部打开对话框的wrapper
*/
innerWrapper: {};
id: {};
zIndex: {};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "submit" | "open" | "mounted" | "validationError" | "value-change" | "opened" | "closed" | "inner-change")[], "reset" | "submit" | "open" | "mounted" | "validationError" | "value-change" | "opened" | "closed" | "inner-change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* 表单配置
* {
* wrapper:{ //表单包装配置
* is: 'el-dialog'//el-dialog|a-modal|el-drawer|a-drawer,
* draggable: false, //是否支持拖动
* inner:false //是否在页面内部打开
* }
* ...FsForm配置
* }
*/
options: {};
/**
* 插槽
*/
slots: {};
/**
* 是否在内部打开对话框
*/
inner: {};
/**
* 内部打开对话框的wrapper
*/
innerWrapper: {};
id: {};
zIndex: {};
}>> & Readonly<{
onReset?: (...args: any[]) => any;
onSubmit?: (...args: any[]) => any;
onMounted?: (...args: any[]) => any;
onOpen?: (...args: any[]) => any;
onValidationError?: (...args: any[]) => any;
"onValue-change"?: (...args: any[]) => any;
onOpened?: (...args: any[]) => any;
onClosed?: (...args: any[]) => any;
"onInner-change"?: (...args: any[]) => any;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
+163
View File
@@ -0,0 +1,163 @@
import { PropType } from "vue";
import "./fs-table.less";
import { ConditionalRenderProps, EditableProps, TableColumnsProps } from "../../d";
/**
* fs-table,表格封装
* 支持el-table/a-table的参数
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
tableVersion: {
type: PropType<string>;
};
/**
* table插槽
*/
slots: {
type: PropType<any>;
};
/**
* 单元格插槽
*/
cellSlots: {
type: PropType<any>;
};
/**
* 列配置,支持el-table-column|a-table-column配置
*/
columns: {
type: PropType<TableColumnsProps>;
default: any;
};
/**
* 操作列
*/
rowHandle: {
type: PropType<any>;
};
/**
* 是否显示表格
*/
show: {
type: BooleanConstructor;
default: boolean;
};
/**
* 表格数据
*/
data: {
type: ArrayConstructor;
default: () => any[];
};
conditionalRender: {
type: PropType<ConditionalRenderProps>;
};
/**
* 行编辑,批量编辑
*/
editable: {
type: PropType<EditableProps>;
default(): {};
};
loading: {
type: BooleanConstructor;
default: boolean;
};
/**
* 当前sort状态
*/
sort: {
type: PropType<any>;
};
request: {
type: PropType<any>;
};
rowKey: {
type: (FunctionConstructor | StringConstructor)[];
default: string;
};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("value-change" | "row-handle" | "pagination-change" | "filter-change" | "sort-change" | "data-change")[], "value-change" | "row-handle" | "pagination-change" | "filter-change" | "sort-change" | "data-change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
tableVersion: {
type: PropType<string>;
};
/**
* table插槽
*/
slots: {
type: PropType<any>;
};
/**
* 单元格插槽
*/
cellSlots: {
type: PropType<any>;
};
/**
* 列配置,支持el-table-column|a-table-column配置
*/
columns: {
type: PropType<TableColumnsProps>;
default: any;
};
/**
* 操作列
*/
rowHandle: {
type: PropType<any>;
};
/**
* 是否显示表格
*/
show: {
type: BooleanConstructor;
default: boolean;
};
/**
* 表格数据
*/
data: {
type: ArrayConstructor;
default: () => any[];
};
conditionalRender: {
type: PropType<ConditionalRenderProps>;
};
/**
* 行编辑,批量编辑
*/
editable: {
type: PropType<EditableProps>;
default(): {};
};
loading: {
type: BooleanConstructor;
default: boolean;
};
/**
* 当前sort状态
*/
sort: {
type: PropType<any>;
};
request: {
type: PropType<any>;
};
rowKey: {
type: (FunctionConstructor | StringConstructor)[];
default: string;
};
}>> & Readonly<{
"onValue-change"?: (...args: any[]) => any;
"onRow-handle"?: (...args: any[]) => any;
"onPagination-change"?: (...args: any[]) => any;
"onFilter-change"?: (...args: any[]) => any;
"onSort-change"?: (...args: any[]) => any;
"onData-change"?: (...args: any[]) => any;
}>, {
data: unknown[];
columns: TableColumnsProps;
loading: boolean;
show: boolean;
editable: EditableProps;
rowKey: string | Function;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
@@ -0,0 +1,9 @@
import { Ref } from "vue";
export declare function useComponentRefProvider(componentsRef: Ref): {
getter: (index: number, key: string) => any;
setter: (index: number, key: string, value: any) => Ref<any, any>;
};
export declare function useComponentRefInject(): {
getter: unknown;
setter: unknown;
};
+4
View File
@@ -0,0 +1,4 @@
import { Slot, Slots } from "vue";
export type CrudSlots = Record<string, Slot | undefined>;
export declare function mergeCrudSlots(configuredSlots: CrudSlots | undefined, templateSlots: Slots): Slots;
export declare function filterCrudSlots(slots: Slots, keyPrefix: string): Slots;
+48
View File
@@ -0,0 +1,48 @@
import FsPage from "./container/fs-page.vue";
import FsContainer from "./container/fs-container.vue";
import FsLayoutDefault from "./container/fs-layout-default.vue";
import FsLayoutCard from "./container/fs-layout-card.vue";
import FsButton from "./basic/fs-button";
import FsIcon from "./basic/fs-icon";
import FsIconify from "./basic/fs-iconify.vue";
import FsIconSvg from "./basic/fs-icon-svg.vue";
import FsLabel from "./basic/fs-label.vue";
import FsLoading from "./basic/fs-loading.vue";
import FsBox from "./basic/fs-box.vue";
import FsComponentRender from "./render/fs-component-render.js";
import FsSlotRender from "./render/fs-slot-render.js";
import FsRender from "./render/fs-render.js";
import FsForm from "./crud/fs-form.vue";
import FsFormItem from "./crud/fs-form-item.vue";
import FsFormItemCol from "./crud/fs-form-item-col.vue";
import FsFormHelper from "./crud/fs-form-helper.vue";
import FsFormWrapper from "./crud/fs-form-wrapper.jsx";
import FsFormProvider from "./crud/fs-form-provider.vue";
import FsCrud from "./fs-crud.vue";
import FsRowHandle from "./crud/fs-row-handle.vue";
import FsTable from "./crud/fs-table.js";
import FsCell from "./crud/fs-cell";
import FsEditableCell from "./crud/editable/fs-editable-cell";
import FsEditable from "./crud/editable/fs-editable.vue";
import FsActionbar from "./actionbar/index.vue";
import FsToolbar from "./toolbar/index.vue";
import FsColumnsFilterLayoutDefault from "./toolbar/fs-table-columns-filter/fs-columns-filter-layout-default.vue";
import fsColumnsFilterNestList from "./toolbar/fs-table-columns-filter/fs-columns-filter-nest-list.vue";
import FsTableColumnsFixedController from "./toolbar/fs-table-columns-filter/fs-table-columns-fixed-controller/index.vue";
import FsSearch from "./search/index.vue";
import FsSearchV1 from "./search/search_v1.vue";
import FsSearchLayoutDefault from "./search/layout-default.vue";
import FsTabsFilter from "./search/tabs-filter.vue";
import FsIconSelector from "./extends/fs-icon-selector/index.vue";
import FsDictRadio from "./extends/fs-dict-radio.vue";
import FsDictSelect from "./extends/fs-dict-select.vue";
import FsValuesFormat from "./extends/fs-values-format.vue";
import FsDictCascaderFormat from "./extends/fs-dict-cascader-format.vue";
import FsDictCascader from "./extends/fs-dict-cascader.vue";
import FsDictCheckbox from "./extends/fs-dict-checkbox.vue";
import FsDictSwitch from "./extends/fs-dict-switch.vue";
import FsDateFormat from "./extends/fs-date-format.vue";
import FsDictTree from "./extends/fs-dict-tree.vue";
import FsTableSelect from "./extends/fs-table-select.vue";
import FsEditableSelect from "./extends/fs-editable-select.vue";
export { FsPage, FsContainer, FsLayoutDefault, FsLayoutCard, FsComponentRender, FsSlotRender, FsRender, FsButton, FsLoading, FsIcon, FsIconify, FsIconSvg, FsIconSelector, FsLabel, FsForm, FsFormItem, FsFormItemCol, FsFormHelper, FsFormWrapper, FsFormProvider, FsCrud, FsTable, FsCell, FsEditableCell, FsEditable, FsRowHandle, FsSearch, FsSearchV1, FsSearchLayoutDefault, FsTabsFilter, FsActionbar, FsToolbar, FsColumnsFilterLayoutDefault, fsColumnsFilterNestList, FsTableColumnsFixedController, FsDictRadio, FsDictSelect, FsValuesFormat, FsDictCascaderFormat, FsDictCascader, FsDictCheckbox, FsDictSwitch, FsDateFormat, FsBox, FsDictTree, FsTableSelect, FsEditableSelect };
@@ -0,0 +1,131 @@
/**
* 组件动态渲染组件
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* modelValue
*/
modelValue: {};
/**
* 组件名称
*/
name: {};
/**
* 插槽
*/
slots: {
type: ObjectConstructor;
};
/**
* 子元素,同slots
*/
children: {
type: ObjectConstructor;
};
/**
* 事件监听
*/
on: {
type: ObjectConstructor;
};
/**
* 同 on
*/
events: {
type: ObjectConstructor;
};
/**
* 上下文scope
*/
scope: {
type: ObjectConstructor;
};
/**
* modelValue的属性名
*/
vModel: {
type: (ObjectConstructor | StringConstructor)[];
};
/**
* 组件参数,会与attrs合并
*/
props: {};
/**
* 自定义render
*/
render: {};
/**
* 当输入框的值上报为undefine时,转为null
*/
undefineToNull: {
type: BooleanConstructor;
default: boolean;
};
}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:dict" | "update:modelValue" | "mounted")[], "update:dict" | "update:modelValue" | "mounted", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* modelValue
*/
modelValue: {};
/**
* 组件名称
*/
name: {};
/**
* 插槽
*/
slots: {
type: ObjectConstructor;
};
/**
* 子元素,同slots
*/
children: {
type: ObjectConstructor;
};
/**
* 事件监听
*/
on: {
type: ObjectConstructor;
};
/**
* 同 on
*/
events: {
type: ObjectConstructor;
};
/**
* 上下文scope
*/
scope: {
type: ObjectConstructor;
};
/**
* modelValue的属性名
*/
vModel: {
type: (ObjectConstructor | StringConstructor)[];
};
/**
* 组件参数,会与attrs合并
*/
props: {};
/**
* 自定义render
*/
render: {};
/**
* 当输入框的值上报为undefine时,转为null
*/
undefineToNull: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
"onUpdate:dict"?: (...args: any[]) => any;
"onUpdate:modelValue"?: (...args: any[]) => any;
onMounted?: (...args: any[]) => any;
}>, {
undefineToNull: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
+19
View File
@@ -0,0 +1,19 @@
/**
* 自定义render组件
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
renderFunc: {
type: FunctionConstructor;
};
scope: {
type: ObjectConstructor;
};
}>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
renderFunc: {
type: FunctionConstructor;
};
scope: {
type: ObjectConstructor;
};
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
@@ -0,0 +1,31 @@
/**
* 插槽render组件
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* 插槽
*/
slots: {
type: FunctionConstructor;
};
/**
* 上下文
*/
scope: {
type: ObjectConstructor;
};
}>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
/**
* 插槽
*/
slots: {
type: FunctionConstructor;
};
/**
* 上下文
*/
scope: {
type: ObjectConstructor;
};
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;
+24
View File
@@ -0,0 +1,24 @@
import { Ref } from "vue";
import { TableColumnsProps } from "../d/crud";
export type ColumnsFilterItem = {
key: string;
title: string;
fixed: boolean | string;
show: boolean;
__key?: string;
__show: boolean;
__disabled: boolean;
__parent?: ColumnsFilterItem;
__title?: string;
children?: ColumnsFilterItem[];
};
export type ColumnsFilterContext = {
originalColumns: Ref<TableColumnsProps>;
originalColumnsMap: Ref<Record<string, ColumnsFilterItem>>;
currentColumns: Ref<ColumnsFilterItem[]>;
text: Ref;
active: Ref;
submit: () => void;
reset: () => void;
};
export declare const ColumnsFilterProvideKey = "ColumnsFilterContext";
+34
View File
@@ -0,0 +1,34 @@
/**
* compute参数方法的参数
*/
export type ComputeContext<R = any> = {
/**
* 行数据
*/
row?: R;
/**
* 表单数据
*/
form?: R;
/**
* 当前行号
*/
index?: number;
/**
* 当前编辑对话框模式[view/add/edit]
*/
mode?: string;
/**
* 其他参数
*/
attrs?: any;
/**
* 获取对应字段组件的ref
* @param key
*/
getComponentRef?: (key?: string) => any | Promise<any>;
/**
* 其他配置
*/
[key: string]: any;
};
+1713
View File
File diff suppressed because it is too large Load Diff
+98
View File
@@ -0,0 +1,98 @@
import { Ref, ComputedRef } from "vue";
import { ColumnProps, EditableProps, EditableShowActionProps, EditableUpdateCellRequest, FormItemProps } from "./crud";
import Schema from "async-validator";
import { ValidateFieldsError } from "async-validator/dist-types/interface";
export type EditableValidateResult = boolean | ValidateFieldsError;
export type EditableTable<R = any> = {
options: Ref<EditableProps<R>>;
disabled?: boolean;
setupEditable: (data?: R[]) => void;
inactive: () => void;
active: () => void;
saveEach: () => Promise<void>;
cancelAll: () => void;
persist: () => void;
resume: () => void;
addRow: () => void;
removeRow: (editableId: any) => void;
getEditableRow: (editableId: any) => void;
activeCols: (opts: {
cols: string[];
}) => void;
hasDirty: () => void;
getEditableCell: (editableId: any, key: string) => EditableCell<R>;
eachRows: (callback: (opts: EditableEachRowsOpts<R>) => void) => void;
eachCells: (callback: (opts: EditableEachCellsOpts<R>) => void) => void;
validate: () => Promise<EditableValidateResult>;
getCleanTableData: (data?: R[]) => any[];
getActiveRows: () => EditableRow<R>[];
};
export type EditableCellActiveProps = {
showAction?: EditableShowActionProps;
exclusive?: boolean;
exclusiveEffect?: "cancel" | "save";
};
export type EditableCell<R = any> = {
isEditing: boolean;
loading: boolean;
mode: string;
activeTrigger: "onClick" | "onDbClick" | false;
isEditable: () => boolean;
isChanged: () => boolean;
getForm: () => FormItemProps<R>;
active: (opts?: EditableCellActiveProps) => void;
inactive: () => void;
resume: () => void;
persist: () => void;
save: () => Promise<void>;
cancel: () => void;
oldValue: any;
newValue: any;
column: ColumnProps;
updateCell: ComputedRef<EditableUpdateCellRequest<R>>;
showAction: EditableShowActionProps;
validateErrors?: any[];
};
export type EditableSaveRowContext<R = any> = {
isAdd: boolean;
row: R;
setData: (data: R) => void;
};
export type EditableRow<R = any> = {
isAdd?: boolean;
inactive: () => void;
active: () => void;
isEditing: boolean;
cells: Record<string, EditableCell<R>>;
persist: () => void;
resume: () => void;
cancel: () => void;
save: (opts: {
doSave: (opts: EditableSaveRowContext<R>) => Promise<void>;
}) => Promise<void>;
loading: boolean;
/**
* 获取可以提交的行数据
*/
getRowData: () => R;
rowData: R;
editableId: any;
validate: (row?: R) => Promise<EditableValidateResult>;
validator?: Schema;
};
export type EditableRowData = {
__editableRowId__: number;
[key: string]: any;
};
export type EditableEachCellsOpts<R = any> = {
rowData: R;
row: EditableRow<R>;
cells: Record<string, EditableCell<R>>;
cell: EditableCell<R>;
key: string;
};
export type EditableEachRowsOpts<R = any> = {
rowData: any;
row: EditableRow<R>;
cells: Record<string, EditableCell<R>>;
};
+115
View File
@@ -0,0 +1,115 @@
import { EditableCellActiveProps, EditableEachCellsOpts, EditableEachRowsOpts, EditableRow, EditableValidateResult } from "./editable";
import { EditableOnEnabledProps } from "../use";
export type EditableAddRowOptions<R = any> = {
row?: R;
active?: boolean;
addRowFunc?: (opts: {
row: R;
}) => void;
};
export type EditableActiveColsOptions = {
cols: string[];
} & EditableCellActiveProps;
/**
* crudExpose.editable
* editable暴露的方法
*/
export type Editable<R = any> = {
enable(opts?: any, onEnabled?: (opts: EditableOnEnabledProps) => void): Promise<void>;
/**
* 禁用编辑
*/
disable(): void;
/**
* 激活所有编辑
*/
active(opts?: EditableCellActiveProps): void;
/**
* 退出编辑
*/
inactive(): void;
/**
* 取消所有编辑
*/
cancel(): void;
/**
* 保存所有编辑,不提交到后台,仅让本地保存
*/
persist(): void;
/**
* 添加行
*/
addRow(opts?: EditableAddRowOptions<R>): void;
/**
* 编辑cols
* @param opts
*/
activeCols(opts: EditableActiveColsOptions): void;
/**
* 还原,取消编辑
*/
resume(): void;
/**
* 删除行
* @param editableId
*/
removeRow(editableId: any): void;
/**
* 获取可编辑行对象
* @param editableId
*/
getEditableRow(editableId: any): EditableRow<R>;
/**
* 执行保存行
* @param opts
*/
doSaveRow(opts: {
editableId?: any;
row?: R;
}): Promise<void>;
/**
* 取消行编辑状态
* @param opts
*/
doCancelRow(opts: {
editableId?: any;
row?: R;
}): Promise<void>;
/**
* 删除行
* @param opts
*/
doRemoveRow(opts: {
editableId?: any;
row?: R;
}): Promise<void>;
/**
* 遍历可编辑单元格对象
* @param callback
*/
eachCells(callback: (opts: EditableEachCellsOpts<R>) => void): void;
/**
* 遍历可编辑行对象
* @param callback
*/
eachRows(callback: (opts: EditableEachRowsOpts<R>) => void): void;
/**
* 校验表单,返回true,表示校验通过
*/
validate(): Promise<EditableValidateResult>;
/**
* 获取可提交的表格数据(移除$editable_id字段)
* 如果传data则移除传入data的editable_id,否则从表格中获取
*/
getTableData(data?: R[]): R[];
/**
* 同上
* @param data
*/
getCleanTableData(data?: R[]): R[];
getInstance(): any;
/**
* 获取当前以激活的行
*/
getActiveRows: () => EditableRow<R>[];
};
+277
View File
@@ -0,0 +1,277 @@
import { CompositionColumns, CrudBinding, FormProps, Page, PageQuery, PageRes, RemoveProps, UserPageQuery } from "./crud";
import { Ref } from "vue";
import { Editable } from "./expose-editable";
export type SearchOptions = {
silence?: boolean;
};
export type DoValueResolveProps<R = any> = {
form: R;
};
export declare class SetFormDataOptions {
/**
* 是否执行valueChange
*/
valueChange?: boolean;
mergeForm?: boolean;
}
/**
* doRefresh方法的参数
*/
export type DoRefreshProps = {
/**
* 刷新后是否跳转到首页
*/
goFirstPage?: boolean;
/**
* 是否静默刷新,不显示loading,没有任何外在表现
*/
silence?: boolean;
/**
* 是否滚动到顶部
*/
scrollTop?: boolean;
};
/**
* crudExpose
*/
export type CrudExpose<R = any> = {
crudRef: Ref;
crudBinding: Ref<CrudBinding<R>>;
/**
* 获取FsFormWrapper的实例
*/
getFormWrapperRef: () => any;
/**
* 获取FsFormRef
*/
getFormRef: () => any;
/**
* 获取表单数据,仅表单打开时有效
*/
getFormData: () => R;
/**
* 设置当前表单数据,仅表单打开时有效
* data: 表单数据
*/
setFormData: (data: R, options?: SetFormDataOptions) => any;
/**
* 获取表单组件实例,仅表单打开时有效
* key: 字段key
* isAsync: 是否异步获取,传true时,此方法返回promise(当组件是异步组件<extends中的组件>时,第一次获取会为空,所以需要异步等待加载完成后才能获取)
*/
getFormComponentRef: (key: string, isAsync?: boolean) => any;
/**
* 执行valueBuilder
* @param rows 表格数据列表
*/
doValueBuilder: (rows: R[], columns?: CompositionColumns<R>) => void;
/**
* 执行valueResolve
* @param props { form }
*/
doValueResolve: (props: DoValueResolveProps<R>, columns?: CompositionColumns<R>) => void;
/**
* 刷新列表数据
*/
doRefresh: (props?: DoRefreshProps) => Promise<void>;
/**
* 翻页, 注意,需要另外手动调用doRefresh才会刷新数据
*/
doPageTurn: (no: number) => void;
/**
* 查询按钮点击,执行查询
* @param opts {form, goFirstPage =true,mergeForm=false}
*/
doSearch: (props: DoSearchProps<R>) => Promise<void>;
/**
* 构建page查询参数
* @param pageQuery
*/
buildPageQuery(pageQuery: PageQuery<R>): UserPageQuery<R>;
/**
* 获取当前分页参数
*/
getPage(): Page;
/**
* 执行搜索,返回页面数据
* @param pageQuery
*/
search: (pageQuery: PageQuery<R>, options?: SearchOptions) => Promise<PageRes<R>>;
/**
* 删除行按钮点击
* @param context = {index / row}
*/
doRemove: (context: DoRemoveContext<R>, opts?: RemoveProps<R>) => Promise<any>;
/**
* 复制行,以当前行数据打开新增对话框
*/
openCopy: (context: OpenEditContext<R>, formOpts?: OpenDialogProps<R>) => Promise<any>;
/**
* 打开编辑对话框
*/
openEdit: (context: OpenEditContext, formOpts?: OpenDialogProps<R>) => Promise<any>;
/**
* 打开添加对话框
*/
openAdd: (context: OpenEditContext, formOpts?: OpenDialogProps<R>) => Promise<any>;
/**
* 打开查看对话框
*/
openView: (context: OpenEditContext, formOpts?: OpenDialogProps) => Promise<any>;
/**
* 打开对话框
*/
openDialog: (formOpts: OpenDialogProps) => Promise<any>;
_openDialog: (mode: string, context: OpenEditContext, formOpts?: OpenDialogProps) => Promise<any>;
/**
* 获取查询组件ref
*/
getSearchRef: () => any;
/**
* 触发查询表单校验
*/
doSearchValidate: () => void;
/**
* 获取查询表单数据
*/
getSearchFormData: () => any;
/**
* 获取查询表单校验成功的数据
*/
getSearchValidatedFormData: () => any;
/**
* 重新设置查询表单数据
*/
setSearchFormData: (props: SetSearchFormDataProps<R>) => void;
/**
* 获取toolbar组件Ref
*/
getToolbarRef: () => any;
/**
* 获取列设置组件Ref
*/
getColumnsFilterRef: () => any;
/**
* 获取列设置的原始列配置Ref
* 可以修改列设置的原始配置
*/
getColumnsFilterOriginalColumnsRef: () => any;
/**
* 获取列设置的每列配置Ref
* 可以修改列设置的每列配置
*/
getColumnsFilterColumnsRef: () => any;
/**
* 获取FsTable的实例
*/
getTableRef: () => any;
/**
* 获取x-table的实例
*/
getBaseTableRef: () => any;
/**
* 获取表格数据
*/
getTableData: () => R[];
/**
* 重新设置表格数据
*/
setTableData: (data: R[]) => void;
/**
* 插入行
* @param index
* @param row
*/
insertTableRow: (index: number, row: R) => void;
/**
* 更新行
* @param index
* @param row
*/
updateTableRow: (index: number, row: R, merge?: boolean) => void;
/**
* 删除行
* @param index
*/
removeTableRow: (index: number) => void;
/**
* 获取表格数据某一行,不支持树形结构
*/
getTableDataRow: (index: number) => any;
/**
* 根据rowKey删除某一行
* @param rowKey
*/
removeTableRowByRowKey: (rowKey: any, data?: R[]) => boolean;
/**
* 选中某一行
* @param context = {row}
*/
doSelectCurrentRow: (context: SelectCurrentRowProps<R>) => void;
/**
* 行编辑
*/
editable: Editable;
};
/**
* index or row 必须传一个
*/
export type OpenEditContext<R = any> = {
/**
* 行索引, 行索引或row,必传一个
*/
index?: number;
/**
* 行数据,默认会赋值给initialForm作为初始值
*/
row?: R;
};
/**
* crudExpose.openDialog 打开对话框参数
*/
export type OpenDialogProps<R = any> = {
/**
* 是否新创建一个实例打开
* 当使用新建实例打开时,无法通过getFormWrapperRef获取到表单ref,你可以从openDialog的返回值中拿到ref
* const {openDialog} = useFormWrapper()
* const wrapperRef = await openDialog(props:OpenDialogProps)
*/
newInstance?: boolean;
/**
* 对话框id,不传则随机生成,新实例在关闭时不会被销毁,使用相同id的form重复打开会被覆盖
*/
id?: string;
} & FormProps<R>;
/**
* crudExpose.setSearchFormData参数
*/
export type SetSearchFormDataProps<R = any> = {
form: R;
mergeForm?: boolean;
triggerSearch?: boolean;
refWarning?: boolean;
};
/**
* crudExpose.doRemove参数
*/
export type DoRemoveContext<R = any> = {
index?: number;
row?: R;
};
export type OnAfterRemoveContext<R = any> = DoRemoveContext<R> & {
res: any;
};
/**
* crudExpose.doSearch参数
*/
export type DoSearchProps<R = any> = {
form: R;
goFirstPage?: boolean;
mergeForm?: boolean;
};
/**
* crudExpose.doSelectCurrentRow参数
*/
export type SelectCurrentRowProps<R = any> = {
row: R;
};
+13
View File
@@ -0,0 +1,13 @@
import { UiInterface } from "@fast-crud/ui-interface";
import { CrudOptions, UseCrudProps } from "../d/crud";
import { DictRequest, LoggerConfig } from "../use";
export type FsSetupOptions<R = any, C = any> = {
ui?: UiInterface;
commonOptions?: (props?: UseCrudProps<R, C>) => CrudOptions<R>;
dictRequest?: DictRequest;
i18n?: any;
logger?: LoggerConfig;
customComponents?: {
[key: string]: any;
};
};
+7
View File
@@ -0,0 +1,7 @@
export * from "./expose";
export * from "./expose-editable";
export * from "./editable";
export * from "./crud";
export * from "./compute";
export * from "./fs";
export * from "./columns-filter";
+16
View File
@@ -0,0 +1,16 @@
import { utils } from "./utils/index";
import { useI18n } from "./locale/";
import { uiContext } from "./ui";
import { App } from "vue";
import { FsSetupOptions } from "./d";
export * from "./utils/index";
export * from "./use";
export * from "./components";
export * from "./ui";
export { utils, useI18n, uiContext };
export * from "./d/index";
export * from "./lib";
export declare const FastCrud: {
install(app: App, options?: FsSetupOptions): void;
};
export default FastCrud;
+76
View File
@@ -0,0 +1,76 @@
import { ColumnProps, CrudExpose, PageQuery, UserPageQuery } from "../../d";
import { CsvParams, ExcelParams, ExportColumn, ExportUtil, ImportUtil } from "./lib/d";
export declare function loadFsExportUtil(): Promise<ExportUtil>;
export declare function loadFsImportUtil(): Promise<ImportUtil>;
export type DataFormatterContext<R = any> = {
row: any;
/**
* 原始行数据
*/
originalRow: R;
key: string;
col: ColumnProps<R>;
exportCol: ExportColumn<R>;
};
export type ColumnBuilderContext<R = any> = {
col: ExportColumn<R>;
};
/**
* 导出配置
*/
export type ExportProps<R = any> = {
/**
* 服务端导出,自己实现
*/
server?: (pageQuery: UserPageQuery<R>) => Promise<void>;
/**
* 仅导出显示的列
*/
onlyShow?: boolean;
/**
* 列过滤器
* @param col
*/
columnFilter?: (col: ColumnProps<R>) => boolean;
/**
* 列配置构建器
*/
columnBuilder?: (context: ColumnBuilderContext<R>) => void;
/**
* 数据mapping
*/
dataFormatter?: (context: DataFormatterContext<R>) => void;
/**
* 导出文件类型
*/
fileType?: "csv" | "excel";
/**
* 数据来源
* local: 本地当前页数据(默认)
* search: 搜索数据
*/
dataFrom?: "local" | "search";
/**
* 查询参数
*/
searchParams?: PageQuery<R>;
/**
* 配置了dict的字段是否自动根据value获取label
* 默认值:true
*/
autoUseDictLabel?: boolean;
/**
* 数据分隔符
*/
separator?: string;
/**
* 数据是否加引号
*/
quoted?: boolean;
} & CsvParams & ExcelParams;
export declare function exportTable<R = any>(crudExpose: CrudExpose<R>, opts?: ExportProps<R>): Promise<any>;
export type ImportProps = {
file: File;
append?: boolean;
};
export declare function importTable<R = any>(crudExpose: CrudExpose<R>, opts: ImportProps): Promise<void>;
+1
View File
@@ -0,0 +1 @@
export default function csv(columns: any, datas: any, options: any, noHeader?: boolean): string;
@@ -0,0 +1,7 @@
export default csv;
declare namespace csv {
function _isIE11(): boolean;
function _isEdge(): boolean;
function _getDownloadUrl(text: any): string;
function download(filename: any, text: any): void;
}
@@ -0,0 +1,6 @@
export function export_table_to_excel(id: any): void;
export function export_json_to_excel(th: any, jsonData: any, defaultTitle: any, options?: {
merges: any[];
header: any;
cols: any;
}): void;
@@ -0,0 +1 @@
export declare function importCsvFromFile(file: File): Promise<unknown>;
+45
View File
@@ -0,0 +1,45 @@
import { ColumnProps } from "../../../d";
export type ExportUtil = {
csv: (params: CsvParams) => Promise<void>;
excel: (params: ExcelParams) => Promise<void>;
txt: (params: TxtParams) => Promise<void>;
};
export type TxtParams = {
text: string;
} & CsvParams;
export type ExcelParams = {
header?: any;
merges?: any[];
columns?: ExportColumn[];
data?: any[];
filename?: string;
};
export type CsvParams = {
columns?: ExportColumn[];
data?: any[];
filename?: string;
noHeader?: boolean;
separator?: string;
quoted?: boolean;
};
/**
* 导出列配置
*/
export type ExportColumn<R = any> = {
columnProps?: ColumnProps<R>;
key: string;
title: string;
width?: number;
[key: string]: any;
};
export type ExportLibColumn = {
prop: string;
label: string;
};
export type ImportData = {
data: any[];
columns: ExportColumn[];
};
export type ImportUtil = {
csv: (file: File) => Promise<ImportData>;
};
+5
View File
@@ -0,0 +1,5 @@
import { ExportUtil } from "./d";
export declare const exportUtil: ExportUtil;
export declare const importUtil: {
csv(file: File): Promise<unknown>;
};
+1
View File
@@ -0,0 +1 @@
export * from "./fs-export";
+10
View File
@@ -0,0 +1,10 @@
declare class I18n {
vueI18nInstance: any;
t(key: string, args: any): any;
setVueI18n(instance: any): void;
}
export declare const i18n: I18n;
export declare function useI18n(): {
t: any;
};
export {};
+2
View File
@@ -0,0 +1,2 @@
declare const _default: any;
export default _default;
+2
View File
@@ -0,0 +1,2 @@
declare const _default: any;
export default _default;
+13
View File
@@ -0,0 +1,13 @@
declare function doFormat(date: any, format: string): string;
declare function dateFormatter(value: any, format?: string): string;
declare function daterangeFormatter(opts: {
value: any;
}): string;
declare function datetimerangeFormatter(opts: {
value: any;
}): string;
declare const shortcuts: {
text: string;
onClick(picker: any): void;
}[];
export { daterangeFormatter, datetimerangeFormatter, dateFormatter, doFormat, shortcuts };
+10
View File
@@ -0,0 +1,10 @@
declare function getTypes(): any;
declare function getType(key: string): any;
declare function addTypes(newTypes: any): void;
declare const _default: {
getType: typeof getType;
addTypes: typeof addTypes;
getTypes: typeof getTypes;
install(): void;
};
export default _default;
+62
View File
@@ -0,0 +1,62 @@
/**
* 辅助type 即将废弃,antdv已经有更好的方式做跨列配置
*/
export default function (): {
colspan: {
form: {
labelCol?: undefined;
wrapperCol?: undefined;
col: {
span: number;
};
} | {
labelCol: {
span: any;
};
wrapperCol: {
span: number;
};
col: {
span: number;
};
};
};
colspan3: {
form: {
labelCol?: undefined;
wrapperCol?: undefined;
col: {
span: number;
};
} | {
labelCol: {
span: any;
};
wrapperCol: {
span: number;
};
col: {
span: number;
};
};
};
colspan4: {
form: {
labelCol?: undefined;
wrapperCol?: undefined;
col: {
span: number;
};
} | {
labelCol: {
span: any;
};
wrapperCol: {
span: number;
};
col: {
span: number;
};
};
};
};
+41
View File
@@ -0,0 +1,41 @@
/// <reference types="chai" />
export default function (): {
button: {
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
column: {
component: {
name: string;
vModel: string;
};
};
};
link: {
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
column: {
component: {
constructor: Function;
toString(): string;
toLocaleString(): string;
valueOf(): Object;
hasOwnProperty(v: PropertyKey): boolean;
isPrototypeOf(v: Object): boolean;
propertyIsEnumerable(v: PropertyKey): boolean;
should: Chai.Assertion;
name: string;
vModel: string;
};
};
};
};
+21
View File
@@ -0,0 +1,21 @@
export default function (): {
"dict-cascader": {
search: {
component: {
clearable: boolean;
};
};
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
column: {
component: {
name: string;
};
};
};
};
+2
View File
@@ -0,0 +1,2 @@
import { ColumnCompositionProps } from "../../d";
export default function (): Record<string, ColumnCompositionProps>;
+68
View File
@@ -0,0 +1,68 @@
export default function (): {
number: {
form: {
component: {
name: string;
props: {};
};
};
align: string;
};
switch: {
form: {
component: {
name: string;
props: {};
};
};
component: {
name: string;
props: {};
};
align: string;
};
slider: {
form: {
component: {
name: string;
props: {};
};
};
align: string;
};
rate: {
form: {
component: {
name: string;
props: {};
};
};
align: string;
};
"color-picker": {
form: {
component: {
name: string;
props: {};
};
};
align: string;
};
transfer: {
form: {
component: {
name: string;
props: {};
};
};
align: string;
};
autocomplete: {
form: {
component: {
name: string;
props: {};
};
};
};
};
+18
View File
@@ -0,0 +1,18 @@
export default function (): {
icon: {
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
column: {
component: {
name: string;
vModel: string;
style: string;
};
};
};
};
+10
View File
@@ -0,0 +1,10 @@
export default function (): {
number: {
form: {
component: {
name: string;
vModel: string;
};
};
};
};
+12
View File
@@ -0,0 +1,12 @@
export default function (): {
"phone-number": {
form: {
component: {
name: string;
};
};
column: {
formatter(row: any, column: any, value: any): string;
};
};
};
+122
View File
@@ -0,0 +1,122 @@
export default function (): {
select: {
search: {
autoSearchTrigger: string;
};
form: {
component: {
[x: string]: string | boolean;
name: string;
};
};
};
"dict-select": {
search: {
autoSearchTrigger: string;
};
column: {
component: {
name: string;
vModel: string;
};
};
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
};
"table-select": {
column: {
component: {
name: string;
vModel: string;
};
};
form: {
component: {
name: string;
};
};
};
"editable-select": {
column: {
component: {
name: string;
vModel: string;
};
};
form: {
component: {
name: string;
};
};
};
"dict-radio": {
search: {
component: {
name: string;
vModel: string;
autoSearchTrigger: string;
};
};
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
column: {
component: {
name: string;
vModel: string;
};
};
};
"dict-checkbox": {
search: {
component: {
name: string;
};
autoSearchTrigger: string;
};
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
column: {
component: {
name: string;
vModel: string;
};
};
};
"dict-switch": {
search: {
component: {
name: string;
vModel: string;
};
autoSearchTrigger: string;
};
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
column: {
component: {
name: string;
vModel: string;
};
};
};
};
+52
View File
@@ -0,0 +1,52 @@
/// <reference types="chai" />
export default function (): {
text: {
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
search: {
autoSearchTrigger: string;
};
};
password: {
form: {
component: {
constructor: Function;
toString(): string;
toLocaleString(): string;
valueOf(): Object;
hasOwnProperty(v: PropertyKey): boolean;
isPrototypeOf(v: Object): boolean;
propertyIsEnumerable(v: PropertyKey): boolean;
should: Chai.Assertion;
name: string;
vModel: string;
};
};
search: {
autoSearchTrigger: string;
};
};
textarea: {
search: {
component: {
[x: string]: string | boolean;
name: string;
type: string;
};
autoSearchTrigger: string;
};
form: {
component: {
[x: string]: string | boolean;
name: string;
type: string;
vModel: string;
};
};
};
};
+20
View File
@@ -0,0 +1,20 @@
export default function (): {
"dict-tree": {
search: {
autoSearchTrigger: string;
};
column: {
component: {
name: string;
vModel: string;
};
};
form: {
component: {
[x: string]: string | boolean;
name: string;
vModel: string;
};
};
};
};
+1
View File
@@ -0,0 +1 @@
export * from "@fast-crud/ui-interface";
+9
View File
@@ -0,0 +1,9 @@
export type LoggerConfig = {
off?: {
tableColumns?: boolean;
};
};
export type GlobalConfig = {
logger?: LoggerConfig;
};
export declare const GlobalConfig: GlobalConfig;
+9
View File
@@ -0,0 +1,9 @@
import { DynamicallyCrudOptions, UseCrudProps } from "../d";
declare const defaultCrudOptions: {
commonOptions(ctx?: UseCrudProps<any, any>): any;
defaultOptions(opts: {
t: any;
crudOptionsRef: any;
}): DynamicallyCrudOptions<any>;
};
export default defaultCrudOptions;
+13
View File
@@ -0,0 +1,13 @@
export * from "./use-crud";
export * from "./use-compute";
export * from "./use-dict";
export * from "./use-dict-define";
export * from "./use-types";
export * from "./use-ui";
export * from "./use-expose";
export * from "./use-merge";
export * from "./use-columns";
export * from "./use-drag";
export * from "./use-form";
export * from "./config";
export * from "./use-plugins";
+22
View File
@@ -0,0 +1,22 @@
import { ColumnCompositionProps, ColumnProps, CompositionColumns, CrudOptions, DynamicallyCrudOptions, FormProps, TableColumnsProps, UseFsContext } from "../d";
export type MergeColumnPlugin = {
name: string;
handle: (columnProps: any, crudOptions: any, index: number) => {};
order: number;
};
export declare function registerMergeColumnPlugin(plugin: MergeColumnPlugin): void;
export declare function buildTableColumnsFlatMap(map: TableColumnsProps, columns: TableColumnsProps): TableColumnsProps;
declare function doColumnsSort(columns: TableColumnsProps): TableColumnsProps;
declare function buildFormOptions(crudOptions: DynamicallyCrudOptions, context?: UseFsContext, mode?: string): FormProps;
declare function buildColumns(userOptions: CrudOptions): CrudOptions;
export declare function forEachTableColumns(columns: TableColumnsProps, callback: (col: ColumnProps, key: string) => void): void;
export declare function forEachColumns(columns: CompositionColumns, callback: (col: ColumnCompositionProps, key: string) => void): void;
export declare function useColumns(): {
buildFormOptions: typeof buildFormOptions;
buildColumns: typeof buildColumns;
registerMergeColumnPlugin: typeof registerMergeColumnPlugin;
forEachColumns: typeof forEachColumns;
doColumnsSort: typeof doColumnsSort;
forEachTableColumns: typeof forEachTableColumns;
};
export {};
+25
View File
@@ -0,0 +1,25 @@
import { Ref } from "vue";
import { AsyncComputeRef, ComputeFn, ComputeRef, ScopeContext } from "../d";
declare function doComputed(getTargetFunc: any, getContextFn: () => any, excludes?: any[], userComputedFn?: (target: any) => any): import("vue").ComputedRef<any>;
export declare class ComputeValue<T = any, R = any> implements ComputeRef<T, R> {
computeFn: ComputeFn<T, R>;
constructor(computeFn: ComputeFn<T, R>);
}
export declare function compute<T = any, R = any>(computeFn: ComputeFn<T, R>): ComputeRef<T, R>;
export type GetContextFn = () => any;
export declare class AsyncComputeValue<RV, R = any, WV = any> implements AsyncComputeRef<RV, R> {
watch?: (context: ScopeContext<R>) => WV;
asyncFn: (value: WV, getContextFn: GetContextFn) => Promise<RV>;
defaultValue?: any;
constructor(options: AsyncComputeRef<RV, R>);
buildAsyncRef(getContextFn: GetContextFn): Ref<RV, RV>;
}
export declare function asyncCompute<RV = any, R = any, WV = any>(options: AsyncComputeRef<RV, R, WV>): AsyncComputeRef<RV, R, WV>;
export declare function useCompute(): {
ComputeValue: typeof ComputeValue;
compute: typeof compute;
AsyncComputeValue: typeof AsyncComputeValue;
asyncCompute: typeof asyncCompute;
doComputed: typeof doComputed;
};
export {};
+14
View File
@@ -0,0 +1,14 @@
import { CrudBinding, CrudExpose, UseCrudProps, UseCrudRet, UseFsProps, UseFsRet } from "../d";
import { Ref } from "vue";
export declare function useCrud<T = any, R = any>(ctx: UseCrudProps<T, R>): UseCrudRet<R>;
export declare function useFs<R = any, C = any>(props: UseFsProps<R, C>): UseFsRet<R, C>;
export declare function useFsAsync<R = any, C = any>(props: UseFsProps<R, C>): Promise<UseFsRet<R, C>>;
export type UseFsRefOptions = {
deep?: boolean;
};
export declare function useFsRef(): {
crudRef: Ref<any, any>;
crudBinding: Ref<CrudBinding, CrudBinding>;
context: any;
crudExpose: CrudExpose<any>;
};
+167
View File
@@ -0,0 +1,167 @@
import { UnwrapNestedRefs } from "vue";
declare const UnMergeable: {
new (): {
cloneable: boolean;
setCloneable(cloneable: any): void;
};
};
export type DictRequest = (req: {
url: string;
dict: Dict;
}) => Promise<any[]>;
declare function setDictRequest(request: DictRequest): void;
export type DictGetUrl = (context?: any) => string;
export type DictGetData<T> = (context?: any) => Promise<T[]>;
/**
* Dict参数
*/
export interface DictOptions<T = any> {
/**
* dict请求url
*/
url?: string | DictGetUrl;
/**
* 自定义获取data远程方法
*/
getData?: DictGetData<T>;
/**
* 字典项value字段名称
*/
value?: string;
/**
* 字典项label字段名称
*/
label?: string;
labelBuilder?: (item: any) => string;
/**
* 字典项children字段名称
*/
children?: string;
/**
* 字典项color字段名称
*/
color?: string;
/**
* 是否是树形
*/
isTree?: boolean;
/**
* 是否全局缓存, 建议将dict()实例放到全局文件中引用,相当于store,也可达到全局缓存的效果
*/
cache?: boolean;
/**
* 是否将本dict当做原型,所有组件引用后将clone一个实例
*/
prototype?: boolean;
/**
* 是否分发时复制
*/
cloneable?: boolean;
/**
* dict创建后是否立即请求
*/
immediate?: boolean;
/**
* 根据values 远程获取字典
* @param values
*/
getNodesByValues?: (values: any[], options?: LoadDictOpts) => Promise<T[]>;
/**
* dict数据远程加载完后触发
*/
onReady?: (context: any) => void;
/**
* 自定义参数
*/
custom?: any;
/**
* 本地字典数据,无需远程请求
*/
data?: T[];
}
export type LoadDictOpts = {
reload?: boolean;
value?: any;
[key: string]: any;
};
export type DictOnReadyContext = {
dict: Dict;
[key: string]: any;
};
/**
*
* @param url
* @param context = {dict, scope}
* @returns {Promise<*>}
*/
export declare class Dict<T = any> extends UnMergeable implements DictOptions<T> {
cache: boolean;
prototype: boolean;
immediate: boolean;
url?: string | DictGetUrl;
getData?: DictGetData<T>;
value: string;
label: string;
labelBuilder?: (item: any) => string;
children: string;
color: string;
isTree: boolean;
_data: null | T[];
get data(): T[];
set data(data: T[]);
originalData?: T[];
dataMap: any;
loading: boolean;
custom: {};
getNodesByValues?: (values: any, options?: LoadDictOpts) => Promise<T[]>;
onReady?: (context: DictOnReadyContext) => void;
notifies: Array<any>;
constructor(dict: DictOptions<T>);
isDynamic(): boolean;
setData(data: any[]): void;
/**
* 加载字典
*/
_loadDict(context: LoadDictOpts): Promise<any[]>;
_triggerNotify(): void;
_registerNotify(): Promise<any[]>;
/**
* 加载字典
* @param context 当prototype=true时会传入
*/
loadDict(context?: LoadDictOpts): Promise<any[]>;
reloadDict(context?: LoadDictOpts): Promise<any[]>;
_unfetchValues: Record<any, {
loading: boolean;
value: any;
}>;
/**
* 根据value获取nodes 追加数据
* @param values
*/
appendByValues(values: any[]): Promise<any[]>;
clear(): void;
getRemoteDictData(context?: any): Promise<any>;
toMap(): void;
buildMap(map: any, list: any): void;
getValue(item: any): any;
getLabel(item: any): any;
getChildren(item: any): any;
getColor(item: any): any;
getDictData(): T[];
getDictMap(): any;
getNodeByValue(value: any): any;
getNodesFromDataMap(value: any): any[];
}
/**
* 创建Dict对象
* 注意:这里只能定义返回<any>,否则build结果会缺失index.d.ts
* @param config
*/
export declare function dict<T = any>(config: DictOptions<T>): UnwrapNestedRefs<Dict<any>>;
export declare function useDictDefine(): {
dict: typeof dict;
setDictRequest: typeof setDictRequest;
Dict: typeof Dict;
};
export {};
+16
View File
@@ -0,0 +1,16 @@
import { Dict } from "../use/use-dict-define";
export declare function useDict(props: any, ctx: any, vModel?: string): {
createComputedOptions: () => import("vue").ComputedRef<any>;
loadDict: (reload?: boolean) => Promise<void>;
reloadDict: () => Promise<void>;
clearDict: () => void;
getDictData: () => any;
getDict: () => any;
watchValue: () => void;
getValue: (item: any) => any;
getLabel: (item: any) => any;
getChildren: (item: any) => any;
getColor: (item: any) => any;
removePropValue: (item: any, prop: any) => void;
curDict: Dict<any>;
};
+8
View File
@@ -0,0 +1,8 @@
export type DragModalOptions = {
getModal: () => HTMLElement;
};
declare function dragModal(opts: DragModalOptions): Promise<void>;
export declare function useDrag(): {
dragModal: typeof dragModal;
};
export {};
+22
View File
@@ -0,0 +1,22 @@
import { Ref } from "vue";
import { CrudExpose } from "../d/expose";
import { CrudBinding } from "../d";
export type UseExposeProps<R = any> = {
crudRef: Ref;
crudBinding: Ref<CrudBinding<R>>;
};
export type UseExposeRet<R = any> = {
expose: CrudExpose<R>;
crudExpose: CrudExpose<R>;
};
export type UseEditableProps<R = any> = {
crudExpose: CrudExpose<R>;
};
export type EditableOnEnabledProps = {
editable: any;
};
/**
*
* @param props
*/
export declare function useExpose<R = any>(props: UseExposeProps<R>): UseExposeRet<R>;
+16
View File
@@ -0,0 +1,16 @@
import { DynamicallyCrudOptions, OpenDialogProps } from "../d";
import { ComponentInternalInstance, VNode } from "vue";
export type FormWrapperInstance = {
id: string;
vNode: VNode;
vm: ComponentInternalInstance;
props: any;
};
export type OpenFormDialogProps<R = any> = {
crudOptions: DynamicallyCrudOptions<R>;
context?: any;
};
export declare function useFormWrapper(pd?: any): {
openDialog: (opts: OpenDialogProps) => Promise<any>;
openCrudFormDialog: <R = any>(opts: OpenFormDialogProps<R>) => Promise<any>;
};
+12
View File
@@ -0,0 +1,12 @@
declare function merge(target: any, ...sources: any): any;
declare function cloneDeep(target: any): any;
declare class UnMergeable {
cloneable: boolean;
setCloneable(cloneable: any): void;
}
export declare function useMerge(): {
merge: typeof merge;
cloneDeep: typeof cloneDeep;
UnMergeable: typeof UnMergeable;
};
export {};
+4
View File
@@ -0,0 +1,4 @@
import { CrudOptionsPluginHandle, CrudOptionsPluginOpts, CrudOptionsPluginReg } from "../d";
export declare const crudOptionsPlugins: Record<string, CrudOptionsPluginReg>;
export declare function registerCrudOptionsPlugin(name: string, plugin: CrudOptionsPluginHandle, opts?: CrudOptionsPluginOpts): void;
export declare function getCrudOptionsPlugin(name: string): CrudOptionsPluginReg;
+6
View File
@@ -0,0 +1,6 @@
export declare function useTypes(): {
addTypes: (newTypes: any) => void;
getType: (key: string) => any;
getTypes: () => any;
install: () => void;
};
+2
View File
@@ -0,0 +1,2 @@
import { uiContext, useUi } from "../ui";
export { uiContext, useUi };
+3
View File
@@ -0,0 +1,3 @@
export declare function useVModel(props: any, ctx: any, vModel: string): {
[x: string]: any;
};
@@ -0,0 +1,3 @@
export declare function getEachDeep(_: any): ForEachDeep;
export type ForEachDeep = (obj: any, callback: any, options?: any) => any;
export declare const forEachDeep: ForEachDeep;
+3
View File
@@ -0,0 +1,3 @@
export declare const deepdash: {
forEachDeep: import("./get-each-deep").ForEachDeep;
};
@@ -0,0 +1,2 @@
export declare function isObject(value: any): boolean;
export default function getIterate(_: any): (item: any) => void;
@@ -0,0 +1,5 @@
declare function getPathToString(_: any): (path: any, ...prefixes: any) => any;
declare namespace getPathToString {
var notChainable: boolean;
}
export default getPathToString;
+36
View File
@@ -0,0 +1,36 @@
import { trace } from "./util.trace";
import store from "./util.store";
export * from "./util.log";
import * as clipboard from "./util.clipboard";
export declare const utils: {
logger: {
debug: (...args: any) => void;
info: (...args: any) => void;
warn: (...args: any) => void;
error: (...args: any) => void;
log: (...args: any) => void;
};
strings: {
isEmpty: (value?: string) => boolean;
isAllEmpty: (...values: any) => boolean;
hasEmpty: (...values: any) => boolean;
};
trace: typeof trace;
vite: {
transformFromGlob: (modules: any, pickNameExp?: any, transform?: any) => any;
installAsyncComponents: (app: any, modules: any, excludes: any, pickNameExp: any, transform: any) => void;
installSyncComponents: (app: any, modules: any, excludes: any, pickNameExp: any, transform: any) => void;
createAsyncComponent: (es: any) => new () => import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any>;
loadAsyncComponentFromGlob: (modules: any) => any;
loadComponentFromGlob: (modules: any) => any;
};
store: typeof store;
deepdash: {
forEachDeep: import("./deepdash/get-each-deep").ForEachDeep;
};
dash: {
omit(ref: import("vue").Ref<any, any>, ...skips: string[]): any;
};
clipboard: typeof clipboard;
};
export default utils;
+14
View File
@@ -0,0 +1,14 @@
/**
* 使用现代Clipboard API复制文本到剪贴板
* @param {string} text - 要复制的文本
* @returns {Promise<boolean>} 复制是否成功
*/
export declare function copyToClipboard(text: any): Promise<boolean>;
/**
* 使用现代Clipboard API读取剪贴板文本
* @returns {Promise<string>} 剪贴板中的文本内容
*/
export declare function readToClipboard(): Promise<string>;
export declare function copyToMemory(text: any, key?: string): void;
export declare function readToMemory(key?: string): any;
export declare function clearMemoryClipboard(key?: string): void;
+3
View File
@@ -0,0 +1,3 @@
export declare const Constants: {
orderDefault: number;
};
+10
View File
@@ -0,0 +1,10 @@
import { Ref } from "vue";
declare const _default: {
/**
* 重构object,但忽略某些字段
* @param ref
* @param skips
*/
omit(ref: Ref, ...skips: string[]): any;
};
export default _default;
+9
View File
@@ -0,0 +1,9 @@
declare const logger: {
debug: (...args: any) => void;
info: (...args: any) => void;
warn: (...args: any) => void;
error: (...args: any) => void;
log: (...args: any) => void;
};
export default logger;
export declare function setLogger(opts?: any): void;
+23
View File
@@ -0,0 +1,23 @@
import { FsRemoteStorage } from "../d";
export default class TableStore {
remoteStorage?: FsRemoteStorage;
$router: any;
tableName: string;
keyType: string | boolean;
id?: string;
constructor(opts: {
$router: any;
tableName: string;
keyType: string | boolean;
remoteStorage?: FsRemoteStorage;
id?: string;
});
getTableId(): string;
getTable(): Promise<any>;
saveTable(table: any): Promise<void>;
clearTable(): Promise<void>;
updateTableValue(value: any, key?: string): Promise<void>;
getItemKey(): string;
getTableValue(key?: string): Promise<any>;
clearTableValue(key?: string): Promise<void>;
}
+9
View File
@@ -0,0 +1,9 @@
declare function isEmpty(value?: string | null): boolean;
declare function isAllEmpty(...values: any): boolean;
declare function hasEmpty(...values: any): boolean;
declare const StringUtils: {
isEmpty: typeof isEmpty;
isAllEmpty: typeof isAllEmpty;
hasEmpty: typeof hasEmpty;
};
export default StringUtils;
+1
View File
@@ -0,0 +1 @@
export declare function trace(name: string, enable?: boolean): void;
+15
View File
@@ -0,0 +1,15 @@
declare function createAsyncComponent(es: any): new () => import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any>;
declare function installAsyncComponents(app: any, modules: any, excludes: any, pickNameExp: any, transform: any): void;
declare function installSyncComponents(app: any, modules: any, excludes: any, pickNameExp: any, transform: any): void;
declare function transformFromGlob(modules: any, pickNameExp?: any, transform?: any): any;
declare function loadAsyncComponentFromGlob(modules: any): any;
declare function loadComponentFromGlob(modules: any): any;
declare const _default: {
transformFromGlob: typeof transformFromGlob;
installAsyncComponents: typeof installAsyncComponents;
installSyncComponents: typeof installSyncComponents;
createAsyncComponent: typeof createAsyncComponent;
loadAsyncComponentFromGlob: typeof loadAsyncComponentFromGlob;
loadComponentFromGlob: typeof loadComponentFromGlob;
};
export default _default;
+98
View File
@@ -0,0 +1,98 @@
import { A as l, ar as u, C as i, D as n, F as m, a9 as c, am as p, O as C, a1 as d, ab as b, L as D, I as g, $ as f, al as S, ai as T, ah as x, aj as y, ae as h, af as I, ak as L, an as E, a3 as P, a2 as R, ap as v, U as O, X as V, V as A, W as M, Z as U, Y as k, P as w, S as B, R as H, Q as W, T as j, K as q, J as G, _ as K, H as N, N as z, a4 as J, a5 as Q, a7 as X, a6 as Y, M as Z, a0 as _, ad as $, ao as ss, a8 as as, aa as es, ag as os, G as ts, aq as rs, i as Fs, q as ls, h as us, z as is, F as ns, l as ms, au as cs, v as ps, t as Cs, ac as ds, E as bs, av as Ds, as as gs, at as fs, B as Ss, r as Ts, s as xs, w as ys, j as hs, b as Is, k as Ls, m as Es, x as Ps, o as Rs, y as vs, d as Os, e as Vs, f as As, a as Ms, p as Us, n as ks, u as ws } from "./index-8d4b0502.mjs";
export * from "@fast-crud/ui-interface";
import { uiContext as Ws, useUi as js } from "@fast-crud/ui-interface";
import "vue";
import "lodash-es";
import "dayjs";
import "@iconify/vue";
import "vue-router";
export {
l as AsyncComputeValue,
u as ColumnsFilterProvideKey,
i as ComputeValue,
n as Dict,
m as FastCrud,
c as FsActionbar,
p as FsBox,
C as FsButton,
d as FsCell,
b as FsColumnsFilterLayoutDefault,
D as FsComponentRender,
g as FsContainer,
f as FsCrud,
S as FsDateFormat,
T as FsDictCascader,
x as FsDictCascaderFormat,
y as FsDictCheckbox,
h as FsDictRadio,
I as FsDictSelect,
L as FsDictSwitch,
E as FsDictTree,
P as FsEditable,
R as FsEditableCell,
v as FsEditableSelect,
O as FsForm,
V as FsFormHelper,
A as FsFormItem,
M as FsFormItemCol,
U as FsFormProvider,
k as FsFormWrapper,
w as FsIcon,
B as FsIconSelector,
H as FsIconSvg,
W as FsIconify,
j as FsLabel,
q as FsLayoutCard,
G as FsLayoutDefault,
K as FsLoading,
N as FsPage,
z as FsRender,
J as FsRowHandle,
Q as FsSearch,
X as FsSearchLayoutDefault,
Y as FsSearchV1,
Z as FsSlotRender,
_ as FsTable,
$ as FsTableColumnsFixedController,
ss as FsTableSelect,
as as FsTabsFilter,
es as FsToolbar,
os as FsValuesFormat,
ts as GlobalConfig,
rs as SetFormDataOptions,
Fs as asyncCompute,
ls as buildTableColumnsFlatMap,
us as compute,
is as crudOptionsPlugins,
ns as default,
ms as dict,
cs as exportTable,
ps as forEachColumns,
Cs as forEachTableColumns,
ds as fsColumnsFilterNestList,
bs as getCrudOptionsPlugin,
Ds as importTable,
gs as loadFsExportUtil,
fs as loadFsImportUtil,
Ss as registerCrudOptionsPlugin,
Ts as registerMergeColumnPlugin,
xs as setLogger,
Ws as uiContext,
ys as useColumns,
hs as useCompute,
Is as useCrud,
Ls as useDict,
Es as useDictDefine,
Ps as useDrag,
Rs as useExpose,
vs as useFormWrapper,
Os as useFs,
Vs as useFsAsync,
As as useFsRef,
Ms as useI18n,
Us as useMerge,
ks as useTypes,
js as useUi,
ws as utils
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFzdC1jcnVkLm1qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OyJ9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+118
View File
@@ -0,0 +1,118 @@
export default {
name: "en",
fs: {
component: {
select: {
placeholder: "please select"
}
},
addForm: { title: "add" },
editForm: { title: "edit" },
viewForm: { title: "view" },
rowHandle: {
title: "handle",
remove: {
text: "remove",
confirmTitle: "remove tip",
confirmMessage: "Are you sure you want to delete this record?",
success: "delete success!",
confirmText: "confirm",
cancelText: "cancel"
},
copy: {
text: "copy"
},
edit: {
text: "edit"
},
view: {
text: "view"
}
},
form: {
cancel: "cancel",
ok: "ok",
reset: "reset",
saveRemind: {
title: "save remind",
content: "The form data has changed, whether to save",
cancel: "don't save",
ok: "save"
},
copy: "copy",
paste: "paste"
},
actionbar: { add: "add" },
toolbar: {
columnFilter: {
title: "columns set",
fixed: "fixed",
order: "sort",
reset: "reset",
confirm: "ok",
unnamed: "unnamed"
},
search: { title: "show search bar" },
refresh: { title: "refresh" },
compact: { title: "compact mode" },
export: { title: "download" },
columns: { title: "columns set" }
},
search: {
container: {
collapseButton: {
text: {
collapse: "collapse",
expand: "expand"
}
}
},
search: { text: "search" },
reset: { text: "reset" },
error: {
message: "form valid error"
},
tabs: { all: "All" }
},
pagination: {
showTotal: "Total {0} items"
},
date: { formatter: { to: "to" } },
extends: {
tableSelect: {
view: "view",
select: "select",
current: "Current selection",
ok: "OK",
cancel: "Cancel"
},
copyable: {
copy: "Copy",
success: "Copied successfully",
error: "Copy failed"
},
cropper: {
title: "image crop",
preview: "preview",
reChoose: "reChoose",
flipX: "flipX",
flipY: "flipY",
reset: "reset",
cancel: "cancel",
confirm: "confirm",
chooseImage: "+ choose image",
onlySupport: "only",
sizeLimit: "size limit",
sizeNoLimit: " no limit"
},
fileUploader: {
text: "fileUpload",
limitTip: "file count limit: {0}",
sizeLimitTip: "file size limit: {0}, current size: {1}",
loadError: "image load error",
pixelLimitTip: "pixel limit : width:{0},height:{1}",
hasUploading: "The file is being uploaded, please wait for the upload to complete or delete"
}
}
}
} as any;
+121
View File
@@ -0,0 +1,121 @@
export default {
name: "zh-cn",
fs: {
component: {
select: {
placeholder: "请选择"
}
},
addForm: { title: "添加" },
editForm: { title: "编辑" },
viewForm: { title: "查看" },
rowHandle: {
title: "操作",
remove: {
text: "删除",
confirmTitle: "删除提示",
confirmMessage: "您确定要删除该记录吗?",
success: "删除成功!",
confirmText: "确定",
cancelText: "取消"
},
copy: {
text: "复制"
},
edit: {
text: "编辑"
},
view: {
text: "查看"
}
},
form: {
cancel: "取消",
ok: "确定",
reset: "重置",
saveRemind: {
title: "提示",
content: "表单数据有变更,是否保存",
cancel: "不保存",
ok: "保存"
},
copy: "复制",
paste: "粘贴",
copySuccess: "表单数据已复制,您可以在添加对话框中粘贴"
},
actionbar: { add: "添加" },
toolbar: {
columnFilter: {
title: "列设置",
fixed: "固定",
order: "排序",
reset: "还原",
confirm: "确定",
unnamed: "未命名"
},
search: { title: "查询显示" },
refresh: { title: "刷新" },
compact: { title: "紧凑模式" },
export: { title: "下载" },
columns: { title: "列设置" }
},
search: {
container: {
collapseButton: {
text: {
collapse: "收起",
expand: "展开"
}
}
},
search: { text: "查询" },
reset: { text: "重置" },
error: {
message: "查询表单校验失败"
},
tabs: { all: "全部" }
},
pagination: {
showTotal: "共 {0} 条"
},
date: {
formatter: { to: "至" }
},
extends: {
tableSelect: {
view: "查看",
select: "选择",
current: "当前选中",
ok: "确定",
cancel: "取消"
},
copyable: {
copy: "复制",
success: "复制成功",
error: "复制失败"
},
cropper: {
title: "图片裁剪",
preview: "预览",
reChoose: "重新选择",
flipX: "左右翻转",
flipY: "上下翻转",
reset: "重置",
cancel: "取消",
confirm: "确定",
chooseImage: "+ 选择图片",
onlySupport: "仅支持",
sizeLimit: "大小不能超过",
sizeNoLimit: "大小不限制"
},
fileUploader: {
text: "文件上传",
limitTip: "文件数量不能超过 {0}",
sizeLimitTip: "文件大小不能超过 {0},当前大小:{1}",
loadError: "图片加载失败",
pixelLimitTip: "图片像素尺寸不能超过 宽:{0},高:{1}",
hasUploading: "还有文件正在上传,请等待上传完成,或删除它"
}
}
}
} as any;
+1
View File
File diff suppressed because one or more lines are too long