@moohng/dui
Version:
基于 Vue 3 的轻量级组件库
83 lines (69 loc) • 3.01 kB
JavaScript
import { defineComponent, pushScopeId, popScopeId, openBlock, createBlock, withScopeId, createVNode } from 'vue';
var script = defineComponent({
name: 'icon-loading',
props: {
radian: {
type: [String, Number],
default: 0
},
rotation: {
type: Boolean,
default: false
}
}
});
const _withId = /*#__PURE__*/withScopeId("data-v-0c4b134f");
pushScopeId("data-v-0c4b134f");
const _hoisted_1 = /*#__PURE__*/createVNode("path", {
d: "M885.333333 512a372.864 372.864 0 0 0-165.290666-310.037333 32 32 0 1 1 35.712-53.12A436.864 436.864 0 0 1 949.333333 512c0 241.536-195.797333 437.333333-437.333333 437.333333-28.501333 0-42.794667-34.474667-22.613333-54.613333l75.989333-76.010667a32 32 0 0 1 45.248 45.248l-11.029333 11.050667C763.52 835.584 885.333333 688 885.333333 512z m-746.666666 0a372.906667 372.906667 0 0 0 167.466666 311.509333 32 32 0 0 1-35.328 53.333334A436.885333 436.885333 0 0 1 74.666667 512C74.666667 270.464 270.464 74.666667 512 74.666667c28.501333 0 42.794667 34.474667 22.613333 54.613333l-75.989333 76.010667a32 32 0 0 1-45.248-45.248l11.029333-11.050667C260.48 188.416 138.666667 336 138.666667 512z",
"p-id": "5953"
}, null, -1 /* HOISTED */);
popScopeId();
const render = /*#__PURE__*/_withId(function render(_ctx, _cache, $props, $setup, $data, $options) {
return (openBlock(), createBlock("svg", {
style: {transform: `rotate(${_ctx.radian}deg)`},
class: ["icon-refresh", {refreshing: _ctx.rotation}],
t: "1598426050497",
viewBox: "0 0 1024 1024",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
"p-id": "5952"
}, [
_hoisted_1
], 6 /* CLASS, STYLE */))
});
function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css_248z = ".icon-refresh[data-v-0c4b134f] {\n margin-top: -3px;\n margin-right: 8px;\n width: 22px;\n height: 22px;\n fill: currentColor;\n vertical-align: middle; }\n .icon-refresh[data-v-0c4b134f].refreshing {\n animation: rotation-0c4b134f 0.8s linear infinite; }\n\n@keyframes rotation-0c4b134f {\n from {\n transform: rotate(0); }\n to {\n transform: rotate(360deg); } }\n";
styleInject(css_248z);
script.render = render;
script.__scopeId = "data-v-0c4b134f";
script.__file = "src/components/icon-loading/icon-loading.vue";
const plugin = {
install: app => {
// 注册组件
app.component(script.name, script);
}
};
export default plugin;
export { plugin };