Skip to content

Commit c19bd09

Browse files
committed
perf: use bootstrap with sass.
1 parent f194229 commit c19bd09

9 files changed

+863
-747
lines changed

README-ja.md

+33-68
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# qrcode.vue
22

3-
⚠️ 現在、Vue 3.xを使用している場合は、`qrcode.vue``3.x`にアップグレードしてください。
3+
⚠️ 現在、Vue 3.xを使用している場合は、`qrcode.vue` `3.x`にアップグレードしてください。
44

5-
🔒 Vue 2.xを使用している場合は、バージョン`1.x`を使用し続けてください。
5+
🔒 Vue 2.xを使用している場合は、バージョン `1.x` を使用し続けてください。
66

7-
[QRコード](https://en.wikipedia.org/wiki/QR_code)を生成するためのVue.jsコンポーネントです。Vue 2とVue 3の両方をサポートしています
7+
[QRコード](https://en.wikipedia.org/wiki/QR_code)を生成するための Vue.js コンポーネントです。Vue 2 と Vue 3 の両方をサポートしています
88

9-
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/scopewu/qrcode.vue/blob/master/LICENSE)
9+
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/scopewu/qrcode.vue/blob/main/LICENSE)
1010

1111
[English](./README.md)
1212

1313
## インストール
1414

15-
`qrcode.vue`コンポーネントをVue.jsアプリに使用できます
15+
`qrcode.vue`コンポーネントを Vue.js アプリに使用できます
1616

1717
```bash
1818
npm install --save qrcode.vue # yarn add qrcode.vue
@@ -45,7 +45,7 @@ createApp({
4545
}).mount('#root')
4646
```
4747

48-
- または、`*.vue`拡張子の単一ファイルコンポーネントで使用します:
48+
または、`*.vue` 拡張子の単一ファイルコンポーネントで使用します:
4949

5050
```html
5151
<template>
@@ -68,46 +68,7 @@ createApp({
6868
</script>
6969
```
7070

71-
- グラデーションの使用例
72-
73-
> グラデーションをサポートする `QrcodeVue` コンポーネントを使用するには、グラデーション関連のプロパティを渡すことができます:
74-
75-
```html
76-
<template>
77-
<qrcode-vue
78-
:size="size"
79-
:value="fullUrl"
80-
:level="level"
81-
:margin="margin"
82-
:render-as="renderAs"
83-
:background="background"
84-
:gradient="true"
85-
:gradient-type="gradientType"
86-
:gradient-start-color="gradientStartColor"
87-
:gradient-end-color="gradientEndColor"
88-
/>
89-
</template>
90-
91-
<script>
92-
export default {
93-
data() {
94-
return {
95-
size: 200,
96-
fullUrl: 'https://example.com',
97-
level: 'H',
98-
margin: 4,
99-
renderAs: 'svg', // or 'canvas'
100-
background: '#ffffff',
101-
gradient: true,
102-
gradientType: 'linear', // or 'radial'
103-
gradientStartColor: '#ff0000', // グラデーションの開始色
104-
gradientEndColor: '#0000ff', // グラデーションの終了色
105-
}
106-
},
107-
}
108-
</script>
109-
110-
- Vue 3で`TypeScript`を使用する場合:
71+
Vue 3で `TypeScript` を使用する場合:
11172

11273
```html
11374
<template>
@@ -135,10 +96,8 @@ export default {
13596
const background = ref('#ffffff')
13697
const foreground = ref('#000000')
13798
const margin = ref(0)
138-
const gradient = ref(false)
139-
const gradientType = ref<GradientType>('linear')
140-
const gradientStartColor = ref('#000000')
141-
const gradientEndColor = ref('#38bdf8')
99+
100+
// 画像の設定
142101
const imageSettings = ref<ImageSettings>({
143102
src: 'https://github.com/scopewu.png',
144103
width: 30,
@@ -147,6 +106,12 @@ export default {
147106
// y: 10,
148107
excavate: true,
149108
})
109+
110+
// グラデーション
111+
const gradient = ref(false)
112+
const gradientType = ref<GradientType>('linear')
113+
const gradientStartColor = ref('#000000')
114+
const gradientEndColor = ref('#38bdf8')
150115
</script>
151116
```
152117

@@ -201,6 +166,24 @@ QRコードの背景色。
201166

202167
QRコードの前景色。
203168

169+
### `image-settings`
170+
171+
- タイプ: `ImageSettings`
172+
- デフォルト: `{}`
173+
174+
```ts
175+
export type ImageSettings = {
176+
src: string, // The URL of image.
177+
x?: number, // The horizontal offset. When not specified, will center the image.
178+
y?: number, // The vertical offset. When not specified, will center the image.
179+
height: number, // The height of image
180+
width: number, // The height of image
181+
excavate?: boolean, // Whether or not to "excavate" the modules around the image.
182+
}
183+
```
184+
185+
The settings to support qrcode image logo.
186+
204187
### `gradient`
205188
206189
- タイプ:`boolean`
@@ -229,24 +212,6 @@ QRコードのグラデーション塗りつぶしを有効にします。
229212
230213
グラデーションの終了色。
231214
232-
### `image-settings`
233-
234-
- タイプ: `ImageSettings`
235-
- デフォルト: `{}`
236-
237-
```ts
238-
export type ImageSettings = {
239-
src: string, // The URL of image.
240-
x?: number, // The horizontal offset. When not specified, will center the image.
241-
y?: number, // The vertical offset. When not specified, will center the image.
242-
height: number, // The height of image
243-
width: number, // The height of image
244-
excavate?: boolean, // Whether or not to "excavate" the modules around the image.
245-
}
246-
```
247-
248-
The settings to support qrcode image logo.
249-
250215
### `class`
251216
252217
- タイプ:`string`

README-zh_cn.md

+32-67
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
一款 Vue.js 二维码组件,同时支持 Vue 2 和 Vue 3.
88

9-
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/scopewu/qrcode.vue/blob/master/LICENSE)
9+
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/scopewu/qrcode.vue/blob/main/LICENSE)
1010

1111
## 快速开始
1212

@@ -43,7 +43,7 @@ createApp({
4343
}).mount('#root')
4444
```
4545

46-
- 或者,在独有单文件扩展 `*.vue` 中使用:
46+
或者,在独有单文件扩展 `*.vue` 中使用:
4747

4848
```html
4949
<template>
@@ -66,46 +66,7 @@ createApp({
6666
</script>
6767
```
6868

69-
- 渐变示例用法
70-
71-
> 要使用带渐变支持的 `QrcodeVue` 组件,你可以传入渐变相关的属性:
72-
73-
```html
74-
<template>
75-
<qrcode-vue
76-
:size="size"
77-
:value="fullUrl"
78-
:level="level"
79-
:margin="margin"
80-
:render-as="renderAs"
81-
:background="background"
82-
:gradient="true"
83-
:gradient-type="gradientType"
84-
:gradient-start-color="gradientStartColor"
85-
:gradient-end-color="gradientEndColor"
86-
/>
87-
</template>
88-
89-
<script>
90-
export default {
91-
data() {
92-
return {
93-
size: 200,
94-
fullUrl: 'https://example.com',
95-
level: 'H',
96-
margin: 4,
97-
renderAs: 'svg', // or 'canvas'
98-
background: '#ffffff',
99-
gradient: true,
100-
gradientType: 'linear', // or 'radial'
101-
gradientStartColor: '#ff0000', // 渐变的起始颜色
102-
gradientEndColor: '#0000ff', // 渐变的结束颜色
103-
}
104-
},
105-
}
106-
</script>
107-
108-
- 在 Vue 3 中配合 `TypeScript` 使用:
69+
在 Vue 3 中配合 `TypeScript` 使用:
10970

11071
```html
11172
<template>
@@ -133,10 +94,8 @@ export default {
13394
const background = ref('#ffffff')
13495
const foreground = ref('#000000')
13596
const margin = ref(0)
136-
const gradient = ref(false)
137-
const gradientType = ref<GradientType>('linear')
138-
const gradientStartColor = ref('#000000')
139-
const gradientEndColor = ref('#38bdf8')
97+
98+
// 可传入二维码图片相关的属性,支持二维码 LOGO;
14099
const imageSettings = ref<ImageSettings>({
141100
src: 'https://github.com/scopewu.png',
142101
width: 30,
@@ -145,6 +104,12 @@ export default {
145104
// y: 10,
146105
excavate: true,
147106
})
107+
108+
// 可传入渐变相关的属性,支持渐变:
109+
const gradient = ref(false)
110+
const gradientType = ref<GradientType>('linear')
111+
const gradientStartColor = ref('#000000')
112+
const gradientEndColor = ref('#38bdf8')
148113
</script>
149114
```
150115

@@ -199,6 +164,27 @@ export default {
199164

200165
二维码前景颜色。
201166

167+
### `image-settings`
168+
169+
- 类型: `ImageSettings`
170+
- 默认值: `{}`
171+
172+
```ts
173+
export type ImageSettings = {
174+
src: string, // 图片的地址。
175+
x?: number, // 水平横向偏移。没有设定值时,图片剧中
176+
y?: number, // 垂直竖向偏移。没有设定值时,图片剧中
177+
height: number, // 图片的高度
178+
width: number, // 图片的宽度
179+
// 是否“挖掘”图像周围的模块。
180+
// 这意味着嵌入图像重叠的任何模块都将使用背景颜色。
181+
// 使用此选项可确保图像周围的边缘清晰。嵌入透明图像时也很有用。
182+
excavate?: boolean,
183+
}
184+
```
185+
186+
二维码图片 logo 配置。
187+
202188
### `gradient`
203189
204190
- 类型: `boolean`
@@ -227,27 +213,6 @@ export default {
227213
228214
渐变的结束颜色。
229215
230-
### `image-settings`
231-
232-
- 类型: `ImageSettings`
233-
- 默认值: `{}`
234-
235-
```ts
236-
export type ImageSettings = {
237-
src: string, // 图片的地址。
238-
x?: number, // 水平横向偏移。没有设定值时,图片剧中
239-
y?: number, // 垂直竖向偏移。没有设定值时,图片剧中
240-
height: number, // 图片的高度
241-
width: number, // 图片的宽度
242-
// 是否“挖掘”图像周围的模块。
243-
// 这意味着嵌入图像重叠的任何模块都将使用背景颜色。
244-
// 使用此选项可确保图像周围的边缘清晰。嵌入透明图像时也很有用。
245-
excavate?: boolean,
246-
}
247-
```
248-
249-
二维码图片 logo 配置。
250-
251216
### `class`
252217
253218
- 类型:`string`

0 commit comments

Comments
 (0)