Home

Awesome

chameleon-ui-builtin version

本仓库为 cml 框架的内置组件库,提供跨端基础内置组件

详细见cml内置组件文档

简介

cml 提供了大量内置组件,包括但不限于以下类型:

同时,cml提供给开发者扩展多态组件的能力

例如:

<template>
  <view class="flex-item"></view>
  <button type="blue" text="确定"/>
</template>

如何开发

npm install
cml dev  //开始开发

多端预览效果

web微信小程序native-weex
<img src="./preview/web.jpg" width="200px"/><img src="./preview/wx.png" width="200px"/><img src="./preview/weex.jpg" width="200px"/>

chameleon编译中标签替换规则

简单的标签替换

cmlwebweexwxalipaybaidu
viewdivdivviewviewview
cover-viewdivdivcover-viewcover-viewcover-view
textspantexttexttexttext
imageimgimageimageiamgeiamge
celldivcellviewviewView
blocktemplatetemplateblockblockblock
cover-imageimgimagecover-imagecover-imagecover-image

内置组件标签的替换

对于chameleon提供的一些内置基础组件,会替换成对应组件标签

cmlwebweexwxaliapybvaidu
pagecml-buildin-pagecml-buildin-pagecml-buildin-pagecml-buildin-pagecml-buildin-page
scrollercml-buildin-scrollercml-buildin-scrollercml-buildin-scrollercml-buildin-scrollercml-buildin-scroller
listcml-buildin-listcml-buildin-listcml-buildin-listcml-buildin-listcml-buildin-list
containercml-buildin-containercml-buildin-containercml-buildin-containercml-buildin-containercml-buildin-container
rowcml-buildin-rowcml-buildin-rowcml-buildin-rowcml-buildin-rowcml-buildin-row
colcml-buildin-colcml-buildin-colcml-buildin-colcml-buildin-colcml-buildin-col
buttoncml-buildin-buttoncml-buildin-buttoncml-buildin-buttoncml-buildin-buttoncml-buildin-button
inputcml-buildin-inputcml-buildin-inputcml-buildin-inputcml-buildin-inputcml-buildin-input
textareacml-buildin-textareacml-buildin-textareacml-buildin-textareacml-buildin-textareacml-buildin-textarea
switchcml-buildin-switchcml-buildin-switchcml-buildin-switchcml-buildin-switchcml-buildin-switch
radiocml-buildin-radiocml-buildin-radiocml-buildin-radiocml-buildin-radiocml-buildin-radio
checkboxcml-buildin-checkboxcml-buildin-checkboxcml-buildin-checkboxcml-buildin-checkboxcml-buildin-checkbox
videocml-buildin-videocml-buildin-videocml-buildin-videocml-buildin-videocml-buildin-video
carouselcml-buildin-carouselcml-buildin-carouselswiperswiperswiper
carousel-itemcml-buildin-carousel-itemcml-buildin-carousel-itemswiper-itemswiper-itemswiper-item

多态组件中 origin-tag 替换为 tag

比如:

cmlwebweexwxalipaybaidu
origin-buttonbuttonbuttonbuttonbuttonbutton
origin-inputinputinputinputinputInput