wwc

wpy-wx-confirmaction

用wepy,vuejs,es6等来开发微信小程序

Showing:

Popularity

Downloads/wk

0

GitHub Stars

5

Maintenance

Last Commit

4yrs ago

Contributors

2

Package

Dependencies

3

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

微信小程序 wepyjs 第三方confirmAction组件

confirmaction

说明

官方的actionsheet不能满足要求。所有开发了一个带提示和确定取消组件。 此组件依赖于wepyjs v1.5.2+

使用

有隐藏,有事件触发,比较复杂。请看示例吧

安装组件

npm install wpy-wx-confirmaction --save-dev

引入组件

// index.wpy
<template>
    <CofirmAction :cofirmhidden.sync="cofirmhidden" :actionTitle.sync="actionTitle" />
</template>
<script>
    import wepy from 'wepy';
    import confirmAction from 'wpy-wx-confirmaction';

    export default class Index extends wepy.page {
        components = {
            CofirmAction: confirmAction
        }

    }
</script>

调用方法(初始化默认值)

    this.cofirmhidden = true
    this.actionTitle = '确定要删除吗'
    CofirmAction.initAction({
        confirm() {
            console.log('confirm...')
            that.cofirmhidden = false
            wx.showToast({
            title: "删除成功",
            duration: 3000
            })
        },
        cancel() {
            console.log('cancel...')
            that.cofirmhidden = false
            wx.showToast({
            title: "取消删除",
            duration: 3000
            })
        }
    })

更多说明

参考github源码地址

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial