import { Layer } from '../types' ; import handleClassName from '../handleClassName' ; import { picassoTrans } from '../../../picasso-trans/src' ; import { WebScale , Unit , ColorFormat , CodeType } from '../../../sketch-dsl/src' ; import generateWXML from './generateWXML' ; import generateWXSS from './generateWXSS' ; description param { Layer [ ] } data param { number } size export const picassoWeappCode = ( data , size ) => { data = handleClassName ( data ) ; data = picassoTrans ( data , { scale : WebScale . Points , unit : Unit . Weapp , colorFormat : ColorFormat . RGBA , codeType : CodeType . Weapp } ) ; const wxml = generateWXML ( data ) ; const wxss = generateWXSS ( data , size ) ; return { wxml , wxss } ; } ;