react-form-ui-y
Version:
311 lines (295 loc) • 9.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.treeSty = undefined;
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _reactUtilsY = require("react-utils-y");
var _formStyle = require("../formStyle");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var treeSty = function treeSty(_theme, _this) {
var textWidth = _this.props.textWidth || "4rem"; //8rem
textWidth = textWidth && textWidth.indexOf('rem') >= 0 ? parseFloat(textWidth) : parseFloat(textWidth / 16);
var publicSty = (0, _formStyle.defaultPublic)(_theme, _this);
var sty = {
//select默认样式
treeInputBox: {
padding: "0px 0px 0px 0.625rem",
margin: "0px",
width: "100%",
height: "2rem",
wordBreak: "keep-all",
boxSizing: "border-box",
display: "flex",
alignItems: "center",
color: "" + (_theme.publicForm.valueColor || '#666666'),
cursor: "pointer"
},
//select正在操作中样式
treeInputBoxFocus: {
padding: "0px 0px 0px 0.625rem",
margin: "0px",
width: "100%",
height: "2rem",
wordBreak: "keep-all",
boxSizing: "border-box",
display: "flex",
alignItems: "center",
color: "" + (_theme.input.focusColor || '#666666'),
cursor: "pointer"
},
//select禁用样式
treeInputBoxDis: {
padding: "0px 0px 0px 0.625rem",
margin: "0px",
width: "100%",
height: "2rem",
wordBreak: "keep-all",
boxSizing: "border-box",
display: "flex",
alignItems: "center",
color: "" + (_theme.publicForm.disValueColor || '#000')
},
//选中的文字
inputText: {
flex: "1",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
textAlign: _this.props.textAlign
},
//下拉svg
inputSvg: {
display: "flex",
alignItems: "center",
justifyContent: "center",
marginRight: "0.625rem",
marginLeft: "0.625rem"
},
//下拉值弹出框
dialogTit: {
color: "" + (_theme.select.dialogTit || '#000'),
height: "2.6rem"
},
//下拉出现的透明遮罩背景,点击其他地方消失
selectdialogMask: {
width: "100%",
height: "100%",
background: "rgba(0, 0, 0, 0)",
position: "fixed",
top: "0",
left: "0",
zIndex: "5"
},
//下拉样式
selectListBox_b_r: {
display: "flex",
flexDirection: "column",
border: "0.08rem solid #dfdfdf",
position: "absolute",
background: "#fff",
zIndex: "6",
top: '2.3rem',
left: "" + (_this.props.formType == "box" ? "" : _this.props.formText ? textWidth + 1.25 + "rem" : "") //1.25是校验*的宽度
},
selectListBox_t_r: {
display: "flex",
flexDirection: "column",
border: "0.08rem solid #dfdfdf",
position: "absolute",
background: "#fff",
zIndex: "6",
bottom: '2.3rem',
left: "" + (_this.props.formType == "box" ? "" : _this.props.formText ? textWidth + 1.25 + "rem" : "") //1.25是校验*的宽度
},
selectListBox_b_l: {
display: "flex",
flexDirection: "column",
border: "0.08rem solid #dfdfdf",
position: "absolute",
background: "#fff",
zIndex: "6",
top: '2.3rem',
right: "0"
},
selectListBox_t_l: {
display: "flex",
flexDirection: "column",
border: "0.08rem solid #dfdfdf",
position: "absolute",
background: "#fff",
zIndex: "6",
bottom: '2.3rem',
right: "0"
},
//树
treeFieldBoxSelect: {
width: "37.5rem",
height: "39.75rem"
},
treeFieldBoxDialog: {
width: "37.5rem",
height: "43.75rem"
// display: "flex",
// flexWrap: "wrap",
// boxSizing: "border-box"
},
//内容头部
treeHead: {
height: "3.125rem",
width: "100%",
display: "flex",
alignItems: "center",
paddingLeft: "1.875rem",
fontSize: "1rem",
boxSizing: "border-box",
borderBottom: "#dfdfdf solid 0.08rem"
},
treeHeadLine: {
width: "0.3125rem",
height: "1rem",
marginRight: "0.375rem",
background: _theme.tree.treeHeadLine || "#ccc"
},
//选择树展示区
chooseBox: {
width: "33.4rem",
height: "5.625rem",
margin: "0 1.875rem",
marginTop: "1.25rem",
border: "#dfdfdf solid 0.08rem",
boxSizing: "border-box",
borderRadius: "0.1875rem"
},
chooseBoxCont: {
display: "flex",
flexWrap: "wrap"
},
chooseItem: {
display: "flex",
justifyContent: "center",
alignItems: "center",
background: "#e0eefb",
margin: "0.2rem",
padding: "0px 0.5rem",
width: "auto",
height: "1.5rem",
fontSize: "0.875rem"
},
chooseItemNull: {
display: "flex",
justifyContent: "center",
alignItems: "center",
width: "33rem",
height: "5.625rem"
},
chooseItemDel: {
width: "1.25rem",
height: "100%",
// marginBottom: "1rem",
cursor: "pointer",
display: "flex",
justifyContent: "center",
alignItems: "center"
},
//搜索
searchBox: {
display: "flex",
height: "2rem",
width: "33.4rem",
margin: "0.25rem 1.875rem 0px",
border: "0.08rem solid #dfdfdf",
borderRadius: "0.1875rem",
boxSizing: "content-box",
position: "relative"
},
searchInput: {
width: "100%",
border: "0",
outline: "none",
padding: "0 0.6rem",
background: "#ff000000"
},
inputTip: {
padding: "0 0.6rem",
width: "100%",
height: "100%",
position: "absolute",
top: "0",
left: "0",
boxSizing: "border-box",
fontSize: "0.8rem",
display: "flex",
alignItems: "center",
color: "#ccc",
zIndex: "-1"
},
searchBtn: {
position: "absolute",
right: "11px",
top: "6px",
cursor: "pointer"
},
//树
treeBox: {
width: "33.4rem",
height: "25rem",
margin: "0.25rem 1.875rem 0px",
paddingTop: "0.25rem",
border: "0.08rem solid #dfdfdf",
borderRadius: "0.1875rem",
boxSizing: "content-box"
},
treeBoxCont: {
display: "flex",
width: "32rem"
},
ulBox: {
margin: "0",
padding: "0",
listStyle: "none",
marginLeft: "1rem",
flex: "1"
},
liBox: {
display: "flex",
flexDirection: "column"
},
treeItemMove: {
display: "flex",
alignItems: "center",
height: "2rem",
background: _theme.tree.moveTreeItem,
borderRadius: "0.1875rem",
cursor: "pointer",
color: "#999999"
},
treeItem: {
display: "flex",
alignItems: "center",
height: "2rem",
cursor: "pointer",
color: "#999999"
},
textBox: {
display: "flex",
alignItems: "center",
flex: "1"
},
//按钮
btnBox: {
display: "flex",
width: "88%",
justifyContent: "flex-end",
alignItems: "center",
height: "4rem",
borderTop: "#dfdfdf solid 0.08rem",
margin: "0 auto",
paddingRight: "1rem"
}
};
return _reactUtilsY._Object.merge(publicSty, sty);
};
exports.treeSty = treeSty;
//# sourceMappingURL=organizationTreeStyle.js.map