使用示例

几种常见的嵌入方式,复制即用。

标准嵌入

引入脚本后,在页面任意位置放置组件标签即可。

<script src="https://ipwcc.fun/ip.js"></script>
<ip-geo-widget></ip-geo-widget>

自定义外观

通过 style 自定义容器外观(圆角、背景、内边距等)。

<ip-geo-widget style="padding:20px;background:#fff;border-radius:15px"></ip-geo-widget>

可配置属性

属性默认值说明
api-urlhttps://ipwcc.fun/ipcc.php自定义数据接口地址
themelight主题:light / dark
show-refreshtrue是否显示刷新按钮,设为 false 隐藏
<ip-geo-widget theme="dark" show-refresh="false"></ip-geo-widget>