mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-01 13:46:34 +08:00
types(Icon): use tsx
This commit is contained in:
parent
97f12e3270
commit
5e09134656
@ -1,9 +1,10 @@
|
|||||||
|
import { PropType } from 'vue';
|
||||||
import { addUnit, createNamespace } from '../utils';
|
import { addUnit, createNamespace } from '../utils';
|
||||||
import Badge from '../badge';
|
import Badge from '../badge';
|
||||||
|
|
||||||
const [createComponent, bem] = createNamespace('icon');
|
const [createComponent, bem] = createNamespace('icon');
|
||||||
|
|
||||||
function isImage(name) {
|
function isImage(name?: string) {
|
||||||
return name ? name.indexOf('/') !== -1 : false;
|
return name ? name.indexOf('/') !== -1 : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ export default createComponent({
|
|||||||
badge: [Number, String],
|
badge: [Number, String],
|
||||||
color: String,
|
color: String,
|
||||||
tag: {
|
tag: {
|
||||||
type: String,
|
type: String as PropType<keyof HTMLElementTagNameMap>,
|
||||||
default: 'i',
|
default: 'i',
|
||||||
},
|
},
|
||||||
classPrefix: {
|
classPrefix: {
|
Loading…
x
Reference in New Issue
Block a user