add theme @mxssfd/typedoc-theme, upgrade packages.

This commit is contained in:
Chen Lily 2024-01-25 17:05:00 +08:00
parent 724840019b
commit 0b9b322b80
5 changed files with 1229 additions and 781 deletions

View File

@ -2,21 +2,21 @@ import { Grid, GridItem, GridItemWrapper, GridSourceItem } from "./grid";
import { Dropdown, DropdownOptions } from "../dropdown";
/** 列类型枚举 */
interface GridColumnType {
declare enum GridColumnType {
/** 通用列 */
0: "Common";
Common = 0,
/** 单行文本框列 */
1: "Input";
Input = 1,
/** 下拉选择列 */
2: "Dropdown";
Dropdown = 2,
/** 复选框列 */
3: "Checkbox";
Checkbox = 3,
/** 图标列 */
4: "Icon";
Icon = 4,
/** 多行文本列 */
5: "Text";
Text = 5,
/** 日期选择列 */
6: "Date";
Date = 6
}
/** 列定义接口 */
@ -24,7 +24,7 @@ export interface GridColumnDefinition {
/** 列关键字,默认以该关键字从行数据中提取单元格值,行数据的关键字属性值里包含 DisplayValue 则优先显示此值 */
key?: string;
/** 列的类型,可以为 {@linkcode GridColumn} 的子类,或者内置类型 {@linkcode GridColumnType} */
type?: keyof GridColumnType | typeof GridColumn;
type?: GridColumnType | typeof GridColumn;
/** 列标题文本 */
caption?: string;
/** 列标题的元素样式 */

18
lib/ui/grid/grid.d.ts vendored
View File

@ -25,21 +25,21 @@ interface GridSourceItem {
}
/** 列排序枚举 */
interface GridColumnDirection {
declare enum GridColumnDirection {
/** 倒序 */
[-1]: Number,
Descending = -1,
/** 升序 */
1: Number
Ascending = 1
}
/** 列事件枚举 */
interface GridColumnColumnEventMap {
declare enum GridColumnColumnEvent {
/** 重排事件 */
"reorder": string,
Reorder = "reorder",
/** 宽调整事件 */
"resize": string,
Resize = "resize",
/** 排序事件 */
"sort": string
Sort = "sort"
}
/** Grid 控件基础类 */
@ -98,7 +98,7 @@ export class Grid {
/** 排序列的索引,默认值 -1 */
sortIndex?: Number;
/** 排序方式,正数升序,负数倒序,默认值 1 */
sortDirection?: keyof GridColumnDirection;
sortDirection?: GridColumnDirection;
/**
* Grid
@ -146,7 +146,7 @@ export class Grid {
* @param colIndex
* @param value
*/
onColumnChanged?: (type: keyof GridColumnColumnEventMap, colIndex: Number, value: Number | keyof GridColumnDirection) => void;
onColumnChanged?: (type: GridColumnColumnEvent, colIndex: Number, value: Number | GridColumnDirection) => void;
/**
*
* @param e

1962
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -26,11 +26,11 @@
"doc": "typedoc"
},
"devDependencies": {
"postcss-preset-env": "^8.2.0",
"sass": "^1.60.0",
"typedoc": "^0.24.8",
"typedoc-theme-hierarchy": "^4.1.2",
"vite": "^4.0.4",
"@mxssfd/typedoc-theme": "^1.1.3",
"postcss-preset-env": "^9.3.0",
"sass": "^1.70.0",
"typedoc": "^0.25.7",
"vite": "^5.0.12",
"vite-plugin-externals": "^0.6.2"
}
}

View File

@ -7,6 +7,8 @@
"out": "./docs",
"readme": "README.md",
"name": "UI Library",
"plugin": ["@mxssfd/typedoc-theme"],
"theme": "my-theme",
"disableSources": true,
"cleanOutputDir": true
}