efront 3.21.5 → 3.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ var unfocus = function () {
14
14
  this.setFocus(null);
15
15
  };
16
16
  var setFocus = function (focused) {
17
+ console.log(focused)
17
18
  if (focused && focused.hasAttribute("disabled")) return;
18
19
  var page = this;
19
20
  if (focused) {
@@ -178,6 +179,7 @@ function main(page, items, active, direction = 'y') {
178
179
  }
179
180
  if (emptyFocus !== false) page.setFocus(target);
180
181
  if (!item.length) return;
182
+ console.log('popupmenu')
181
183
  page.setFocus(target);
182
184
  var clone = template.cloneNode();
183
185
  clone.$parentScopes = page.$parentScopes;
@@ -199,6 +201,7 @@ function main(page, items, active, direction = 'y') {
199
201
  once("remove")(menu, function () {
200
202
  removeFromList(mounted_menus, this);
201
203
  });
204
+ menu.go(0);
202
205
  }
203
206
  on("blur")(page, unfocus);
204
207
  var template = page.tempalte || document.createElement("ylist");
@@ -215,7 +218,7 @@ function main(page, items, active, direction = 'y') {
215
218
  time = +time;
216
219
  if (byMousedown && !time) return;
217
220
  if (time) byMousedown = false;
218
-
221
+
219
222
  if (page.ispop || time) popTimer = setTimeout(function () {
220
223
  if (time) byMousedown = elem;
221
224
  page.setFocus(elem);
@@ -312,10 +315,7 @@ function main(page, items, active, direction = 'y') {
312
315
  }`;
313
316
  var notHidden = `!${itemName}.hidden`;
314
317
  var generator = getGenerator(page, 'menu-item');
315
- var fire0 = function () {
316
- fire.apply(this, arguments);
317
- dispatch(window, 'render');
318
- };
318
+ page.$generatorScopes.push($scope);
319
319
  list(page, function (index) {
320
320
  var item = items[index];
321
321
  if (!item) return;
@@ -323,18 +323,15 @@ function main(page, items, active, direction = 'y') {
323
323
  var a = $scope["menu-item"](null, item);
324
324
  if (src.itemName) a.setAttribute("e-if", notHidden);
325
325
  a.setAttribute("e-class", className);
326
+ a.setAttribute("on-mouseleave", "cancel.call(this)");
327
+ a.setAttribute("on-mouseenter", "popMenu.call(this)");
328
+ a.setAttribute("on-pointermove", "popMenu.call(this)");
329
+ a.setAttribute("on-click", "open.call(this)");
330
+ a.setAttribute("_menu", src.itemName);
331
+ if (istoolbar) a.setAttribute("on-pointerdown", "popMenu1");
326
332
  a = generator(index, item, a);
327
- a.menu = item;
328
- on("mouseleave")(a, cancel);
329
- on("mouseenter")(a, open);
330
- on("pointermove")(a, open);
331
- if (istoolbar) on("pointerdown")(a, open1);
332
- on("click")(a, fire0);
333
333
  return a;
334
334
  });
335
- on("append")(page, function () {
336
- this.go(0);
337
- })
338
335
  }
339
336
  else {
340
337
  page.innerHTML = menuList;
@@ -349,7 +346,6 @@ function main(page, items, active, direction = 'y') {
349
346
  }
350
347
  else {
351
348
  var generator = getGenerator(page, 'menu-item');
352
-
353
349
  list(page, function (index) {
354
350
  var elem = generator(index);
355
351
  if (!elem) return;
@@ -362,7 +358,7 @@ function main(page, items, active, direction = 'y') {
362
358
  on("mouseenter")(elem, open);
363
359
  on("pointermove")(elem, cancel);
364
360
  if (istoolbar) on("pointerdown")(elem, open1);
365
- on("click")(elem, fire0);
361
+ on("click")(elem, fire);
366
362
  return elem;
367
363
  }, direction);
368
364
  }
package/coms/zimoli/on.js CHANGED
@@ -231,6 +231,18 @@ var broadcast = function (k, hk, event) {
231
231
  var element = this;
232
232
  var handlers = element[hk];
233
233
  if (handlers.length > 1) handlers = handlers.slice();
234
+ if (event.which === 1 && event.buttons === 0) {
235
+ // firefox 无按键
236
+ Object.defineProperty(event, 'which', { value: 0 });
237
+ }
238
+ if (event.which === 1 && event.buttons === 2) {
239
+ // firefox 右键
240
+ Object.defineProperty(event, 'which', { value: 3 });
241
+ }
242
+ if (event.which === 1 && event.buttons === 4) {
243
+ // firefox 中键
244
+ Object.defineProperty(event, 'which', { value: 2 });
245
+ }
234
246
  for (var [eventtypes, handler, context] of handlers) {
235
247
  if (eventtypes.self && event.target !== element) continue;
236
248
  if (!checkKeyNeed(eventtypes, event)) continue;
@@ -1,15 +1,17 @@
1
1
  "use strict";
2
2
  var oncetree = {};
3
+ function emit(ontype, target, handler, firstmost) {
4
+ var off = ontype.call(this, target, function (event) {
5
+ off();
6
+ return handler.call(this, event);
7
+ }, firstmost);
8
+ return off;
9
+ }
3
10
  function _once(key) {
4
11
  if (oncetree[key]) return oncetree[key];
5
- return oncetree[key] = function (target, handler, firstmost) {
6
- var off = on(key).call(this, target, function (event) {
7
- off();
8
- return handler.call(this, event);
9
- }, firstmost);
10
- return off;
11
- };
12
+ return oncetree[key] = emit.bind(null, on(key));
12
13
  }
14
+ once.emit = emit;
13
15
  function once(key, target, handler, firstmost) {
14
16
  if (isFunction(handler) && isNode(target)) return _once(key).call(this, target, handler, firstmost);
15
17
  return _once(key);
@@ -564,7 +564,17 @@ var createEmiter = function (on) {
564
564
  search[0] += `with(this.$parentScopes[${scopes.length}])`;
565
565
  getter1 = createGetter(search, false);
566
566
  }
567
- on(key)(this, function (e) {
567
+ var onkey;
568
+ if (key === 'mounted' || key === 'mount') {
569
+ onkey = on === once ? oncemount : onmounted;
570
+ }
571
+ else if (key === 'wheel' || key === 'mousewheel') {
572
+ onkey = on === once ? once.emit.bind(null, onmousewheel) : onmousewheel;
573
+ }
574
+ else {
575
+ onkey = on(key);
576
+ }
577
+ onkey(this, function (e) {
568
578
  digest();
569
579
  if (parsedSrc) {
570
580
  var target = e.currentTarget || e.target;
@@ -86,7 +86,7 @@ var scrollbary = function () {
86
86
  var run = function () {
87
87
  var thumbPosition = getScreenPosition(scroller.thumb);
88
88
  if (delta > 0 && thumbPosition.bottom - delta / 6 < scrollTimerTarget || delta < 0 && thumbPosition.top - delta / 6 > scrollTimerTarget) {
89
- var targetTop = scroller.Top() + delta;
89
+ var targetTop = scroller.$Top() + delta;
90
90
  var target = scroller.target;
91
91
  scroller.scrollTo(targetTop);
92
92
  if (target) setTargetTop(target, targetTop);
@@ -126,11 +126,11 @@ var scrollbary = function () {
126
126
 
127
127
 
128
128
  var setTargetTop = function (target, top) {
129
- if (target.Top instanceof Function) target.Top(top);
129
+ if (target.$Top instanceof Function) target.$Top(top);
130
130
  else target.scrollTop = top;
131
131
  };
132
132
  var getTargetTop = function (target) {
133
- if (target.Top instanceof Function) return target.Top();
133
+ if (target.$Top instanceof Function) return target.$Top();
134
134
  return target.scrollTop;
135
135
  };
136
136
 
@@ -152,7 +152,7 @@ var scrollbary = function () {
152
152
  _scrollbar.autoshow();
153
153
  });
154
154
  on("change")(_scrollbar, function () {
155
- var top = _scrollbar.Top();
155
+ var top = _scrollbar.$Top();
156
156
  setTargetTop(_container, top);
157
157
  });
158
158
  if (followResize) on("resize")(followResize, _scrollbar.reshape);
@@ -167,7 +167,7 @@ var scrollbary = function () {
167
167
  _scrollbar.scrollTo = scrollTo;
168
168
  var _handler = document.createElement("scrollbar-thumb");
169
169
  _handler.className = "thumb";
170
- _scrollbar.Top = getTop;
170
+ _scrollbar.$Top = getTop;
171
171
  _scrollbar.autohide = lazy(function () {
172
172
  this.thumb.style.opacity = 0;
173
173
  }, 600);
@@ -1,14 +1,20 @@
1
- <tbody -src="(d,i) in data" :style="tbodyHeight()">
2
- <tr thead #adapter insert>
3
- <td row-index>序号</td>
4
- <td -repeat="f in fields track by f.id" :style="{width:f.width}" @dblclick="sort(f)"><i -if="f.icon"
5
- -class="f.icon"></i></span><span -if="f.name" -html="f.name"></span>
1
+ <thead @mounted="setFixedColumn.call(this.parentNode)">
2
+ <tr inline-block #adapter thead @mounted="resizeT(this)">
3
+ <td fixed row-index>序号</td>
4
+ <td fixed:="f.fixed" -repeat="f in fields track by f.id" :style="{width:f.width}" @dblclick="sort(f)"><i
5
+ -if="f.icon" -class="f.icon"></i><span -if="f.name" -html="f.name"></span><template
6
+ -else>&nbsp;</template>
6
7
  </td>
7
8
  </tr>
8
- <tr>
9
- <td row-index -bind="i+1"></td>
10
- <td -repeat="f in fields">
11
- <model -if="f.key" :field=f :data=d readonly></model>
9
+ </thead>
10
+ <tbody -src="(d,i) in data" :style="tbodyHeight(this)">
11
+ <tr inline-block @mounted="this.style.width=adapter.style.width">
12
+ <td fixed row-index -bind="i+1" @mounted="this.style=adapter.firstChild.getAttribute('style')">
13
+ </td>
14
+ <td fixed:="f.fixed" -repeat="(f,i) in fields"
15
+ @mounted="this.style=adapter.children[i+1].getAttribute('style')">
16
+ <model -if="f.key&&!isEmpty(d[f.key])" :field=f :data=d readonly></model>
17
+ <template -else>&nbsp;</template>
12
18
  <a on-click="o.do(d)" -if="!f.key&&f.options&&(!o.when||o.when(d))"
13
19
  _type="o.type instanceof Function?o.type(d):o.type" -repeat="o in f.options">
14
20
  <span -text="o.name instanceof Function?o.name(d):o.name"></span>
@@ -16,7 +16,7 @@ var moveMargin = function (element, movePixels) {
16
16
  var markRowTds = function (tr, deltas, colstart, colend) {
17
17
  var inc = 0;
18
18
  var collections = [];
19
- [].map.call(tr.children, function (td) {
19
+ Array.prototype.forEach.call(tr.children, function (td) {
20
20
  while (deltas[inc] > 0) {
21
21
  deltas[inc++]--;
22
22
  }
@@ -40,32 +40,95 @@ var markRowTds = function (tr, deltas, colstart, colend) {
40
40
  });
41
41
  return collections;
42
42
  };
43
- var getRowsOfTdsByCol = function (table, start, end) {
44
- var savedRowDeltas = [];
45
- var savedCollections = [];
46
- [].map.call(table.children, function (tr) {
47
- if (trElementReg.test(tr.tagName)) {
48
- var collections = markRowTds(tr, savedRowDeltas, start, end);
49
- savedCollections.push(collections);
43
+ var forEachTableRow = function (table, call) {
44
+ for (var tr of table.children) {
45
+ if (isTableRow(tr)) {
46
+ call(tr);
50
47
  }
51
48
  else {
52
- var collections = getRowsOfTdsByCol(tr, start, end);
53
- savedCollections.push.apply(savedCollections, collections);
49
+ for (var c of tr.children) if (isTableRow(c)) call(c);
54
50
  }
55
- });
51
+ }
52
+ }
53
+ var getRowsOfTdsByCol = function (table, start, end) {
54
+ var savedRowDeltas = [];
55
+ var savedCollections = [];
56
+ forEachTableRow(table, function (tr) {
57
+ var collections = markRowTds(tr, savedRowDeltas, start, end);
58
+ savedCollections.push(collections);
59
+ })
56
60
  return savedCollections;
57
61
  }
58
62
  var getTdsByCol = function (table, start, end) {
59
63
  return [].concat.apply([], getRowsOfTdsByCol(table, start, end));
60
64
  };
65
+ var resizeT = function (t, w) {
66
+ if (!w) {
67
+ var w = 0;
68
+ for (var cx = 0, dx = t.children.length; cx < dx; cx++) {
69
+ w += t.children[cx].offsetWidth;
70
+ }
71
+ }
72
+ css(t, { width: w });
73
+ }
74
+ var getThead = function (table) {
75
+ for (var c of table.children) {
76
+ if (/^thead$/i.test(c.tagName) || c.hasAttribute('thead')) return c;
77
+ }
78
+ };
79
+ var getTbody = function (table) {
80
+ for (var c of table.children) {
81
+ if (/^tbody$/i.test(c.tagName) || c.hasAttribute("tbody")) return c;
82
+ }
83
+ };
84
+ var isTableRow = function (e) {
85
+ return trElementReg.test(e.tagName);
86
+ };
87
+ var resizeColumn = function (target, targetW) {
88
+ var deltaW = targetW - target.offsetWidth;
89
+ forEachTableRow(this, function (tr) {
90
+ resizeT(tr, tr.offsetWidth + deltaW);
91
+ });
92
+ for (var c of this.children) {
93
+ if (!isTableRow(c)) {
94
+ var tr = c.querySelector('tr');
95
+ c.style.width = tr.style.width;
96
+ }
97
+ }
98
+ var { colstart, colend } = target;
99
+ if (isEmpty(colstart) || isEmpty(colend)) return;
100
+ var ts = getRowsOfTdsByCol(this, colstart, colend);
101
+ for (var cs of ts) {
102
+ var c = cs[cs.length - 1];
103
+ var w = 0;
104
+ for (var c of cs) {
105
+ w += c.offsetWidth;
106
+ }
107
+ w = targetW - w;
108
+ while (w !== 0) {
109
+ var c = cs.pop();
110
+ var w0 = c.offsetWidth + w;
111
+ if (w0 < 0) {
112
+ w = -w0;
113
+ w0 = w;
114
+ }
115
+ else {
116
+ w = 0;
117
+ }
118
+ if (targetW !== w) css(c, { width: w0 });
119
+ }
120
+ }
121
+ };
61
122
  var resizeTarget = function (event) {
62
123
  var { resizing } = this;
63
124
  if (!resizing) return;
64
125
  event.moveLocked = true;
65
126
  var { restX, target } = resizing;
66
- var targetX = event.clientX - restX;
67
- target.style.width = targetX + "px";
127
+ var targetW = event.clientX - restX;
128
+ if (targetW < 20) targetW = 20;
129
+ resizeColumn.call(this, target, targetW);
68
130
  resizing.clientX = event.clientX;
131
+ setFixedColumn.call(this);
69
132
  };
70
133
  var getFirstSingleColCell = function (table, col) {
71
134
  var tds = getTdsByCol(table, col, col);
@@ -122,7 +185,7 @@ function enrichField(f) {
122
185
  }
123
186
  else switch (f.type) {
124
187
  case "text":
125
- width = 30;
188
+ width = 200;
126
189
  break;
127
190
  case "input":
128
191
  width = 200;
@@ -144,7 +207,71 @@ function enrichField(f) {
144
207
  }
145
208
  if (width > 600) width = 600;
146
209
  f.width = width + 60;
210
+ if (!f.key && f.options && isEmpty(f.fixed)) {
211
+ f.fixed = true;
212
+ }
147
213
  }
214
+ var tbodyHeight = function (tbody) {
215
+ return { 'max-height': ((innerHeight - getScreenPosition(tbody).top - 16) / 32 | 0) * 32 }
216
+ };
217
+
218
+ var setFixed = function (children, scrolled, left, borderRight) {
219
+ var setBorderRight = function (fixedLeft) {
220
+ var end = fixedLeft[fixedLeft.length - 1];
221
+ if (end && end.style[left]) css(end, {
222
+ [borderRight]: '1px solid #0006'
223
+ });
224
+ };
225
+ var fixedElements = [];
226
+ var offset = 0;
227
+ var fixedWidth = 0;
228
+ for (var c of children) {
229
+ var pc = getScreenPosition(c);
230
+ var isfixed = c.hasAttribute('fixed');
231
+ if (fixedWidth + scrolled > offset && fixedWidth + pc.width < this.clientWidth / 3) {
232
+ if (isfixed) {
233
+ css(c, { [left]: scrolled - offset + fixedWidth, [borderRight]: '' });
234
+ fixedElements.push(c);
235
+ fixedWidth += pc.width;
236
+ }
237
+ }
238
+ else {
239
+ setBorderRight(fixedElements);
240
+ if (isfixed && c.style[left]) {
241
+ css(c, { [left]: '', [borderRight]: '' })
242
+ fixedElements.push(c);
243
+ }
244
+ }
245
+ offset += pc.width;
246
+ }
247
+ setBorderRight(fixedElements);
248
+ for (var f of fixedElements) {
249
+ var cols = getRowsOfTdsByCol(this, f.colstart, f.colend);
250
+ for (var c of cols) css(c[0], {
251
+ [left]: f.style[left],
252
+ [borderRight]: f.style[borderRight]
253
+ });
254
+ }
255
+
256
+ };
257
+
258
+
259
+ var setFixedColumn = function () {
260
+ var thead = getThead(this);
261
+ if (!thead) return;
262
+ if (!isTableRow(thead)) thead = thead.querySelector('tr');
263
+ var children = Array.prototype.slice.call(thead.children);
264
+ var lastChild = children[children.length - 1];
265
+ if (!lastChild) return;
266
+ var deltaW = thead.scrollWidth - lastChild.offsetWidth;
267
+ if (this.clientWidth > deltaW + 200) {
268
+ css(lastChild, { width: this.clientWidth - deltaW });
269
+ css(thead, { width: this.clientWidth });
270
+ resizeColumn.call(this, lastChild, this.clientWidth - deltaW);
271
+ }
272
+ setFixed.call(this, children, this.scrollLeft, 'left', 'borderRight');
273
+ setFixed.call(this, children.reverse(), this.scrollWidth - this.clientWidth - this.scrollLeft, 'right', 'borderLeft');
274
+ };
148
275
 
149
276
  function table(elem) {
150
277
  var tableElement = isElement(elem) ? elem : document.createElement("table");
@@ -169,11 +296,10 @@ function table(elem) {
169
296
  });
170
297
  onmousemove(tableElement, function (event) {
171
298
  if (!thead) {
172
- [thead] = table.getElementsByTagName("thead");
173
- if (!thead) thead = table.querySelector('[thead]');
299
+ thead = getThead(table);
174
300
  }
175
301
  if (!getTargetIn(thead, event.target)) return;
176
-
302
+ if (table.resizing) return;
177
303
  var tds = getTargetIn(cellMatchManager, event.target);
178
304
  if (!isArray(tds)) tds = [];
179
305
  tds.map(function (td) {
@@ -195,41 +321,67 @@ function table(elem) {
195
321
  });
196
322
  var table = tableElement;
197
323
  var thead;
324
+ var markedRows = false;
198
325
  var cellMatchManager = function (element) {
199
326
  if (!thead) {
200
327
  [thead] = table.getElementsByTagName("thead");
201
328
  if (!thead) thead = table.querySelector('[thead]');
202
329
  }
203
- if (table.resizing) return false;
204
330
  if (!getTargetIn(thead, element)) return false;
205
331
  if (!tdElementReg.test(element.tagName)) return false;
206
- var savedRowDeltas = [];
207
- [].map.call(thead.children, function (tr) {
208
- markRowTds(tr, savedRowDeltas);
209
- });
332
+ if (!markedRows) {
333
+ var savedRowDeltas = [];
334
+ [].map.call(thead.children, function (tr) {
335
+ markRowTds(tr, savedRowDeltas);
336
+ });
337
+ markedRows = true;
338
+ }
210
339
  var { colstart, colend } = element;
211
340
  return getTdsByCol(table, colstart, colend);
212
341
  };
342
+
213
343
  table.dragbox = function () {
214
344
  return thead;
215
345
  };
216
- var tbodyHeight = e => ({ 'max-height': ((innerHeight - getScreenPosition(table).top - 46) / 32 | 0) * 32 + 36 });
346
+ table.useIncrease = false;
347
+ var _vbox = function () {
348
+ table.$Left = function (x) {
349
+ if (isFinite(x)) this.scrollLeft = x;
350
+ setFixedColumn.call(this);
351
+ return this.scrollLeft;
352
+ };
353
+ vbox(table, 'x');
354
+ };
217
355
  care(table, function ([fields, data]) {
356
+ if (_vbox) _vbox(), _vbox = null;
218
357
  thead = null;
219
358
  fields.forEach(enrichField);
220
359
  remove(this.children);
221
360
  this.innerHTML = template;
222
-
361
+ markedRows = false;
362
+ this.style.display = 'block';
223
363
  render(this, {
224
364
  fields,
225
- tbody() {
365
+ isEmpty,
366
+ tbody(e) {
226
367
  var e = list.apply(null, arguments);
227
- css(e, tbodyHeight());
368
+ css(e, tbodyHeight(e));
369
+ css(e, { width: this.adapter.offsetWidth, display: 'block' });
228
370
  return e;
229
371
  },
372
+ thead(t) {
373
+ var tr = document.createElement('thead');
374
+ tr.renders = [function () {
375
+ resizeT(this.firstChild)
376
+ }];
377
+ css(tr, { display: 'block' });
378
+ appendChild(tr, Array.prototype.slice.call(t.children));
379
+ return tr;
380
+ },
230
381
  tbodyHeight,
231
382
  data,
232
383
  adapter: null,
384
+ resizeT,
233
385
  model,
234
386
  sort(f) {
235
387
  f.sign = f.sign > 0 ? -1 : 1;
@@ -245,6 +397,7 @@ function table(elem) {
245
397
  css(target, { width: f.width });
246
398
  },
247
399
  a: button,
400
+ setFixedColumn,
248
401
  }, this.$parentScopes.concat(this.$scope));
249
402
  })
250
403
  autodragchildren(
@@ -257,6 +410,7 @@ function table(elem) {
257
410
  var [f] = fields.splice(src - 1, 1);
258
411
  fields.splice(dst - 1, 0, f);
259
412
  }
413
+ markedRows = false;
260
414
  var children = parentNode.children;
261
415
  var srcElement = children[src];
262
416
  var dstElement = children[rel];
@@ -290,5 +444,8 @@ function table(elem) {
290
444
  }
291
445
  }
292
446
  );
447
+ resizingList.set(table);
448
+ on("resize")(table, setFixedColumn);
449
+ on("scroll")(table, setFixedColumn);
293
450
  return table;
294
451
  }
@@ -32,10 +32,20 @@ table,
32
32
  vertical-align: top;
33
33
  }
34
34
 
35
- & {
36
- outline: 1px solid #0006;
35
+
36
+ tr {
37
+ position: relative;
38
+ white-space: nowrap;
39
+ width: 100%;
37
40
  }
38
41
 
42
+ th,
43
+ td {
44
+ white-space: normal;
45
+ height: 100%;
46
+ border: 1px solid transparent;
47
+ padding: 1px 10px;
48
+ }
39
49
 
40
50
  .y-ing {
41
51
  &:before {
@@ -45,7 +55,7 @@ table,
45
55
  top: 0;
46
56
  bottom: 0;
47
57
  right: 0;
48
- background-color: rgba(0, 0, 0, .06);
58
+ background-color: rgba(0, 30, 69, .06);
49
59
  }
50
60
 
51
61
  >* {
@@ -53,28 +63,47 @@ table,
53
63
  }
54
64
  }
55
65
 
56
- @cell-padding: 0 10px;
57
66
 
58
67
  & {
59
68
  // text-align: center;
69
+ outline: 1px solid #0006;
70
+ max-width: 100%;
60
71
  border-collapse: collapse;
61
72
  table-layout: fixed;
62
73
  white-space: nowrap;
74
+ height: auto;
75
+ border-radius: 3px;
76
+ }
77
+
78
+ [row-index] {
79
+ user-select: none;
80
+ width: 56px;
81
+ padding-right: 10px;
82
+ text-align: right;
83
+ }
84
+
85
+ >tbody {
86
+ [row-index] {
87
+ background: #fff;
88
+ }
89
+ }
63
90
 
91
+ [fixed] {
92
+ z-index: 2;
64
93
  }
65
94
 
66
95
  >thead {
67
96
  user-select: none;
68
97
  line-height: 36px;
98
+ min-width: 100%;
69
99
 
70
100
  >tr {
71
101
 
72
102
  >td,
73
103
  >th {
74
- padding: @cell-padding;
75
104
  position: relative;
76
105
  color: #fff;
77
- background-color: #999;
106
+ background-color: #395268;
78
107
  }
79
108
  }
80
109
  }
@@ -83,27 +112,30 @@ table,
83
112
  line-height: 32px;
84
113
  height: 100%;
85
114
  min-height: 30px;
86
- border-top: 4px solid #6669;
87
-
88
-
89
-
90
115
  user-select: auto;
91
116
 
92
117
  >tr {
93
118
 
94
119
  >td,
95
120
  >th {
96
- padding: @cell-padding;
97
121
  position: relative;
98
122
  overflow: hidden;
99
123
  }
100
124
 
101
125
  &:nth-of-type(odd) {
102
- background-color: #eee;
126
+
127
+ >td,
128
+ >th {
129
+ background-color: #fff;
130
+ }
103
131
  }
104
132
 
105
133
  &:nth-of-type(even) {
106
- background-color: #fff;
134
+
135
+ >td,
136
+ th {
137
+ background-color: #f2f4f6;
138
+ }
107
139
  }
108
140
 
109
141
 
@@ -111,7 +143,7 @@ table,
111
143
 
112
144
  >td,
113
145
  >th {
114
- background: #dddddd;
146
+ background: #e9edf2;
115
147
  }
116
148
  }
117
149
  }
@@ -131,18 +163,13 @@ table,
131
163
  }
132
164
 
133
165
 
134
- tr {
166
+ [inline-block] {
135
167
 
136
168
  >th,
137
169
  >td {
138
- background: inherit;
139
-
140
- &[row-index] {
141
- user-select: none;
142
- // pointer-events: none;
143
- background: #fff;
144
- text-align: right;
145
- }
170
+ white-space: nowrap;
171
+ overflow: hidden;
172
+ display: inline-block;
146
173
  }
147
174
  }
148
175