br-dionysus 1.1.4 → 1.3.0

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 CHANGED
@@ -1978,37 +1978,25 @@ const list = ref<{ name: string, className: string }[]>([
1978
1978
 
1979
1979
 
1980
1980
 
1981
+ ### 2) 所需参数
1981
1982
 
1982
- ### 1) 所需参数
1983
+ | 名称 | 描述 | 类型 | 可选值 | 默认值 |
1984
+ |-----------|----|---------------------------|:---:|:---:|
1985
+ | parameter | 参数 | UsePackageConfigParameter | - | {} |
1983
1986
 
1984
- | 名称 | 描述 | 类型 | 可选值 | 默认值 |
1985
- |------------|--------|--------------|:---:|:---:|
1986
- | name | 表格唯一标识 | string | - | - |
1987
- | tableTitle | 列配置 | tableTitle[] | - | - |
1988
- | tableData | 表格数据 | ref<any[]> | - | - |
1987
+ #### UsePackageConfigParameter
1989
1988
 
1990
- ### 2) 返回值
1989
+ | 名称 | 描述 | 类型 | 必填 | 默认值 |
1990
+ |-----------|-----------|-----------------------------------|----|--------------------------------------------------------------------------------------:|
1991
+ | setConfig | 触发设置配置的回调 | (key: string, value: any) => void | 否 | (key: string, data: any): void => { localStorage.setItem(key, JSON.stringify(data)) } |
1992
+ | getConfig | 触发获取配置的回调 | (key: string) => any | 否 | (key: string): any => JSON.parse(localStorage.getItem(key) \|\| '{}') |
1991
1993
 
1992
- | 名称 | 描述 | 类型 |
1993
- |------------------|---------|-----------------------------------------|
1994
- | tableTitle | 处理之后的表头 | TableTitle[] |
1995
- | tableConfig | 表头的配置项 | { [propName: string]: TableConfigItem} |
1996
- | headerDragend | 表格拖拽事件 | function |
1997
- | initColumnFilter | 列的筛选 | function |
1998
- | filtersValue | 过滤条件 | { [key: string]: Array<string,number>} |
1999
-
2000
- ### 3) TableTitle
1994
+ ### 2) 返回值
2001
1995
 
2002
- | 名称 | 描述 | 类型 |
2003
- |---------------|----------------------------------------------------------------------|---------------------------------------------|
2004
- | label | 显示的标题 | string |
2005
- | prop | 字段对应列的字段名字也可以使用 property属性 | string |
2006
- | minWidth? | 对应列的最小宽度与 width 的区别是 width 是固定的,min-width 会按比例分配剩余宽度 | number ,string, |
2007
- | className? | 列的className | string |
2008
- | sortable | 列是否能够排序 则代表用户希望远程排序,需要监听 Table 的 sort-change 事件 */ | Boolean |
2009
- | filters? | 据过滤的选项, 数组格式,数组中的元素需要有 text 和 value 属性。 数组中的每个元素都需要有 text 和 value 属性 | {text:string,number,value:string,number} [] |
2010
- | filterMethod? | 数据过滤使用的方法, 如果是多选的筛选项,对每一条数据会执行多次,任意一次返回 true 就会显示 | Function |
2011
- | headerAlign? | 表头对齐方式, 若不设置该项,则使用表格的对齐方式 | 'left' , 'center' , 'right' |
1996
+ | 名称 | 描述 | 类型 |
1997
+ |-----|--------|-----------------------------------|
1998
+ | set | 触发设置配置 | (key: string, value: any) => void |
1999
+ | get | 触发获取配置 | (key: string) => any |
2012
2000
 
2013
2001
 
2014
2002
 
@@ -2046,10 +2034,16 @@ const list = ref<{ name: string, className: string }[]>([
2046
2034
 
2047
2035
 
2048
2036
 
2037
+
2038
+
2049
2039
  表格组合 hook
2050
2040
  =================
2041
+ ### 1) 基础用法
2051
2042
 
2052
- ### 1) 所需参数
2043
+
2044
+
2045
+
2046
+ ### 2) 所需参数
2053
2047
 
2054
2048
  | 名称 | 描述 | 类型 | 可选值 | 默认值 |
2055
2049
  |------------|--------|--------------|:---:|:---:|
@@ -2057,7 +2051,7 @@ const list = ref<{ name: string, className: string }[]>([
2057
2051
  | tableTitle | 列配置 | tableTitle[] | - | - |
2058
2052
  | tableData | 表格数据 | ref<any[]> | - | - |
2059
2053
 
2060
- ### 2) 返回值
2054
+ ### 3) 返回值
2061
2055
 
2062
2056
  | 名称 | 描述 | 类型 |
2063
2057
  |------------------|---------|-----------------------------------------|
@@ -2067,7 +2061,7 @@ const list = ref<{ name: string, className: string }[]>([
2067
2061
  | initColumnFilter | 列的筛选 | function |
2068
2062
  | filtersValue | 过滤条件 | { [key: string]: Array<string,number>} |
2069
2063
 
2070
- ### 3) TableTitle
2064
+ ### 4) TableTitle
2071
2065
 
2072
2066
  | 名称 | 描述 | 类型 |
2073
2067
  |---------------|----------------------------------------------------------------------|---------------------------------------------|