@opentiny/vue-button-group
Advanced tools
Comparing version 3.12.0 to 3.13.0
@@ -19,2 +19,4 @@ function _extends() { | ||
var template = function template2(mode) { | ||
var _process$env; | ||
typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null; | ||
return PcTemplate; | ||
@@ -67,3 +69,3 @@ }; | ||
}); | ||
var version = "3.12.0"; | ||
var version = "3.13.0"; | ||
ButtonGroup.model = { | ||
@@ -70,0 +72,0 @@ prop: "modelValue", |
304
lib/pc.js
@@ -97,2 +97,6 @@ import { renderless, api } from "@opentiny/vue-renderless/button-group/vue"; | ||
}; | ||
var _hoisted_10 = { | ||
key: 1, | ||
class: "tiny-button-group--empty" | ||
}; | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
@@ -109,161 +113,169 @@ var _component_tiny_button = resolveComponent("tiny-button"); | ||
[renderSlot(_ctx.$slots, "default", {}, function() { | ||
return [!(_ctx.showMore && _ctx.showMore > 0) ? (openBlock(), createElementBlock("ul", _hoisted_1, [(openBlock(true), createElementBlock( | ||
return [_ctx.data.length > 0 ? (openBlock(), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.data, function(node, index) { | ||
return openBlock(), createElementBlock( | ||
"li", | ||
{ | ||
key: index, | ||
class: normalizeClass({ | ||
active: _ctx.state.value === node[_ctx.valueField] | ||
}) | ||
}, | ||
[createElementVNode("button", { | ||
class: normalizeClass(_ctx.getItemClass(node)), | ||
style: normalizeStyle({ | ||
height: _ctx.size === "medium" ? "42px" : _ctx.size === "small" ? "32px" : _ctx.size === "mini" ? "24px" : "", | ||
"line-height": _ctx.size === "medium" ? "40px" : _ctx.size === "small" ? "30px" : _ctx.size === "mini" ? "22px" : "" | ||
}), | ||
type: "button", | ||
onClick: function onClick($event) { | ||
return _ctx.handleClick(node); | ||
} | ||
}, toDisplayString(node[_ctx.textField]), 15, _hoisted_2), node.sup ? (openBlock(), createElementBlock( | ||
"span", | ||
{ | ||
key: 0 | ||
}, | ||
[!(_ctx.showMore && _ctx.showMore > 0) ? (openBlock(), createElementBlock("ul", _hoisted_1, [(openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.data, function(node, index) { | ||
return openBlock(), createElementBlock( | ||
"li", | ||
{ | ||
key: 0, | ||
class: normalizeClass(["tiny-group-item__sup", { | ||
"tiny-group-item__sup-text": !node.sup.slot && !node.sup.icon && node.sup.text, | ||
"tiny-group-item__sup-icon": !node.sup.slot && node.sup.icon | ||
}, typeof node.sup.class === "string" ? node.sup.class : ""].concat(Array.isArray(node.sup.class) ? node.sup.class : [])) | ||
key: index, | ||
class: normalizeClass({ | ||
active: _ctx.state.value === node[_ctx.valueField] | ||
}) | ||
}, | ||
[node.sup.slot ? renderSlot(_ctx.$slots, node.sup.slot, { | ||
key: 0, | ||
sup: node.sup | ||
}) : node.sup.icon ? (openBlock(), createBlock(resolveDynamicComponent(node.sup.icon), { | ||
key: 1 | ||
})) : node.sup.text ? (openBlock(), createElementBlock( | ||
[createElementVNode("button", { | ||
class: normalizeClass(_ctx.getItemClass(node)), | ||
style: normalizeStyle({ | ||
height: _ctx.size === "medium" ? "42px" : _ctx.size === "small" ? "32px" : _ctx.size === "mini" ? "24px" : "", | ||
"line-height": _ctx.size === "medium" ? "40px" : _ctx.size === "small" ? "30px" : _ctx.size === "mini" ? "22px" : "" | ||
}), | ||
type: "button", | ||
onClick: function onClick($event) { | ||
return _ctx.handleClick(node); | ||
} | ||
}, toDisplayString(node[_ctx.textField]), 15, _hoisted_2), node.sup ? (openBlock(), createElementBlock( | ||
"span", | ||
_hoisted_3, | ||
toDisplayString(node.sup.text), | ||
1 | ||
/* TEXT */ | ||
{ | ||
key: 0, | ||
class: normalizeClass(["tiny-group-item__sup", { | ||
"tiny-group-item__sup-text": !node.sup.slot && !node.sup.icon && node.sup.text, | ||
"tiny-group-item__sup-icon": !node.sup.slot && node.sup.icon | ||
}, typeof node.sup.class === "string" ? node.sup.class : ""].concat(Array.isArray(node.sup.class) ? node.sup.class : [])) | ||
}, | ||
[node.sup.slot ? renderSlot(_ctx.$slots, node.sup.slot, { | ||
key: 0, | ||
sup: node.sup | ||
}) : node.sup.icon ? (openBlock(), createBlock(resolveDynamicComponent(node.sup.icon), { | ||
key: 1 | ||
})) : node.sup.text ? (openBlock(), createElementBlock( | ||
"span", | ||
_hoisted_3, | ||
toDisplayString(node.sup.text), | ||
1 | ||
/* TEXT */ | ||
)) : createCommentVNode("v-if", true)], | ||
2 | ||
/* CLASS */ | ||
)) : createCommentVNode("v-if", true)], | ||
2 | ||
/* CLASS */ | ||
)) : createCommentVNode("v-if", true)], | ||
2 | ||
/* CLASS */ | ||
); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
))])) : (openBlock(), createElementBlock("ul", _hoisted_4, [(openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.state.buttonData, function(node, index) { | ||
return openBlock(), createElementBlock( | ||
"li", | ||
{ | ||
key: index, | ||
class: normalizeClass({ | ||
active: _ctx.state.value === node[_ctx.valueField] | ||
}) | ||
}, | ||
[createVNode(_component_tiny_button, { | ||
class: normalizeClass(_ctx.getItemClass(node)), | ||
onClick: function onClick($event) { | ||
return _ctx.handleClick(node); | ||
} | ||
}, { | ||
default: withCtx(function() { | ||
return [createTextVNode( | ||
toDisplayString(node[_ctx.textField]), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), | ||
_: 2 | ||
/* DYNAMIC */ | ||
}, 1032, ["class", "onClick"]), node.sup ? (openBlock(), createElementBlock( | ||
"span", | ||
); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
))])) : (openBlock(), createElementBlock("ul", _hoisted_4, [(openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.state.buttonData, function(node, index) { | ||
return openBlock(), createElementBlock( | ||
"li", | ||
{ | ||
key: 0, | ||
class: normalizeClass(["tiny-group-item__sup", { | ||
"tiny-group-item__sup-text": !node.sup.slot && !node.sup.icon && node.sup.text, | ||
"tiny-group-item__sup-icon": !node.sup.slot && node.sup.icon | ||
}, typeof node.sup.class === "string" ? node.sup.class : ""].concat(Array.isArray(node.sup.class) ? node.sup.class : [])) | ||
key: index, | ||
class: normalizeClass({ | ||
active: _ctx.state.value === node[_ctx.valueField] | ||
}) | ||
}, | ||
[node.sup.slot ? renderSlot(_ctx.$slots, node.sup.slot, { | ||
key: 0, | ||
sup: node.sup | ||
}) : node.sup.icon ? (openBlock(), createBlock(resolveDynamicComponent(node.sup.icon), { | ||
key: 1 | ||
})) : node.sup.text ? (openBlock(), createElementBlock( | ||
[createVNode(_component_tiny_button, { | ||
class: normalizeClass(_ctx.getItemClass(node)), | ||
onClick: function onClick($event) { | ||
return _ctx.handleClick(node); | ||
} | ||
}, { | ||
default: withCtx(function() { | ||
return [createTextVNode( | ||
toDisplayString(node[_ctx.textField]), | ||
1 | ||
/* TEXT */ | ||
)]; | ||
}), | ||
_: 2 | ||
/* DYNAMIC */ | ||
}, 1032, ["class", "onClick"]), node.sup ? (openBlock(), createElementBlock( | ||
"span", | ||
_hoisted_5, | ||
toDisplayString(node.sup.text), | ||
1 | ||
/* TEXT */ | ||
{ | ||
key: 0, | ||
class: normalizeClass(["tiny-group-item__sup", { | ||
"tiny-group-item__sup-text": !node.sup.slot && !node.sup.icon && node.sup.text, | ||
"tiny-group-item__sup-icon": !node.sup.slot && node.sup.icon | ||
}, typeof node.sup.class === "string" ? node.sup.class : ""].concat(Array.isArray(node.sup.class) ? node.sup.class : [])) | ||
}, | ||
[node.sup.slot ? renderSlot(_ctx.$slots, node.sup.slot, { | ||
key: 0, | ||
sup: node.sup | ||
}) : node.sup.icon ? (openBlock(), createBlock(resolveDynamicComponent(node.sup.icon), { | ||
key: 1 | ||
})) : node.sup.text ? (openBlock(), createElementBlock( | ||
"span", | ||
_hoisted_5, | ||
toDisplayString(node.sup.text), | ||
1 | ||
/* TEXT */ | ||
)) : createCommentVNode("v-if", true)], | ||
2 | ||
/* CLASS */ | ||
)) : createCommentVNode("v-if", true)], | ||
2 | ||
/* CLASS */ | ||
)) : createCommentVNode("v-if", true)], | ||
2 | ||
/* CLASS */ | ||
); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
)), _ctx.data.length > _ctx.showMore ? (openBlock(), createElementBlock("li", _hoisted_6, [createVNode(_component_tiny_popover, { | ||
"visible-arrow": false, | ||
width: "200", | ||
"popper-class": "tiny-group-item__more-popover" | ||
}, { | ||
reference: withCtx(function() { | ||
return [createVNode(_component_tiny_button, { | ||
class: "more-button" | ||
}, { | ||
default: withCtx(function() { | ||
return [createVNode(_component_icon_popup)]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
})]; | ||
}), | ||
default: withCtx(function() { | ||
return [createElementVNode("ul", _hoisted_7, [(openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.state.moreData, function(moreNode, index) { | ||
return openBlock(), createElementBlock("li", { | ||
key: index, | ||
class: normalizeClass({ | ||
active: _ctx.state.value === moreNode[_ctx.valueField], | ||
"more-item": true | ||
}), | ||
onClick: function onClick($event) { | ||
return _ctx.moreNodeClick(moreNode); | ||
} | ||
}, toDisplayString(moreNode[_ctx.textField]), 11, _hoisted_8); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
))])]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
})])) : createCommentVNode("v-if", true), _ctx.showEdit ? (openBlock(), createElementBlock("li", _hoisted_9, [createVNode(_component_tiny_button, { | ||
onClick: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.$emit("edit"); | ||
}), | ||
class: "edit-button" | ||
}, { | ||
default: withCtx(function() { | ||
return [createVNode(_component_icon_writing)]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
})])) : createCommentVNode("v-if", true)]))]; | ||
); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
)), _ctx.data.length > _ctx.showMore ? (openBlock(), createElementBlock("li", _hoisted_6, [createVNode(_component_tiny_popover, { | ||
"visible-arrow": false, | ||
width: "200", | ||
"popper-class": "tiny-group-item__more-popover" | ||
}, { | ||
reference: withCtx(function() { | ||
return [createVNode(_component_tiny_button, { | ||
class: "more-button" | ||
}, { | ||
default: withCtx(function() { | ||
return [createVNode(_component_icon_popup)]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
})]; | ||
}), | ||
default: withCtx(function() { | ||
return [createElementVNode("ul", _hoisted_7, [(openBlock(true), createElementBlock( | ||
Fragment, | ||
null, | ||
renderList(_ctx.state.moreData, function(moreNode, index) { | ||
return openBlock(), createElementBlock("li", { | ||
key: index, | ||
class: normalizeClass({ | ||
active: _ctx.state.value === moreNode[_ctx.valueField], | ||
"more-item": true | ||
}), | ||
onClick: function onClick($event) { | ||
return _ctx.moreNodeClick(moreNode); | ||
} | ||
}, toDisplayString(moreNode[_ctx.textField]), 11, _hoisted_8); | ||
}), | ||
128 | ||
/* KEYED_FRAGMENT */ | ||
))])]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
})])) : createCommentVNode("v-if", true), _ctx.showEdit ? (openBlock(), createElementBlock("li", _hoisted_9, [createVNode(_component_tiny_button, { | ||
onClick: _cache[0] || (_cache[0] = function($event) { | ||
return _ctx.$emit("edit"); | ||
}), | ||
class: "edit-button" | ||
}, { | ||
default: withCtx(function() { | ||
return [createVNode(_component_icon_writing)]; | ||
}), | ||
_: 1 | ||
/* STABLE */ | ||
})])) : createCommentVNode("v-if", true)]))], | ||
64 | ||
/* STABLE_FRAGMENT */ | ||
)) : (openBlock(), createElementBlock("span", _hoisted_10, " 暂无数据 "))]; | ||
})], | ||
@@ -270,0 +282,0 @@ 2 |
{ | ||
"name": "@opentiny/vue-button-group", | ||
"version": "3.12.0", | ||
"version": "3.13.0", | ||
"description": "", | ||
@@ -10,4 +10,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-common": "~3.12.0", | ||
"@opentiny/vue-renderless": "~3.12.0" | ||
"@opentiny/vue-common": "~3.13.0", | ||
"@opentiny/vue-renderless": "~3.13.0" | ||
}, | ||
@@ -14,0 +14,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20598
554
2
+ Added@opentiny/vue-common@3.13.1(transitive)
+ Added@opentiny/vue-locale@3.13.0(transitive)
+ Added@opentiny/vue-renderless@3.13.2(transitive)
+ Added@opentiny/vue-theme@3.13.3(transitive)
+ Added@opentiny/vue-theme-mobile@3.13.0(transitive)
- Removed@opentiny/vue-common@3.12.0(transitive)
- Removed@opentiny/vue-locale@3.12.0(transitive)
- Removed@opentiny/vue-renderless@3.12.1(transitive)
- Removed@opentiny/vue-theme@3.12.1(transitive)
- Removed@opentiny/vue-theme-mobile@3.12.0(transitive)
Updated@opentiny/vue-common@~3.13.0