zartui 2.1.17 → 2.1.19
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.
- package/es/index.js +1 -1
- package/es/media-picker/index.js +1 -1
- package/es/table/index.css +1 -1
- package/es/table/index.js +20 -4
- package/es/table/index.less +17 -1
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/media-picker/index.js +1 -1
- package/lib/table/index.css +1 -1
- package/lib/table/index.js +20 -4
- package/lib/table/index.less +17 -1
- package/lib/zart.js +22 -6
- package/lib/zart.min.js +2 -2
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -76,7 +76,7 @@ import TextEllipsis from './text-ellipsis';
|
|
|
76
76
|
import Timeline from './timeline';
|
|
77
77
|
import Toast from './toast';
|
|
78
78
|
import Uploader from './uploader';
|
|
79
|
-
var version = '2.1.
|
|
79
|
+
var version = '2.1.19';
|
|
80
80
|
function install(Vue) {
|
|
81
81
|
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, SpeechRecognizer, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, TextEllipsis, Timeline, Toast, Uploader];
|
|
82
82
|
components.forEach(function (item) {
|
package/es/media-picker/index.js
CHANGED
|
@@ -1149,7 +1149,7 @@ export default createComponent({
|
|
|
1149
1149
|
}
|
|
1150
1150
|
}, [this.renderCertificates()]) : h("div", {
|
|
1151
1151
|
"class": bem('line')
|
|
1152
|
-
}, [this.renderButtons()]), h(ZtGrid, {
|
|
1152
|
+
}, [this.renderButtons(), this.slots('extend')]), h(ZtGrid, {
|
|
1153
1153
|
"directives": [{
|
|
1154
1154
|
name: "show",
|
|
1155
1155
|
value: this.mediaList.length && this.pickerMode !== "certificate"
|
package/es/table/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-table table{border-collapse:separate;border-spacing:0;width:100%;table-layout:auto;box-sizing:border-box}.zt2-table--fixed{overflow:auto scroll}.zt2-table--fixed::-webkit-scrollbar{width:0;height:0}.zt2-table--fixed table{table-layout:fixed}.zt2-table--thead-fixed{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt2-table--fix-left{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt2-table--bordered{border-left:1px solid #f0f0f0}.zt2-table--bordered>table{border-top:1px solid #f0f0f0}.zt2-table--bordered .zt2-table__thead>tr>th{border-right:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0}.zt2-table--bordered .zt2-table__tbody>tr>td{border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0}.zt2-table__thead>tr>th{box-sizing:border-box;overflow-wrap:break-word;height:40px;font-weight:600;font-size:14px;color:#0091fa;text-align:center;line-height:40px;background:#e6f5ff}.zt2-table__head{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.zt2-table__head-sort{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;color:#c8c9cc}.zt2-table__sort-active{color:#0091fa}.zt2-table__tbody>tr>td{box-sizing:border-box;overflow-wrap:break-word;height:40px;font-size:14px;color:#2d4b73;text-align:center;line-height:40px;background:#fff}.zt2-table--striped .zt2-table__tbody>tr:nth-child(even)>td{background:#f5faff}.zt2-table--left-last{border-right:none!important}.zt2-table--left-last::after{content:"";position:absolute;top:0;right:-10px;width:10px;height:100%;opacity:.06;background-image:-webkit-linear-gradient(left,#000 0,rgba(0,0,0,0) 100%);background-image:linear-gradient(90deg,#000 0,rgba(0,0,0,0) 100%)}
|
|
1
|
+
.zt2-table table{border-collapse:separate;border-spacing:0;width:100%;table-layout:auto;box-sizing:border-box}.zt2-table--fixed{overflow:auto scroll}.zt2-table--fixed::-webkit-scrollbar{width:0;height:0}.zt2-table--fixed table{table-layout:fixed}.zt2-table--thead-fixed{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt2-table--fix-left,.zt2-table--fix-right{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt2-table--bordered{border-left:1px solid #f0f0f0}.zt2-table--bordered>table{border-top:1px solid #f0f0f0}.zt2-table--bordered .zt2-table__thead>tr>th{border-right:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0}.zt2-table--bordered .zt2-table__tbody>tr>td{border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0}.zt2-table__thead>tr>th{box-sizing:border-box;overflow-wrap:break-word;height:40px;font-weight:600;font-size:14px;color:#0091fa;text-align:center;line-height:40px;background:#e6f5ff}.zt2-table__head{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.zt2-table__head-sort{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;color:#c8c9cc}.zt2-table__sort-active{color:#0091fa}.zt2-table__tbody>tr>td{box-sizing:border-box;overflow-wrap:break-word;height:40px;font-size:14px;color:#2d4b73;text-align:center;line-height:40px;background:#fff}.zt2-table--striped .zt2-table__tbody>tr:nth-child(even)>td{background:#f5faff}.zt2-table--left-last{border-right:none!important}.zt2-table--left-last::after{content:"";position:absolute;top:0;right:-10px;width:10px;height:100%;opacity:.06;background-image:-webkit-linear-gradient(left,#000 0,rgba(0,0,0,0) 100%);background-image:linear-gradient(90deg,#000 0,rgba(0,0,0,0) 100%)}.zt2-table--right-last{border-left:none!important}.zt2-table--right-last::after{content:"";position:absolute;top:0;left:-10px;width:10px;height:100%;opacity:.06;background-image:-webkit-linear-gradient(right,#000 0,rgba(0,0,0,0) 100%);background-image:linear-gradient(-90deg,#000 0,rgba(0,0,0,0) 100%)}
|
package/es/table/index.js
CHANGED
|
@@ -33,6 +33,7 @@ export default createComponent({
|
|
|
33
33
|
data: function data() {
|
|
34
34
|
return {
|
|
35
35
|
pingedLeft: false,
|
|
36
|
+
pingedRight: false,
|
|
36
37
|
sortOrder: '',
|
|
37
38
|
sortKey: ''
|
|
38
39
|
};
|
|
@@ -40,7 +41,7 @@ export default createComponent({
|
|
|
40
41
|
computed: {
|
|
41
42
|
fixedColumn: function fixedColumn() {
|
|
42
43
|
return this.headList.filter(function (v) {
|
|
43
|
-
return v.fixed;
|
|
44
|
+
return v.fixed || v.fixedRight;
|
|
44
45
|
});
|
|
45
46
|
},
|
|
46
47
|
fixed: function fixed() {
|
|
@@ -78,6 +79,8 @@ export default createComponent({
|
|
|
78
79
|
scrollLeft = _ref.scrollLeft;
|
|
79
80
|
var mergedScrollLeft = typeof scrollLeft === 'number' ? scrollLeft : currentTarget.scrollLeft;
|
|
80
81
|
this.pingedLeft = mergedScrollLeft > 0;
|
|
82
|
+
var rightRemain = currentTarget.scrollWidth - currentTarget.scrollLeft - currentTarget.clientWidth;
|
|
83
|
+
this.pingedRight = rightRemain > 0;
|
|
81
84
|
},
|
|
82
85
|
getNextSortOrder: function getNextSortOrder(type) {
|
|
83
86
|
if (!type) {
|
|
@@ -106,10 +109,13 @@ export default createComponent({
|
|
|
106
109
|
return h("th", {
|
|
107
110
|
"class": bem({
|
|
108
111
|
'fix-left': colData.fixed,
|
|
109
|
-
'left-last': colData.lastFixLeft && this.pingedLeft
|
|
112
|
+
'left-last': colData.lastFixLeft && this.pingedLeft,
|
|
113
|
+
'fix-right': colData.fixedRight,
|
|
114
|
+
'right-last': colData.lastRight && this.pingedRight
|
|
110
115
|
}),
|
|
111
116
|
"style": {
|
|
112
|
-
left: colData.fixed ? colData.left : ''
|
|
117
|
+
left: colData.fixed ? colData.left : '',
|
|
118
|
+
right: colData.fixedRight ? colData.right : ''
|
|
113
119
|
},
|
|
114
120
|
"attrs": {
|
|
115
121
|
"colspan": (colData == null ? void 0 : colData.colSpan) !== 1 ? colData == null ? void 0 : colData.colSpan : null
|
|
@@ -185,6 +191,7 @@ export default createComponent({
|
|
|
185
191
|
}
|
|
186
192
|
var style = _extends({}, colData.style);
|
|
187
193
|
style.left = colData.fixed ? colData.left : '';
|
|
194
|
+
style.right = colData.fixedRight ? colData.right : '';
|
|
188
195
|
return ((_additionalCellProps = additionalCellProps) == null ? void 0 : _additionalCellProps.rowSpan) !== 0 && ((_additionalCellProps2 = additionalCellProps) == null ? void 0 : _additionalCellProps2.colSpan) !== 0 && h("td", {
|
|
189
196
|
"on": {
|
|
190
197
|
"click": function click() {
|
|
@@ -193,7 +200,9 @@ export default createComponent({
|
|
|
193
200
|
},
|
|
194
201
|
"class": bem({
|
|
195
202
|
'fix-left': colData.fixed,
|
|
196
|
-
'left-last': colData.lastFixLeft && _this3.pingedLeft
|
|
203
|
+
'left-last': colData.lastFixLeft && _this3.pingedLeft,
|
|
204
|
+
'fix-right': colData.fixedRight,
|
|
205
|
+
'right-last': colData.lastRight && _this3.pingedRight
|
|
197
206
|
}),
|
|
198
207
|
"attrs": {
|
|
199
208
|
"colspan": ((_additionalCellProps3 = additionalCellProps) == null ? void 0 : _additionalCellProps3.colSpan) !== 1 ? (_additionalCellProps4 = additionalCellProps) == null ? void 0 : _additionalCellProps4.colSpan : null,
|
|
@@ -204,9 +213,16 @@ export default createComponent({
|
|
|
204
213
|
})]);
|
|
205
214
|
}
|
|
206
215
|
},
|
|
216
|
+
mounted: function mounted() {
|
|
217
|
+
var table = this.$refs.table;
|
|
218
|
+
if (table) {
|
|
219
|
+
this.pingedRight = table.scrollWidth > table.clientWidth;
|
|
220
|
+
}
|
|
221
|
+
},
|
|
207
222
|
render: function render(h) {
|
|
208
223
|
var _this4 = this;
|
|
209
224
|
return h("div", {
|
|
225
|
+
"ref": "table",
|
|
210
226
|
"class": bem({
|
|
211
227
|
fixed: this.fixed,
|
|
212
228
|
bordered: this.bordered,
|
package/es/table/index.less
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
z-index: 2;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
&--fix-right,
|
|
31
32
|
&--fix-left {
|
|
32
33
|
position: sticky !important;
|
|
33
34
|
z-index: 2;
|
|
@@ -131,4 +132,19 @@
|
|
|
131
132
|
background-image: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0) 100%);
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
+
|
|
136
|
+
&--right-last {
|
|
137
|
+
border-left: none !important;
|
|
138
|
+
|
|
139
|
+
&::after {
|
|
140
|
+
content: "";
|
|
141
|
+
position: absolute;
|
|
142
|
+
top: 0;
|
|
143
|
+
left: -10px;
|
|
144
|
+
width: 10px;
|
|
145
|
+
height: 100%;
|
|
146
|
+
opacity: 0.06;
|
|
147
|
+
background-image: linear-gradient(-90deg, #000000 0%, rgba(0, 0, 0, 0) 100%);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|