You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/qrcode/demo/customColor.vue

34 lines
606 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<docs>
---
order: 5
title:
zh-CN: 自定义颜色
en-US: Custom Color
---
## zh-CN
通过设置 `color` 自定义二维码颜色通过设置 `style` 自定义背景颜色
## en-US
Custom Color.
</docs>
<template>
<a-space>
<a-qrcode value="http://www.antdv.com" :color="token.colorSuccessText" />
<a-qrcode
value="http://www.antdv.com"
:color="token.colorInfoText"
:bg-color="token.colorBgLayout"
/>
</a-space>
</template>
<script lang="ts" setup>
import { theme } from 'ant-design-vue';
const { useToken } = theme;
const { token } = useToken();
</script>