4.0.0 • Published 7 months ago

gd-lib v4.0.0

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

:toolbox: Functions

:gear: useList

列表

FunctionType
useList({ request, response, initSearchForm, isAuto }: Option) => { setList: (searchForm?: AnyObject) => Promise<void>; list: Ref<any[]>; searchForm: Ref<any>; isLoading: Ref<boolean>; isEmpty: Ref<boolean>; state: { ...; }; }

Parameters:

  • option.request: 请求数据
  • option.response: 处理响应数据
  • option.initSearchForm: 初始的查询条件
  • option.isAuto: onMounted时自动请求数据

:gear: useRecord

一条记录

FunctionType
useRecord({ request, response, initSearchForm, isAuto }: Option) => { setRecord: (searchForm?: AnyObject) => Promise<void>; record: Ref<any>; searchForm: Ref<any>; isLoading: Ref<boolean>; state: { record: any; searchForm: any; isLoading: boolean; }; }

:gear: useScrollList

滚动列表

FunctionType
useScrollList({ request, response, initSearchForm, pageSize, isAuto, onReachBottom, onPullDownRefresh, props }: Option) => { setList: (isSearch?: boolean) => Promise<void>; search: () => Promise<void>; next: () => Promise<void>; reset: () => Promise<void>; ... 8 more ...; state: { ...; }; }

:gear: useTable

表格

FunctionType
useTable({ request, response, initSearchForm, pageSize, isAuto, props }: Option) => { setList: (searchForm?: AnyObject) => Promise<void>; search: (searchForm?: AnyObject) => Promise<void>; reset: (searchForm?: AnyObject) => Promise<void>; pageNum: Ref<...>; ... 7 more ...; state: { ...; }; }

:gear: delay

延迟

FunctionType
delay(millisecond?: number) => Promise<unknown>

Parameters:

  • millisecond: - 毫秒

:gear: getMyUnoCssPreset

uno.css的preset

FunctionType
getMyUnoCssPreset(option?: Option) => { name: string; prefix: string; rules: ((RegExp or (([_, num]: any[]) => { margin: string; }))[] | (RegExp | (([_, num]: any[]) => { 'margin-top': string; }))[] | (RegExp | (([_, num]: any[]) => { ...; }))[] | ... 19 more ... | (RegExp | (([_, num]: any[]) => { ...; }))[])[]; }
4.0.0

7 months ago

3.3.20

2 years ago

3.3.21

2 years ago

3.3.19

2 years ago

3.3.14

2 years ago

3.3.15

2 years ago

3.3.17

2 years ago

3.3.18

2 years ago

3.3.9

2 years ago

3.3.8

2 years ago

3.3.13

2 years ago

3.3.10

2 years ago

3.3.11

2 years ago

3.3.12

2 years ago

3.3.7

2 years ago

3.3.6

2 years ago

3.3.5

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.1

2 years ago

3.2.2

2 years ago

3.3.0

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.3.2

2 years ago

3.1.0

2 years ago

3.0.12

2 years ago

3.0.11

2 years ago

3.0.10

2 years ago

3.0.8

2 years ago

3.0.7

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.2.6

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago