插件名称 | vueflags |
---|---|
发布时间 | 2020年6月21日 |
插件作者 | LeCoupa |
一个Vue.js组件,可为您的应用程序提供230多个国家/地区的单位。
2020年10月26日
10/04/2020
2020/06/18
# Yarn
$ yarn add @growthbunker/vueflags
# NPM
$ npm install @growthbunker/vueflags --save
1.导入并注册组件。
import VueFlags from "@growthbunker/vueflags";
Vue.use(VueFlags);
2.将组件插入模板,然后在code
道具中指定国家/地区缩写。
<template>
<gb-flag code="fr" />
</template>
3.更改标志的大小 : “nano” | “micro” | “mini” | “small” | “default” | “medium” | “large” | “huge”.
<template>
<gb-flag code="fr" size="small" />
</template>
4.或自定义平板的宽度/高度,如下所示:
<template>
<gb-flag code="fr" width="16" height="16" />
</template>