@opentinyvue/vue-column-list-item 2.22.0 → 3.22.0

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/lib/index.js CHANGED
@@ -6,36 +6,40 @@ import DropdownItem from '@opentinyvue/vue-dropdown-item';
6
6
  import Checkbox from '@opentinyvue/vue-checkbox';
7
7
  import Radio from '@opentinyvue/vue-radio';
8
8
  import { IconEllipsis } from '@opentinyvue/vue-icon';
9
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createCommentVNode, withCtx, renderSlot, createBlock, resolveDynamicComponent, createElementVNode, normalizeStyle, Fragment, renderList, withModifiers, toDisplayString } from 'vue';
9
10
 
10
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
11
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
12
- if (render) {
13
- options.render = render;
14
- options.staticRenderFns = staticRenderFns;
15
- options._compiled = true;
11
+ function _createForOfIteratorHelperLoose(r, e) {
12
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
13
+ if (t) return (t = t.call(r)).next.bind(t);
14
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
15
+ t && (r = t);
16
+ var o = 0;
17
+ return function() {
18
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
19
+ };
16
20
  }
17
- var hook;
18
- if (injectStyles) {
19
- hook = injectStyles;
20
- }
21
- if (hook) {
22
- if (options.functional) {
23
- options._injectStyles = hook;
24
- var originalRender = options.render;
25
- options.render = function renderWithStyleInjection(h, context) {
26
- hook.call(context);
27
- return originalRender(h, context);
28
- };
29
- } else {
30
- var existing = options.beforeCreate;
31
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
32
- }
21
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
22
+ }
23
+ function _unsupportedIterableToArray(r, a) {
24
+ if (r) {
25
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
26
+ var t = {}.toString.call(r).slice(8, -1);
27
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
33
28
  }
34
- return {
35
- exports: scriptExports,
36
- options
37
- };
38
29
  }
30
+ function _arrayLikeToArray(r, a) {
31
+ (null == a || a > r.length) && (a = r.length);
32
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
33
+ return n;
34
+ }
35
+ var _export_sfc = function _export_sfc2(sfc, props) {
36
+ var target = sfc.__vccOpts || sfc;
37
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
38
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
39
+ target[key] = val;
40
+ }
41
+ return target;
42
+ };
39
43
 
40
44
  function _extends() {
41
45
  return _extends = Object.assign ? Object.assign.bind() : function(n) {
@@ -46,220 +50,10 @@ function _extends() {
46
50
  return n;
47
51
  }, _extends.apply(null, arguments);
48
52
  }
49
- var render = function render2() {
50
- var _vm = this;
51
- var _h = _vm.$createElement;
52
- var _c = _vm._self._c || _h;
53
- return _c("div", {
54
- staticClass: "block sm:flex bg-color-bg-1 w-full py-2.5 px-3 sm:pb-2.5 text-sm sm:text-xs border-color-border-separator",
55
- class: _vm.m(_vm.state.effectOptions.length ? "pb-0" : "pb-3", _vm.image && !_vm.state.showCheckbox && !_vm.state.showRadio ? "pl-4" : "pl-3", _vm.state.type === "list" ? "pl-0 pr-0 border-b-0.5 sm:border-b-px [&:last-child]:border-none" : "border-0.5 sm:border rounded-lg sm:rounded hover:shadow", _vm.customClass),
56
- attrs: {
57
- "data-tag": "tiny-column-list-item",
58
- "role": "column-list-item"
59
- },
60
- on: {
61
- "click": function click($event) {
62
- return _vm.$emit("click", $event);
63
- }
64
- }
65
- }, [_vm.state.showCheckbox ? _c("div", {
66
- staticClass: "float-left sm:float-none mr-3 [&_[data-tag=tiny-checkbox]]:p-0 [&_[data-tag=tiny-checkbox]>span>span]:p-0 [&_[data-tag=tiny-checkbox]>span:nth-child(2)]:hidden",
67
- attrs: {
68
- "data-tag": "tiny-column-list-item-checkbox"
69
- }
70
- }, [_c("tiny-checkbox", {
71
- attrs: {
72
- "disabled": _vm.state.disabled,
73
- "label": _vm.label
74
- },
75
- on: {
76
- "change": _vm.handleChange
77
- },
78
- model: {
79
- value: _vm.state.model,
80
- callback: function callback($$v) {
81
- _vm.$set(_vm.state, "model", $$v);
82
- },
83
- expression: "state.model"
84
- }
85
- })], 1) : _vm._e(), _vm.state.showRadio ? _c("div", {
86
- staticClass: "float-left sm:float-none mr-1.5 sm:mr-0 [&_[role=radio]]:w-6 [&_[role=radio]]:h-5 [&_[role=radio]_span_span]:p-0",
87
- attrs: {
88
- "data-tag": "tiny-column-list-item-radio"
89
- }
90
- }, [_c("tiny-radio", {
91
- attrs: {
92
- "disabled": _vm.state.disabled,
93
- "label": _vm.label
94
- },
95
- on: {
96
- "change": _vm.handleChange
97
- },
98
- model: {
99
- value: _vm.state.model,
100
- callback: function callback($$v) {
101
- _vm.$set(_vm.state, "model", $$v);
102
- },
103
- expression: "state.model"
104
- }
105
- }, [_c("span")])], 1) : _vm._e(), _vm.image || _vm.slots.image && _vm.slots.image() ? _c("div", {
106
- staticClass: "float-left block sm:flex mr-3 shrink-0 pt-1",
107
- class: [_vm.state.size === "small" ? "w-9 h-11" : "w-14 sm:w-11 h-16"],
108
- attrs: {
109
- "data-tag": "tiny-column-list-item-image"
110
- }
111
- }, [_vm._t("image", function() {
112
- return [typeof _vm.image === "string" ? _c("img", {
113
- staticClass: "rounded",
114
- class: [_vm.state.size === "small" ? "w-9 h-9" : "w-14 sm:w-11 h-14 sm:h-11"],
115
- attrs: {
116
- "src": _vm.image
117
- }
118
- }) : _c(_vm.image, {
119
- tag: "component",
120
- staticClass: "rounded",
121
- class: [_vm.state.size === "small" ? "w-9 h-9" : "w-14 sm:w-11 h-14 sm:h-11"]
122
- })];
123
- })], 2) : _vm._e(), _c("div", {
124
- staticClass: "block text-left sm:flex flex-auto flex-wrap",
125
- attrs: {
126
- "data-tag": "tiny-column-list-item-column1"
127
- }
128
- }, [_vm.slots.column1 && _vm.slots.column1() ? _c("div", {
129
- staticClass: "min-w-[theme(spacing.40)] overflow-hidden sm:ml-0 pr-0 sm:pr-5",
130
- style: {
131
- "flex-grow": _vm.flexGrow[0] || 0,
132
- "flex-basis": _vm.flexBasis[0] || "auto"
133
- }
134
- }, [_vm._t("column1")], 2) : _vm._e(), _vm.slots.column2 && _vm.slots.column2() ? _c("div", {
135
- staticClass: "min-w-[theme(spacing.40)] overflow-hidden pr-0 sm:pr-5 mt-1 sm:mt-0 pt-0 sm:pt-1",
136
- class: [_vm.state.showCheckbox || _vm.state.showRadio ? "pl-8 sm:pl-0" : ""],
137
- style: {
138
- "flex-grow": _vm.flexGrow[1] || 0,
139
- "flex-basis": _vm.flexBasis[1] || "auto"
140
- },
141
- attrs: {
142
- "data-tag": "tiny-column-list-item-column2"
143
- }
144
- }, [_vm._t("column2")], 2) : _vm._e(), _vm.slots.column3 && _vm.slots.column3() ? _c("div", {
145
- staticClass: "min-w-[theme(spacing.40)] overflow-hidden pr-0 sm:pr-5 mt-1 sm:mt-0 pt-0 sm:pt-1",
146
- class: [_vm.state.showCheckbox || _vm.state.showRadio ? "pl-8 sm:pl-0" : ""],
147
- style: {
148
- "flex-grow": _vm.flexGrow[2] || 0,
149
- "flex-basis": _vm.flexBasis[2] || "auto"
150
- },
151
- attrs: {
152
- "data-tag": "tiny-column-list-item-column3"
153
- }
154
- }, [_vm._t("column3")], 2) : _vm._e(), _vm.slots.column4 && _vm.slots.column4() ? _c("div", {
155
- staticClass: "min-w-[theme(spacing.40)] overflow-hidden pr-0 sm:pr-5 mt-1 sm:mt-0 pt-0 sm:pt-1",
156
- class: [_vm.state.showCheckbox || _vm.state.showRadio ? "pl-8 sm:pl-0" : ""],
157
- style: {
158
- "flex-grow": _vm.flexGrow[3] || 0,
159
- "flex-basis": _vm.flexBasis[3] || "auto"
160
- },
161
- attrs: {
162
- "data-tag": "tiny-column-list-item-column4"
163
- }
164
- }, [_vm._t("column4")], 2) : _vm._e()]), _vm.state.effectOptions.length || _vm.slots.operate && _vm.slots.operate() ? _c("hr", {
165
- staticClass: "block sm:hidden mt-2.5 -mx-3 border-t-0.5 border-t-color-border-separator"
166
- }) : _vm._e(), _vm.state.effectOptions.length || _vm.slots.operate && _vm.slots.operate() ? _c("div", {
167
- staticClass: "w-full sm:w-auto px-0 sm:pl-5 sm:pr-1 h-12 sm:h-auto flex flex-row sm:flex-col items-center justify-around sm:justify-center sm:items-start shadow-none sm:shadow-[-6px_0px_5px_-5px_#e8ebef] shrink-0 text-color-text-primary",
168
- style: {
169
- flexBasis: _vm.operateFlexBasis
170
- },
171
- attrs: {
172
- "data-tag": "tiny-column-list-item-operatebox"
173
- }
174
- }, [_vm._t("operate", function() {
175
- return [_vm._l(_vm.state.effectOptions.slice(0, _vm.state.sliceNum), function(item, index) {
176
- return _c("div", {
177
- key: item.text + index,
178
- staticClass: "cursor-pointer mb-0 sm:mb-2 line-clamp-1",
179
- class: [item.disabled ? "text-color-text-disabled cursor-not-allowed" : ""],
180
- attrs: {
181
- "data-tag": "tiny-column-list-item-operate"
182
- },
183
- on: {
184
- "click": function click($event) {
185
- $event.stopPropagation();
186
- return _vm.handelIconClick(item, index, $event);
187
- }
188
- }
189
- }, [_c(item.icon, {
190
- tag: "component",
191
- staticClass: "w-4 h-4",
192
- class: [item.disabled ? "fill-color-icon-disabled" : ""]
193
- }), item.text ? _c("span", {
194
- staticClass: "ml-1 align-middle"
195
- }, [_vm._v(_vm._s(item.text))]) : _vm._e()], 1);
196
- }), _vm.state.effectOptions.length === _vm.state.iconNum ? _c("div", {
197
- staticClass: "cursor-pointer",
198
- class: [_vm.state.effectOptions[_vm.state.sliceNum].disabled ? "text-color-text-disabled cursor-not-allowed" : ""],
199
- attrs: {
200
- "data-tag": "tiny-column-list-item-iconnum"
201
- },
202
- on: {
203
- "click": function click($event) {
204
- $event.stopPropagation();
205
- return _vm.handelIconClick(_vm.state.effectOptions[_vm.state.sliceNum], _vm.state.sliceNum, $event);
206
- }
207
- }
208
- }, [_c(_vm.state.effectOptions[_vm.state.sliceNum].icon, {
209
- tag: "component",
210
- staticClass: "w-4 h-4",
211
- class: [_vm.state.effectOptions[_vm.state.sliceNum].disabled ? "fill-color-icon-disabled" : ""]
212
- }), _vm.state.effectOptions[_vm.state.sliceNum].text ? _c("span", {
213
- staticClass: "ml-1 align-middle"
214
- }, [_vm._v(_vm._s(_vm.state.effectOptions[_vm.state.sliceNum].text))]) : _vm._e()], 1) : _vm._e(), _vm.state.effectOptions.length > _vm.state.iconNum ? _c("tiny-dropdown", {
215
- attrs: {
216
- "show-self-icon": ""
217
- },
218
- nativeOn: {
219
- "click": function click($event) {
220
- $event.stopPropagation();
221
- }
222
- },
223
- scopedSlots: _vm._u([{
224
- key: "dropdown",
225
- fn: function fn() {
226
- return [_c("tiny-dropdown-menu", {
227
- attrs: {
228
- "placement": "bottom"
229
- }
230
- }, _vm._l(_vm.state.effectOptions.slice(_vm.state.sliceNum), function(item, index) {
231
- return _c("tiny-dropdown-item", {
232
- key: item.text + index
233
- }, [_c("div", {
234
- class: ["px-2", item.disabled ? "text-color-text-disabled cursor-not-allowed" : ""],
235
- on: {
236
- "click": function click($event) {
237
- $event.stopPropagation();
238
- return _vm.handelIconClick(item, index + _vm.state.sliceNum, $event);
239
- }
240
- }
241
- }, [_c(item.icon, {
242
- tag: "component",
243
- staticClass: "w-4 h-4",
244
- class: [item.disabled ? "fill-color-icon-disabled" : ""]
245
- }), item.text ? _c("span", [_vm._v(_vm._s(item.text))]) : _vm._e()], 1)]);
246
- }), 1)];
247
- },
248
- proxy: true
249
- }], null, false, 3388098432)
250
- }, [_c(_vm.iconMore, {
251
- tag: "component",
252
- staticClass: "w-4 h-4"
253
- }), _vm.state.effectOptions[0].text ? _c("span", {
254
- staticClass: "ml-1 text-color-text-primary"
255
- }, [_vm._v(_vm._s(_vm.t("ui.base.more")))]) : _vm._e()], 1) : _vm._e()];
256
- })], 2) : _vm._e()]);
257
- };
258
- var staticRenderFns = [];
259
53
  var $constants = {
260
54
  COLUMN_GROUP: "ColumnListGroup"
261
55
  };
262
- var __vue2_script = defineComponent({
56
+ var _sfc_main = defineComponent({
263
57
  name: $prefix + "ColumnListItem",
264
58
  emits: ["icon-click", "update:modelValue", "change", "click"],
265
59
  components: {
@@ -355,17 +149,292 @@ var __vue2_script = defineComponent({
355
149
  });
356
150
  }
357
151
  });
358
- var __cssModules = {};
359
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
360
- function __vue2_injectStyles(context) {
361
- for (var o in __cssModules) {
362
- this[o] = __cssModules[o];
363
- }
152
+ var _hoisted_1 = {
153
+ key: 0,
154
+ "data-tag": "tiny-column-list-item-checkbox",
155
+ class: "float-left sm:float-none mr-3 [&_[data-tag=tiny-checkbox]]:p-0 [&_[data-tag=tiny-checkbox]>span>span]:p-0 [&_[data-tag=tiny-checkbox]>span:nth-child(2)]:hidden"
156
+ };
157
+ var _hoisted_2 = {
158
+ key: 1,
159
+ "data-tag": "tiny-column-list-item-radio",
160
+ class: "float-left sm:float-none mr-1.5 sm:mr-0 [&_[role=radio]]:w-6 [&_[role=radio]]:h-5 [&_[role=radio]_span_span]:p-0"
161
+ };
162
+ var _hoisted_3 = /* @__PURE__ */ createElementVNode(
163
+ "span",
164
+ null,
165
+ null,
166
+ -1
167
+ /* HOISTED */
168
+ );
169
+ var _hoisted_4 = ["src"];
170
+ var _hoisted_5 = {
171
+ "data-tag": "tiny-column-list-item-column1",
172
+ class: "block text-left sm:flex flex-auto flex-wrap"
173
+ };
174
+ var _hoisted_6 = {
175
+ key: 3,
176
+ class: "block sm:hidden mt-2.5 -mx-3 border-t-0.5 border-t-color-border-separator"
177
+ };
178
+ var _hoisted_7 = ["onClick"];
179
+ var _hoisted_8 = {
180
+ key: 0,
181
+ class: "ml-1 align-middle"
182
+ };
183
+ var _hoisted_9 = {
184
+ key: 0,
185
+ class: "ml-1 align-middle"
186
+ };
187
+ var _hoisted_10 = {
188
+ key: 0,
189
+ class: "ml-1 text-color-text-primary"
190
+ };
191
+ var _hoisted_11 = ["onClick"];
192
+ var _hoisted_12 = {
193
+ key: 0
194
+ };
195
+ function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
196
+ var _component_tiny_checkbox = resolveComponent("tiny-checkbox");
197
+ var _component_tiny_radio = resolveComponent("tiny-radio");
198
+ var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
199
+ var _component_tiny_dropdown_menu = resolveComponent("tiny-dropdown-menu");
200
+ var _component_tiny_dropdown = resolveComponent("tiny-dropdown");
201
+ return openBlock(), createElementBlock(
202
+ "div",
203
+ {
204
+ "data-tag": "tiny-column-list-item",
205
+ role: "column-list-item",
206
+ class: normalizeClass(["block sm:flex bg-color-bg-1 w-full py-2.5 px-3 sm:pb-2.5 text-sm sm:text-xs border-color-border-separator", _ctx.m(_ctx.state.effectOptions.length ? "pb-0" : "pb-3", _ctx.image && !_ctx.state.showCheckbox && !_ctx.state.showRadio ? "pl-4" : "pl-3", _ctx.state.type === "list" ? "pl-0 pr-0 border-b-0.5 sm:border-b-px [&:last-child]:border-none" : "border-0.5 sm:border rounded-lg sm:rounded hover:shadow", _ctx.customClass)]),
207
+ onClick: _cache[4] || (_cache[4] = function($event) {
208
+ return _ctx.$emit("click", $event);
209
+ })
210
+ },
211
+ [_ctx.state.showCheckbox ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_tiny_checkbox, {
212
+ modelValue: _ctx.state.model,
213
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
214
+ return _ctx.state.model = $event;
215
+ }),
216
+ disabled: _ctx.state.disabled,
217
+ label: _ctx.label,
218
+ onChange: _ctx.handleChange
219
+ }, null, 8, ["modelValue", "disabled", "label", "onChange"])])) : createCommentVNode("v-if", true), _ctx.state.showRadio ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_tiny_radio, {
220
+ modelValue: _ctx.state.model,
221
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
222
+ return _ctx.state.model = $event;
223
+ }),
224
+ disabled: _ctx.state.disabled,
225
+ label: _ctx.label,
226
+ onChange: _ctx.handleChange
227
+ }, {
228
+ default: withCtx(function() {
229
+ return [_hoisted_3];
230
+ }),
231
+ _: 1
232
+ /* STABLE */
233
+ }, 8, ["modelValue", "disabled", "label", "onChange"])])) : createCommentVNode("v-if", true), _ctx.image || _ctx.slots.image && _ctx.slots.image() ? (openBlock(), createElementBlock(
234
+ "div",
235
+ {
236
+ key: 2,
237
+ "data-tag": "tiny-column-list-item-image",
238
+ class: normalizeClass(["float-left block sm:flex mr-3 shrink-0 pt-1", [_ctx.state.size === "small" ? "w-9 h-11" : "w-14 sm:w-11 h-16"]])
239
+ },
240
+ [renderSlot(_ctx.$slots, "image", {}, function() {
241
+ return [typeof _ctx.image === "string" ? (openBlock(), createElementBlock("img", {
242
+ key: 0,
243
+ src: _ctx.image,
244
+ class: normalizeClass(["rounded", [_ctx.state.size === "small" ? "w-9 h-9" : "w-14 sm:w-11 h-14 sm:h-11"]])
245
+ }, null, 10, _hoisted_4)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.image), {
246
+ key: 1,
247
+ class: normalizeClass(["rounded", [_ctx.state.size === "small" ? "w-9 h-9" : "w-14 sm:w-11 h-14 sm:h-11"]])
248
+ }, null, 8, ["class"]))];
249
+ })],
250
+ 2
251
+ /* CLASS */
252
+ )) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_5, [_ctx.slots.column1 && _ctx.slots.column1() ? (openBlock(), createElementBlock(
253
+ "div",
254
+ {
255
+ key: 0,
256
+ class: "min-w-[theme(spacing.40)] overflow-hidden sm:ml-0 pr-0 sm:pr-5",
257
+ style: normalizeStyle({
258
+ "flex-grow": _ctx.flexGrow[0] || 0,
259
+ "flex-basis": _ctx.flexBasis[0] || "auto"
260
+ })
261
+ },
262
+ [renderSlot(_ctx.$slots, "column1")],
263
+ 4
264
+ /* STYLE */
265
+ )) : createCommentVNode("v-if", true), _ctx.slots.column2 && _ctx.slots.column2() ? (openBlock(), createElementBlock(
266
+ "div",
267
+ {
268
+ key: 1,
269
+ "data-tag": "tiny-column-list-item-column2",
270
+ class: normalizeClass(["min-w-[theme(spacing.40)] overflow-hidden pr-0 sm:pr-5 mt-1 sm:mt-0 pt-0 sm:pt-1", [_ctx.state.showCheckbox || _ctx.state.showRadio ? "pl-8 sm:pl-0" : ""]]),
271
+ style: normalizeStyle({
272
+ "flex-grow": _ctx.flexGrow[1] || 0,
273
+ "flex-basis": _ctx.flexBasis[1] || "auto"
274
+ })
275
+ },
276
+ [renderSlot(_ctx.$slots, "column2")],
277
+ 6
278
+ /* CLASS, STYLE */
279
+ )) : createCommentVNode("v-if", true), _ctx.slots.column3 && _ctx.slots.column3() ? (openBlock(), createElementBlock(
280
+ "div",
281
+ {
282
+ key: 2,
283
+ "data-tag": "tiny-column-list-item-column3",
284
+ class: normalizeClass(["min-w-[theme(spacing.40)] overflow-hidden pr-0 sm:pr-5 mt-1 sm:mt-0 pt-0 sm:pt-1", [_ctx.state.showCheckbox || _ctx.state.showRadio ? "pl-8 sm:pl-0" : ""]]),
285
+ style: normalizeStyle({
286
+ "flex-grow": _ctx.flexGrow[2] || 0,
287
+ "flex-basis": _ctx.flexBasis[2] || "auto"
288
+ })
289
+ },
290
+ [renderSlot(_ctx.$slots, "column3")],
291
+ 6
292
+ /* CLASS, STYLE */
293
+ )) : createCommentVNode("v-if", true), _ctx.slots.column4 && _ctx.slots.column4() ? (openBlock(), createElementBlock(
294
+ "div",
295
+ {
296
+ key: 3,
297
+ "data-tag": "tiny-column-list-item-column4",
298
+ class: normalizeClass(["min-w-[theme(spacing.40)] overflow-hidden pr-0 sm:pr-5 mt-1 sm:mt-0 pt-0 sm:pt-1", [_ctx.state.showCheckbox || _ctx.state.showRadio ? "pl-8 sm:pl-0" : ""]]),
299
+ style: normalizeStyle({
300
+ "flex-grow": _ctx.flexGrow[3] || 0,
301
+ "flex-basis": _ctx.flexBasis[3] || "auto"
302
+ })
303
+ },
304
+ [renderSlot(_ctx.$slots, "column4")],
305
+ 6
306
+ /* CLASS, STYLE */
307
+ )) : createCommentVNode("v-if", true)]), _ctx.state.effectOptions.length || _ctx.slots.operate && _ctx.slots.operate() ? (openBlock(), createElementBlock("hr", _hoisted_6)) : createCommentVNode("v-if", true), _ctx.state.effectOptions.length || _ctx.slots.operate && _ctx.slots.operate() ? (openBlock(), createElementBlock(
308
+ "div",
309
+ {
310
+ key: 4,
311
+ "data-tag": "tiny-column-list-item-operatebox",
312
+ style: normalizeStyle({
313
+ flexBasis: _ctx.operateFlexBasis
314
+ }),
315
+ class: "w-full sm:w-auto px-0 sm:pl-5 sm:pr-1 h-12 sm:h-auto flex flex-row sm:flex-col items-center justify-around sm:justify-center sm:items-start shadow-none sm:shadow-[-6px_0px_5px_-5px_#e8ebef] shrink-0 text-color-text-primary"
316
+ },
317
+ [renderSlot(_ctx.$slots, "operate", {}, function() {
318
+ return [(openBlock(true), createElementBlock(
319
+ Fragment,
320
+ null,
321
+ renderList(_ctx.state.effectOptions.slice(0, _ctx.state.sliceNum), function(item, index) {
322
+ return openBlock(), createElementBlock("div", {
323
+ "data-tag": "tiny-column-list-item-operate",
324
+ class: normalizeClass(["cursor-pointer mb-0 sm:mb-2 line-clamp-1", [item.disabled ? "text-color-text-disabled cursor-not-allowed" : ""]]),
325
+ key: item.text + index,
326
+ onClick: withModifiers(function($event) {
327
+ return _ctx.handelIconClick(item, index, $event);
328
+ }, ["stop"])
329
+ }, [(openBlock(), createBlock(resolveDynamicComponent(item.icon), {
330
+ class: normalizeClass(["w-4 h-4", [item.disabled ? "fill-color-icon-disabled" : ""]])
331
+ }, null, 8, ["class"])), item.text ? (openBlock(), createElementBlock(
332
+ "span",
333
+ _hoisted_8,
334
+ toDisplayString(item.text),
335
+ 1
336
+ /* TEXT */
337
+ )) : createCommentVNode("v-if", true)], 10, _hoisted_7);
338
+ }),
339
+ 128
340
+ /* KEYED_FRAGMENT */
341
+ )), _ctx.state.effectOptions.length === _ctx.state.iconNum ? (openBlock(), createElementBlock(
342
+ "div",
343
+ {
344
+ key: 0,
345
+ "data-tag": "tiny-column-list-item-iconnum",
346
+ class: normalizeClass(["cursor-pointer", [_ctx.state.effectOptions[_ctx.state.sliceNum].disabled ? "text-color-text-disabled cursor-not-allowed" : ""]]),
347
+ onClick: _cache[2] || (_cache[2] = withModifiers(function($event) {
348
+ return _ctx.handelIconClick(_ctx.state.effectOptions[_ctx.state.sliceNum], _ctx.state.sliceNum, $event);
349
+ }, ["stop"]))
350
+ },
351
+ [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.effectOptions[_ctx.state.sliceNum].icon), {
352
+ class: normalizeClass(["w-4 h-4", [_ctx.state.effectOptions[_ctx.state.sliceNum].disabled ? "fill-color-icon-disabled" : ""]])
353
+ }, null, 8, ["class"])), _ctx.state.effectOptions[_ctx.state.sliceNum].text ? (openBlock(), createElementBlock(
354
+ "span",
355
+ _hoisted_9,
356
+ toDisplayString(_ctx.state.effectOptions[_ctx.state.sliceNum].text),
357
+ 1
358
+ /* TEXT */
359
+ )) : createCommentVNode("v-if", true)],
360
+ 2
361
+ /* CLASS */
362
+ )) : createCommentVNode("v-if", true), _ctx.state.effectOptions.length > _ctx.state.iconNum ? (openBlock(), createBlock(_component_tiny_dropdown, {
363
+ key: 1,
364
+ "show-self-icon": "",
365
+ onClick: _cache[3] || (_cache[3] = withModifiers(function() {
366
+ }, ["stop"]))
367
+ }, {
368
+ dropdown: withCtx(function() {
369
+ return [createVNode(_component_tiny_dropdown_menu, {
370
+ placement: "bottom"
371
+ }, {
372
+ default: withCtx(function() {
373
+ return [(openBlock(true), createElementBlock(
374
+ Fragment,
375
+ null,
376
+ renderList(_ctx.state.effectOptions.slice(_ctx.state.sliceNum), function(item, index) {
377
+ return openBlock(), createBlock(
378
+ _component_tiny_dropdown_item,
379
+ {
380
+ key: item.text + index
381
+ },
382
+ {
383
+ default: withCtx(function() {
384
+ return [createElementVNode("div", {
385
+ onClick: withModifiers(function($event) {
386
+ return _ctx.handelIconClick(item, index + _ctx.state.sliceNum, $event);
387
+ }, ["stop"]),
388
+ class: normalizeClass(["px-2", item.disabled ? "text-color-text-disabled cursor-not-allowed" : ""])
389
+ }, [(openBlock(), createBlock(resolveDynamicComponent(item.icon), {
390
+ class: normalizeClass(["w-4 h-4", [item.disabled ? "fill-color-icon-disabled" : ""]])
391
+ }, null, 8, ["class"])), item.text ? (openBlock(), createElementBlock(
392
+ "span",
393
+ _hoisted_12,
394
+ toDisplayString(item.text),
395
+ 1
396
+ /* TEXT */
397
+ )) : createCommentVNode("v-if", true)], 10, _hoisted_11)];
398
+ }),
399
+ _: 2
400
+ /* DYNAMIC */
401
+ },
402
+ 1024
403
+ /* DYNAMIC_SLOTS */
404
+ );
405
+ }),
406
+ 128
407
+ /* KEYED_FRAGMENT */
408
+ ))];
409
+ }),
410
+ _: 1
411
+ /* STABLE */
412
+ })];
413
+ }),
414
+ default: withCtx(function() {
415
+ return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconMore), {
416
+ class: "w-4 h-4"
417
+ })), _ctx.state.effectOptions[0].text ? (openBlock(), createElementBlock(
418
+ "span",
419
+ _hoisted_10,
420
+ toDisplayString(_ctx.t("ui.base.more")),
421
+ 1
422
+ /* TEXT */
423
+ )) : createCommentVNode("v-if", true)];
424
+ }),
425
+ _: 1
426
+ /* STABLE */
427
+ })) : createCommentVNode("v-if", true)];
428
+ })],
429
+ 4
430
+ /* STYLE */
431
+ )) : createCommentVNode("v-if", true)],
432
+ 2
433
+ /* CLASS */
434
+ );
364
435
  }
365
- var ColumnListItem = /* @__PURE__ */ function() {
366
- return __component__.exports;
367
- }();
368
- var version = "2.22.0";
436
+ var ColumnListItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
437
+ var version = "3.22.0";
369
438
  ColumnListItem.model = {
370
439
  prop: "modelValue",
371
440
  event: "update:modelValue"
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-column-list-item",
3
- "version": "2.22.0",
3
+ "version": "3.22.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentinyvue/vue-checkbox": "~2.22.0",
11
- "@opentinyvue/vue-common": "~2.22.0",
12
- "@opentinyvue/vue-dropdown": "~2.22.0",
13
- "@opentinyvue/vue-dropdown-item": "~2.22.0",
14
- "@opentinyvue/vue-dropdown-menu": "~2.22.0",
15
- "@opentinyvue/vue-icon": "~2.22.0",
10
+ "@opentinyvue/vue-checkbox": "~3.22.0",
11
+ "@opentinyvue/vue-common": "~3.22.0",
12
+ "@opentinyvue/vue-dropdown": "~3.22.0",
13
+ "@opentinyvue/vue-dropdown-item": "~3.22.0",
14
+ "@opentinyvue/vue-dropdown-menu": "~3.22.0",
15
+ "@opentinyvue/vue-icon": "~3.22.0",
16
16
  "@opentinyvue/vue-renderless": "~3.22.0",
17
- "@opentinyvue/vue-radio": "~2.22.0"
17
+ "@opentinyvue/vue-radio": "~3.22.0"
18
18
  },
19
19
  "license": "MIT",
20
20
  "types": "index.d.ts"
@@ -1,2 +1,165 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
2
+ _constants: {
3
+ type: ObjectConstructor;
4
+ default: () => {
5
+ COLUMN_GROUP: string;
6
+ };
7
+ };
8
+ modelValue: {};
9
+ label: {};
10
+ data: {
11
+ type: ObjectConstructor;
12
+ default: () => {};
13
+ };
14
+ options: {
15
+ type: ArrayConstructor;
16
+ default: () => never[];
17
+ };
18
+ flexGrow: {
19
+ type: ArrayConstructor;
20
+ default: () => number[];
21
+ validator(value: unknown): any;
22
+ };
23
+ flexBasis: {
24
+ type: ArrayConstructor;
25
+ default: () => never[];
26
+ };
27
+ image: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ iconMore: {
32
+ type: (StringConstructor | ObjectConstructor)[];
33
+ default: () => import("@vue/reactivity").Raw<import("@vue/runtime-core").DefineComponent<{}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
34
+ [key: string]: any;
35
+ }>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{}>>, {}, {}>>;
36
+ };
37
+ size: {
38
+ type: StringConstructor;
39
+ default: string;
40
+ };
41
+ showCheckbox: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ showRadio: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ disabled: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ type: {
54
+ type: StringConstructor;
55
+ default: string;
56
+ };
57
+ customClass: {
58
+ type: StringConstructor;
59
+ default: string;
60
+ };
61
+ operateFlexBasis: StringConstructor;
62
+ tiny_mode: StringConstructor;
63
+ tiny_mode_root: BooleanConstructor;
64
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
65
+ tiny_renderless: FunctionConstructor;
66
+ tiny_theme: StringConstructor;
67
+ tiny_chart_theme: ObjectConstructor;
68
+ }, {
69
+ t: (this: any, path: any, options?: any) => any;
70
+ vm: any;
71
+ f: (props: any, attrs?: {}) => {};
72
+ a: (attrs: any, filters: any, include: any) => {};
73
+ d: (props: any) => void;
74
+ dp: (props: any) => void;
75
+ gcls: (key: any) => any;
76
+ m: (...cssClasses: any[]) => string;
77
+ }, any, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "click" | "update:modelValue" | "icon-click")[], "change" | "click" | "update:modelValue" | "icon-click", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
78
+ _constants: {
79
+ type: ObjectConstructor;
80
+ default: () => {
81
+ COLUMN_GROUP: string;
82
+ };
83
+ };
84
+ modelValue: {};
85
+ label: {};
86
+ data: {
87
+ type: ObjectConstructor;
88
+ default: () => {};
89
+ };
90
+ options: {
91
+ type: ArrayConstructor;
92
+ default: () => never[];
93
+ };
94
+ flexGrow: {
95
+ type: ArrayConstructor;
96
+ default: () => number[];
97
+ validator(value: unknown): any;
98
+ };
99
+ flexBasis: {
100
+ type: ArrayConstructor;
101
+ default: () => never[];
102
+ };
103
+ image: {
104
+ type: StringConstructor;
105
+ default: string;
106
+ };
107
+ iconMore: {
108
+ type: (StringConstructor | ObjectConstructor)[];
109
+ default: () => import("@vue/reactivity").Raw<import("@vue/runtime-core").DefineComponent<{}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
110
+ [key: string]: any;
111
+ }>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{}>>, {}, {}>>;
112
+ };
113
+ size: {
114
+ type: StringConstructor;
115
+ default: string;
116
+ };
117
+ showCheckbox: {
118
+ type: BooleanConstructor;
119
+ default: boolean;
120
+ };
121
+ showRadio: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ disabled: {
126
+ type: BooleanConstructor;
127
+ default: boolean;
128
+ };
129
+ type: {
130
+ type: StringConstructor;
131
+ default: string;
132
+ };
133
+ customClass: {
134
+ type: StringConstructor;
135
+ default: string;
136
+ };
137
+ operateFlexBasis: StringConstructor;
138
+ tiny_mode: StringConstructor;
139
+ tiny_mode_root: BooleanConstructor;
140
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
141
+ tiny_renderless: FunctionConstructor;
142
+ tiny_theme: StringConstructor;
143
+ tiny_chart_theme: ObjectConstructor;
144
+ }>> & {
145
+ onChange?: ((...args: any[]) => any) | undefined;
146
+ onClick?: ((...args: any[]) => any) | undefined;
147
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
148
+ "onIcon-click"?: ((...args: any[]) => any) | undefined;
149
+ }, {
150
+ disabled: boolean;
151
+ size: string;
152
+ type: string;
153
+ data: Record<string, any>;
154
+ options: unknown[];
155
+ image: string;
156
+ customClass: string;
157
+ tiny_mode_root: boolean;
158
+ _constants: Record<string, any>;
159
+ flexBasis: unknown[];
160
+ flexGrow: unknown[];
161
+ showCheckbox: boolean;
162
+ showRadio: boolean;
163
+ iconMore: string | Record<string, any>;
164
+ }, {}>;
2
165
  export default _default;