- {this.$slots.default()}
+
+ {slots.default()}
);
}
- },
- },
+ };
- render() {
- const { color, size, type, vertical } = this;
+ const spinnerStyle = computed(() => {
+ const style = {
+ color: props.color,
+ };
- const style = { color };
- if (size) {
- const iconSize = addUnit(size);
- style.width = iconSize;
- style.height = iconSize;
- }
+ if (props.size) {
+ const size = addUnit(props.size);
+ style.width = size;
+ style.height = size;
+ }
- return (
-
-
- {type === 'spinner' ? SpinIcon : CircularIcon}
-
- {this.genLoadingText()}
-
- );
+ return style;
+ });
+
+ return () => {
+ const { type, vertical } = props;
+
+ return (
+
+
+ {type === 'spinner' ? SpinIcon : CircularIcon}
+
+ {renderText()}
+
+ );
+ };
},
});