10 Star 2 Fork 12

OpenHarmony-SIG / ohos-SwipeLayout

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

SwipeLayout

简介

支持顶部、底部、左侧、右侧四个方向的滑动布局。

sample.png sample.png sample.png sample.png

下载安装

ohpm install @ohos/swipelayout

OpenHarmony ohpm环境配置等更多内容,请参考 如何安装OpenHarmony ohpm包

使用说明

在build中使用()

  Column() {
    SwipeLayoutLayDown({
              bottomViewLeftW: 200,
              bottomViewRightW: 300,
              bottomViewTopH:60,
              bottomViewBottomH:80,
              mWidth: '100%',
              mHeight: 100,
              parentIsTouch: $isTouch
            })
      }

接口说明

顶部、底部、左侧、右侧四个方向的滑动的自定义容器是通过在构造方法中使用字段来设置各种属性(自定义容器:SwipeLayout、SwipeLayoutLayDownFullList、SwipeLayoutLayDownFullGrid、SwipeLayoutLayDownRoot)

  1. 设置左侧布局宽度 bottomViewLeftW
  2. 设置右侧布局宽度 bottomViewRightW
  3. 设置组件高度 mHeight
  4. 设置组件宽度 mWidth
  5. 设置动画时长 mDuration
  6. 设置顶部布局高度 bottomViewTopH
  7. 设置底部布局高度 bottomViewBottomH

约束与限制

在下述版本验证通过:

  • DevEco Studio 版本: 4.1 Canary(4.1.3.317)

  • OpenHarmony SDK:API11 (4.1.0.36)

目录结构

|---- ohos-SwipeLayout  
|     |---- entry  # 示例代码文件夹
|     |---- SwipeLayout  # swipeLayout库文件夹
          |----src
              |----main
                  |----ets
                      |---- SwipeLayout.ets   # 自定义容器
                      |---- SimpleSwipeListener.ets   # 滑动监听器
                      |---- util/Attributes.ets   # 滑动模式枚举类
                      |---- SwipeLayoutLayDown.ets   # LayDown滑动效果的自定义容器
                      |---- SwipeLayoutLayDownRoot.ets   # 可以嵌套容器的自定义容器
                      |---- SwipeLayoutPullOut.ets   # PullOut滑动效果的自定义容器
                      |---- SwipeLayoutLayDownFullGrid.ets   # 适用于Grid自定义容器   
                      |---- SwipeLayoutLayDownFullList.ets   # 适用于List自定义容器 
|          |---- index.ets  # 对外接口
|     |---- README.md  # 安装使用方法                    

贡献代码

使用过程中发现任何问题都可以提 Issue 给我们,当然,我们也非常欢迎你给我们发 PR

开源协议

本项目基于 MIT License ,请自由地享受和参与开源。

The MIT License (MIT) Copyright (c) 2014 代码家 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
TypeScript 等 3 种语言
MIT
取消

发行版 (1)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/openharmony-sig/ohos-SwipeLayout.git
git@gitee.com:openharmony-sig/ohos-SwipeLayout.git
openharmony-sig
ohos-SwipeLayout
ohos-SwipeLayout
master

搜索帮助

14c37bed 8189591 565d56ea 8189591