Skip to content

hjyue1/painter-wepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

小程序生成图片库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();
        }
    }
}

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published