diff --git a/dist/tinper-neoui-grid.css b/dist/tinper-neoui-grid.css deleted file mode 100644 index 4416e49..0000000 --- a/dist/tinper-neoui-grid.css +++ /dev/null @@ -1,888 +0,0 @@ -.u-grid { - display: block; - position: relative; - color: #333; - background-color: #F9F9F9; - zoom: 1; - font-family: 'Helvetica Neue', Helvetica, 'Hiragino Sans GB', 'Segoe UI', 'Microsoft Yahei', Tahoma, Arial, STHeiti, sans-serif; - font-weight: normal; - font-size: 16px; - text-align: left; - border-width: 1px; - border-bottom-width: 0px; - border-style: solid; - border-color: #cecece; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-shadow: none; - -webkit-box-shadow: none; - overflow:hidden; -} -.u-grid li { - font-size: 16px; -} -.u-grid-top { - display: none; - position: fixed; - width: 100%; - height: 100%; - left: 0px; - top: 0px; - z-index: 99999; - background-color: #fff ; - filter: alpha(opacity=10); - -moz-opacity: 0.1; - -khtml-opacity: 0.1; - opacity: .1; - user-select: none; - -o-user-select: none; - -ms-user-select: none; - -moz-user-select: -moz-none; - -webkit-user-select: none; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-user-drag: none; - cursor: default; -} -.u-grid table { - width: 100%; - margin: 0; - max-width: none; - border-collapse: separate; - border-spacing: 0; - empty-cells: show; - border-width: 0; - outline: 0; - table-layout: fixed; - background: #fff; - margin: 0px !important; -} -/* -header区域css begin -*/ -.u-grid-header { - border-style: solid; - border-width: 0 0 1px 0; - border-color: #cecece; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - background-image: none; - background-position: 50% 50%; - background-repeat: repeat; - position: relative; -} -.u-grid-header-wrap { - position: relative; - width: 100%; - overflow: hidden; - zoom: 1; -} -.u-grid-header-left { - position: absolute; - z-index: 11; - background-color: #eeeff1; - height: 100%; -} -.u-grid-header-multi-select { - padding: 0 0 0 1.25em; - margin: 0px; - position: relative; - float: left; - border-style: solid; - border-color: #cecece; - border-width: 0px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - height: 2.75em; - line-height: 2.75em; -} -.u-grid-header-num { - position: relative; - float: left; - height: 2.125em; - border-style: solid; - border-color: #cecece; - border-width: 0px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - height: 100%; -} -.u-grid-header-th { - vertical-align: bottom; - height: 2.75em; - font-weight: normal; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - text-align: left; - border-style: solid; - border-color: #cecece; - border-width: 0px; - padding:0px !important; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - //background-image: none; - background-position: 50% 50%; - user-select: none; - -o-user-select: none; - -ms-user-select: none; - -moz-user-select: -moz-none; - -webkit-user-select: none; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-user-drag: none; - cursor: default; - background: #eeeff1; -} - -.u-grid-header-th>div:hover{ - background:#d7d7d7; -} - -.u-grid-header-level-div{ - z-index: 1; - border-style: solid; - border-color: #cecece; - border-width: 0px 1px 0px 0px; -} - -.u-grid-header-th-first { - border-left-width: 0; -} -.u-grid-header-link { - display: block; - padding-left: 0.714285714285em; - padding-right: 0.714285714285em; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - color: #333; - font-size: 0.875em; - height: 3.14285714em; - line-height: 3.14285714em; -} - -.u-grid-hide-title-icon .uf-fontselectioneditor { - display: none -} -.u-gird-parent { - position: absolute; - top: 0px; - text-align: center; - /*background-color: #F9F9F9;*/ - background-color: #eeeff1; - z-index: 1; - border-style: solid; - border-color: #cecece; - border-width: 1px; - margin-left: -1px; - box-sizing: content-box; - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; -} - -.grid-no-left-border{ - border-left-width: 0px; - margin: 0px; -} - -.grid-max-level-div{ - border-top: 0px; -} -.u-grid-header-link:hover { - //color: #a8a8a8; -} -.u-grid-header-link:visited { - //color: #a8a8a8; -} - - -.u-grid-header-columnmenu { - position: absolute; - padding: 0 .4em 0 .6em; - font-size: 0.75em !important; - top: 0px; - right: 0px; - color: #a8a8a8; - height: 3.6666667em; - line-height: 3.6666667em; - z-index: 999; -} -/*拖动*/ -.u-grid-header-resize-handle { - position: absolute; - cursor: col-resize; - z-index: 12; - width: .6em; - height: 2.125em; - display: block; - bottom: 0px; -} -/*交换*/ -.u-grid-header-drag-clue { - overflow: hidden; - border-radius: 2px; - background-color: #3f51b5; - position: absolute; - z-index: 13; - border-style: solid; - border-width: 1px; - font-size: 0.75em; - white-space: nowrap; - cursor: default; - color: #fff; -} -.u-grid-header-drag-status { - width: 1em; - height: 1em; -} -.u-grid-header-swap-tip-span { - height: 5px; - position: absolute; - z-index: 13; - cursor: default; - display: none; - line-height: 0px !important; -} -/*排序*/ -/*.u-grid-header-sort-span { - width: 1em; - text-align: center; - line-height: 2.125em !important; - position: absolute; - top: 0px; - right: 2.9em; -}*/ -.u-grid-header-sort-span { - width: 1.3em; - text-align: center; - font-size: 12px; - position: absolute; - height: inherit; - line-height: inherit; - color: #666; -} -/*排序优先级*/ -.u-grid-header-sort-priority { - display: inline-block; - position: absolute; - top: 1em; - right: -0.5em; - line-height: 2.125em; - font-size: 0.5em; -} -/* -header区域css end -*/ -/* -content区域css begin -*/ -.u-grid td { - border-style: solid ; - border-color: #cecece ; - border-width: 0 0 1px 0 ; - box-sizing: border-box; - padding:0px !important; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - vertical-align: middle; - white-space: nowrap; - text-overflow: ellipsis; - /*height: 2.6875em; - line-height: 2.6875em;*/ - height: 43px; - line-height: 43px; - /*height: 2.68em \9; - line-height: 2.68em \9;*/ - font-size: 16px !important; - overflow: hidden; -} - -.u-grid .grid_edit_form_td{ - overflow: visible; -} - -.u-grid tbody tr:last-child td{ - border-bottom-width: 0px; -} - -.u-grid-content-left>div:last-child{ - border-bottom-width: 0px; -} - -.u-grid-content-left.u-grid-content-left-sum>div:last-child{ - border-bottom-width: 1px; -} - -.u-grid-content tr{ - border-top:0px !important; -} -.u-grid-content-td-div { - height: inherit; - margin: 0 2em 0 0.833333333em; - font-size: 0.75em !important; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - position: relative; - line-height: inherit; -} -.u-grid-edit-div .u-grid-content-td-div { - margin: 0 1em 0 1em; - line-height: 3.5em; - font-size: 12px; - overflow: visible; - white-space: nowrap; - text-overflow: ellipsis; - height: 100%; -} -.u-grid-content-td-div-over::after{ - content:"..."; - font-weight:bold; - position:absolute; - bottom:15px; - right: -5px; -} - - -.u-grid-content-td-div > input{ - height:100%; -} -.u-grid-content-td-div > .right-span{ - position: absolute; - right: 0px; - line-height: 3.5em; - width: 2rem; - text-align: center; -} - -/*checkbox样式*/ - -.u-grid-content-td-div .u-checkbox-outline,.u-grid-content-td-div .u-checkbox-focus-helper { - top: -10px; -} - -.u-grid-content { - border-style: solid; - border-color: #cecece; - border-width: 0px; - border-bottom-width: 1px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - position: relative; - zoom: 1; - background-color: #fff ; - overflow: hidden; -} -.u-grid-content-div { - position: relative; - overflow-x: auto; - overflow-y: auto; -} -.u-grid-content-left { - position: absolute; -} -.u-grid-content-left-sum-bottom { - position: absolute; - bottom: 16px; - left: 0px; - height: 2.125em; - z-index: 11; - background-color: #FFF; -} -.u-grid-content-left-bottom { - position: absolute; - bottom: 0px; - left: 0px; - height: 16px; - z-index: 11; - background-color: #FFF; -} -.u-grid-content-left-row { - position: relative; - height: 2.125em; -} -.u-grid-content-multiSelect { - padding: 0 0 0 1.25em; - position: relative; - float: left; - height: 2.75em; - line-height: 2.75em; - border-style: solid; - border-color: #cecece; - border-width: 0px; - border-bottom-width: 1px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - margin: 0px !important; - font-size: 16px !important; -} -.u-grid-multi-input { - margin: 0px !important; - height: 100%; -} -.u-grid-content-num { - border-style: solid; - border-color: #cecece; - border-width: 0px; - border-bottom-width: 1px; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - height: 2.75em; - line-height: 2.75em; - position: relative; - float: left; - text-align: center; - padding: 0px; -} -.u-gird-centent-sum-div { - float: left; - font-size: 0.75em; - font-size: inherit \9; - height: inherit; - line-height: inherit; - margin-left: 0.666667em; - margin-left: 0px \9; -} -.u-grid-content-sel-row { - background-color: #e9f7fc !important; - //color: #FFF !important; -} - -.u-grid-content-sel-row a{ - //color: #0377c1 !important; -} - -.u-grid-content-focus-row { - background-color: #e9f7fc !important; - //color: #FFF !important; -} -.u-grid-content-tree-span { - width: 1.25em; - height: 1.25em; - color: #007ae3; - font-size: 14px !important; -} - - -/*行拖拽*/ -td.u-grid-drag-icon:before { - content: "\e6d1"; - font-family: "uf" !important; - font-size: 12px; - position: absolute; - z-index: 100; -} -/* -content区域css end -*/ -/* -content edit menu区域css begin -*/ -.u-grid-content-edit-menu { - display: none; - overflow: hidden; - position: absolute; - z-index: 13; - background: #fff; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - width: 100%; - height: 28px; -} -/*.u-grid-content-edit-menu-button{ - height: 2em; - margin:.2em .2em; -} tiaoxq修改 .u-grid-content-edit-menu-button-ok .u-grid-content-edit-menu-button-cancel*/ -.u-grid-content-edit-menu-button { - position: absolute; - right: 50px; - display: inline-block; - margin-bottom: 0; - font-weight: 400; - text-align: center; - vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - white-space: nowrap; - font-size: 13px; - line-height: 1.5; - border-radius: 3px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; - height: 28px; - width: 80px; - background-color: white; - border-color: #bfbfbf; - outline: none; -} -.u-grid-content-edit-menu-button-ok { - color: #01a3f6; - margin-left: 10px; -} -.u-grid-content-edit-menu-button-cancel { - color: #e50011; - right: 150px; -} -.u-grid-edit-form { - position: relative; - z-index: 12; - font-size: 12px; - float: left; -} -.u-grid-edit-whole-div { - position: relative; - width: 350px; - float: left; - height: 30px; - margin-bottom: 10px; -} -.u-grid-edit-label { - width: 84px; - float: left; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - text-align: right; - line-height: 28px; -} -.u-grid-edit-div { - width: 175px; - margin-left: 10px; - float: left; -} -.u-grid-edit-div input[type=text] { - width: 100%; - line-height: 28px; - height: 28px; - border: 1px solid #c9c9c9; - border-radius: 3px; - -webkit-box-shadow: none; - box-shadow: none; - -webkit-transition: none; - transition: none; - outline: none; - box-sizing:border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - -} -.u-grid-edit-div input[type=checkbox] { - height: 13px; - width: 13px; -} -.u-grid-edit-div input[type=radio] { - height: 13px; - width: 13px; -} -.u-grid-edit-div .input-group input { - border-right: none; - padding-right: 0px; -} -/* -content edit menu区域css end -*/ -/* -content no row区域css begin -*/ -.u-grid-noRowsDiv { - position: relative; - top: 0px; - left: 0px; - width: 100%; - font-size: 0.75em; - height: 2.125em; - line-height: 2.125em; - color: #a8a8a8; - text-align: center; - display: none; -} -.u-grid-noRowsShowDiv { - position: absolute; - top: 0px; - left: 0px; - width: 100%; - font-size: 0.75em; - height: 2.125em; - line-height: 2.125em; - color: #a8a8a8; - text-align: center; - display: none; -} -/* -content no row区域css end -*/ -/* -columnMenu区域css begin -*/ -.u-grid-column-menu { - width: 160px; - display: none; - overflow: hidden; - position: fixed; - z-index: 13; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} -.u-grid-column-menu-ul { - background-color: #fff; - font-weight: 500; - background-image: none; - padding: 0px; - margin: 0px; - background-position: 50% 50%; - border-width: 0px 0px 1px 0px; - border-style: solid; - border-color: #cecece; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -.u-grid-column-menu-li { - display: block; - height: 2.125em; - border-width: 1px 1px 0px 1px; - border-style: solid; - border-color: #cecece; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - cursor: pointer; -} -.u-grid-column-menu-div1 { - display: block; - padding: 0 .8em 0 .8em; - line-height: 2.83em; - font-size: 0.75em; - position: relative; - height: 100%; -} -.u-grid-column-menu-span { - position: absolute; - width: 120px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.u-grid-column-menu-div3 { - right: 2em; - position: absolute; - font-size: 0.75em !important; - filter: alpha(opacity=70); - -moz-opacity: 0.7; - -khtml-opacity: 0.7; - opacity: .7; - line-height: 2.83em !important; -} -/* -columnMenu区域css end -*/ -/* -columnMenu columns区域css begin -*/ -.u-grid-column-menu-columns { - width: 160px; - display: block; - overflow-y: auto; - overflow-x: hidden; - position: relative; - z-index: 13; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} -.u-grid-column-menu-columns-ul { - border-width: 1px 0px 0px 0px; - border-style: solid; - border-color: #cecece; - background-color: #fff; - font-weight: 500; - background-image: none; - padding: 0px; - background-position: 50% 50%; - margin: 0px; -} -.u-grid-column-menu-columns-li { - display: block; - height: 2.125em; - border-width: 0px 1px 0px 1px; - border-style: solid; - border-color: #cecece; - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - cursor: pointer; -} -.u-grid-column-menu-columns-div1 { - display: block; - padding: 0 .8em 0 .8em; - line-height: 2.83em; - font-size: 0.75em; - position: relative; - height: 100%; -} -.u-grid-column-menu-columns-div2 { - position: absolute; - filter: alpha(opacity=70); - -moz-opacity: 0.7; - -khtml-opacity: 0.7; - opacity: .7; -} -.u-grid-column-menu-columns-span { - position: absolute; - width: 120px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - left: 35px; -} -/* -columnMenu columns区域css end -*/ -/* -form展示区域css begin -*/ -.u-grid-form { - width: 100%; - height: 100%; - overflow-x: hidden; - overflow-y: scroll; -} -.u-grid-content-td-div .input-group-addon { - padding: 3px 12px; -} -.u-grid-content-td-div .grid-combox { - height: 28px; -} -.u-grid-content-td-div .eType-input { - position: relative; - width: 90%; - height: 90%; - margin: 0px; - // margin-left: 5%; - min-height: 20px; - font-size: 12px; - color: #333; -} -.u-grid-content-td-div .eType-input > input { - width: 100%; - height: 100%; - line-height: normal; -} -.u-grid-content-td-div .eType-input > .right-span{ - position: absolute; - line-height: 3.5em; - cursor: pointer; - right: 0px; - width: 2rem; - text-align: center; -} - -.u-grid-content-td-div .checkbox label { - top: -2px; -} -.u-grid-content-td-div input[type=checkbox] { - position: relative; - top: 0px; - cursor: pointer; -} -/* -form展示区域css end -*/ - - -/* -特殊css处理 begin -*/ -.u-grid .u-text{ - padding:0px; -} - -.u-grid-err-td{ - background-color: #1baede; -} - -.u-grid-err-td *{ - background-color: #1baede; -} - -/*鼠标滑过begin*/ - -.u-grid-move-bg{ - background: #f4f8fb !important;; - color:#333; -} -.u-grid .u-grid-move-bg a{ - color: #0377c1; -} -.u-grid-move-bg a:hover{ - text-decoration: underline; - cursor: pointer; -} -.u-grid a{ - color:#333; - text-decoration: none; -} -/*鼠标滑过end*/ - -/*复选框begin*/ -.u-grid-checkbox-outline{ - position: absolute; - box-sizing: border-box; - width: 14px; - height: 14px; - margin: 0; - cursor: pointer; - overflow: hidden; - border: 1px solid rgb(191,191,191); - border-radius: 2px; - display: none; - top: 15px; -} - -.u-grid-checkbox-tick-outline{ - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; - -webkit-mask: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K); - mask: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K); - background: transparent; - transition-duration: 0.28s; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-property: background; -} - -.u-grid-checkbox-outline.is-checked{ - border: 1px solid #1baede; - display: inline-block; -} - -.u-grid-move-bg .u-grid-checkbox-outline{ - display: inline-block; -} - -.u-grid-header-multi-select .u-grid-checkbox-outline{ - display: inline-block; -} - -.u-grid-checkbox-outline.is-checked .u-grid-checkbox-tick-outline{ - -webkit-mask: none; - mask: none; - background: #1baede url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K); -} -/*复选框end*/ diff --git a/dist/tinper-neoui-grid.js b/dist/tinper-neoui-grid.js deleted file mode 100644 index 45c02de..0000000 --- a/dist/tinper-neoui-grid.js +++ /dev/null @@ -1,6921 +0,0 @@ -/** - * tinper-neoui-grid v3.1.28 - * grid - * author : yonyou FED - * homepage : https://github.com/iuap-design/tinper-neoui-grid#readme - * bugs : https://github.com/iuap-design/tinper-neoui-grid/issues - **/ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _dataSource = __webpack_require__(1); - - var _column = __webpack_require__(7); - - var _gridComp = __webpack_require__(9); - - var old = $.fn.grid; - // 方法扩展 - /* - * 对象所支持的属性及默认值 - */ - - $.fn.grid = function (options) { - var grid = $(this).data('gridComp'); - if (!grid) $(this).data('gridComp', grid = new _gridComp.gridComp(this, options)); - return grid; - }; - $.fn.grid.gridComp = _gridComp.gridComp; - $.fn.grid.gridCompColumn = _column.column; - $.fn.grid.dataSource = _dataSource.dataSource; - - $.fn.grid.noConflict = function () { - $.fn.grid = old; - return this; - }; - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.dataSource = undefined; - - var _dataSourceInit = __webpack_require__(2); - - var _re_gridCompSort = __webpack_require__(3); - - var _re_gridCompTree = __webpack_require__(6); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var dataSource = function dataSource(options, gridComp) { - _classCallCheck(this, dataSource); - - this.init(options, gridComp); - this.sortRows(); - }; - - ; - - var dataSourceProto = dataSource.prototype; - Object.assign(dataSourceProto, _dataSourceInit.initFunObj); - - dataSourceProto.basicSortRows = _re_gridCompSort.sortFunObj.re_basicSortRows; - - /* - * tree - */ - - - dataSourceProto.treeSortRows = _re_gridCompTree.treeFunObj.re_treeSortRows; - dataSourceProto.pushChildRows = _re_gridCompTree.treeFunObj.pushChildRows; - - exports.dataSource = dataSource; - -/***/ }, -/* 2 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - /* - * 处理参数 - */ - var init = function init(options, gridComp) { - this.defaults = {}; - this.gridComp = gridComp; - this.options = $.extend({}, this.defaults, options); - this.rows = new Array(); // 存储数据行 - this.hasParentRows = new Array(); // 存在父项 - this.nothasParentRows = new Array(); // 不存在父项 - }; - /* - * 将values转化为rows并进行排序 - */ - var sortRows = function sortRows(field, sortType) { - if (this.gridComp.options.showTree) { - this.treeSortRows(field, sortType); - } else { - this.basicSortRows(field, sortType); - } - this.gridComp.eidtRowIndex = -1; - }; - /* - * 将values转化为rows并进行排序(标准) - */ - var basicSortRows = function basicSortRows(field, sortType) { - var oThis = this, - dataType = ""; - if (field) { - dataType = this.gridComp.getColumnByField(field).options.dataType; - } - this.rows = new Array(); - if (this.options.values) { - $.each(this.options.values, function (i) { - var rowObj = {}; - rowObj.value = this; - rowObj.valueIndex = i; - oThis.rows.push(rowObj); - }); - } - }; - var treeSortRows = function treeSortRows(field, sortType) { - this.basicSortRows(field, sortType); - }; - /* - * 获取合计值 - */ - var getSumValue = function getSumValue(field, gridCompColumn, gridComp) { - var sumValue = null; - if (gridCompColumn.options.sumCol) { - $.each(this.rows, function (i) { - var v = $(this.value).attr(field); - if (gridCompColumn.options.dataType == 'Int') { - v = gridComp.getInt(v, 0); - sumValue += parseInt(v); - } else { - v = gridComp.getFloat(v, 0); - sumValue = gridComp.accAdd(sumValue, parseFloat(v)); - } - }); - } - // 处理精度 - if (gridCompColumn.options.dataType == 'Float' && gridCompColumn.options.precision) { - var o = {}; - o.value = sumValue; - o.precision = gridCompColumn.options.precision; - sumValue = gridComp.DicimalFormater(o); - } - if (sumValue != null && sumValue != undefined && sumValue != 'null' && sumValue != 'undefined') { - return sumValue + ''; - } else { - return ''; - } - }; - var initFunObj = exports.initFunObj = { - init: init, - sortRows: sortRows, - basicSortRows: basicSortRows, - treeSortRows: treeSortRows, - getSumValue: getSumValue - }; - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.sortFunObj = undefined; - - var _gridCompEvent = __webpack_require__(4); - - var sort_initEventFun = function sort_initEventFun() { - // 扩展方法 - var oThis = this; - $('#' + this.options.id).on('mouseup', function (e) { - if ($(e.target).closest('#' + oThis.options.id + '_header').length > 0) { - // 点击的是header区域 - oThis.mouseUpX = e.clientX; - oThis.mouseUpY = e.clientY; - //点击过程中鼠标没有移动 - if (oThis.mouseDownX == oThis.mouseUpX && oThis.mouseDownY == oThis.mouseUpY) { - //或者移动距离小于5px(由于移动之后会显示屏幕div,暂时不做处理) - oThis.columnClickX = e.clientX; - oThis.columnClickY = e.clientY; - var eleTh = $(e.target).closest('th')[0]; - if ($(e.target).hasClass('u-grid-header-columnmenu')) {} else { - // 执行click操作,进行排序 - oThis.canSortable(e, eleTh); - } - } - } else if ($(e.target).closest('#' + oThis.options.id + '_content').length > 0) { - // 点击的是数据区域 - - } - }); - }; - var sort_initGridEventFun = function sort_initGridEventFun() { - // 扩展方法 - var oThis = this; - }; - /* - * 处理排序 - */ - var canSortable = function canSortable(e, ele) { - var oThis = this, - $ele = $(ele), - field = $ele.attr('field'), - sortable = this.getColumnAttr('sortable', field); - if (sortable) { - if (e.ctrlKey) { - // 构建排序信息的数据结构 - var prioArray = []; - $('.u-grid-header-sort-priority').each(function (index, domEle) { - var $el = $(domEle); - var p = parseInt($el.text()); - var f = $el.closest('th').attr('field'); - var st; - if ($el.parent().hasClass("uf-arrow-up")) { - st = 'asc'; - } else if ($el.parent().hasClass("uf-arrow-down")) { - st = 'desc'; - } - prioArray[p - 1] = { - field: f, - sortType: st - }; - }); - // 页面调整 - /*修改ue将caret调整为caret*/ - var $caret; - if (($caret = $ele.find('.uf-arrow-up')).length > 0) { - var p = parseInt($caret.find('.u-grid-header-sort-priority').text()); - prioArray[p - 1].sortType = 'desc'; - $caret.removeClass('uf-arrow-up').addClass('uf-arrow-down'); - } else if (($caret = $ele.find('.uf-arrow-down')).length > 0) { - var p = parseInt($caret.find('.u-grid-header-sort-priority').text()); - for (var i = p; i < prioArray.length; i++) { - var $flag = $('[field=' + prioArray[i].field + ']').find('.u-grid-header-sort-priority'); - $flag.text(parseInt($flag.text()) - 1); - } - prioArray.splice(p - 1, 1); - $caret.remove(); - } else { - prioArray.push({ - field: field, - sortType: 'asc' - }); - // $ele.first().append(''+prioArray.length+'') - $ele.first().first().append(''); - } - // 执行排序逻辑 - this.dataSourceObj.sortRowsByPrio(prioArray); - } else { - if ($(".uf-arrow-up").parent().parent().parent()[0] == ele) { - //原来为升序,本次为降序 - $(".uf-arrow-up").remove(); - //$(ele.firstChild)[0].insertAdjacentHTML('beforeEnd','1'); - $(ele.firstChild.firstChild)[0].insertAdjacentHTML('beforeEnd', ''); - if (typeof this.options.onSortFun == 'function') { - this.options.onSortFun(field, 'asc'); - } else { - this.dataSourceObj.sortRows(field, "asc"); - } - } else if ($(".uf-arrow-down").parent().parent().parent()[0] == ele) { - //原来为降序,本次为不排序 - $(".uf-arrow-down").remove(); - if (typeof this.options.onSortFun == 'function') { - this.options.onSortFun(); - } else { - this.dataSourceObj.sortRows(); - } - } else { - //本次为升序 - $(".uf-arrow-up").remove(); - $(".uf-arrow-down").remove(); - // $(ele.firstChild)[0].insertAdjacentHTML('beforeEnd','1'); - $(ele.firstChild.firstChild)[0].insertAdjacentHTML('beforeEnd', ''); - if (typeof this.options.onSortFun == 'function') { - this.options.onSortFun(field, "desc"); - } else { - this.dataSourceObj.sortRows(field, "desc"); - } - } - } - - oThis.repairContent(); - oThis.afterGridDivsCreate(); - } - }; - var re_deleteOneRowTree = function re_deleteOneRowTree() { - if (this.options.showTree) { - this.dataSourceObj.sortRows(); - } - }; - /* - * 根据排序的优先级的排序 - * prioArray = [{field:'f2', sortType:'asc'}, {field:'f3', sortType:'desc'}, {field:'f1', sortType:'asc'}] - */ - var sortRowsByPrio = function sortRowsByPrio(prioArray, cancelSort) { - var oThis = this; - if (cancelSort) { - this.rows = new Array(); - if (this.options.values) { - $.each(this.options.values, function (i) { - var rowObj = {}; - rowObj.value = this; - rowObj.valueIndex = i; - oThis.rows.push(rowObj); - }); - } - } - - var evalStr = function evalStr(i) { - if (i == prioArray.length - 1) { - return 'by(prioArray[' + i + '].field, prioArray[' + i + '].sortType)'; - } else { - return 'by(prioArray[' + i + '].field, prioArray[' + i + '].sortType,' + evalStr(i + 1) + ')'; - } - }; - - var by = function by(field, sortType, eqCall) { - var callee = arguments.callee; - return function (a, b) { - var v1 = $(a.value).attr(field); - var v2 = $(b.value).attr(field); - var dataType = oThis.gridComp.getColumnByField(field).options.dataType; - if (dataType == 'Float') { - v1 = parseFloat(v1); - v2 = parseFloat(v2); - if (isNaN(v1)) { - return 1; - } - if (isNaN(v2)) { - return -1; - } - if (v1 == v2 && eqCall) { - return eqCall(); - } - return sortType == 'asc' ? v1 - v2 : v2 - v1; - } else if (dataType == 'Int') { - v1 = parseInt(v1); - v2 = parseInt(v2); - if (isNaN(v1)) { - return 1; - } - if (isNaN(v2)) { - return -1; - } - if (v1 == v2 && eqCall) { - return eqCall(); - } - return sortType == 'asc' ? v1 - v2 : v2 - v1; - } else { - v1 = oThis.gridComp.getString(v1, ''); - v2 = oThis.gridComp.getString(v2, ''); - try { - var rsl = v1.localeCompare(v2); - if (rsl === 0 && eqCall) { - return eqCall(); - } - if (rsl === 0) { - return 0; - } - return sortType == 'asc' ? rsl : -rsl; - } catch (e) { - return 0; - } - } - }; - }; - - this.rows.sort(eval(evalStr(0))); - }; - /* - * 将values转化为rows并进行排序(标准) - */ - var re_basicSortRows = function re_basicSortRows(field, sortType) { - var oThis = this; - var dataType = ""; - if (field) { - dataType = this.gridComp.getColumnByField(field).options.dataType; - } - if (sortType == "asc") { - this.rows.sort(function (a, b) { - var v1 = $(b.value).attr(field); - var v2 = $(a.value).attr(field); - if (dataType == 'Float') { - v1 = parseFloat(v1); - v2 = parseFloat(v2); - if (isNaN(v1)) { - return 1; - } - if (isNaN(v2)) { - return -1; - } - return v1 - v2; - } else if (dataType == 'Int') { - v1 = parseInt(v1); - v2 = parseInt(v2); - if (isNaN(v1)) { - return 1; - } - if (isNaN(v2)) { - return -1; - } - return v1 - v2; - } else { - v1 = oThis.gridComp.getString(v1, ''); - v2 = oThis.gridComp.getString(v2, ''); - try { - return v1.localeCompare(v2); - } catch (e) { - return 0; - } - } - }); - } else if (sortType == "desc") { - this.rows.sort(function (a, b) { - var v1 = $(a.value).attr(field); - var v2 = $(b.value).attr(field); - if (dataType == 'Float') { - v1 = parseFloat(v1); - v2 = parseFloat(v2); - if (isNaN(v1)) { - return 1; - } - if (isNaN(v2)) { - return -1; - } - return v1 - v2; - } else if (dataType == 'Int') { - v1 = parseInt(v1); - v2 = parseInt(v2); - if (isNaN(v1)) { - return 1; - } - if (isNaN(v2)) { - return -1; - } - return v1 - v2; - } else { - v1 = oThis.gridComp.getString(v1, ''); - v2 = oThis.gridComp.getString(v2, ''); - try { - return v1.localeCompare(v2); - } catch (e) { - return 0; - } - } - }); - } else { - this.rows = new Array(); - if (this.options.values) { - $.each(this.options.values, function (i) { - var rowObj = {}; - rowObj.value = this; - rowObj.valueIndex = i; - oThis.rows.push(rowObj); - }); - } - } - }; - var sortFunObj = exports.sortFunObj = { - sort_initEventFun: sort_initEventFun, - sort_initGridEventFun: sort_initGridEventFun, - re_basicSortRows: re_basicSortRows, - canSortable: canSortable, - deleteOneRowTree: re_deleteOneRowTree, - sortRowsByPrio: sortRowsByPrio - }; - -/***/ }, -/* 4 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.eventFunObj = undefined; - - var _gridBrowser = __webpack_require__(5); - - /* - * 创建完成之后顶层div添加监听 - */ - var initEventFun = function initEventFun() { - var oThis = this; - $('#' + this.options.id).on('mousedown', function (e) { - if ($(e.target).closest('#' + oThis.options.id + '_header').length > 0) { - // 点击的是header区域 - oThis.mouseDownX = e.clientX; - oThis.mouseDownY = e.clientY; - } else if ($(e.target).closest('#' + oThis.options.id + '_content').length > 0) { - // 点击的是数据区域 - } - }); - }; - /* - * 创建完成之后grid层 div添加监听 - */ - var initGridEventFun = function initGridEventFun() { - var oThis = this; - // 拖动 - this.initContentDivEventFun(); - // 全选 - $('#' + this.options.id + '_header_multi_input').on('click', function (e) { - if (this.hasChecked) { - oThis.setAllRowUnSelect(); - this.hasChecked = false; - } else { - oThis.setAllRowSelect(); - this.hasChecked = true; - } - }); - }; - /* - * 内容区 div添加监听 - */ - var initContentDivEventFun = function initContentDivEventFun() { - var oThis = this; - // 通过复选框设置选中行 - $('#' + oThis.options.id + '_content .u-grid-content-left').on('click', function (e) { - var $input = $(e.target).closest('.u-grid-checkbox-outline'); - if ($input.length > 0) { - var $div = $($input.parent()); - var index = $('.u-grid-content-multiSelect', $div.parent()).index($div); - if ($input.hasClass('is-checked')) { - oThis.setRowUnselect(index); - } else { - oThis.setRowSelect(index); - } - } - }); - // 同步滚动条 - $('#' + this.options.id + '_content_div').on('scroll', function (e) { - oThis.scrollLeft = this.scrollLeft; - oThis.scrollTop = this.scrollTop; - if (oThis.options.fixedFloat == 'right') { - $('#' + oThis.options.id + '_header_table').css('left', oThis.leftW - oThis.scrollLeft + "px"); - } else { - $('#' + oThis.options.id + '_header_table').css('left', oThis.leftW - oThis.scrollLeft + oThis.fixedWidth + "px"); - } - $('#' + oThis.options.id + '_noRowsShow').css('left', oThis.scrollLeft + "px"); - $('#' + oThis.options.id + '_edit_form').css('left', oThis.scrollLeft + "px"); - $('#' + oThis.options.id + '_content_multiSelect').css('top', -oThis.scrollTop + "px"); - $('#' + oThis.options.id + '_content_numCol').css('top', -oThis.scrollTop + "px"); - $('#' + oThis.options.id + '_content_fixed_div').css('top', -oThis.scrollTop + "px"); - if (_gridBrowser.gridBrowser.isIE10 || _gridBrowser.gridBrowser.isIPAD) { - //ie10下示例系统中的档案节点新增数据之后前两次无法输入,因为此处会关闭输入控件 - } else { - oThis.editClose(); - } - }); - // 数据行相关事件 - $('#' + this.options.id + '_content_tbody').on('click', function (e) { - // 双击处理 - if (typeof oThis.options.onDblClickFun == 'function') { - oThis.isDblEvent('tbodyClick', oThis.dblClickFun, e, oThis.clickFun, e); - } else { - oThis.clickFun(e); - } - }); - $('#' + this.options.id + '_content_fixed_tbody').on('click', function (e) { - // 双击处理 - if (typeof oThis.options.onDblClickFun == 'function') { - oThis.isDblEvent('tbodyClick', oThis.dblClickFun, e, oThis.clickFun, e); - } else { - oThis.clickFun(e); - } - }); - $('#' + this.options.id + '_content').on('mousemove', function (e) { - var $tr = $(e.target).closest('tr'), - $div = $(e.target).closest('div'), - mousemoveIndex = -1; - // 首先清除所有的背景 - if ($tr.length > 0) { - mousemoveIndex = $('tr', $tr.parent()).index($tr); - } else if ($div.length > 0 && ($div.hasClass('u-grid-content-multiSelect') || $div.hasClass('u-grid-content-num'))) { - //左侧复选及数字列 - mousemoveIndex = $('div', $div.parent()).index($div); - } - - oThis.trHoverFun(mousemoveIndex); - }); - $('#' + this.options.id + '_content').on('mouseout', function (e) { - $('#' + oThis.options.id + '_content_tbody').find('tr').removeClass('u-grid-move-bg'); - $('#' + oThis.options.id + '_content_fixed_tbody').find('tr').removeClass('u-grid-move-bg'); - if (oThis.options.multiSelect) $('#' + oThis.options.id + '_content_multiSelect').find('div').removeClass('u-grid-move-bg'); - if (oThis.options.showNumCol) $('#' + oThis.options.id + '_content_numCol').find('div').removeClass('u-grid-move-bg'); - if (typeof oThis.options.onContentOut == 'function') { - var obj = {}; - obj.gridObj = oThis; - var $tr = $(e.target).closest('tr'); - if ($tr.length > 0 && !$tr.is('.u-grid-content-sum-row')) { - var mouseoutIndex = $('tr[role="row"]', $tr.parent()).index($tr); - obj.rowObj = oThis.dataSourceObj.rows[mouseoutIndex]; - obj.rowIndex = mouseoutIndex; - } - oThis.options.onContentOut(obj); - } - }); - }; - - var eventFunObj = exports.eventFunObj = { - initEventFun: initEventFun, - initGridEventFun: initGridEventFun, - initContentDivEventFun: initContentDivEventFun - }; - -/***/ }, -/* 5 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var gridBrowser = {}, - userAgent = navigator.userAgent, - ua = userAgent.toLowerCase(), - s; - if (s = ua.match(/msie ([\d.]+)/)) { - gridBrowser.isIE = true; - } - if (gridBrowser.isIE) { - var mode = document.documentMode; - if (mode == null) {} else { - if (mode == 8) { - gridBrowser.isIE8 = true; - } else if (mode == 9) { - gridBrowser.isIE9 = true; - } else if (mode == 10) { - gridBrowser.isIE10 = true; - } - } - } - - if (ua.indexOf('Android') > -1 || ua.indexOf('android') > -1 || ua.indexOf('Adr') > -1 || ua.indexOf('adr') > -1) { - gridBrowser.isAndroid = true; - } - - if (gridBrowser.isAndroid) { - if (window.screen.width >= 768 && window.screen.width < 1024) { - gridBrowser.isAndroidPAD = true; - } - if (window.screen.width <= 768) { - gridBrowser.isAndroidPhone = true; - } - } - - if (ua.match(/iphone/i)) { - gridBrowser.isIOS = true; - gridBrowser.isIphone = true; - } - - if (ua.match(/ipad/i)) { - gridBrowser.isIOS = true; - gridBrowser.isIPAD = true; - } - - if (gridBrowser.isIphone || gridBrowser.isAndroidPhone) { - gridBrowser.isMobile = true; - } - - exports.gridBrowser = gridBrowser; - -/***/ }, -/* 6 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var re_initTree = function re_initTree(options, gridOptions) { - if (gridOptions.showTree) { - options.sortable = false; - } - return options; - }; - var re_initOptionsTree = function re_initOptionsTree() { - if (this.options.showTree) { - this.options.showNumCol = false; - } - }; - var re_clickFunTree = function re_clickFunTree(e) { - var oThis = this, - $target = $(e.target), - $td = $target.closest('td'); - - if ($td.length > 0) { - var $tr = $td.parent(); - var index = this.getTrIndex($tr); - var row = oThis.dataSourceObj.rows[index]; - if (row) { - var rowChildIndex = oThis.getChildRowIndex(row); - if ($target.hasClass('uf-reduce-s-o') || $target.hasClass('uf-add-s-o')) { - var minus = $td.find('.uf-reduce-s-o'); - var plus = $td.find('.uf-add-s-o'); - if (minus.length > 0) { - // 合上 需要将所有的都合上 - minus.removeClass('uf-reduce-s-o').addClass('uf-add-s-o'); - if (rowChildIndex.length > 0) { - var allChildRowIndex = oThis.getAllChildRowIndex(row); - $.each(allChildRowIndex, function () { - var $tr1 = $('tr[role="row"]:eq(' + parseInt(this) + ')', $tr.parent()); - $tr1.css('display', 'none'); - // 左侧复选区隐藏 - $('#' + oThis.options.id + '_content_multiSelect >div:nth-child(' + (parseInt(this) + 1) + ')').css('display', 'none'); - $('.uf-reduce-s-o', $tr1).removeClass('uf-reduce-s-o').addClass('uf-add-s-o'); - }); - } - if (this.options.editType == 'form') { - $('#' + this.options.id + '_multiSelect_edit').remove(null, true); - $('#' + this.options.id + '_numCol_edit').remove(null, true); - $('#' + this.options.id + '_edit_tr').remove(null, true); - $('#' + this.options.id + '_edit_tr1').remove(null, true); - } - } else if (plus.length > 0) { - // 展开 - plus.removeClass('uf-add-s-o').addClass('uf-reduce-s-o'); - if (rowChildIndex.length > 0) { - $.each(rowChildIndex, function () { - var $tr1 = $('tr[role="row"]:eq(' + parseInt(this) + ')', $tr.parent()); - $tr1.css('display', ''); - var ss = $('#' + oThis.options.id + '_content_multiSelect >div:nth-child(' + (parseInt(this) + 1) + ')')[0]; - $('#' + oThis.options.id + '_content_multiSelect >div:nth-child(' + (parseInt(this) + 1) + ')').css('display', ''); - }); - } - } - this.resetLeftHeight(); - } - } - } - }; - var re_addOneRowTree = function re_addOneRowTree(row, index, rowObj) { - var oThis = this, - l = this.dataSourceObj.rows.length, - displayFlag; - // 存在树结构 - if (this.options.showTree) { - this.hasParent = false; - this.hasChildF = false; - var keyField = this.options.keyField; - var parentKeyField = this.options.parentKeyField; - var keyValue = this.getString($(row).attr(keyField), ''); - rowObj.keyValue = keyValue; - var parentKeyValue = this.getString($(row).attr(parentKeyField), ''); - rowObj.parentKeyValue = parentKeyValue; - var parentChildLength; - /* 判断是否存在父项/子项 */ - $.each(this.dataSourceObj.rows, function (i) { - var value = this.value; - var nowKeyValue = oThis.getString($(value).attr(keyField), ''); - var nowParentKeyValue = oThis.getString($(value).attr(parentKeyField), ''); - if (nowKeyValue == parentKeyValue) { - /* 取父项的index和父项的子index*/ - oThis.hasParent = true; - oThis.addRowParentIndex = i; - parentChildLength = oThis.getAllChildRow(this).length; - var parentLevel = this.level; - rowObj.level = parentLevel + 1; - // 由于不止需要计算最后一个子节点,同时需要计算子节点的子节点。所以现在添加到父节点的下面一个 - index = oThis.addRowParentIndex + parentChildLength + 1; - if (!oThis.options.needTreeSort) return false; - } - if (nowParentKeyValue == keyValue) { - oThis.hasChildF = true; - } - if (oThis.hasParent && oThis.hasChildF) return false; - }); - if (!this.hasParent) { - rowObj.level = 0; - if (index != l) { - // 如果没有父项则插入到最后,因为index有可能插入到其他节点的子节点之中,计算复杂 - index = l; - } - } - if (this.hasParent) { - var $pTr = $('#' + this.options.id + '_content_div').find('tbody').find('tr[role="row"]').eq(oThis.addRowParentIndex); - if (parentChildLength > 0) { - // 如果存在父项并且父项存在子项则需要判断父项是否展开 - var openDiv = $('.uf-add-s-o', $pTr); - if (!(openDiv.length > 0)) { - displayFlag = 'block'; - } - } else { - // 如果存在父项并且父项原来没有子项则需要添加图标 - if (this.options.autoExpand) { - displayFlag = 'block'; - } - - var d = $("div:eq(0)", $pTr); - var openDiv = $('.uf-add-s-o', $pTr); - var closeDiv = $('.uf-reduce-s-o', $pTr); - if (this.options.autoExpand) { - var spanHtml = ''; - } else { - var spanHtml = ''; - } - if (d.length > 0 && openDiv.length == 0 && closeDiv.length == 0) { - d[0].insertAdjacentHTML('afterBegin', spanHtml); - var oldLeft = parseInt(d[0].style.left); - l = oldLeft - 16; - if (l > 0 || l == 0) { - d[0].style.left = l + "px"; - } - } - if (openDiv.length > 0) { - openDiv.removeClass('uf-add-s-o').addClass('uf-reduce-s-o'); - } - } - } - } - - return { - index: index, - displayFlag: displayFlag - }; - }; - var re_addOneRowTreeHasChildF = function re_addOneRowTreeHasChildF(rowObj) { - if (this.hasChildF) { - //如果存在子项则重新渲染整个区域 - this.dataSourceObj.sortRows(); - this.repairContent(); - } else { - // 修改rowObj 和parent的变量 - if (this.hasParent) { - var parentRowObj = this.dataSourceObj.rows[this.addRowParentIndex]; - parentRowObj.hasChild = true; - parentRowObj.childRow.push(rowObj); - parentRowObj.childRowIndex.push(rowObj.valueIndex); - rowObj.parentRow = parentRowObj; - rowObj.parentRowIndex = this.addRowParentIndex; - } - rowObj.hasChild = false; - rowObj.childRow = new Array(); - rowObj.childRowIndex = new Array(); - } - }; - var re_updateValueAtTree = function re_updateValueAtTree(rowIndex, field, value, force) { - var oThis = this; - var keyField = this.options.keyField; - var parentKeyField = this.options.parentKeyField; - if (this.options.showTree && (field == keyField || field == parentKeyField)) { - // 目前已经不适用grid源生的编辑设置了,因为树表时关闭edit - var hasParent = false; - var hasChildF = false; - - $.each(this.dataSourceObj.rows, function (i) { - var vv = this.value; - var nowKeyValue = oThis.getString($(vv).attr(keyField), ''); - var nowParentKeyValue = oThis.getString($(vv).attr(parentKeyField), ''); - if (field == keyField && value == nowParentKeyValue) { - //修改的是keyfield,判断是否存在子项 - hasChildF = true; - } - if (field == parentKeyField && value == nowKeyValue) { - //修改的是parentKeyField,判断是否存在父项 - hasParent = true; - } - }); - if (hasChildF || hasParent) { - //删除当前行之后重新插入当前行由addonerow来进行树结构处理 - var rowValue = $(this.dataSourceObj.rows[rowIndex].value); - this.deleteOneRow(rowIndex); - this.addOneRow(rowValue[0]); - } - } - if (this.options.showTree && (field == keyField || field == parentKeyField) && (hasChildF || hasParent)) { - rowIndex = this.getRowIndexByValue(field, value); - } - return rowIndex; - }; - /* - * 获取数据行下所有子元素 - */ - var getAllChildRow = function getAllChildRow(row) { - // if(row.allChildRow && row.allChildRow.length > 0){ - // return row.allChildRow; - // } - row.allChildRow = new Array(); - this.getAllChildRowFun(row, row.allChildRow); - return row.allChildRow; - }; - var re_getChildRowIndex = function re_getChildRowIndex(row) { - var result = []; - if (row.childRow && row.childRow.length > 0) { - $.each(row.childRow, function () { - result.push(this.valueIndex); - }); - } - return result; - }; - /* - * 获取数据行下所有子元素的index - */ - var getAllChildRowIndex = function getAllChildRowIndex(row) { - // if(row.allChildRowIndex && row.allChildRowIndex.length > 0){ - // return row.allChildRowIndex; - // } - row.allChildRowIndex = new Array(); - this.getAllChildRowIndexFun(row, row.allChildRowIndex); - return row.allChildRowIndex; - }; - var getAllChildRowFun = function getAllChildRowFun(row, rowArry) { - var oThis = this; - if (row.childRow.length > 0) { - Array.prototype.push.apply(rowArry, row.childRow); - $.each(row.childRow, function () { - oThis.getAllChildRowFun(this, rowArry); - }); - } - }; - var getAllChildRowIndexFun = function getAllChildRowIndexFun(row, rowArry) { - var oThis = this; - if (row.childRow.length > 0) { - Array.prototype.push.apply(rowArry, this.getChildRowIndex(row)); - $.each(row.childRow, function () { - oThis.getAllChildRowIndexFun(this, rowArry); - }); - } - }; - /* 展开某个节点 */ - var expandNode = function expandNode(keyValue) { - var rowIndex = this.getRowIndexByValue(this.options.keyField, keyValue); - this.expandNodeByIndex(rowIndex); - }; - var expandNodeByIndex = function expandNodeByIndex(rowIndex) { - var row = this.getRowByIndex(rowIndex); - var parentExpand = false, - parentIndex, - needExpanedParent = new Array(); - var whileRow = row; - while (!parentExpand) { - if (whileRow.parentKeyValue == '') { - parentExpand = true; - break; - } else { - parentIndex = whileRow.parentRowIndex; - whileRow = whileRow.parentRow; - var $pTr = $('#' + this.options.id + '_content_div').find('tbody').find('tr[role="row"]').eq(parentIndex); - var openDiv = $('.uf-add-s-o', $pTr); - if (openDiv.length > 0) { - //合着 - needExpanedParent.push(parentIndex); - } else { - parentExpand = true; - break; - } - } - } - if (needExpanedParent.length > 0) { - for (var i = needExpanedParent.length - 1; i > -1; i--) { - var index = needExpanedParent[i]; - var $pTr = $('#' + this.options.id + '_content_div').find('tbody').find('tr[role="row"]').eq(index); - var openDiv = $('.uf-add-s-o', $pTr); - openDiv.click(); - } - } - - var $Tr = $('#' + this.options.id + '_content_div').find('tbody').find('tr[role="row"]').eq(rowIndex); - var openDiv = $('.uf-add-s-o', $Tr); - var firstDiv = $('.u-grid-content-td-div', $Tr); - if (openDiv.length > 0) openDiv.click();else firstDiv.click(); - }; - /* - * 将values转化为rows并进行排序(数表) - */ - var re_treeSortRows = function re_treeSortRows(field, sortType) { - var oThis = this; - var spliceHasParentRows = new Array(); - this.rows = new Array(); - this.hasParentRows = new Array(); - this.nothasParentRows = new Array(); - if (this.options.values) { - $.each(this.options.values, function (i) { - var rowObj = {}; - var $this = $(this); - var keyField = oThis.gridComp.options.keyField; - var parentKeyField = oThis.gridComp.options.parentKeyField; - var keyValue = oThis.gridComp.getString($this.attr(keyField), ''); - var parentKeyValue = oThis.gridComp.getString($this.attr(parentKeyField), ''); - rowObj.valueIndex = i; - rowObj.value = this; - rowObj.keyValue = keyValue; - rowObj.parentKeyValue = parentKeyValue; - if (parentKeyValue == '') { - oThis.nothasParentRows.push(rowObj); - } else { - oThis.hasParentRows.push(rowObj); - } - oThis.rows.push(rowObj); - }); - // 判断存在父项的数据的父项是否真正存在 - $.each(this.hasParentRows, function (i) { - var parentKeyValue = this.parentKeyValue; - var hasParent = false; - $.each(oThis.rows, function () { - if (this.keyValue == parentKeyValue) { - hasParent = true; - } - }); - if (!hasParent) { - spliceHasParentRows.push(this); - oThis.nothasParentRows.push(this); - } - }); - $.each(spliceHasParentRows, function () { - var index = oThis.hasParentRows.indexOf(this); - oThis.hasParentRows.splice(index, 1); - }); - oThis.rows = new Array(); - var level = 0; - // 遍历nothasParentRows,将子项加入rows - $.each(this.nothasParentRows, function (i) { - this.level = level; - oThis.rows.push(this); - oThis.pushChildRows(this, level); - }); - } - }; - /* - * 将当前行子项插入rows数组 - */ - var pushChildRows = function pushChildRows(row, level) { - var keyValue = row.keyValue; - var oThis = this; - var nowLevel = parseInt(level) + 1; - var hasChild = false; - var childRowArray = new Array(); - var childRowIndexArray = new Array(); - var spliceHasParentRows = new Array(); - $.each(this.hasParentRows, function (i) { - if (this && this.parentKeyValue == keyValue) { - hasChild = true; - this.level = nowLevel; - oThis.rows.push(this); - childRowArray.push(this); - var index = parseInt(oThis.rows.length - 1); - childRowIndexArray.push(index); - spliceHasParentRows.push(this); - oThis.pushChildRows(this, nowLevel); - } - }); - $.each(spliceHasParentRows, function () { - var index = oThis.hasParentRows.indexOf(this); - oThis.hasParentRows.splice(index, 1); - }); - row.hasChild = hasChild; - row.childRow = childRowArray; - row.childRowIndex = childRowIndexArray; - }; - var treeFunObj = exports.treeFunObj = { - initOptionsTree: re_initOptionsTree, - clickFunTree: re_clickFunTree, - addOneRowTree: re_addOneRowTree, - addOneRowTreeHasChildF: re_addOneRowTreeHasChildF, - updateValueAtTree: re_updateValueAtTree, - getAllChildRow: getAllChildRow, - getChildRowIndex: re_getChildRowIndex, - getAllChildRowIndex: getAllChildRowIndex, - getAllChildRowFun: getAllChildRowFun, - getAllChildRowIndexFun: getAllChildRowIndexFun, - expandNode: expandNode, - expandNodeByIndex: expandNodeByIndex, - re_treeSortRows: re_treeSortRows, - pushChildRows: pushChildRows, - re_initTree: re_initTree - }; - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.column = undefined; - - var _columnInit = __webpack_require__(8); - - var _re_gridCompTree = __webpack_require__(6); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var column = function column(options, gridComp) { - _classCallCheck(this, column); - - this.init(options, gridComp); - }; - - ; - var gridCompColumnProto = column.prototype; - Object.assign(gridCompColumnProto, _columnInit.initFunObj); - - /* - * tree - */ - - - gridCompColumnProto.initTree = _re_gridCompTree.treeFunObj.re_initTree; - - exports.column = column; - -/***/ }, -/* 8 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - /* - * 处理参数 - */ - var init = function init(options, gridComp) { - // this.gridComp = gridComp; // 在处理前端缓存将column转为string的时候会因为此属性出现死循环 - var gridOptions = gridComp.options; - this.gridGetBoolean = gridComp.getBoolean; - this.defaults = { - width: '200', // 默认宽度为200 - sortable: true, // 是否可以排序 - canDrag: true, // 是否可以拖动 - fixed: false, // 是否固定列 - visible: true, // 是否显示 - canVisible: true, // 是否可以隐藏 - sumCol: false, // 是否计算合计 - editable: true, // 是否可修改 - editFormShow: true, // 是否可修改 - autoExpand: false, // 是否自动扩展列 - editType: 'text', // 编辑类型,支持传入function扩展 - dataType: 'String', // 数据类型,String, Date, Datetime, Int, Float - //precision: //精度 - format: 'YYYY-MM-DD hh:mm:ss', - //renderType:'', 渲染类型 - //headerColor - headerLevel: 1, // header层级 - hiddenLevel: 1 }; - // 从grid继承的属性 - var gridDefault = { - sortable: gridOptions.sortable, - canDrag: gridOptions.canDrag, - width: gridOptions.columnWidth - }; - if (options.dataType == 'Date') { - this.defaults.format = 'YYYY-MM-DD'; - } - // 树表暂时不支持排序 - options = this.initTree(options, gridOptions); - this.options = $.extend({}, this.defaults, gridDefault, options); - this.getBooleanOptions(); - try { - if (typeof this.options.renderType == 'string') this.options.renderType = eval(this.options.renderType); - } catch (e) {} - try { - if (typeof this.options.editType == 'string') this.options.editType = eval(this.options.editType); - } catch (e) {} - - this.options.width = this.options.width; - this.firstColumn = false; - }; - var initTree = function initTree(options) { - return options; - }; - var getBooleanOptions = function getBooleanOptions() { - this.options.sortable = this.gridGetBoolean(this.options.sortable); - this.options.canDrag = this.gridGetBoolean(this.options.canDrag); - this.options.fixed = this.gridGetBoolean(this.options.fixed); - this.options.visible = this.gridGetBoolean(this.options.visible); - this.options.canVisible = this.gridGetBoolean(this.options.canVisible); - this.options.sumCol = this.gridGetBoolean(this.options.sumCol); - this.options.editable = this.gridGetBoolean(this.options.editable); - this.options.editFormShow = this.gridGetBoolean(this.options.editFormShow); - this.options.autoExpand = this.gridGetBoolean(this.options.autoExpand); - }; - - var initFunObj = exports.initFunObj = { - init: init, - initTree: initTree, - getBooleanOptions: getBooleanOptions - }; - -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.gridComp = undefined; - - var _gridCompCreate = __webpack_require__(10); - - var _gridCompCreateCal = __webpack_require__(11); - - var _gridCompEvent = __webpack_require__(4); - - var _gridCompGet = __webpack_require__(12); - - var _gridCompInit = __webpack_require__(13); - - var _gridCompOperateRow = __webpack_require__(15); - - var _gridCompRenderType = __webpack_require__(16); - - var _gridCompSet = __webpack_require__(17); - - var _gridCompWDChange = __webpack_require__(18); - - var _gridCompClick = __webpack_require__(19); - - var _gridCompOther = __webpack_require__(20); - - var _ut_utility = __webpack_require__(21); - - var _re_gridCompColMenu = __webpack_require__(22); - - var _re_gridCompDrag = __webpack_require__(23); - - var _re_gridCompEdit = __webpack_require__(14); - - var _re_gridCompEditForm = __webpack_require__(24); - - var _re_gridCompFixed = __webpack_require__(25); - - var _re_gridCompFormShow = __webpack_require__(26); - - var _re_gridCompHeaderLevel = __webpack_require__(27); - - var _re_gridCompLocalStorage = __webpack_require__(28); - - var _re_gridCompOverWidthHidden = __webpack_require__(29); - - var _re_gridCompSort = __webpack_require__(3); - - var _re_gridCompSumRow = __webpack_require__(30); - - var _re_gridCompSwap = __webpack_require__(31); - - var _re_gridCompRowDrag = __webpack_require__(32); - - var _re_gridCompTree = __webpack_require__(6); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var gridComp = function gridComp(ele, options) { - _classCallCheck(this, gridComp); - - this.init(ele, options); - this.initGrid(); - }; - - ; - var gridCompProto = gridComp.prototype; - Object.assign(gridCompProto, _gridCompCreate.createFunObj); - Object.assign(gridCompProto, _gridCompCreateCal.createCalFunOjb); - Object.assign(gridCompProto, _gridCompEvent.eventFunObj); - Object.assign(gridCompProto, _gridCompGet.getFunObj); - Object.assign(gridCompProto, _gridCompInit.initFunObj); - Object.assign(gridCompProto, _gridCompOperateRow.operateRowFunObj); - Object.assign(gridCompProto, _gridCompRenderType.renderTypeFunObj); - Object.assign(gridCompProto, _gridCompSet.setFunObj); - Object.assign(gridCompProto, _gridCompWDChange.wdChangeFunObj); - Object.assign(gridCompProto, _gridCompClick.clickFunObj); - Object.assign(gridCompProto, _gridCompOther.otherFunObj); - Object.assign(gridCompProto, _ut_utility.utilFunOjb); - - /* - * colmuenu - */ - var oldInitGridCompColumn = gridCompProto.initGridCompColumn, - oldInitEventFun = gridCompProto.initEventFun, - oldInitGridEventFun = gridCompProto.initGridEventFun; - - gridCompProto.initGridCompColumnColumnMenuFun = _re_gridCompColMenu.re_initGridCompColumnColumnMenuFun; - gridCompProto.initGridCompColumn = function () { - // 执行原有方法 - oldInitGridCompColumn.apply(this, arguments); - _re_gridCompColMenu.colMenu_initGridCompColumn.apply(this, arguments); - }; - gridCompProto.createColumnMenu = _re_gridCompColMenu.re_createColumnMenu; - gridCompProto.initEventFun = function () { - // 执行原有方法 - oldInitEventFun.apply(this, arguments); - _re_gridCompColMenu.colMenu_initEventFun.apply(this, arguments); - }; - gridCompProto.initGridEventFun = function () { - // 执行原有方法 - oldInitGridEventFun.apply(this, arguments); - _re_gridCompColMenu.colMenu_initGridEventFun.apply(this, arguments); - }; - - if (typeof gridCompProto.saveGridCompColumnArrToLocal == 'undefined') { - gridCompProto.saveGridCompColumnArrToLocal = function () {}; - } - if (typeof gridCompProto.clearLocalData == 'undefined') { - gridCompProto.clearLocalData = function () {}; - } - - /* - * grag - */ - var oldInitEventFun_grag = gridCompProto.initEventFun; - var oldInitGridEventFun_grag = gridCompProto.initGridEventFun; - - Object.assign(gridCompProto, _re_gridCompDrag.dragFunObj); - gridCompProto.initEventFun = function () { - // 执行原有方法 - oldInitEventFun_grag.apply(this, arguments); - _re_gridCompDrag.dragFunObj.drag_initEventFun.apply(this, arguments); - }; - gridCompProto.initGridEventFun = function () { - // 执行原有方法 - oldInitGridEventFun_grag.apply(this, arguments); - _re_gridCompDrag.dragFunObj.drag_initGridEventFun.apply(this, arguments); - }; - if (typeof gridCompProto.saveGridCompColumnArrToLocal == 'undefined') { - gridCompProto.saveGridCompColumnArrToLocal = function () {}; - } - - /* - * edit - */ - var oldInitEventFun_edit = gridCompProto.initEventFun; - - Object.assign(gridCompProto, _re_gridCompEdit.eidtFunObj); - - if (typeof gridCompProto.formEditCell == 'undefined') { - gridCompProto.formEditCell = function () {}; - }; - - gridCompProto.initEventFun = function () { - // 执行原有方法 - oldInitEventFun_edit.apply(this, arguments); - _re_gridCompEdit.eidtFunObj.edit_initEventFun.apply(this, arguments); - }; - - /* - * editForm - */ - var oldInitDefault = gridCompProto.initDefault, - oldSetRequired = gridCompProto.setRequired; - - Object.assign(gridCompProto, _re_gridCompEditForm.editFromFunObj); - gridCompProto.initDefault = function () { - // 执行原有方法 - oldInitDefault.apply(this, arguments); - _re_gridCompEditForm.editFromFunObj.editForm_initDefault.apply(this, arguments); - }; - gridCompProto.setRequired = function () { - // 执行原有方法 - oldSetRequired.apply(this, arguments); - _re_gridCompEditForm.editFromFunObj.editForm_setRequired.apply(this, arguments); - }; - - /* - * fixed - */ - var oldColumnsVisibleFun = gridCompProto.columnsVisibleFun; - - Object.assign(gridCompProto, _re_gridCompFixed.fixFunObj); - gridCompProto.columnsVisibleFun = function () { - // 执行原有方法 - oldColumnsVisibleFun.apply(this, arguments); - _re_gridCompFixed.fixFunObj.fixed_columnsVisibleFun.apply(this, arguments); - }; - - /* - * formShow - */ - - Object.assign(gridCompProto, _re_gridCompFormShow.formShowFunOjb); - - /* - * headerLevel - */ - - Object.assign(gridCompProto, _re_gridCompHeaderLevel.headerLevelFunObj); - - /* - * localStorage - */ - - Object.assign(gridCompProto, _re_gridCompLocalStorage.localStorageFunObj); - - /* - * overWidthColumn - */ - - Object.assign(gridCompProto, _re_gridCompOverWidthHidden.overWidthHiddenFunObj); - - /* - * sort - */ - var oldInitEventFun_sort = gridCompProto.initEventFun; - var oldInitGridEventFun_sort = gridCompProto.initGridEventFun; - - Object.assign(gridCompProto, _re_gridCompSort.sortFunObj); - gridCompProto.initEventFun = function () { - // 执行原有方法 - oldInitEventFun_sort.apply(this, arguments); - _re_gridCompSort.sortFunObj.sort_initEventFun.apply(this, arguments); - }; - gridCompProto.initGridEventFun = function () { - // 执行原有方法 - oldInitGridEventFun_sort.apply(this, arguments); - _re_gridCompSort.sortFunObj.sort_initGridEventFun.apply(this, arguments); - }; - - /* - * sumRow - */ - - Object.assign(gridCompProto, _re_gridCompSumRow.sumRowFunObj); - - /* - * swap - */ - var oldInitEventFun_swap = gridCompProto.initEventFun; - var oldInitGridEventFun_swap = gridCompProto.initGridEventFun; - - Object.assign(gridCompProto, _re_gridCompSwap.swapFunObj); - - gridCompProto.initEventFun = function () { - // 执行原有方法 - oldInitEventFun_swap.apply(this, arguments); - _re_gridCompSwap.swapFunObj.swap_initEventFun.apply(this, arguments); - }; - gridCompProto.initGridEventFun = function () { - // 执行原有方法 - oldInitGridEventFun_swap.apply(this, arguments); - _re_gridCompSwap.swapFunObj.swap_initGridEventFun.apply(this, arguments); - }; - - /* - * rowDrag - */ - - // var oldInitEventFun_rowDrag= gridCompProto.initEventFun; - var oldInitGridEventFun_rowDrag = gridCompProto.initGridEventFun; - - Object.assign(gridCompProto, _re_gridCompTree.treeFunObj); - - gridCompProto.initGridEventFun = function () { - // 执行原有方法 - oldInitGridEventFun_rowDrag.apply(this, arguments); - _re_gridCompRowDrag.rowDragFunObj.rowDrag_initGridEventFun.apply(this, arguments); - }; - - /* - * tree - */ - - - Object.assign(gridCompProto, _re_gridCompTree.treeFunObj); - - exports.gridComp = gridComp; - -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.createFunObj = undefined; - - var _gridBrowser = __webpack_require__(5); - - /* - * 创建顶层div以及_top div层 - * 添加顶层div相关监听 - */ - var createDivs = function createDivs() { - var oThis = this, - styleStr = '', - str = '', - mobileClass = ''; - this.ele.innerHTML = ''; - if (this.options.width) { - str += 'width:' + this.options.width + ';'; - } else { - str += 'width:auto;'; - } - if (this.options.height) { - str += 'height:' + this.options.height + ';'; - } else { - str += 'height:auto;'; - } - if (str != '') { - styleStr = 'style="' + str + '"'; - } - if (_gridBrowser.gridBrowser.isMobile) { - mobileClass = 'u-grid-mobile'; - } - var htmlStr = '