UNPKG

@arco-design/web-vue

Version:

Arco Design Vue 2.0: A Vue.js 3 UI Library

78 lines (77 loc) 2.5 kB
"use strict"; var vue = require("vue"); var globalConfig = require("../../_utils/global-config.js"); var is = require("../../_utils/is.js"); var pluginVue_exportHelper = require("../../_virtual/plugin-vue_export-helper.js"); const _sfc_main = vue.defineComponent({ name: "IconRotateLeft", 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); } }, rotate: Number, spin: Boolean }, emits: { click: (ev) => true }, setup(props, { emit }) { const prefixCls = globalConfig.getPrefixCls("icon"); const cls = vue.computed(() => [prefixCls, `${prefixCls}-rotate-left`, { [`${prefixCls}-spin`]: props.spin }]); const innerStyle = vue.computed(() => { const styles = {}; if (props.size) { styles.fontSize = is.isNumber(props.size) ? `${props.size}px` : props.size; } if (props.rotate) { styles.transform = `rotate(${props.rotate}deg)`; } return styles; }); const onClick = (ev) => { emit("click", ev); }; return { cls, innerStyle, onClick }; } }); const _hoisted_1 = ["stroke-width", "stroke-linecap", "stroke-linejoin"]; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", class: vue.normalizeClass(_ctx.cls), style: vue.normalizeStyle(_ctx.innerStyle), "stroke-width": _ctx.strokeWidth, "stroke-linecap": _ctx.strokeLinecap, "stroke-linejoin": _ctx.strokeLinejoin, onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)) }, _cache[1] || (_cache[1] = [ vue.createElementVNode("path", { d: "M10 22a1 1 0 0 1 1-1h20a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H11a1 1 0 0 1-1-1V22ZM23 11h11a6 6 0 0 1 6 6v6M22.5 12.893 19.587 11 22.5 9.107v3.786Z" }, null, -1) ]), 14, _hoisted_1); } var _IconRotateLeft = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["render", _sfc_render]]); module.exports = _IconRotateLeft;