8 Star 0 Fork 4

OpenHarmony-TPC / StatusViewJS

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

StatusViewJs

自定义不同状态组件

包含两部份:

  • statusView是自定义状态图,仿照原StausView组件开发
  • stauslayout是仿微信小程序页面状态切换组件

效果图

使用

1、StatusLayout使用(layoutpage.hml)

<element name="statusLayout" src="../../common/statuslayout/statusLayout.hml"></element>
<div class="container">
    <text class="btn" on:click="clickMethod">测试</text>
    <div class="dataDiv" show="{{ showList }}">
        <list class="todo-wraper">
            <list-item for="{{ datas }}" class="todo-item">
                <text class="todo-title">{{ $item }}</text>
            </list-item>
        </list>
    </div>
    <div show="{{ ! showList }}" class="statusLayoutDiv">
        <statusLayout id="contentView" @event-type="clickMethod"></statusLayout>
    </div>
</div>
  • @event-type是自定义事件,格式固定; 在statusLayout.js中使用this.$emit('eventType')即可实现掉用clickMethod

  • 在layoutpage.js中, var statusLayout = that.$child("contentView") 获取statuslayout的组件对象进行操作

2、StatusView使用(viewpage.hml)

<element name="statusView" src="../../common/statusview/statusView.hml"></element>

    <div class="statusViewDiv">
        <statusView id="contentView"></statusView>
    </div>

在js文件中,var statusview = this.$child("contentView")获取组件,实现按钮切换组件动画。

运行要求

SDK 6+

LICENSE

  Copyright (c) 2021 shanghaozhi
   StatusViewJS is licensed under Mulan PSL v2.
   You can use this software according to the terms and conditions of the Mulan PSL v2.
   You may obtain a copy of Mulan PSL v2 at:
            http://license.coscl.org.cn/MulanPSL2
   THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
   See the Mulan PSL v2 for more details.
Copyright 2017 Mert Şimşek. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

暂无描述 展开 收起
JavaScript 等 3 种语言
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/openharmony-tpc/StatusViewJS.git
git@gitee.com:openharmony-tpc/StatusViewJS.git
openharmony-tpc
StatusViewJS
StatusViewJS
master

搜索帮助