|
|
@@ -1,7 +1,8 @@
|
|
|
<script lang="ts">
|
|
|
-import { h, PropType, computed } from 'vue';
|
|
|
+import { h, PropType } from 'vue';
|
|
|
import { createComponent } from '@/utils/create';
|
|
|
const { componentName, create } = createComponent('icon');
|
|
|
+import { pxCheck } from '@/utils/pxCheck';
|
|
|
|
|
|
export default create({
|
|
|
props: {
|
|
|
@@ -22,10 +23,6 @@ export default create({
|
|
|
return props.name ? props.name.indexOf('/') !== -1 : false;
|
|
|
};
|
|
|
|
|
|
- const pxCheck = (value: string | number) => {
|
|
|
- return typeof Number(value) === 'number' ? `${value}px` : String(value);
|
|
|
- };
|
|
|
-
|
|
|
return () => {
|
|
|
const _isImage = isImage();
|
|
|
return h(
|