1
0

2 Commity 30d9e04954 ... a04f96c171

Autor SHA1 Správa Dátum
  徐勤民 a04f96c171 feat(http): 扩展HTTP请求头支持布尔值类型 1 mesiac pred
  徐勤民 e480c0512a feat(basic): 新增列表项样式配置和上拉加载更多控制 1 mesiac pred
2 zmenil súbory, kde vykonal 10 pridanie a 4 odobranie
  1. 6 0
      README.md
  2. 4 4
      src/main/ets/http/HttpHelperX.ts

+ 6 - 0
README.md

@@ -590,6 +590,8 @@ build() {
         isLoading: this.isLoading,
         // 是否自动调用`onRefresh`方法,默认为`true`,加载组件会自动调用一次`onRefresh`
         init: false,
+        // 是否可以上拉加载更多,默认`default`
+        canLoadMore: 'default',
         // 第一次加载完成,是否定位到底部,默认`false`,定位到顶部
         positioningToBottom: true,
         // 控制器,提供跳转到顶部、跳转到底部、是否已经在最底部方法
@@ -631,6 +633,10 @@ build() {
       }, onDelete: () => {
         ToolsHelper.showMessage('删除')
       },
+      marginTop: index === 0 ? 7 : 0,
+      marginBottom: 7,
+      brtRight: 10,
+      brbRight: 10,
     }) {
     // item布局
       Column() {}

+ 4 - 4
src/main/ets/http/HttpHelperX.ts

@@ -4,14 +4,14 @@ import { http } from '@kit.NetworkKit';
 export interface HttpParamsGet {
   url: string
   query?: Record<string, string> | Object
-  headers?: Record<string, string | null | undefined>
+  headers?: Record<string, boolean | string | null | undefined>
 }
 
 export interface HttpParamsPost {
   url: string
   data?: string | Object | ArrayBuffer
   query?: Record<string, string> | Object
-  headers?: Record<string, string | null | undefined>
+  headers?: Record<string, boolean | string | null | undefined>
 }
 
 export interface HttpParamsUpload {
@@ -26,7 +26,7 @@ export interface HttpParamsForm {
   url: string
   data?: Record<string, string> | Object | undefined
   query?: Record<string, string> | Object
-  headers?: Record<string, string | null | undefined>
+  headers?: Record<string, boolean | string | null | undefined>
 }
 
 export class HttpHelperX {
@@ -36,7 +36,7 @@ export class HttpHelperX {
    * @param headers
    * @returns
    */
-  static getHeaders(ct: string, headers?: Record<string, string>) {
+  static getHeaders(ct: string, headers?: Record<string, boolean | string>) {
     return {
       "Content-Type": ct,
       // "Accept": "application/json",