@mpxjs/webpack-plugin
Version:
mpx compile core
37 lines (34 loc) • 751 B
JavaScript
const TAG_NAME = 'switch'
module.exports = function ({ print }) {
const aliPropLog = print({ platform: 'ali', tag: TAG_NAME, isError: false })
const jdPropLog = print({ platform: 'jd', tag: TAG_NAME, isError: false })
return {
test: TAG_NAME,
web (tag, { el }) {
el.isBuiltIn = true
return 'mpx-switch'
},
ios (tag, { el }) {
el.isBuiltIn = true
return 'mpx-switch'
},
android (tag, { el }) {
el.isBuiltIn = true
return 'mpx-switch'
},
harmony (tag, { el }) {
el.isBuiltIn = true
return 'mpx-switch'
},
props: [
{
test: /^type$/,
ali: aliPropLog
},
{
test: /^disabled$/,
jd: jdPropLog
}
]
}
}