+19
-14
| /*! | ||
| * datagrid v0.4.3 | ||
| * datagrid v0.4.4 | ||
| * https://github.com/lmk123/datagrid | ||
@@ -275,3 +275,3 @@ * Released under the MIT License. | ||
| __$styleInject(".datagrid .fixed-header{position:absolute;top:0;left:0;right:0;background-color:#fff;overflow:hidden}",undefined); | ||
| __$styleInject(".datagrid .fixed-header{position:absolute;top:0;left:0;right:0;background-color:#fff;overflow:hidden}.datagrid .fixed-header table{will-change:transform}",undefined); | ||
@@ -327,3 +327,3 @@ var fixedHeader = function (Base) { | ||
| // @ts-ignore | ||
| getCSSProperty('transform')] = "translate3d(-" + (scrollContainer.scrollLeft) + "px,0,0)"; | ||
| getCSSProperty('transform')] = "translateX(-" + (scrollContainer.scrollLeft) + "px)"; | ||
| }) | ||
@@ -399,7 +399,6 @@ ]; | ||
| __$styleInject(".fixed-grid{position:absolute;top:0;background:#fff}.fixed-grid .scroll-container{overflow:hidden}.fixed-grid-left{left:0}.fixed-grid-right{right:0}",undefined); | ||
| __$styleInject(".fixed-grid{position:absolute;top:0;background:#fff}.fixed-grid .scroll-container{overflow:hidden}.fixed-grid table{will-change:transform}.fixed-grid-left{left:0}.fixed-grid-right{right:0}",undefined); | ||
| var ref$1 = Array.prototype; | ||
| var some = ref$1.some; | ||
| var forEach = ref$1.forEach; | ||
| var indexOf = ref$1.indexOf; | ||
@@ -429,3 +428,3 @@ var fixedTable = function (Base) { | ||
| // @ts-ignore | ||
| getCSSProperty('transform')] = "translate3d(0,-" + (scrollContainer.scrollTop) + "px,0)"; | ||
| getCSSProperty('transform')] = "translateY(-" + (scrollContainer.scrollTop) + "px)"; | ||
| } | ||
@@ -530,11 +529,14 @@ }), | ||
| fixedTable.ui.colgroup.innerHTML = colHtml; | ||
| // 目前的做法是根据表格内容平铺表格,不会导致换行,所以暂时注释掉同步高度的代码 | ||
| // 同步表头的高度 | ||
| fixedTable.ui.theadRow.style.height = this.ui.theadRow.offsetHeight + 'px'; | ||
| // fixedTable.ui.theadRow.style.height = this.ui.theadRow.offsetHeight + 'px' | ||
| // 同步 tr 的高度 | ||
| var trs = fixedTable.ui.tbody.children; | ||
| forEach.call(this.ui.tbody.children, function (tr, index) { | ||
| trs[index].style.height = | ||
| tr.offsetHeight + 'px'; | ||
| }); | ||
| // const trs = fixedTable.ui.tbody.children | ||
| // forEach.call( | ||
| // this.ui.tbody.children, | ||
| // (tr: HTMLTableRowElement, index: number) => { | ||
| // ;(trs[index] as HTMLTableRowElement).style.height = | ||
| // tr.offsetHeight + 'px' | ||
| // } | ||
| // ) | ||
| }; | ||
@@ -756,3 +758,6 @@ anonymous.prototype.destroy = function destroy () { | ||
| } | ||
| children[index].classList.add('selected-row'); | ||
| var newSelectedRow = children[index]; | ||
| if (newSelectedRow) { | ||
| newSelectedRow.classList.add('selected-row'); | ||
| } | ||
| }; | ||
@@ -759,0 +764,0 @@ updateSelected(this); |
+19
-14
| /*! | ||
| * datagrid v0.4.3 | ||
| * datagrid v0.4.4 | ||
| * https://github.com/lmk123/datagrid | ||
@@ -269,3 +269,3 @@ * Released under the MIT License. | ||
| __$styleInject(".datagrid .fixed-header{position:absolute;top:0;left:0;right:0;background-color:#fff;overflow:hidden}",undefined); | ||
| __$styleInject(".datagrid .fixed-header{position:absolute;top:0;left:0;right:0;background-color:#fff;overflow:hidden}.datagrid .fixed-header table{will-change:transform}",undefined); | ||
@@ -321,3 +321,3 @@ var fixedHeader = function (Base) { | ||
| // @ts-ignore | ||
| getCSSProperty('transform')] = "translate3d(-" + (scrollContainer.scrollLeft) + "px,0,0)"; | ||
| getCSSProperty('transform')] = "translateX(-" + (scrollContainer.scrollLeft) + "px)"; | ||
| }) | ||
@@ -393,7 +393,6 @@ ]; | ||
| __$styleInject(".fixed-grid{position:absolute;top:0;background:#fff}.fixed-grid .scroll-container{overflow:hidden}.fixed-grid-left{left:0}.fixed-grid-right{right:0}",undefined); | ||
| __$styleInject(".fixed-grid{position:absolute;top:0;background:#fff}.fixed-grid .scroll-container{overflow:hidden}.fixed-grid table{will-change:transform}.fixed-grid-left{left:0}.fixed-grid-right{right:0}",undefined); | ||
| var ref$1 = Array.prototype; | ||
| var some = ref$1.some; | ||
| var forEach = ref$1.forEach; | ||
| var indexOf = ref$1.indexOf; | ||
@@ -423,3 +422,3 @@ var fixedTable = function (Base) { | ||
| // @ts-ignore | ||
| getCSSProperty('transform')] = "translate3d(0,-" + (scrollContainer.scrollTop) + "px,0)"; | ||
| getCSSProperty('transform')] = "translateY(-" + (scrollContainer.scrollTop) + "px)"; | ||
| } | ||
@@ -524,11 +523,14 @@ }), | ||
| fixedTable.ui.colgroup.innerHTML = colHtml; | ||
| // 目前的做法是根据表格内容平铺表格,不会导致换行,所以暂时注释掉同步高度的代码 | ||
| // 同步表头的高度 | ||
| fixedTable.ui.theadRow.style.height = this.ui.theadRow.offsetHeight + 'px'; | ||
| // fixedTable.ui.theadRow.style.height = this.ui.theadRow.offsetHeight + 'px' | ||
| // 同步 tr 的高度 | ||
| var trs = fixedTable.ui.tbody.children; | ||
| forEach.call(this.ui.tbody.children, function (tr, index) { | ||
| trs[index].style.height = | ||
| tr.offsetHeight + 'px'; | ||
| }); | ||
| // const trs = fixedTable.ui.tbody.children | ||
| // forEach.call( | ||
| // this.ui.tbody.children, | ||
| // (tr: HTMLTableRowElement, index: number) => { | ||
| // ;(trs[index] as HTMLTableRowElement).style.height = | ||
| // tr.offsetHeight + 'px' | ||
| // } | ||
| // ) | ||
| }; | ||
@@ -750,3 +752,6 @@ anonymous.prototype.destroy = function destroy () { | ||
| } | ||
| children[index].classList.add('selected-row'); | ||
| var newSelectedRow = children[index]; | ||
| if (newSelectedRow) { | ||
| newSelectedRow.classList.add('selected-row'); | ||
| } | ||
| }; | ||
@@ -753,0 +758,0 @@ updateSelected(this); |
+19
-14
| /*! | ||
| * datagrid v0.4.3 | ||
| * datagrid v0.4.4 | ||
| * https://github.com/lmk123/datagrid | ||
@@ -324,3 +324,3 @@ * Released under the MIT License. | ||
| __$styleInject(".datagrid .fixed-header{position:absolute;top:0;left:0;right:0;background-color:#fff;overflow:hidden}",undefined); | ||
| __$styleInject(".datagrid .fixed-header{position:absolute;top:0;left:0;right:0;background-color:#fff;overflow:hidden}.datagrid .fixed-header table{will-change:transform}",undefined); | ||
@@ -376,3 +376,3 @@ var fixedHeader = function (Base) { | ||
| // @ts-ignore | ||
| getCSSProperty('transform')] = "translate3d(-" + (scrollContainer.scrollLeft) + "px,0,0)"; | ||
| getCSSProperty('transform')] = "translateX(-" + (scrollContainer.scrollLeft) + "px)"; | ||
| }) | ||
@@ -448,7 +448,6 @@ ]; | ||
| __$styleInject(".fixed-grid{position:absolute;top:0;background:#fff}.fixed-grid .scroll-container{overflow:hidden}.fixed-grid-left{left:0}.fixed-grid-right{right:0}",undefined); | ||
| __$styleInject(".fixed-grid{position:absolute;top:0;background:#fff}.fixed-grid .scroll-container{overflow:hidden}.fixed-grid table{will-change:transform}.fixed-grid-left{left:0}.fixed-grid-right{right:0}",undefined); | ||
| var ref$1 = Array.prototype; | ||
| var some = ref$1.some; | ||
| var forEach = ref$1.forEach; | ||
| var indexOf = ref$1.indexOf; | ||
@@ -478,3 +477,3 @@ var fixedTable = function (Base) { | ||
| // @ts-ignore | ||
| getCSSProperty('transform')] = "translate3d(0,-" + (scrollContainer.scrollTop) + "px,0)"; | ||
| getCSSProperty('transform')] = "translateY(-" + (scrollContainer.scrollTop) + "px)"; | ||
| } | ||
@@ -579,11 +578,14 @@ }), | ||
| fixedTable.ui.colgroup.innerHTML = colHtml; | ||
| // 目前的做法是根据表格内容平铺表格,不会导致换行,所以暂时注释掉同步高度的代码 | ||
| // 同步表头的高度 | ||
| fixedTable.ui.theadRow.style.height = this.ui.theadRow.offsetHeight + 'px'; | ||
| // fixedTable.ui.theadRow.style.height = this.ui.theadRow.offsetHeight + 'px' | ||
| // 同步 tr 的高度 | ||
| var trs = fixedTable.ui.tbody.children; | ||
| forEach.call(this.ui.tbody.children, function (tr, index) { | ||
| trs[index].style.height = | ||
| tr.offsetHeight + 'px'; | ||
| }); | ||
| // const trs = fixedTable.ui.tbody.children | ||
| // forEach.call( | ||
| // this.ui.tbody.children, | ||
| // (tr: HTMLTableRowElement, index: number) => { | ||
| // ;(trs[index] as HTMLTableRowElement).style.height = | ||
| // tr.offsetHeight + 'px' | ||
| // } | ||
| // ) | ||
| }; | ||
@@ -805,3 +807,6 @@ anonymous.prototype.destroy = function destroy () { | ||
| } | ||
| children[index].classList.add('selected-row'); | ||
| var newSelectedRow = children[index]; | ||
| if (newSelectedRow) { | ||
| newSelectedRow.classList.add('selected-row'); | ||
| } | ||
| }; | ||
@@ -808,0 +813,0 @@ updateSelected(this); |
+1
-1
| { | ||
| "name": "datagrid", | ||
| "version": "0.4.3", | ||
| "version": "0.4.4", | ||
| "description": "插件式表格组件。", | ||
@@ -5,0 +5,0 @@ "repository": { |
+1
-1
@@ -1,2 +0,2 @@ | ||
| # DataGrid | ||
| # DataGrid [](https://www.npmjs.com/package/datagrid) | ||
@@ -3,0 +3,0 @@ 插件式表格组件。[查看在线示例](https://lmk123.github.io/datagrid/) |
+3
-1
@@ -24,4 +24,6 @@ .datagrid { | ||
| .datagrid td { | ||
| padding: 8px 15px; | ||
| padding-left: 15px; | ||
| padding-right: 15px; | ||
| white-space: nowrap; | ||
| height: 32px; | ||
| } | ||
@@ -28,0 +30,0 @@ |
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
133634
1.03%2742
0.73%