zartui 2.1.1 → 2.1.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.
@@ -219,6 +219,13 @@ export default createComponent({
219
219
  "click": function click() {
220
220
  _this3.select(option.value);
221
221
  }
222
+ },
223
+ "scopedSlots": {
224
+ title: _this3.$scopedSlots['item-title'] ? function () {
225
+ return _this3.$scopedSlots['item-title']({
226
+ item: option
227
+ });
228
+ } : undefined
222
229
  }
223
230
  }, [h(Checkbox, {
224
231
  "style": "padding:0;position: absolute;right: 0px;",
@@ -255,6 +262,13 @@ export default createComponent({
255
262
  _this3.$emit('item-select', option.value);
256
263
  }
257
264
  }
265
+ },
266
+ "scopedSlots": {
267
+ title: _this3.$scopedSlots['item-title'] ? function () {
268
+ return _this3.$scopedSlots['item-title']({
269
+ item: option
270
+ });
271
+ } : undefined
258
272
  }
259
273
  }, [active && h(Icon, {
260
274
  "class": bem('icon'),
package/es/index.js CHANGED
@@ -75,7 +75,7 @@ import TextEllipsis from './text-ellipsis';
75
75
  import Timeline from './timeline';
76
76
  import Toast from './toast';
77
77
  import Uploader from './uploader';
78
- var version = '2.1.1';
78
+ var version = '2.1.3';
79
79
 
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, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, TextEllipsis, Timeline, Toast, Uploader];
package/es/table/index.js CHANGED
@@ -8,6 +8,7 @@ var _createNamespace = createNamespace('table'),
8
8
  createComponent = _createNamespace[0],
9
9
  bem = _createNamespace[1];
10
10
 
11
+ var BODY_CELL_SLOTS_NAME = 'bodyCell';
11
12
  export default createComponent({
12
13
  props: {
13
14
  headList: {
@@ -161,7 +162,7 @@ export default createComponent({
161
162
  }
162
163
  },
163
164
  onClick: function onClick() {},
164
- getElement: function getElement(rowData, colData) {
165
+ getElement: function getElement(rowData, colData, rowIndex) {
165
166
  var h = this.$createElement;
166
167
 
167
168
  var _ref3 = this,
@@ -171,6 +172,18 @@ export default createComponent({
171
172
  return slots("data" + rowData[colData.key].id)[0];
172
173
  }
173
174
 
175
+ var slotProps = {
176
+ column: colData,
177
+ record: rowData,
178
+ text: rowData[colData.key],
179
+ index: rowIndex
180
+ };
181
+ var bodyCellSlots = slots(BODY_CELL_SLOTS_NAME, slotProps);
182
+
183
+ if (bodyCellSlots && bodyCellSlots.length) {
184
+ return bodyCellSlots[0];
185
+ }
186
+
174
187
  return colData.ellipsis ? h(TextEllipsis, {
175
188
  "attrs": {
176
189
  "content": rowData[colData.key],
@@ -209,7 +222,7 @@ export default createComponent({
209
222
  "rowspan": ((_additionalCellProps5 = additionalCellProps) == null ? void 0 : _additionalCellProps5.rowSpan) !== 1 ? (_additionalCellProps6 = additionalCellProps) == null ? void 0 : _additionalCellProps6.rowSpan : null
210
223
  },
211
224
  "style": style
212
- }, [_this3.getElement(rowData, colData)]);
225
+ }, [_this3.getElement(rowData, colData, rowIndex)]);
213
226
  })]);
214
227
  }
215
228
  },
@@ -235,6 +235,13 @@ var _default2 = createComponent({
235
235
  "click": function click() {
236
236
  _this3.select(option.value);
237
237
  }
238
+ },
239
+ "scopedSlots": {
240
+ title: _this3.$scopedSlots['item-title'] ? function () {
241
+ return _this3.$scopedSlots['item-title']({
242
+ item: option
243
+ });
244
+ } : undefined
238
245
  }
239
246
  }, [h(_checkbox.default, {
240
247
  "style": "padding:0;position: absolute;right: 0px;",
@@ -271,6 +278,13 @@ var _default2 = createComponent({
271
278
  _this3.$emit('item-select', option.value);
272
279
  }
273
280
  }
281
+ },
282
+ "scopedSlots": {
283
+ title: _this3.$scopedSlots['item-title'] ? function () {
284
+ return _this3.$scopedSlots['item-title']({
285
+ item: option
286
+ });
287
+ } : undefined
274
288
  }
275
289
  }, [active && h(_icon.default, {
276
290
  "class": bem('icon'),
package/lib/index.js CHANGED
@@ -313,7 +313,7 @@ exports.Toast = _toast.default;
313
313
  var _uploader = _interopRequireDefault(require("./uploader"));
314
314
 
315
315
  exports.Uploader = _uploader.default;
316
- var version = '2.1.1';
316
+ var version = '2.1.3';
317
317
  exports.version = version;
318
318
 
319
319
  function install(Vue) {
@@ -19,6 +19,8 @@ var _createNamespace = (0, _utils.createNamespace)('table'),
19
19
  createComponent = _createNamespace[0],
20
20
  bem = _createNamespace[1];
21
21
 
22
+ var BODY_CELL_SLOTS_NAME = 'bodyCell';
23
+
22
24
  var _default = createComponent({
23
25
  props: {
24
26
  headList: {
@@ -172,7 +174,7 @@ var _default = createComponent({
172
174
  }
173
175
  },
174
176
  onClick: function onClick() {},
175
- getElement: function getElement(rowData, colData) {
177
+ getElement: function getElement(rowData, colData, rowIndex) {
176
178
  var h = this.$createElement;
177
179
 
178
180
  var _ref3 = this,
@@ -182,6 +184,18 @@ var _default = createComponent({
182
184
  return slots("data" + rowData[colData.key].id)[0];
183
185
  }
184
186
 
187
+ var slotProps = {
188
+ column: colData,
189
+ record: rowData,
190
+ text: rowData[colData.key],
191
+ index: rowIndex
192
+ };
193
+ var bodyCellSlots = slots(BODY_CELL_SLOTS_NAME, slotProps);
194
+
195
+ if (bodyCellSlots && bodyCellSlots.length) {
196
+ return bodyCellSlots[0];
197
+ }
198
+
185
199
  return colData.ellipsis ? h(_index2.default, {
186
200
  "attrs": {
187
201
  "content": rowData[colData.key],
@@ -219,7 +233,7 @@ var _default = createComponent({
219
233
  "rowspan": ((_additionalCellProps5 = additionalCellProps) == null ? void 0 : _additionalCellProps5.rowSpan) !== 1 ? (_additionalCellProps6 = additionalCellProps) == null ? void 0 : _additionalCellProps6.rowSpan : null
220
234
  },
221
235
  "style": style
222
- }, [_this3.getElement(rowData, colData)]);
236
+ }, [_this3.getElement(rowData, colData, rowIndex)]);
223
237
  })]);
224
238
  }
225
239
  },