tabbar ts
This commit is contained in:
parent
344fb0a628
commit
fd1ad30d09
|
|
@ -14,8 +14,8 @@ declare type TabBarProps = {
|
|||
children?: React.ReactNode;
|
||||
list: Array<Item>;
|
||||
onChange?: (value: string, event?: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
||||
fixed: boolean;
|
||||
bordered: boolean;
|
||||
fixed?: boolean;
|
||||
bordered?: boolean;
|
||||
value?: string;
|
||||
};
|
||||
declare const _default: React.MemoExoticComponent<(props: TabBarProps) => JSX.Element>;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ require("./index.less");
|
|||
var prefixCls = 'oak';
|
||||
exports.default = (0, react_1.memo)(function (props) {
|
||||
var _a;
|
||||
var style = props.style, className = props.className, list = props.list, onChange = props.onChange, iconClassName = props.iconClassName, textClassName = props.textClassName, _b = props.fixed, fixed = _b === void 0 ? true : _b, _c = props.bordered, bordered = _c === void 0 ? true : _c, _d = props.value, value = _d === void 0 ? '' : _d;
|
||||
var style = props.style, className = props.className, list = props.list, onChange = props.onChange, iconClassName = props.iconClassName, textClassName = props.textClassName, _b = props.fixed, fixed = _b === void 0 ? true : _b, _c = props.bordered, bordered = _c === void 0 ? false : _c, _d = props.value, value = _d === void 0 ? '' : _d;
|
||||
var length = list === null || list === void 0 ? void 0 : list.length;
|
||||
return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: (0, classnames_1.default)("".concat(prefixCls, "-tabBar"), (_a = {},
|
||||
_a["".concat(prefixCls, "-tabBar--fixed")] = fixed,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
/** index.wxss **/
|
||||
@import "../../../../config/styles/mp/index.less";
|
||||
@import "../../../../config/styles/mp/mixins.less";
|
||||
|
||||
.page-body {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
background-color: @bg-color-fade;
|
||||
box-sizing: border-box;
|
||||
.safe-area-inset-bottom();
|
||||
}
|
||||
|
||||
.col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
}
|
||||
.pannel-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 96rpx;
|
||||
padding: 0 32rpx;
|
||||
font-size: 32rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pannel-label {
|
||||
width: 160rpx;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
|
||||
.pannel-text {
|
||||
flex: 1;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
|
@ -21,8 +21,8 @@ type TabBarProps = {
|
|||
value: string,
|
||||
event?: React.MouseEvent<HTMLDivElement, MouseEvent>
|
||||
) => void;
|
||||
fixed: boolean;
|
||||
bordered: boolean;
|
||||
fixed?: boolean;
|
||||
bordered?: boolean;
|
||||
value?: string;
|
||||
};
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ export default memo((props: TabBarProps) => {
|
|||
iconClassName,
|
||||
textClassName,
|
||||
fixed = true,
|
||||
bordered = true,
|
||||
bordered = false,
|
||||
value = '',
|
||||
} = props;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue