br-dionysus 1.1.3 → 1.2.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
 
@@ -446,10 +446,14 @@ const uc = { class: "g-inline-box" }, cc = ["data-show-inline-btn"], dc = ["data
446
446
  }
447
447
  return !0;
448
448
  };
449
- let oa = (e, t) => localStorage.setItem(e, JSON.stringify(t)), la = (e) => JSON.parse(localStorage.getItem(e) || "{}");
450
- const Ls = ({ setConfig: e, getConfig: t } = {}) => (e && (oa = e), t && (la = t), {
451
- set: (l, s, r) => oa(l, s, r),
452
- get: (l, s) => la(l, s)
449
+ let oa = (e, t) => {
450
+ localStorage.setItem(e, JSON.stringify(t));
451
+ }, la = (e) => JSON.parse(localStorage.getItem(e) || "{}");
452
+ const Ls = (e = {}) => (e.setConfig && (oa = e.setConfig), e.getConfig && (la = e.getConfig), {
453
+ set: (o, l) => {
454
+ oa(o, l);
455
+ },
456
+ get: (o) => la(o)
453
457
  }), xo = Ls(), Zt = (e, t = 100) => {
454
458
  e = e.replace("#", "").toLowerCase(), e.length === 3 && (e = e.split("").map((s) => s + s).join(""));
455
459
  let n = parseInt(e.substring(0, 2), 16), o = parseInt(e.substring(2, 4), 16), l = parseInt(e.substring(4, 6), 16);
@@ -11953,6 +11957,7 @@ export {
11953
11957
  El as TabPagePlugin,
11954
11958
  _1 as default,
11955
11959
  k1 as useGlobalZIndex,
11960
+ Ls as usePackageConfig,
11956
11961
  A1 as useRemainingSpace,
11957
11962
  vc as useSkin,
11958
11963
  x1 as useTableConfig