winbox-ui-next
Version:
We Design Vue 2.0: A Vue.js 3 UI Library
78 lines (77 loc) • 2.73 kB
JavaScript
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode } from "vue";
import { getPrefixCls } from "../../_utils/global-config.js";
import { isNumber } from "../../_utils/is.js";
import _export_sfc from "../../_virtual/plugin-vue_export-helper";
const _sfc_main = defineComponent({
name: "IconStorage",
props: {
size: {
type: [Number, String]
},
strokeWidth: {
type: Number,
default: 4
},
strokeLinecap: {
type: String,
default: "butt",
validator: (value) => {
return ["butt", "round", "square"].includes(value);
}
},
strokeLinejoin: {
type: String,
default: "miter",
validator: (value) => {
return ["arcs", "bevel", "miter", "miter-clip", "round"].includes(value);
}
},
spin: Boolean
},
setup(props) {
const prefixCls = getPrefixCls("icon");
const cls = computed(() => [prefixCls, `${prefixCls}-storage`, { [`${prefixCls}-spin`]: props.spin }]);
const innerStyle = computed(() => {
if (props.size) {
return {
fontSize: isNumber(props.size) ? `${props.size}px` : props.size
};
}
return void 0;
});
return {
cls,
innerStyle
};
}
});
const _hoisted_1 = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M7 18h34v12H7V18ZM40 6H8a1 1 0 0 0-1 1v11h34V7a1 1 0 0 0-1-1ZM7 30h34v11a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V30Z" }, null, -1);
const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", { d: "M13.02 36H13v.02h.02V36Z" }, null, -1);
const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", {
d: "M13 12v-2h-2v2h2Zm.02 0h2v-2h-2v2Zm0 .02v2h2v-2h-2Zm-.02 0h-2v2h2v-2ZM13 14h.02v-4H13v4Zm-1.98-2v.02h4V12h-4Zm2-1.98H13v4h.02v-4Zm1.98 2V12h-4v.02h4Z",
fill: "currentColor",
stroke: "none"
}, null, -1);
const _hoisted_5 = /* @__PURE__ */ createElementVNode("path", { d: "M13.02 24H13v.02h.02V24Z" }, null, -1);
const _hoisted_6 = [
_hoisted_2,
_hoisted_3,
_hoisted_4,
_hoisted_5
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("svg", {
viewBox: "0 0 48 48",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
stroke: "currentColor",
class: normalizeClass(_ctx.cls),
style: normalizeStyle(_ctx.innerStyle),
"stroke-width": _ctx.strokeWidth,
"stroke-linecap": _ctx.strokeLinecap,
"stroke-linejoin": _ctx.strokeLinejoin
}, _hoisted_6, 14, _hoisted_1);
}
var _IconStorage = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export { _IconStorage as default };