├── package ├── .npmignore ├── assets │ ├── css │ │ ├── global.css │ │ └── var.less │ ├── images │ │ ├── dialog.png │ │ ├── chameleon.jpg │ │ ├── chameleon.png │ │ ├── api │ │ │ └── kind │ │ │ │ ├── api.png │ │ │ │ ├── logo.png │ │ │ │ ├── media.png │ │ │ │ ├── page.png │ │ │ │ ├── device.png │ │ │ │ ├── feedback.png │ │ │ │ ├── location.png │ │ │ │ ├── network.png │ │ │ │ └── storage.png │ │ ├── index │ │ │ ├── pause.png │ │ │ ├── play.png │ │ │ ├── plus.png │ │ │ ├── record.png │ │ │ ├── stop.png │ │ │ ├── trash.png │ │ │ ├── wechat.png │ │ │ ├── icon_API.png │ │ │ ├── location.png │ │ │ ├── wechatHL.png │ │ │ ├── green_tri.png │ │ │ ├── icon_API_HL.png │ │ │ ├── icon_foot.png │ │ │ ├── icon_component.png │ │ │ ├── icon64_appwx_logo.png │ │ │ └── icon_component_HL.png │ │ └── component │ │ │ ├── pic │ │ │ ├── 1.jpg │ │ │ └── 2.jpg │ │ │ └── kind │ │ │ ├── form.png │ │ │ ├── logo.png │ │ │ ├── map.png │ │ │ ├── nav.png │ │ │ ├── view.png │ │ │ ├── canvas.png │ │ │ ├── content.png │ │ │ └── media.png │ └── js │ │ ├── style.js │ │ └── util.js ├── components │ ├── c-tip │ │ ├── images │ │ │ ├── left.png │ │ │ ├── top.png │ │ │ ├── bottom.png │ │ │ ├── close.png │ │ │ └── right.png │ │ ├── c-tip.interface │ │ └── com │ │ │ └── c-tip-angle │ │ │ ├── c-tip-angle.interface │ │ │ ├── c-tip-angle.weex.cml │ │ │ ├── c-tip-angle.qq.cml │ │ │ ├── c-tip-angle.web.cml │ │ │ ├── c-tip-angle.wx.cml │ │ │ ├── c-tip-angle.alipay.cml │ │ │ └── c-tip-angle.baidu.cml │ ├── c-dialog │ │ ├── images │ │ │ ├── gps.png │ │ │ ├── warn.png │ │ │ ├── close.png │ │ │ ├── prompt.png │ │ │ ├── thank.png │ │ │ ├── address.png │ │ │ ├── network.png │ │ │ ├── success.png │ │ │ └── microphone.png │ │ └── c-dialog.interface │ ├── c-toast │ │ ├── images │ │ │ ├── succ.png │ │ │ ├── warn.png │ │ │ └── loading.gif │ │ ├── c-toast.interface │ │ └── c-toast.cml │ ├── c-refresh │ │ ├── images │ │ │ └── loading.gif │ │ ├── c-refresh.interface │ │ ├── c-refresh.qq.cml │ │ ├── c-refresh.wx.cml │ │ ├── c-refresh.alipay.cml │ │ ├── c-refresh.baidu.cml │ │ ├── c-refresh.weex.cml │ │ └── c-refresh.web.cml │ ├── c-loading │ │ ├── assets │ │ │ └── img │ │ │ │ └── loading.gif │ │ ├── c-loading.interface │ │ └── c-loadingfunc.interface │ ├── c-tab-pane-item │ │ ├── c-tab-pane-item.interface │ │ └── c-tab-pane-item.cml │ ├── c-tab-pane │ │ ├── c-tab-pane.interface │ │ └── c-tab-pane.cml │ ├── c-popup │ │ └── c-popup.interface │ ├── c-tab-item │ │ └── c-tab-item.interface │ ├── c-tabbar │ │ └── c-tabbar.interface │ ├── c-picker-panel │ │ └── c-picker-panel.interface │ ├── c-radio-group │ │ ├── c-radio-group.interface │ │ └── c-radio-group.cml │ ├── c-tab │ │ ├── c-tab.interface │ │ └── c-tab.cml │ ├── c-actionsheet │ │ └── c-actionsheet.interface │ ├── c-checkbox-group │ │ ├── c-checkbox-group.interface │ │ └── c-checkbox-group.cml │ ├── c-picker-item │ │ ├── c-picker-item.interface │ │ ├── c-picker-item.web.cml │ │ ├── c-picker-item.weex.cml │ │ ├── c-picker-item.qq.cml │ │ ├── c-picker-item.wx.cml │ │ ├── c-picker-item.alipay.cml │ │ └── c-picker-item.baidu.cml │ └── c-picker │ │ ├── c-picker.interface │ │ └── c-picker.cml └── package.json ├── preview ├── web.jpg ├── wx.png └── weex.jpg ├── src ├── store │ ├── index │ │ ├── action-types.js │ │ ├── state.js │ │ ├── getter-types.js │ │ ├── mutation-types.js │ │ ├── getters.js │ │ ├── actions.js │ │ └── mutations.js │ ├── actions.js │ ├── getters.js │ ├── mutations.js │ ├── state.js │ ├── getter-types.js │ ├── mutation-types.js │ ├── action-types.js │ ├── index.js │ └── utils.js ├── assets │ ├── css │ │ ├── global.css │ │ └── var.less │ ├── images │ │ ├── dialog.png │ │ ├── chameleon.jpg │ │ ├── chameleon.png │ │ ├── index │ │ │ ├── pause.png │ │ │ ├── play.png │ │ │ ├── plus.png │ │ │ ├── stop.png │ │ │ ├── trash.png │ │ │ ├── record.png │ │ │ ├── wechat.png │ │ │ ├── green_tri.png │ │ │ ├── icon_API.png │ │ │ ├── icon_foot.png │ │ │ ├── location.png │ │ │ ├── wechatHL.png │ │ │ ├── icon_API_HL.png │ │ │ ├── icon_component.png │ │ │ ├── icon64_appwx_logo.png │ │ │ └── icon_component_HL.png │ │ ├── api │ │ │ └── kind │ │ │ │ ├── api.png │ │ │ │ ├── logo.png │ │ │ │ ├── page.png │ │ │ │ ├── device.png │ │ │ │ ├── media.png │ │ │ │ ├── network.png │ │ │ │ ├── storage.png │ │ │ │ ├── feedback.png │ │ │ │ └── location.png │ │ └── component │ │ │ ├── pic │ │ │ ├── 1.jpg │ │ │ └── 2.jpg │ │ │ └── kind │ │ │ ├── map.png │ │ │ ├── nav.png │ │ │ ├── canvas.png │ │ │ ├── form.png │ │ │ ├── logo.png │ │ │ ├── media.png │ │ │ ├── view.png │ │ │ └── content.png │ └── js │ │ ├── style.js │ │ └── util.js ├── components │ ├── c-tip │ │ ├── images │ │ │ ├── top.png │ │ │ ├── bottom.png │ │ │ ├── close.png │ │ │ ├── left.png │ │ │ └── right.png │ │ ├── c-tip.interface │ │ └── com │ │ │ └── c-tip-angle │ │ │ ├── c-tip-angle.interface │ │ │ ├── c-tip-angle.weex.cml │ │ │ ├── c-tip-angle.qq.cml │ │ │ ├── c-tip-angle.web.cml │ │ │ ├── c-tip-angle.wx.cml │ │ │ ├── c-tip-angle.alipay.cml │ │ │ └── c-tip-angle.baidu.cml │ ├── c-dialog │ │ ├── images │ │ │ ├── gps.png │ │ │ ├── close.png │ │ │ ├── thank.png │ │ │ ├── warn.png │ │ │ ├── address.png │ │ │ ├── network.png │ │ │ ├── prompt.png │ │ │ ├── success.png │ │ │ └── microphone.png │ │ └── c-dialog.interface │ ├── c-toast │ │ ├── images │ │ │ ├── succ.png │ │ │ ├── warn.png │ │ │ └── loading.gif │ │ ├── c-toast.interface │ │ └── c-toast.cml │ ├── c-refresh │ │ ├── images │ │ │ └── loading.gif │ │ ├── c-refresh.interface │ │ ├── c-refresh.qq.cml │ │ ├── c-refresh.wx.cml │ │ ├── c-refresh.alipay.cml │ │ ├── c-refresh.baidu.cml │ │ ├── c-refresh.weex.cml │ │ └── c-refresh.web.cml │ ├── c-loading │ │ ├── assets │ │ │ └── img │ │ │ │ └── loading.gif │ │ ├── c-loading.interface │ │ └── c-loadingfunc.interface │ ├── c-tab-pane-item │ │ ├── c-tab-pane-item.interface │ │ └── c-tab-pane-item.cml │ ├── c-tab-pane │ │ ├── c-tab-pane.interface │ │ └── c-tab-pane.cml │ ├── c-popup │ │ └── c-popup.interface │ ├── c-tab-item │ │ └── c-tab-item.interface │ ├── c-tabbar │ │ └── c-tabbar.interface │ ├── c-picker-panel │ │ └── c-picker-panel.interface │ ├── c-radio-group │ │ ├── c-radio-group.interface │ │ └── c-radio-group.cml │ ├── c-tab │ │ ├── c-tab.interface │ │ └── c-tab.cml │ ├── c-actionsheet │ │ └── c-actionsheet.interface │ ├── c-checkbox-group │ │ ├── c-checkbox-group.interface │ │ └── c-checkbox-group.cml │ ├── c-picker-item │ │ ├── c-picker-item.interface │ │ ├── c-picker-item.web.cml │ │ ├── c-picker-item.weex.cml │ │ ├── c-picker-item.qq.cml │ │ ├── c-picker-item.wx.cml │ │ ├── c-picker-item.alipay.cml │ │ └── c-picker-item.baidu.cml │ └── c-picker │ │ ├── c-picker.interface │ │ └── c-picker.cml ├── pages │ ├── COMP │ │ ├── c-picker-date │ │ │ ├── layer-header │ │ │ │ ├── imgs │ │ │ │ │ ├── cancel.png │ │ │ │ │ └── Group@3x.png │ │ │ │ └── layer-header.cml │ │ │ ├── data.js │ │ │ └── c-picker-date.cml │ │ ├── c-picker │ │ │ ├── data.js │ │ │ └── c-picker.cml │ │ ├── c-picker-item │ │ │ ├── data.js │ │ │ └── c-picker-item.cml │ │ ├── c-picker-panel │ │ │ ├── data.js │ │ │ └── c-picker-panel.cml │ │ ├── c-tabbar │ │ │ ├── bar-home.cml │ │ │ ├── bar-detail.cml │ │ │ └── c-tabbar.cml │ │ ├── c-loading │ │ │ └── c-loading.cml │ │ ├── c-actionsheet │ │ │ └── c-actionsheet.cml │ │ ├── c-popup │ │ │ └── c-popup.cml │ │ ├── c-toast │ │ │ └── c-toast.cml │ │ └── c-radio-group │ │ │ └── c-radio-group.cml │ ├── API │ │ ├── toast │ │ │ └── toast.cml │ │ └── modal │ │ │ └── modal.cml │ └── components │ │ └── c-header │ │ └── c-header.cml ├── app │ └── app.cml └── router.config.json ├── version-log ├── bin └── build.sh ├── mock ├── template │ └── index.php └── api │ └── index.js ├── CHANGLOG.md ├── package.json ├── deploy.sh ├── chameleon.config.js ├── .gitignore └── README.md /package/.npmignore: -------------------------------------------------------------------------------- 1 | .scripts 2 | npm-debug.log* -------------------------------------------------------------------------------- /preview/web.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/preview/web.jpg -------------------------------------------------------------------------------- /preview/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/preview/wx.png -------------------------------------------------------------------------------- /preview/weex.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/preview/weex.jpg -------------------------------------------------------------------------------- /src/store/index/action-types.js: -------------------------------------------------------------------------------- 1 | 2 | export const INDEX_CHANGE_NAME = 'INDEX_CHANGE_NAME' 3 | -------------------------------------------------------------------------------- /src/assets/css/global.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: red; 3 | font-size: 24cpx; 4 | display: flex; 5 | } -------------------------------------------------------------------------------- /package/assets/css/global.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: red; 3 | font-size: 24cpx; 4 | display: flex; 5 | } -------------------------------------------------------------------------------- /src/store/actions.js: -------------------------------------------------------------------------------- 1 | import index from './index/actions' 2 | 3 | export default { 4 | ...index 5 | } 6 | -------------------------------------------------------------------------------- /src/store/getters.js: -------------------------------------------------------------------------------- 1 | import index from './index/getters' 2 | 3 | export default { 4 | ...index 5 | } 6 | -------------------------------------------------------------------------------- /src/assets/images/dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/dialog.png -------------------------------------------------------------------------------- /src/store/mutations.js: -------------------------------------------------------------------------------- 1 | import index from './index/mutations' 2 | 3 | export default { 4 | ...index 5 | } 6 | -------------------------------------------------------------------------------- /package/assets/images/dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/dialog.png -------------------------------------------------------------------------------- /src/assets/images/chameleon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/chameleon.jpg -------------------------------------------------------------------------------- /src/assets/images/chameleon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/chameleon.png -------------------------------------------------------------------------------- /src/assets/images/index/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/pause.png -------------------------------------------------------------------------------- /src/assets/images/index/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/play.png -------------------------------------------------------------------------------- /src/assets/images/index/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/plus.png -------------------------------------------------------------------------------- /src/assets/images/index/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/stop.png -------------------------------------------------------------------------------- /src/assets/images/index/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/trash.png -------------------------------------------------------------------------------- /src/store/index/state.js: -------------------------------------------------------------------------------- 1 | const state = { 2 | name: '李四', 3 | age: '18' 4 | } 5 | 6 | export default state 7 | -------------------------------------------------------------------------------- /version-log: -------------------------------------------------------------------------------- 1 | #####################version info##################### 2 | 3 | # 0.0.5 组件点击回调增加 activeIndex 字段 4 | -------------------------------------------------------------------------------- /package/assets/images/chameleon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/chameleon.jpg -------------------------------------------------------------------------------- /package/assets/images/chameleon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/chameleon.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/api.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/logo.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/page.png -------------------------------------------------------------------------------- /src/assets/images/index/record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/record.png -------------------------------------------------------------------------------- /src/assets/images/index/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/wechat.png -------------------------------------------------------------------------------- /src/components/c-tip/images/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-tip/images/top.png -------------------------------------------------------------------------------- /package/assets/images/api/kind/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/api.png -------------------------------------------------------------------------------- /package/assets/images/index/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/pause.png -------------------------------------------------------------------------------- /package/assets/images/index/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/play.png -------------------------------------------------------------------------------- /package/assets/images/index/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/plus.png -------------------------------------------------------------------------------- /package/assets/images/index/record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/record.png -------------------------------------------------------------------------------- /package/assets/images/index/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/stop.png -------------------------------------------------------------------------------- /package/assets/images/index/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/trash.png -------------------------------------------------------------------------------- /package/assets/images/index/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/wechat.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/device.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/media.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/network.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/storage.png -------------------------------------------------------------------------------- /src/assets/images/component/pic/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/pic/1.jpg -------------------------------------------------------------------------------- /src/assets/images/component/pic/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/pic/2.jpg -------------------------------------------------------------------------------- /src/assets/images/index/green_tri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/green_tri.png -------------------------------------------------------------------------------- /src/assets/images/index/icon_API.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/icon_API.png -------------------------------------------------------------------------------- /src/assets/images/index/icon_foot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/icon_foot.png -------------------------------------------------------------------------------- /src/assets/images/index/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/location.png -------------------------------------------------------------------------------- /src/assets/images/index/wechatHL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/wechatHL.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/gps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/gps.png -------------------------------------------------------------------------------- /src/components/c-tip/images/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-tip/images/bottom.png -------------------------------------------------------------------------------- /src/components/c-tip/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-tip/images/close.png -------------------------------------------------------------------------------- /src/components/c-tip/images/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-tip/images/left.png -------------------------------------------------------------------------------- /src/components/c-tip/images/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-tip/images/right.png -------------------------------------------------------------------------------- /src/components/c-toast/images/succ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-toast/images/succ.png -------------------------------------------------------------------------------- /src/components/c-toast/images/warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-toast/images/warn.png -------------------------------------------------------------------------------- /src/store/state.js: -------------------------------------------------------------------------------- 1 | import index from './index/state'; 2 | 3 | const state = { 4 | index 5 | } 6 | 7 | export default state 8 | -------------------------------------------------------------------------------- /package/assets/images/api/kind/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/logo.png -------------------------------------------------------------------------------- /package/assets/images/api/kind/media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/media.png -------------------------------------------------------------------------------- /package/assets/images/api/kind/page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/page.png -------------------------------------------------------------------------------- /package/assets/images/index/icon_API.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/icon_API.png -------------------------------------------------------------------------------- /package/assets/images/index/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/location.png -------------------------------------------------------------------------------- /package/assets/images/index/wechatHL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/wechatHL.png -------------------------------------------------------------------------------- /package/components/c-tip/images/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-tip/images/left.png -------------------------------------------------------------------------------- /package/components/c-tip/images/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-tip/images/top.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/feedback.png -------------------------------------------------------------------------------- /src/assets/images/api/kind/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/api/kind/location.png -------------------------------------------------------------------------------- /src/assets/images/component/kind/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/kind/map.png -------------------------------------------------------------------------------- /src/assets/images/component/kind/nav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/kind/nav.png -------------------------------------------------------------------------------- /src/assets/images/index/icon_API_HL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/icon_API_HL.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/close.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/thank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/thank.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/warn.png -------------------------------------------------------------------------------- /src/store/index/getter-types.js: -------------------------------------------------------------------------------- 1 | export const INDEX_DESC_NAME = 'INDEX_DESC_NAME' 2 | export const INDEX_DESC_AGE = 'INDEX_DESC_AGE' 3 | -------------------------------------------------------------------------------- /package/assets/images/api/kind/device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/device.png -------------------------------------------------------------------------------- /package/assets/images/api/kind/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/feedback.png -------------------------------------------------------------------------------- /package/assets/images/api/kind/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/location.png -------------------------------------------------------------------------------- /package/assets/images/api/kind/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/network.png -------------------------------------------------------------------------------- /package/assets/images/api/kind/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/api/kind/storage.png -------------------------------------------------------------------------------- /package/assets/images/component/pic/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/pic/1.jpg -------------------------------------------------------------------------------- /package/assets/images/component/pic/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/pic/2.jpg -------------------------------------------------------------------------------- /package/assets/images/index/green_tri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/green_tri.png -------------------------------------------------------------------------------- /package/assets/images/index/icon_API_HL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/icon_API_HL.png -------------------------------------------------------------------------------- /package/assets/images/index/icon_foot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/icon_foot.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/gps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/gps.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/warn.png -------------------------------------------------------------------------------- /package/components/c-tip/images/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-tip/images/bottom.png -------------------------------------------------------------------------------- /package/components/c-tip/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-tip/images/close.png -------------------------------------------------------------------------------- /package/components/c-tip/images/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-tip/images/right.png -------------------------------------------------------------------------------- /package/components/c-toast/images/succ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-toast/images/succ.png -------------------------------------------------------------------------------- /package/components/c-toast/images/warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-toast/images/warn.png -------------------------------------------------------------------------------- /src/assets/images/component/kind/canvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/kind/canvas.png -------------------------------------------------------------------------------- /src/assets/images/component/kind/form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/kind/form.png -------------------------------------------------------------------------------- /src/assets/images/component/kind/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/kind/logo.png -------------------------------------------------------------------------------- /src/assets/images/component/kind/media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/kind/media.png -------------------------------------------------------------------------------- /src/assets/images/component/kind/view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/kind/view.png -------------------------------------------------------------------------------- /src/assets/images/index/icon_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/icon_component.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/address.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/network.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/prompt.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/success.png -------------------------------------------------------------------------------- /src/components/c-refresh/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-refresh/images/loading.gif -------------------------------------------------------------------------------- /src/components/c-toast/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-toast/images/loading.gif -------------------------------------------------------------------------------- /package/assets/images/component/kind/form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/kind/form.png -------------------------------------------------------------------------------- /package/assets/images/component/kind/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/kind/logo.png -------------------------------------------------------------------------------- /package/assets/images/component/kind/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/kind/map.png -------------------------------------------------------------------------------- /package/assets/images/component/kind/nav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/kind/nav.png -------------------------------------------------------------------------------- /package/assets/images/component/kind/view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/kind/view.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/close.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/prompt.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/thank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/thank.png -------------------------------------------------------------------------------- /package/components/c-toast/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-toast/images/loading.gif -------------------------------------------------------------------------------- /src/assets/images/component/kind/content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/component/kind/content.png -------------------------------------------------------------------------------- /src/assets/images/index/icon64_appwx_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/icon64_appwx_logo.png -------------------------------------------------------------------------------- /src/assets/images/index/icon_component_HL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/assets/images/index/icon_component_HL.png -------------------------------------------------------------------------------- /src/components/c-dialog/images/microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-dialog/images/microphone.png -------------------------------------------------------------------------------- /package/assets/images/component/kind/canvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/kind/canvas.png -------------------------------------------------------------------------------- /package/assets/images/component/kind/content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/kind/content.png -------------------------------------------------------------------------------- /package/assets/images/component/kind/media.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/component/kind/media.png -------------------------------------------------------------------------------- /package/assets/images/index/icon_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/icon_component.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/address.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/network.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/success.png -------------------------------------------------------------------------------- /package/components/c-refresh/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-refresh/images/loading.gif -------------------------------------------------------------------------------- /src/components/c-loading/assets/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/components/c-loading/assets/img/loading.gif -------------------------------------------------------------------------------- /package/assets/images/index/icon64_appwx_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/icon64_appwx_logo.png -------------------------------------------------------------------------------- /package/assets/images/index/icon_component_HL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/assets/images/index/icon_component_HL.png -------------------------------------------------------------------------------- /package/components/c-dialog/images/microphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-dialog/images/microphone.png -------------------------------------------------------------------------------- /src/assets/js/style.js: -------------------------------------------------------------------------------- 1 | export function obj2str(obj = {}) { 2 | return Object.keys(obj) 3 | .map(key => `${key}:${obj[key]}`) 4 | .join(";"); 5 | } -------------------------------------------------------------------------------- /package/assets/js/style.js: -------------------------------------------------------------------------------- 1 | export function obj2str(obj = {}) { 2 | return Object.keys(obj) 3 | .map(key => `${key}:${obj[key]}`) 4 | .join(";"); 5 | } -------------------------------------------------------------------------------- /package/components/c-loading/assets/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/package/components/c-loading/assets/img/loading.gif -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-date/layer-header/imgs/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/pages/COMP/c-picker-date/layer-header/imgs/cancel.png -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-date/layer-header/imgs/Group@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chameleon-team/cml-ui/HEAD/src/pages/COMP/c-picker-date/layer-header/imgs/Group@3x.png -------------------------------------------------------------------------------- /bin/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -rf ./package/components 3 | rm -rf ./package/assets 4 | cp -R ./src/components/ ./package/components 5 | cp -R ./src/assets/ ./package/assets 6 | -------------------------------------------------------------------------------- /mock/template/index.php: -------------------------------------------------------------------------------- 1 | "0", 4 | "errmsg"=> "", 5 | "pageData"=> array( 6 | "name"=>"chameleon", 7 | "age" => 10 8 | ) 9 | ); -------------------------------------------------------------------------------- /src/store/index/mutation-types.js: -------------------------------------------------------------------------------- 1 | export const INDEX_REPLACE_STATE = 'REPLACE_INDEX_STATE' 2 | export const INDEX_CHANGE_NAME = 'INDEX_CHANGE_NAME' 3 | export const INDEX_CHANGE_AGE = 'INDEX_CHANGE_AGE' 4 | -------------------------------------------------------------------------------- /src/store/getter-types.js: -------------------------------------------------------------------------------- 1 | import {checkDuplicate} from './utils'; 2 | 3 | import * as index from './index/getter-types'; 4 | 5 | let list = [index]; 6 | checkDuplicate(list); 7 | 8 | export default { 9 | ...index 10 | } 11 | -------------------------------------------------------------------------------- /src/store/mutation-types.js: -------------------------------------------------------------------------------- 1 | import {checkDuplicate} from './utils'; 2 | 3 | import * as index from './index/mutation-types'; 4 | 5 | let list = [index]; 6 | checkDuplicate(list); 7 | 8 | export default { 9 | ...index 10 | } 11 | -------------------------------------------------------------------------------- /src/components/c-tab-pane-item/c-tab-pane-item.interface: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/store/action-types.js: -------------------------------------------------------------------------------- 1 | 2 | import {checkDuplicate} from './utils'; 3 | 4 | import * as index from './index/action-types'; 5 | 6 | let list = [index]; 7 | checkDuplicate(list); 8 | 9 | export default { 10 | ...index 11 | } 12 | -------------------------------------------------------------------------------- /package/components/c-tab-pane-item/c-tab-pane-item.interface: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /src/components/c-loading/c-loading.interface: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /package/components/c-loading/c-loading.interface: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /src/components/c-tab-pane/c-tab-pane.interface: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /package/components/c-tab-pane/c-tab-pane.interface: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import actions from './actions' 2 | import getters from './getters' 3 | import state from './state' 4 | import mutations from './mutations' 5 | 6 | import createStore from "chameleon-store"; 7 | 8 | export default createStore({ 9 | actions, 10 | getters, 11 | state, 12 | mutations 13 | }) 14 | -------------------------------------------------------------------------------- /src/store/index/getters.js: -------------------------------------------------------------------------------- 1 | import * as types from './getter-types' 2 | 3 | export default { 4 | [types.INDEX_DESC_NAME]: function(state, getters) { 5 | return `我叫:${state.index.name}。` 6 | }, 7 | [types.INDEX_DESC_AGE]: function(state, getters) { 8 | return `今年:${state.index.age} 岁。` 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /src/components/c-popup/c-popup.interface: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /package/components/c-popup/c-popup.interface: -------------------------------------------------------------------------------- 1 | 11 | 12 | -------------------------------------------------------------------------------- /package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cml-ui", 3 | "version": "0.3.1", 4 | "description": "chameleon基础组件库&接口能力", 5 | "main": "/components", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Chameleon-Team", 10 | "license": "Apache", 11 | "email": "ChameleonCore@didiglobal.com", 12 | "dependencies": { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/components/c-tab-item/c-tab-item.interface: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /package/components/c-tab-item/c-tab-item.interface: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /src/components/c-tip/c-tip.interface: -------------------------------------------------------------------------------- 1 | 14 | 15 | -------------------------------------------------------------------------------- /package/components/c-tip/c-tip.interface: -------------------------------------------------------------------------------- 1 | 14 | 15 | -------------------------------------------------------------------------------- /src/store/utils.js: -------------------------------------------------------------------------------- 1 | 2 | export function checkDuplicate(list) { 3 | let tempArray = []; 4 | for(let i=0;i 2 | type EventDetail = { 3 | value: Boolean 4 | } 5 | 6 | interface CToastInterface { 7 | type: String, 8 | message: String, 9 | duration: Number, 10 | show: Boolean, 11 | mask: Boolean, 12 | needIcon: Boolean, 13 | show(eventDetail: EventDetail): void; 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/c-toast/c-toast.interface: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/c-tabbar/c-tabbar.interface: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /package/components/c-tabbar/c-tabbar.interface: -------------------------------------------------------------------------------- 1 | 17 | 18 | -------------------------------------------------------------------------------- /src/components/c-picker-panel/c-picker-panel.interface: -------------------------------------------------------------------------------- 1 | 14 | 15 | -------------------------------------------------------------------------------- /package/components/c-picker-panel/c-picker-panel.interface: -------------------------------------------------------------------------------- 1 | 14 | 15 | -------------------------------------------------------------------------------- /src/store/index/actions.js: -------------------------------------------------------------------------------- 1 | import * as mutationTypes from './mutation-types' 2 | import * as actionTypes from './action-types' 3 | 4 | export default { 5 | [actionTypes.INDEX_CHANGE_NAME]({commit,state}, params = {}) { 6 | new Promise(function(resolve, reject) { 7 | setTimeout(()=>{ 8 | resolve('action名称'+ new Date().getTime()) 9 | },2000) 10 | }).then(res=>{ 11 | commit(mutationTypes.CHANGE_NAME, res); 12 | }) 13 | }, 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker/data.js: -------------------------------------------------------------------------------- 1 | export const provins = [ 2 | "北京市", 3 | "天津市", 4 | "河北省", 5 | "山西省", 6 | "内蒙古", 7 | "辽宁省", 8 | "吉林省", 9 | "黑龙江省", 10 | "上海市", 11 | "江苏省", 12 | "浙江省", 13 | "安徽省", 14 | "福建省", 15 | "江西省", 16 | "山东省", 17 | "河南省", 18 | "湖北省", 19 | "湖南省", 20 | "广东省", 21 | "广西", 22 | "海南省", 23 | "重庆市", 24 | "四川省", 25 | "贵州省", 26 | "云南省", 27 | "西藏", 28 | "陕西省", 29 | "甘肃省", 30 | "青海", 31 | "宁夏", 32 | "新疆" 33 | ]; 34 | -------------------------------------------------------------------------------- /src/components/c-tip/com/c-tip-angle/c-tip-angle.interface: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-item/data.js: -------------------------------------------------------------------------------- 1 | export const provins = [ 2 | "北京市", 3 | "天津市", 4 | "河北省", 5 | "山西省", 6 | "内蒙古", 7 | "辽宁省", 8 | "吉林省", 9 | "黑龙江省", 10 | "上海市", 11 | "江苏省", 12 | "浙江省", 13 | "安徽省", 14 | "福建省", 15 | "江西省", 16 | "山东省", 17 | "河南省", 18 | "湖北省", 19 | "湖南省", 20 | "广东省", 21 | "广西", 22 | "海南省", 23 | "重庆市", 24 | "四川省", 25 | "贵州省", 26 | "云南省", 27 | "西藏", 28 | "陕西省", 29 | "甘肃省", 30 | "青海", 31 | "宁夏", 32 | "新疆" 33 | ]; 34 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-panel/data.js: -------------------------------------------------------------------------------- 1 | export const provins = [ 2 | "北京市", 3 | "天津市", 4 | "河北省", 5 | "山西省", 6 | "内蒙古", 7 | "辽宁省", 8 | "吉林省", 9 | "黑龙江省", 10 | "上海市", 11 | "江苏省", 12 | "浙江省", 13 | "安徽省", 14 | "福建省", 15 | "江西省", 16 | "山东省", 17 | "河南省", 18 | "湖北省", 19 | "湖南省", 20 | "广东省", 21 | "广西", 22 | "海南省", 23 | "重庆市", 24 | "四川省", 25 | "贵州省", 26 | "云南省", 27 | "西藏", 28 | "陕西省", 29 | "甘肃省", 30 | "青海", 31 | "宁夏", 32 | "新疆" 33 | ]; 34 | -------------------------------------------------------------------------------- /package/components/c-tip/com/c-tip-angle/c-tip-angle.interface: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /src/pages/API/toast/toast.cml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 15 | 26 | -------------------------------------------------------------------------------- /src/store/index/mutations.js: -------------------------------------------------------------------------------- 1 | import * as types from './mutation-types' 2 | 3 | const mutations = { 4 | [types.INDEX_REPLACE_STATE](state, newState) { 5 | // for(let key in newState) { 6 | // state[key] = newState[key] 7 | // } 8 | state.index = newState; 9 | }, 10 | [types.INDEX_CHANGE_NAME](state, name) { 11 | state.index.name = name; 12 | }, 13 | [types.INDEX_CHANGE_AGE](state, age) { 14 | state.index.age = age 15 | } 16 | } 17 | 18 | export default mutations 19 | -------------------------------------------------------------------------------- /src/pages/API/modal/modal.cml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 16 | 27 | -------------------------------------------------------------------------------- /src/components/c-radio-group/c-radio-group.interface: -------------------------------------------------------------------------------- 1 | 18 | 19 | -------------------------------------------------------------------------------- /package/components/c-radio-group/c-radio-group.interface: -------------------------------------------------------------------------------- 1 | 18 | 19 | -------------------------------------------------------------------------------- /package/components/c-tab/c-tab.interface: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /src/components/c-tab/c-tab.interface: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /CHANGLOG.md: -------------------------------------------------------------------------------- 1 | ## [0.3.1] 2 | ### Features 3 | - 扩展qq端 4 | 5 | ## [0.2.0-alpha.4] 6 | ### Bug fixes 7 | - 修复小程序端``组件出现在顶部问题 8 | 9 | ## [0.2.1] 10 | ### Features 11 | - ``组件支持自定义标题以及内容样式 12 | - ``、`` 支持自定义子项图标和样式 13 | - 优化``组件 14 | 15 | ## [0.2.0-alpha.3] 16 | ### Features 17 | - 支持qq小程序 18 | 19 | 20 | ## [0.2.0-mvvm.1] 21 | ### Features 22 | - 支持扩展新端 23 | 24 | ## [0.1.9-alpha.1] 25 | ### Features 26 | - 修复``问题 27 | - 优化 ``组件 28 | 29 | ## [0.1.8] 30 | ### Features 31 | - 新增 `` 组件 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cml-ui", 3 | "version": "0.0.5", 4 | "description": "chameleon基础组件库&接口能力", 5 | "scripts": { 6 | "build": "sh ./bin/build.sh", 7 | "publish": "npm run build && cd package && npm publish", 8 | "deploy": "sh deploy.sh weex && sh deploy.sh web" 9 | }, 10 | "author": "Chameleon-Team", 11 | "license": "Apache", 12 | "email": "ChameleonCore@didiglobal.com", 13 | "dependencies": { 14 | "chameleon-api": "^0.5.3", 15 | "chameleon-runtime": "^0.3.1", 16 | "chameleon-store": "0.1.0", 17 | "chameleon-ui-builtin": "^0.4.1-alpha.1" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/components/c-refresh/c-refresh.interface: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /package/components/c-refresh/c-refresh.interface: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /src/components/c-actionsheet/c-actionsheet.interface: -------------------------------------------------------------------------------- 1 | 21 | 22 | -------------------------------------------------------------------------------- /package/components/c-actionsheet/c-actionsheet.interface: -------------------------------------------------------------------------------- 1 | 21 | 22 | -------------------------------------------------------------------------------- /package/components/c-tab-pane-item/c-tab-pane-item.cml: -------------------------------------------------------------------------------- 1 | 6 | 24 | 30 | 37 | -------------------------------------------------------------------------------- /src/components/c-tab-pane-item/c-tab-pane-item.cml: -------------------------------------------------------------------------------- 1 | 6 | 24 | 30 | 37 | -------------------------------------------------------------------------------- /src/components/c-checkbox-group/c-checkbox-group.interface: -------------------------------------------------------------------------------- 1 | 22 | 23 | -------------------------------------------------------------------------------- /package/components/c-checkbox-group/c-checkbox-group.interface: -------------------------------------------------------------------------------- 1 | 22 | 23 | -------------------------------------------------------------------------------- /package/components/c-picker-item/c-picker-item.interface: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /src/components/c-picker-item/c-picker-item.interface: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /src/components/c-picker/c-picker.interface: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /package/components/c-picker/c-picker.interface: -------------------------------------------------------------------------------- 1 | 24 | 25 | -------------------------------------------------------------------------------- /src/app/app.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /src/components/c-tip/com/c-tip-angle/c-tip-angle.weex.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 32 | 33 | -------------------------------------------------------------------------------- /package/components/c-tip/com/c-tip-angle/c-tip-angle.weex.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 32 | 33 | -------------------------------------------------------------------------------- /src/assets/js/util.js: -------------------------------------------------------------------------------- 1 | import cml from 'chameleon-api' 2 | 3 | export function pxTransform(s) { 4 | if (!s) return ''; 5 | if (!!~s.indexOf('cpx')) { 6 | return s.replace(/(-?\d*\.?\d*)cpx/ig, (matchs, $1) => { 7 | return cml.cpx2px(Number($1)) + 'px'; 8 | }); 9 | } 10 | return s; 11 | } 12 | 13 | export function cmlStyleTransfer (str) { 14 | if (!str) return {}; 15 | let styleAry = str.split(';'); 16 | let obj = {}; 17 | styleAry.forEach(element => { 18 | let classObj = element.split(':'); 19 | let className = String(classObj[0]).replace(/(^\s*)|(\s*)$/g,""); 20 | if (className) { 21 | let classValue = pxTransform(String(classObj[1]).replace(/(^\s*)|(\s*)$/g,"")); 22 | obj[className] = classValue; 23 | } 24 | }); 25 | return obj; 26 | } 27 | -------------------------------------------------------------------------------- /package/assets/js/util.js: -------------------------------------------------------------------------------- 1 | import cml from 'chameleon-api' 2 | 3 | export function pxTransform(s) { 4 | if (!s) return ''; 5 | if (!!~s.indexOf('cpx')) { 6 | return s.replace(/(-?\d*\.?\d*)cpx/ig, (matchs, $1) => { 7 | return cml.cpx2px(Number($1)) + 'px'; 8 | }); 9 | } 10 | return s; 11 | } 12 | 13 | export function cmlStyleTransfer (str) { 14 | if (!str) return {}; 15 | let styleAry = str.split(';'); 16 | let obj = {}; 17 | styleAry.forEach(element => { 18 | let classObj = element.split(':'); 19 | let className = String(classObj[0]).replace(/(^\s*)|(\s*)$/g,""); 20 | if (className) { 21 | let classValue = pxTransform(String(classObj[1]).replace(/(^\s*)|(\s*)$/g,"")); 22 | obj[className] = classValue; 23 | } 24 | }); 25 | return obj; 26 | } 27 | -------------------------------------------------------------------------------- /src/components/c-dialog/c-dialog.interface: -------------------------------------------------------------------------------- 1 | 30 | 31 | -------------------------------------------------------------------------------- /package/components/c-dialog/c-dialog.interface: -------------------------------------------------------------------------------- 1 | 30 | 31 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # 当前目录 5 | BD_BIN="${BASH_SOURCE-$0}" 6 | BD_BIN="$(dirname "${BD_BIN}")" 7 | BD_BIN="$(cd "${BD_BIN}"; pwd)" 8 | # 项目仓库根目录 9 | PROJECT_ROOT="${BD_BIN}" 10 | 11 | #PROJECT NAME 12 | PROJECT_NAME="chameleon-ui" 13 | 14 | PLATFORM=$1 15 | DIST_FOLDER="$PROJECT_ROOT/dist/$PLATFORM" 16 | DIST_FOLDER_STATIC="$DIST_FOLDER/static" 17 | 18 | 19 | # build 20 | echo "build $PLATFORM" 21 | cml $PLATFORM build 22 | 23 | # 发布 entry 24 | echo "publish $PLATFORM entry" 25 | didiup -d $DIST_FOLDER -c $PROJECT_NAME/$PLATFORM 26 | 27 | # 目录名存入数组 28 | j=0 29 | for file in $DIST_FOLDER_STATIC/*; do 30 | { 31 | static_folder_list[j]=${file##*/} 32 | j=`expr $j + 1` 33 | } 34 | done 35 | 36 | for((i=0;i<${#static_folder_list[*]};i++)) 37 | do 38 | { 39 | sub=${static_folder_list[$i]} 40 | # 发布 static 41 | echo "publish $PLATFORM static/$sub" 42 | didiup -d $DIST_FOLDER_STATIC/$sub -c $PROJECT_NAME/$PLATFORM/static/$sub 43 | } & 44 | done -------------------------------------------------------------------------------- /src/pages/COMP/c-tabbar/bar-home.cml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 24 | 45 | 52 | -------------------------------------------------------------------------------- /src/pages/COMP/c-tabbar/bar-detail.cml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 24 | 45 | 52 | -------------------------------------------------------------------------------- /chameleon.config.js: -------------------------------------------------------------------------------- 1 | 2 | //设置静态资源的线上路径 3 | const publicPath = 'https://beatles-chameleon.github.io/cml-ui/dist'; 4 | //设置api请求前缀 5 | const apiPrefix = 'https://api.chameleon.com'; 6 | 7 | cml.config.merge({ 8 | cmlNpm: [ 9 | ], 10 | platforms: ["web","weex","wx", "baidu", "alipay"], 11 | cmlComponents: [ 12 | ], 13 | buildInfo: { 14 | wxAppId: '123456', 15 | wxEntryPage: '', 16 | webPath: 'https://api.chameleon.com/h5/commentinfo' 17 | }, 18 | wx: { 19 | dev: { 20 | }, 21 | build: { 22 | apiPrefix 23 | } 24 | }, 25 | web: { 26 | dev: { 27 | hash: true, 28 | analysis: false, 29 | console: false 30 | }, 31 | build: { 32 | analysis: false, 33 | publicPath: `${publicPath}/web/`, 34 | apiPrefix 35 | } 36 | }, 37 | weex: { 38 | dev: { 39 | }, 40 | build: { 41 | publicPath: `${publicPath}/weex/`, 42 | apiPrefix, 43 | hash: false 44 | }, 45 | custom: { 46 | publicPath: `${publicPath}/wx/`, 47 | apiPrefix 48 | } 49 | } 50 | }) 51 | 52 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-date/data.js: -------------------------------------------------------------------------------- 1 | export function getYears(year){ 2 | let date_current = new Date(); 3 | let y = year||date_current.getFullYear(); 4 | let years = []; 5 | for (let i = 1949; i <= 2099; i++) { 6 | years.push(String(i)+'年'); 7 | } 8 | return years 9 | } 10 | 11 | export function getMonths(){ 12 | let months = []; 13 | for (let i = 1; i <= 12; i++) { 14 | months.push(String(i)+'月'); 15 | } 16 | return months 17 | } 18 | 19 | export function getMaxDay(year, month){ 20 | // let year = toDigital(year); 21 | // let month = toDigital(month); 22 | let date_current = new Date(); 23 | let y = year || date_current.getFullYear(); 24 | let m = month || date_current.getMonth()+1; 25 | let d = new Date(y, m, 0); 26 | return d.getDate(); 27 | } 28 | 29 | export function getDays(year, month){ 30 | let maxDay = getMaxDay(year, month); 31 | let days = []; 32 | for (let i = 1; i <= maxDay; i++) { 33 | days.push(String(i)+'日'); 34 | } 35 | return days; 36 | } 37 | 38 | export function toDigital(item){ 39 | return item.replace('年','').replace('月','').replace('日','') 40 | } 41 | -------------------------------------------------------------------------------- /mock/api/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = [ 3 | { 4 | method: ['get','post'], 5 | path: '/api/driver/getList', 6 | controller: function (req, res, next) { 7 | console.log('/api/driver/getList') 8 | // setTimeout(()=>{ 9 | res.json({ 10 | total: 100, 11 | driverList: getDriverList() 12 | }); 13 | // },1000) 14 | }, 15 | }, 16 | { 17 | method: 'get', 18 | path: '/api/driver/getList2', 19 | controller: function (req, res, next) { 20 | setTimeout(()=>{ 21 | res.json({ 22 | total: 100, 23 | driverList: getDriverList() 24 | }); 25 | },1000) 26 | }, 27 | } 28 | ] 29 | 30 | function getDriverList() { 31 | let result = []; 32 | for(let i=0;i< 10;i++) { 33 | result.push({ 34 | cityName: '北京', 35 | driverId: '123'+i, 36 | phone: '1762011465'+i, 37 | joinTime: Date.now(), 38 | hasPrivateCar: i%2 == 0, 39 | licencePlateNo: '京C12345'+i, 40 | identityCard: '130274203472937'+i, 41 | carId: '123', 42 | carColor: '红', 43 | carType: 'A6', 44 | carBrand: '奥迪', 45 | isBinding: i%2 == 0, 46 | driverStatus: { 47 | workStatus: i%2, 48 | serviceStatus: i%2 49 | }, 50 | accountStatus: i%2 51 | }) 52 | } 53 | return result; 54 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Editor directories and files 2 | .DS_Store 3 | .idea 4 | *.suo 5 | *.ntvs* 6 | *.njsproj 7 | *.sln 8 | .vscode 9 | # Logs 10 | logs 11 | *.log 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | 28 | # nyc test coverage 29 | .nyc_output 30 | 31 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 32 | .grunt 33 | 34 | # Bower dependency directory (https://bower.io/) 35 | bower_components 36 | 37 | # node-waf configuration 38 | .lock-wscript 39 | 40 | # Compiled binary addons (https://nodejs.org/api/addons.html) 41 | build/Release 42 | 43 | # Dependency directories 44 | node_modules/ 45 | jspm_packages/ 46 | 47 | # Typescript v1 declaration files 48 | typings/ 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Optional REPL history 57 | .node_repl_history 58 | 59 | # Output of 'npm pack' 60 | *.tgz 61 | 62 | # Yarn Integrity file 63 | .yarn-integrity 64 | 65 | # dotenv environment variables file 66 | .env 67 | 68 | # /////////////////////////// 69 | 70 | dist 71 | output/ 72 | .temp 73 | node_modules 74 | -------------------------------------------------------------------------------- /src/components/c-tip/com/c-tip-angle/c-tip-angle.qq.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/components/c-tip/com/c-tip-angle/c-tip-angle.web.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/components/c-tip/com/c-tip-angle/c-tip-angle.wx.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-tip/com/c-tip-angle/c-tip-angle.qq.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-tip/com/c-tip-angle/c-tip-angle.web.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-tip/com/c-tip-angle/c-tip-angle.wx.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/components/c-tip/com/c-tip-angle/c-tip-angle.alipay.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/components/c-tip/com/c-tip-angle/c-tip-angle.baidu.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-tip/com/c-tip-angle/c-tip-angle.alipay.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-tip/com/c-tip-angle/c-tip-angle.baidu.cml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 26 | 27 | 54 | 55 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-picker-item/c-picker-item.web.cml: -------------------------------------------------------------------------------- 1 | 11 | 55 | 56 | 59 | 60 | 70 | -------------------------------------------------------------------------------- /package/components/c-picker-item/c-picker-item.weex.cml: -------------------------------------------------------------------------------- 1 | 11 | 56 | 57 | 59 | 60 | 70 | -------------------------------------------------------------------------------- /src/components/c-picker-item/c-picker-item.web.cml: -------------------------------------------------------------------------------- 1 | 11 | 55 | 56 | 59 | 60 | 70 | -------------------------------------------------------------------------------- /src/components/c-picker-item/c-picker-item.weex.cml: -------------------------------------------------------------------------------- 1 | 11 | 56 | 57 | 59 | 60 | 70 | -------------------------------------------------------------------------------- /src/components/c-refresh/c-refresh.qq.cml: -------------------------------------------------------------------------------- 1 | 11 | 48 | 49 | 64 | 65 | -------------------------------------------------------------------------------- /src/components/c-refresh/c-refresh.wx.cml: -------------------------------------------------------------------------------- 1 | 11 | 48 | 49 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-refresh/c-refresh.qq.cml: -------------------------------------------------------------------------------- 1 | 11 | 48 | 49 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-refresh/c-refresh.wx.cml: -------------------------------------------------------------------------------- 1 | 11 | 48 | 49 | 64 | 65 | -------------------------------------------------------------------------------- /src/components/c-refresh/c-refresh.alipay.cml: -------------------------------------------------------------------------------- 1 | 11 | 48 | 49 | 64 | 65 | -------------------------------------------------------------------------------- /src/components/c-refresh/c-refresh.baidu.cml: -------------------------------------------------------------------------------- 1 | 11 | 48 | 49 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-refresh/c-refresh.alipay.cml: -------------------------------------------------------------------------------- 1 | 11 | 48 | 49 | 64 | 65 | -------------------------------------------------------------------------------- /package/components/c-refresh/c-refresh.baidu.cml: -------------------------------------------------------------------------------- 1 | 11 | 48 | 49 | 64 | 65 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-date/c-picker-date.cml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 71 | 73 | 83 | -------------------------------------------------------------------------------- /src/components/c-tab-pane/c-tab-pane.cml: -------------------------------------------------------------------------------- 1 | 8 | 43 | 58 | -------------------------------------------------------------------------------- /package/components/c-tab-pane/c-tab-pane.cml: -------------------------------------------------------------------------------- 1 | 8 | 43 | 58 | -------------------------------------------------------------------------------- /src/components/c-picker-item/c-picker-item.qq.cml: -------------------------------------------------------------------------------- 1 | 10 | 56 | 57 | 59 | 60 | 67 | -------------------------------------------------------------------------------- /src/components/c-picker-item/c-picker-item.wx.cml: -------------------------------------------------------------------------------- 1 | 10 | 56 | 57 | 59 | 60 | 67 | -------------------------------------------------------------------------------- /package/components/c-picker-item/c-picker-item.qq.cml: -------------------------------------------------------------------------------- 1 | 10 | 56 | 57 | 59 | 60 | 67 | -------------------------------------------------------------------------------- /package/components/c-picker-item/c-picker-item.wx.cml: -------------------------------------------------------------------------------- 1 | 10 | 56 | 57 | 59 | 60 | 67 | -------------------------------------------------------------------------------- /src/components/c-picker-item/c-picker-item.alipay.cml: -------------------------------------------------------------------------------- 1 | 10 | 58 | 59 | 61 | 62 | 69 | -------------------------------------------------------------------------------- /package/components/c-picker-item/c-picker-item.alipay.cml: -------------------------------------------------------------------------------- 1 | 10 | 58 | 59 | 61 | 62 | 69 | -------------------------------------------------------------------------------- /package/components/c-picker-item/c-picker-item.baidu.cml: -------------------------------------------------------------------------------- 1 | 10 | 58 | 59 | 61 | 62 | 69 | -------------------------------------------------------------------------------- /src/components/c-picker-item/c-picker-item.baidu.cml: -------------------------------------------------------------------------------- 1 | 10 | 58 | 59 | 61 | 62 | 69 | -------------------------------------------------------------------------------- /src/pages/COMP/c-loading/c-loading.cml: -------------------------------------------------------------------------------- 1 | 14 | 51 | 66 | 79 | -------------------------------------------------------------------------------- /src/pages/components/c-header/c-header.cml: -------------------------------------------------------------------------------- 1 | 12 | 57 | 86 | 98 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-date/layer-header/layer-header.cml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 68 | 95 | 102 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-item/c-picker-item.cml: -------------------------------------------------------------------------------- 1 | 16 | 44 | 82 | 95 | -------------------------------------------------------------------------------- /src/components/c-refresh/c-refresh.weex.cml: -------------------------------------------------------------------------------- 1 | 19 | 67 | 68 | 90 | 91 | -------------------------------------------------------------------------------- /package/components/c-refresh/c-refresh.weex.cml: -------------------------------------------------------------------------------- 1 | 19 | 67 | 68 | 90 | 91 | -------------------------------------------------------------------------------- /src/components/c-toast/c-toast.cml: -------------------------------------------------------------------------------- 1 | 9 | 68 | 95 | 105 | -------------------------------------------------------------------------------- /package/components/c-toast/c-toast.cml: -------------------------------------------------------------------------------- 1 | 9 | 68 | 95 | 105 | -------------------------------------------------------------------------------- /src/components/c-picker/c-picker.cml: -------------------------------------------------------------------------------- 1 | 22 | 86 | 89 | 100 | -------------------------------------------------------------------------------- /package/components/c-picker/c-picker.cml: -------------------------------------------------------------------------------- 1 | 22 | 86 | 89 | 100 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cml-ui [![version](https://img.shields.io/npm/v/chameleon-tool.svg?style=flat)](https://www.npmjs.com/package/cml-ui) 2 | 本仓库为 `cml` 框架的扩展组件库,提供丰富的组件能力 3 | 4 | 详细见[cml扩展组件文档](https://cmljs.org/doc/component/expand/expand.html) 5 | 6 | 例如: 7 | ```html 8 | 17 | ``` 18 | ### 1 如何开发 19 | ```javascript 20 | npm install 21 | cml dev //开始开发 22 | ``` 23 | ### 2 目录概述 24 | 25 | ```javascript 26 | . 27 | ├── README.md 28 | ├── bin 29 | │ └── build.sh 30 | ├── chameleon.config.js 31 | ├── dist 32 | │ └── wx 33 | │ ├── app.js 34 | │ ├── app.json 35 | │ ├── app.wxss 36 | │ ├── components 37 | │ ├── pages 38 | │ ├── project.config.json 39 | │ └── static 40 | ├── mock 41 | │ ├── api 42 | │ │ └── index.js 43 | │ └── template 44 | │ └── index.php 45 | ├── package // build.sh 结果,发布到npm 46 | │ ├── assets 47 | │ │ ├── css 48 | │ │ └── images 49 | │ ├── components 50 | │ │ ├── c-action-sheet 51 | │ │ └── c-dialog 52 | │ └── package.json 53 | ├── package-lock.json 54 | ├── package.json 55 | └── src //开发目录 56 | ├── app 57 | │ ├── app.cml 58 | │ └── app.interface 59 | ├── assets 60 | │ ├── css 61 | │ └── images 62 | ├── components //开发组件 63 | │ ├── c-action-sheet 64 | │ └── c-dialog 65 | ├── entry 66 | │ ├── entry.html 67 | │ ├── entry.web.js 68 | │ └── entry.weex.js 69 | ├── pages //组件示例demo页 70 | │ ├── API // 相应api 接口demo示例 71 | │ ├── COMP //相应组件demo示例; 72 | │ └── index //主页入口 73 | │ 74 | ├── router.js 75 | ├── router.config.json //路由配置 76 | └── store 77 | ├── action-types.js 78 | ├── actions.js 79 | ├── getter-types.js 80 | ├── getters.js 81 | ├── index.js 82 | ├── mutation-types.js 83 | ├── mutations.js 84 | └── state.js 85 | 86 | ``` 87 | 开发步骤 88 | 1. 查看index.cml文件,大概了解主页的配置和生效路径; 89 | 2. 配置: 90 | 只需要在 router.config.json 中配置对应路由页面 91 | 3. 配置完毕之后 在 `src/pages/COMP`中书写你的demo组件 92 | 4. 当前以上的工作都是为了可以实时查看开发的组件的效果做准备,接下来就需要去`src/components`中去开发我们对应的组件 93 | 5. enjoy yourself 94 | 95 | ### 4 多端预览效果 96 | 97 | | web | 微信小程序 | native-weex | 98 | |:----------:|:-------------:|:------:| 99 | | | | | 100 | -------------------------------------------------------------------------------- /src/assets/css/var.less: -------------------------------------------------------------------------------- 1 | // 类名前缀 2 | @cml-prefix: cml; 3 | 4 | // 颜色定义规范 5 | //// 主基调 6 | @color-orange: #fc9153; 7 | @color-regular-blue: #4a4c5b; 8 | @color-background: #f3f4f5; 9 | @color-background-grew: #e8864c; 10 | @color-title-background: #f7f7f7; 11 | 12 | //// 文字信息 13 | @color-dark-grey: #333; 14 | @color-grey: #666; 15 | @color-light-grey: #999; 16 | @color-light-grey-s: #ccc; 17 | @color-light-grey-ss: #eee; 18 | @color-white: #fff; 19 | //// 其他辅色 20 | 21 | ////// 灰色 22 | @color-light-grey-sss: #fcfcfc; 23 | ////// 橘色 24 | @color-dark-orange: #f08250; 25 | @color-light-orange: #fc9153; 26 | @color-grey-orange: #ffc4a6; 27 | 28 | ////// 黄色 29 | @color-dark-yellow: #ffd00b; 30 | @color-light-yellow: #ffe650; 31 | @color-grey-yellow: #ffedb4; 32 | 33 | ////// 红色 34 | @color-dark-red: #bd2630; 35 | @color-light-red: #db2a36; 36 | @color-grey-red: #ff525d; 37 | 38 | ////// 粉色 39 | @color-dark-pink: #aa337a; 40 | @color-light-pink: #d24b82; 41 | @color-grey-pink: #ef65ab; 42 | 43 | ////// 紫色 44 | @color-dark-purple: #48296d; 45 | @color-light-purple: #6a2d8e; 46 | @color-grey-purple: #af72c5; 47 | 48 | ////// 黄绿色 49 | @color-dark-greenyellow: #8bb93f; 50 | @color-light-greenyellow: #bfd141; 51 | @color-grey-greenyellow: #d5e08c; 52 | 53 | ////// 深绿 54 | @color-dark-deepgreen: #1b733e; 55 | @color-light-deepgreen: #50a050; 56 | @color-grey-deepgreen: #80c075; 57 | 58 | ////// 深青色 59 | @color-dark-cyan: #018172; 60 | @color-light-cyan: #28aa91; 61 | @color-grey-cyan: #71c3bc; 62 | 63 | ////// 藏青色 64 | @color-dark-cadetblue: #256ea8; 65 | @color-light-cadetblue: #3ca0e6; 66 | @color-grey-cadetblue: #96caf0; 67 | 68 | ////// 蓝色 69 | @color-dark-blue: #233c64; 70 | @color-light-blue: #1e4191; 71 | @color-grey-blue: #6e82d7; 72 | 73 | //// 横线色值 74 | @color-row-line: #ebebeb; 75 | //// 竖线色值 76 | @color-col-line: #f5f5f5; 77 | 78 | /// click & touch active background-color 79 | @color-active-light-orange: rgba(252, 145, 83, .04); 80 | @color-active-light-gray: rgba(0, 0, 0, .04); 81 | 82 | @color-row-line-new: rgba(0, 0, 0, .08); 83 | @color-col-line-new: rgba(0, 0, 0, .02); 84 | 85 | /// click & touch active color 86 | @color-active-light-orange-fe: #fdc2a5; 87 | @color-active-light-gray-fe: #c2c2c2; 88 | 89 | /// mask background-color 90 | @color-mask-bgc: rgba(37, 38, 45, .4); 91 | 92 | // 字体大小定义规范 93 | @fontsize-large-xxxx: 60cpx; 94 | @fontsize-large-xxx: 48cpx; 95 | @fontsize-large-xx: 40cpx; 96 | @fontsize-large-x: 36cpx; 97 | @fontsize-large: 32cpx; 98 | @fontsize-medium: 28cpx; 99 | @fontsize-small: 24cpx; 100 | @fontsize-small-s: 20cpx; 101 | @fontSize-sug: 34cpx; 102 | 103 | /// 内容区阴影 104 | @box-shadow-content: 0 1px 3px rgba(0, 0, 0, .1); 105 | @box-shadow-nav: 0 2px 3px rgba(0, 0, 0, .12); 106 | 107 | 108 | -------------------------------------------------------------------------------- /package/assets/css/var.less: -------------------------------------------------------------------------------- 1 | // 类名前缀 2 | @cml-prefix: cml; 3 | 4 | // 颜色定义规范 5 | //// 主基调 6 | @color-orange: #fc9153; 7 | @color-regular-blue: #4a4c5b; 8 | @color-background: #f3f4f5; 9 | @color-background-grew: #e8864c; 10 | @color-title-background: #f7f7f7; 11 | 12 | //// 文字信息 13 | @color-dark-grey: #333; 14 | @color-grey: #666; 15 | @color-light-grey: #999; 16 | @color-light-grey-s: #ccc; 17 | @color-light-grey-ss: #eee; 18 | @color-white: #fff; 19 | //// 其他辅色 20 | 21 | ////// 灰色 22 | @color-light-grey-sss: #fcfcfc; 23 | ////// 橘色 24 | @color-dark-orange: #f08250; 25 | @color-light-orange: #fc9153; 26 | @color-grey-orange: #ffc4a6; 27 | 28 | ////// 黄色 29 | @color-dark-yellow: #ffd00b; 30 | @color-light-yellow: #ffe650; 31 | @color-grey-yellow: #ffedb4; 32 | 33 | ////// 红色 34 | @color-dark-red: #bd2630; 35 | @color-light-red: #db2a36; 36 | @color-grey-red: #ff525d; 37 | 38 | ////// 粉色 39 | @color-dark-pink: #aa337a; 40 | @color-light-pink: #d24b82; 41 | @color-grey-pink: #ef65ab; 42 | 43 | ////// 紫色 44 | @color-dark-purple: #48296d; 45 | @color-light-purple: #6a2d8e; 46 | @color-grey-purple: #af72c5; 47 | 48 | ////// 黄绿色 49 | @color-dark-greenyellow: #8bb93f; 50 | @color-light-greenyellow: #bfd141; 51 | @color-grey-greenyellow: #d5e08c; 52 | 53 | ////// 深绿 54 | @color-dark-deepgreen: #1b733e; 55 | @color-light-deepgreen: #50a050; 56 | @color-grey-deepgreen: #80c075; 57 | 58 | ////// 深青色 59 | @color-dark-cyan: #018172; 60 | @color-light-cyan: #28aa91; 61 | @color-grey-cyan: #71c3bc; 62 | 63 | ////// 藏青色 64 | @color-dark-cadetblue: #256ea8; 65 | @color-light-cadetblue: #3ca0e6; 66 | @color-grey-cadetblue: #96caf0; 67 | 68 | ////// 蓝色 69 | @color-dark-blue: #233c64; 70 | @color-light-blue: #1e4191; 71 | @color-grey-blue: #6e82d7; 72 | 73 | //// 横线色值 74 | @color-row-line: #ebebeb; 75 | //// 竖线色值 76 | @color-col-line: #f5f5f5; 77 | 78 | /// click & touch active background-color 79 | @color-active-light-orange: rgba(252, 145, 83, .04); 80 | @color-active-light-gray: rgba(0, 0, 0, .04); 81 | 82 | @color-row-line-new: rgba(0, 0, 0, .08); 83 | @color-col-line-new: rgba(0, 0, 0, .02); 84 | 85 | /// click & touch active color 86 | @color-active-light-orange-fe: #fdc2a5; 87 | @color-active-light-gray-fe: #c2c2c2; 88 | 89 | /// mask background-color 90 | @color-mask-bgc: rgba(37, 38, 45, .4); 91 | 92 | // 字体大小定义规范 93 | @fontsize-large-xxxx: 60cpx; 94 | @fontsize-large-xxx: 48cpx; 95 | @fontsize-large-xx: 40cpx; 96 | @fontsize-large-x: 36cpx; 97 | @fontsize-large: 32cpx; 98 | @fontsize-medium: 28cpx; 99 | @fontsize-small: 24cpx; 100 | @fontsize-small-s: 20cpx; 101 | @fontSize-sug: 34cpx; 102 | 103 | /// 内容区阴影 104 | @box-shadow-content: 0 1px 3px rgba(0, 0, 0, .1); 105 | @box-shadow-nav: 0 2px 3px rgba(0, 0, 0, .12); 106 | 107 | 108 | -------------------------------------------------------------------------------- /src/components/c-checkbox-group/c-checkbox-group.cml: -------------------------------------------------------------------------------- 1 | 19 | 100 | 103 | 110 | -------------------------------------------------------------------------------- /package/components/c-checkbox-group/c-checkbox-group.cml: -------------------------------------------------------------------------------- 1 | 19 | 100 | 103 | 110 | -------------------------------------------------------------------------------- /src/pages/COMP/c-actionsheet/c-actionsheet.cml: -------------------------------------------------------------------------------- 1 | 18 | 87 | 98 | 111 | -------------------------------------------------------------------------------- /src/pages/COMP/c-popup/c-popup.cml: -------------------------------------------------------------------------------- 1 | 12 | 87 | 98 | 111 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker-panel/c-picker-panel.cml: -------------------------------------------------------------------------------- 1 | 23 | 54 | 91 | 105 | -------------------------------------------------------------------------------- /src/components/c-radio-group/c-radio-group.cml: -------------------------------------------------------------------------------- 1 | 18 | 106 | 109 | 116 | -------------------------------------------------------------------------------- /package/components/c-radio-group/c-radio-group.cml: -------------------------------------------------------------------------------- 1 | 18 | 106 | 109 | 116 | -------------------------------------------------------------------------------- /src/pages/COMP/c-picker/c-picker.cml: -------------------------------------------------------------------------------- 1 | 24 | 62 | 99 | 112 | -------------------------------------------------------------------------------- /src/components/c-tab/c-tab.cml: -------------------------------------------------------------------------------- 1 | 18 | 86 | 96 | 121 | 122 | -------------------------------------------------------------------------------- /package/components/c-tab/c-tab.cml: -------------------------------------------------------------------------------- 1 | 18 | 86 | 96 | 121 | 122 | -------------------------------------------------------------------------------- /package/components/c-loading/c-loadingfunc.interface: -------------------------------------------------------------------------------- 1 | 8 | 9 | 20 | 58 | 69 | 80 | 91 | -------------------------------------------------------------------------------- /src/components/c-loading/c-loadingfunc.interface: -------------------------------------------------------------------------------- 1 | 8 | 9 | 20 | 58 | 69 | 80 | 91 | -------------------------------------------------------------------------------- /src/pages/COMP/c-toast/c-toast.cml: -------------------------------------------------------------------------------- 1 | 20 | 105 | 116 | 129 | -------------------------------------------------------------------------------- /src/pages/COMP/c-tabbar/c-tabbar.cml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 68 | 82 | 113 | -------------------------------------------------------------------------------- /src/router.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "mode": "hash", 3 | "domain": "https://api.chameleon.com", 4 | "routes":[ 5 | { 6 | "url": "/", 7 | "path": "/pages/index/index", 8 | "name": "首页", 9 | "mock": "index.php" 10 | }, 11 | { 12 | "name": "c-toast", 13 | "url": "/pages/COMP/c-toast/c-toast", 14 | "path": "/pages/COMP/c-toast/c-toast", 15 | "mock": "index.php" 16 | }, 17 | { 18 | "name": "c-dialog", 19 | "url": "/pages/COMP/c-dialog/c-dialog", 20 | "path": "/pages/COMP/c-dialog/c-dialog", 21 | "mock": "index.php" 22 | }, 23 | { 24 | "name": "c-popup", 25 | "url": "/pages/COMP/c-popup/c-popup", 26 | "path": "/pages/COMP/c-popup/c-popup", 27 | "mock": "index.php" 28 | }, 29 | { 30 | "name": "c-tip", 31 | "url": "/pages/COMP/c-tip/c-tip", 32 | "path": "/pages/COMP/c-tip/c-tip", 33 | "mock": "index.php" 34 | }, 35 | { 36 | "name": "c-loading", 37 | "url": "/pages/COMP/c-loading/c-loading", 38 | "path": "/pages/COMP/c-loading/c-loading", 39 | "mock": "index.php" 40 | }, 41 | { 42 | "name": "c-actionsheet", 43 | "url": "/pages/COMP/c-actionsheet/c-actionsheet", 44 | "path": "/pages/COMP/c-actionsheet/c-actionsheet", 45 | "mock": "index.php" 46 | }, 47 | { 48 | "name": "c-picker", 49 | "url": "/pages/COMP/c-picker/c-picker", 50 | "path": "/pages/COMP/c-picker/c-picker", 51 | "mock": "index.php" 52 | }, 53 | { 54 | "name": "c-picker-panel", 55 | "url": "/pages/COMP/c-picker-panel/c-picker-panel", 56 | "path": "/pages/COMP/c-picker-panel/c-picker-panel", 57 | "mock": "index.php" 58 | }, 59 | { 60 | "name": "c-picker-item", 61 | "url": "/pages/COMP/c-picker-item/c-picker-item", 62 | "path": "/pages/COMP/c-picker-item/c-picker-item", 63 | "mock": "index.php" 64 | }, 65 | { 66 | "url": "/pages/COMP/c-picker-date/c-picker-date", 67 | "path": "/pages/COMP/c-picker-date/c-picker-date", 68 | "name": "c-picker-date", 69 | "mock": "index.php" 70 | }, 71 | { 72 | "name": "c-tab", 73 | "url": "/pages/COMP/c-tab/c-tab", 74 | "path": "/pages/COMP/c-tab/c-tab", 75 | "mock": "index.php" 76 | }, 77 | { 78 | "name": "c-tabbar", 79 | "url": "/pages/COMP/c-tabbar/c-tabbar", 80 | "path": "/pages/COMP/c-tabbar/c-tabbar", 81 | "mock": "index.php" 82 | }, 83 | { 84 | "name": "c-checkbox-group", 85 | "url": "/pages/COMP/c-checkbox-group/c-checkbox-group", 86 | "path": "/pages/COMP/c-checkbox-group/c-checkbox-group", 87 | "mock": "index.php" 88 | }, 89 | { 90 | "name": "c-radio-group", 91 | "url": "/pages/COMP/c-radio-group/c-radio-group", 92 | "path": "/pages/COMP/c-radio-group/c-radio-group", 93 | "mock": "index.php" 94 | }, 95 | { 96 | "name": "c-refresh", 97 | "url": "/pages/COMP/c-refresh/c-refresh", 98 | "path": "/pages/COMP/c-refresh/c-refresh", 99 | "mock": "index.php" 100 | }, 101 | { 102 | "name": "cml.modal", 103 | "url": "/pages/API/modal/modal", 104 | "path": "/pages/API/modal/modal", 105 | "mock": "index.php" 106 | }, 107 | { 108 | "name": "cml.toast", 109 | "url": "/pages/API/toast/toast", 110 | "path": "/pages/API/toast/toast", 111 | "mock": "index.php" 112 | } 113 | ] 114 | } 115 | -------------------------------------------------------------------------------- /src/components/c-refresh/c-refresh.web.cml: -------------------------------------------------------------------------------- 1 | 14 | 108 | 109 | 130 | 131 | 138 | -------------------------------------------------------------------------------- /package/components/c-refresh/c-refresh.web.cml: -------------------------------------------------------------------------------- 1 | 14 | 108 | 109 | 130 | 131 | 138 | -------------------------------------------------------------------------------- /src/pages/COMP/c-radio-group/c-radio-group.cml: -------------------------------------------------------------------------------- 1 | 39 | 121 | 136 | 149 | --------------------------------------------------------------------------------