Files
bsmall/node_modules/mini-ali-ui/es/footer/index.js
2020-09-24 11:08:03 +08:00

41 lines
1009 B
JavaScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import fmtUnit from '../_util/fmtUnit';
Component({
props: {
className: '',
// normal: 基础样式;
// guide文案加引导
// copyright声明
// brand带品牌
// link带链接
// end: 没有更多
type: 'normal',
content: '',
extend: [],
onBrandTap: function onBrandTap() {},
showEndIcon: false,
iconName: 'selected'
},
data: {
defaultSize: fmtUnit(18),
maxSize: fmtUnit(22),
valueUnit: fmtUnit('px')
},
methods: {
onBrandClick: function onBrandClick(e) {
var brandLink = e.currentTarget.dataset.url;
var _this$props = this.props,
onBrandTap = _this$props.onBrandTap,
extend = _this$props.extend;
if (onBrandTap !== '' && brandLink) {
my.navigateTo({
url: brandLink
});
}
if (onBrandTap !== '' && !brandLink && typeof onBrandTap === 'function') {
onBrandTap(extend[e.currentTarget.dataset.index]);
}
}
}
});