UNPKG

weex-nuke

Version:

基于 Rax 、Weex 的高性能组件体系 ~~

204 lines (198 loc) 4.27 kB
'use strict'; function VariableMix(theme) { var Core = theme.Core; var ComponentCustomStyle = theme.Switch; /** * 开关 * @namespace component * @property module switch * @property tag Switch * @property category component */ var switchVaribles = { /** * width * @property namespace size/bounding */ 'wrap-width-ios': 100, /** * width * @property namespace size/bounding */ 'wrap-width-android': 68, /** * height * @property namespace size/bounding */ 'wrap-height-ios': 60, /** * height * @property namespace size/bounding */ 'wrap-height-android': 28, /** * corner * @property namespace statement/normal */ 'wrap-border-radius': 40, /** * width * @property namespace size/border */ 'wrap-border-width-ios': 2, /** * width * @property namespace size/border */ 'wrap-border-width-android': 0, /** * margin * @property namespace size/bounding */ 'wrap-margin': 0, /** * padding * @property namespace size/bounding */ 'wrap-padding': 0, /** * background * @property namespace statement */ 'c-bg-color-ios': '#00e158', /** * background * @property namespace statement */ 'c-bg-color-android': '#4FCEDB', /** * border * @property namespace statement */ 'c-border-color-ios': '#00e158', /** * border * @property namespace statement */ 'c-border-color-android': Core['color-transparent'], /** * border * @property namespace statement */ 'unc-border-color': '#dfdfdf', /** * background * @property namespace statement */ 'unc-bg-color-ios': Core['color-white'], /** * background * @property namespace statement */ 'unc-bg-color-android': '#B1B1B1', /** * background * @property namespace statement */ 'dis-c-bg-color-ios': '#00FF58', /** * background * @property namespace statement */ 'dis-c-bg-color-android': '#221F1F', /** * background * @property namespace statement */ 'dis-unc-bg-color-ios': '#cccccc', /** * background * @property namespace statement */ 'dis-unc-bg-color-android': '#221F1F', /** * border * @property namespace statement */ 'dis-c-border-color-ios': '#dfdfdf', /** * border * @property namespace statement */ 'dis-c-border-color-android': '#1A9CB7', /** * size * @property namespace size/dot */ 'dot-size-ios': 60, /** * size * @property namespace size/dot */ 'dot-size-android': 44, /** * background * @property namespace size/dot */ 'dot-bg-color-ios': Core['color-white'], /** * background * @property namespace size/dot */ 'dot-bg-color-android': '#EBEBEB', /** * left * @property namespace size/dot */ 'dot-left-ios': 0, /** * left * @property namespace size/dot */ 'dot-left-android': -14, /** * background * @property namespace size/dot */ 'dot-checked-bg-color-ios': Core['color-white'], /** * background * @property namespace size/dot */ 'dot-checked-bg-color-android': '#009EB7', /** * transform * @property namespace statement/dot */ 'dot-transform-ios': 40, /** * transform * @property namespace statement/dot */ 'dot-transform-android': 48, /** * top * @property namespace size/dot */ 'dot-top-ios': 0, /** * top * @property namespace size/dot * @property calculate (['wrap-height-android'] - ['dot-size-android'])/2 */ 'dot-top-android': -8, /** * background * @property namespace size/dot */ 'dot-disabled-bg-color-ios': Core['color-white'], /** * background * @property namespace size/dot */ 'dot-disabled-bg-color-android': Core['color-white'] }; var variable = Object.assign(switchVaribles, ComponentCustomStyle); return variable; } module.exports = VariableMix;