1.0.7 • Published 5 years ago

painter-wepy v1.0.7

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

小程序生成图片库Painter的Wepy版本

安装

    npm install painter-wepy --save
    import painter from 'painter-wepy'

例子

<script>
    <template lang="wxml" minapp="wepy">
        <painter :palette.sync="palette" @imgOK.user="onImgOK" />
    </template>
</script>

import wepy from 'wepy';
import painter from 'painter-wepy'

export default class Index extends wepy.page {
    components = {
        painter,
    };
    data = {
        palette: {
            {
                width: '654rpx',
                height: '1000rpx',
                background: '#eee',
                views: [
                        {
                        type: 'text',
                        text: 'borderWidth',
                        css: {
                            bottom: '40rpx',
                            right: '200rpx',
                            color: 'green',
                            borderWidth: '2rpx',
                        }
                    }
                ]
            }
        }
    }
    methods = {
        onImgOK(e) {
            this.imgUrl = e.path
            this.$apply();
        }
    }
}
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago