Skip to content

Commit cff642e

Browse files
committed
Merge branch 'master' into next
2 parents bd9bf48 + df7f30e commit cff642e

21 files changed

+280
-247
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
<p align="center">
1111
<a href="https://www.npmjs.com/package/vue-final-modal"><img src="https://badgen.net/npm/v/vue-final-modal" alt="Version"></a>
1212
<a href="https://www.npmjs.com/package/vue-final-modal"><img src="https://badgen.net/badgesize/brotli/hunterliu1003/vue-final-modal/master/dist/VueFinalModal.umd.js" alt="Size"></a>
13+
<a href='https://coveralls.io/github/vue-final/vue-final-modal?branch=master'><img src='https://coveralls.io/repos/github/vue-final/vue-final-modal/badge.svg?branch=master' alt='Coverage Status' /></a>
1314
</p>
1415
<p align="center">
1516
<a href="https://www.npmjs.com/package/vue-final-modal"><img src="https://badgen.net/npm/v/vue-final-modal/next" alt="Version"></a>
1617
<a href="https://www.npmjs.com/package/vue-final-modal"><img src="https://badgen.net/badgesize/brotli/hunterliu1003/vue-final-modal/next/dist/VueFinalModal.umd.js" alt="Size"></a>
18+
<a href='https://coveralls.io/github/vue-final/vue-final-modal?branch=next'><img src='https://coveralls.io/repos/github/vue-final/vue-final-modal/badge.svg?branch=next' alt='Coverage Status' /></a>
1719
</p>
1820

1921
<p align="right">
@@ -235,7 +237,7 @@ export default {
235237

236238
## **Slots**
237239

238-
If you open a modal though API `show(name, params)`, You can using scoped-slot to get `params` in template:
240+
If you open a modal though API `show(name, params)`, You can use scoped-slot to get `params` in template:
239241

240242
```html
241243
<template v-slot="{ params }">

dist/VueFinalModal.esm.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.esm.js.map

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js.map

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/en/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ features:
2323
<p class="flex h-8 space-x-4">
2424
<a href="https://www.npmjs.com/package/vue-final-modal"><img src="https://badgen.net/npm/v/vue-final-modal" alt="Version"></a>
2525
<a href="https://www.npmjs.com/package/vue-final-modal"><img src="https://badgen.net/badgesize/brotli/hunterliu1003/vue-final-modal/master/dist/VueFinalModal.umd.js" alt="Size"></a>
26+
<a href='https://coveralls.io/github/vue-final/vue-final-modal?branch=master'><img src='https://coveralls.io/repos/github/vue-final/vue-final-modal/badge.svg?branch=master' alt='Coverage Status' /></a>
2627
</p>
2728

2829
<p class="flex h-8 space-x-4">
2930
<a href="https://www.npmjs.com/package/vue-final-modal"><img src="https://badgen.net/npm/v/vue-final-modal/next" alt="Version"></a>
3031
<a href="https://www.npmjs.com/package/vue-final-modal"><img src="https://badgen.net/badgesize/brotli/hunterliu1003/vue-final-modal/next/dist/VueFinalModal.umd.js" alt="Size"></a>
32+
<a href='https://coveralls.io/github/vue-final/vue-final-modal?branch=next'><img src='https://coveralls.io/repos/github/vue-final/vue-final-modal/badge.svg?branch=next' alt='Coverage Status' /></a>
3133
</p>
3234

3335
<p align="right">

docs/content/zh-Hant/api.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: API Reference
3-
description: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
2+
title: API 參考
3+
description: 'Vue Final Modal 是一個無渲染、可堆疊、可拆卸且輕巧的 modal 元件。'
44
category: API
55
position: 7
66
---
77
## Usage
88

9-
<alert>`$vfm` is an object containing VueFinalModal's data/methods.</alert>
9+
<alert>`$vfm` 是一個存放 VueFinalModal 資料與方法的物件</alert>
1010

1111
### **Options API**
1212

13-
Just use `this.$vfm`.
13+
在組件內使用 `this.$vfm`.
1414

1515
### **Composition API** <badge>Vue 3 only</badge>
1616

@@ -27,10 +27,10 @@ export default {
2727

2828
### `show(name, params)`
2929

30-
- Type: `Function`
31-
- Arguments:
32-
- name: `String` - Name of the modal
33-
- params: `?: object` - Any data that you want to pass into the modal, checkout the guide [params](/guide/params).
30+
- 型別: `Function`
31+
- 參數:
32+
- name: `String` - 指定 modal 的名字。
33+
- params: `?: object` - Any data that you want to pass into the modal, checkout the guide [params](/zh-Hant/guide/params).
3434

3535
<show-code text="Example">
3636

@@ -58,15 +58,15 @@ this.$vfm.show('example', { userName: 'vue-final-modal' })
5858
</script>
5959
```
6060

61-
<alert>`v-model` is necessary when you open a modal with `$vfm.show(name)` API.</alert>
61+
<alert>如果要使用 `$vfm.show(name)` 打開 modal,`v-model` 是必須給的。</alert>
6262

6363
</show-code>
6464

6565
### `hide([names])`
6666

67-
- Type: `Function`
68-
- Arguments:
69-
- names: `String` - The names to hide
67+
- 型別: `Function`
68+
- 參數:
69+
- names: `String` - 指定要隱藏 modal 名稱。
7070

7171
<show-code text="Example">
7272

@@ -93,38 +93,38 @@ this.$vfm.show('example', { userName: 'vue-final-modal' })
9393

9494
### `hideAll()`
9595

96-
hide all modals.
96+
關閉所有的 modal。
9797

9898
### `toggle(name, show, params)`
9999

100-
- Type: `Function`
101-
- Arguments:
102-
- name: [`String` | `Array`] - The names of the modal
103-
- show: `?: Boolean` - Show modal or not
104-
- params: `?: object` - Any data that you want to pass into the modal, checkout the guide [params](/guide/params).
100+
- 型別: `Function`
101+
- 參數:
102+
- name: [`String` | `Array`] - modal 的名稱。
103+
- show: `?: Boolean` - 打開或隱藏這個 modal
104+
- params: `?: object` - 任何你想要傳入 modal 的資料,詳閱 [參數(params](/zh-Hant/guide/params)
105105

106-
toggle modals by name.
106+
根據名字(name)切換 modals 的狀態。
107107

108108
### `get([names])`
109109

110-
- Type: `Function`
111-
- Arguments:
112-
- names: `String` - Get the names of the modal instances
113-
- Return:
114-
- `Array`: returns the modal instances
110+
- 型別: `Function`
111+
- 參數:
112+
- names: `String` - 取的傳入的名字(name)對應的 modals 實例。
113+
- 回傳:
114+
- `Array`: 回傳的 modals 實例
115115

116116
### `openedModals`
117117

118-
- Return:
118+
- 回傳:
119119

120-
- `Array`: returns the opened modal instances.
120+
- `Array`: 回傳所有顯示中的 modal 實例。
121121

122122
- Examples:
123123

124-
1. `$vfm.openedModals[0]`: get the first opened modal instance.
125-
2. `$vfm.openedModals.length`: get how many modals was opened.
124+
1. `$vfm.openedModals[0]`: 取得第一個打開的 modal 實例。
125+
2. `$vfm.openedModals.length`: 取的現在打開的 modal 總數。
126126

127127
### `modals`
128128

129-
- Return:
130-
- `Array`: returns all modal instances.
129+
- 回傳:
130+
- `Array`: 取的所有 modal 的實例。

docs/content/zh-Hant/dynamic-modal.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
---
2-
title: Dynamic modal
3-
description: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
2+
title: 動態 modal
3+
description: 'Vue Final Modal 是一個無渲染、可堆疊、可拆卸且輕巧的 modal 元件。'
44
category: API
55
position: 8
66
version: 2
77
badge: v2.0.0+
88
features:
9-
- Support Vue 3 and Vue 2
10-
- Tailwind CSS friendly
11-
- Renderless component
12-
- SSR support
13-
- Stackable
9+
- 支援 Vue 3 Vue 2
10+
- Tailwind CSS 友好
11+
- 無選染元件
12+
- 支援 SSR
13+
- 支援 modal 堆疊
1414
- Detachable
15-
- Scrollable
16-
- Transition support
17-
- Mobile friendly
18-
- Tiny bundle size
19-
- Accessibility support
15+
- 可滾動的 modal
16+
- 支援過度效果
17+
- 行動裝置友善
18+
- 極小的打包尺寸
19+
- 支援無障礙(Accessibility
2020
---
2121

22-
This feature let you create modal dynamically.
22+
這個功能讓你可以動態的建立 modal
2323

24-
## Add `ModalsContainer`
24+
## 新增 `ModalsContainer`
2525

26-
All dynamic modals will be displayed in `ModalsContainer`. You can get all dynamic modal instances by [$vfm.dynamicModals](#dynamicmodals).
26+
所有的動態 modals 都會被崁入、顯示在 `ModalsContainer` 元件中。你可以透過 [$vfm.dynamicModals](#dynamicmodals) 屬性取得所有的動態 modal 實例
2727

2828
```html[App.vue]
2929
<div>
@@ -36,12 +36,12 @@ All dynamic modals will be displayed in `ModalsContainer`. You can get all dynam
3636

3737
### `show(dynamicModalOptions, params)`
3838

39-
To show dynamic modal you can use the API `$vfm.show` function.
39+
你可以透過 `$vfm.show` 這個方法開啟動態 modal。
4040

41-
- Type: `Function`,
42-
- Arguments:
41+
- 型別: `Function`,
42+
- 參數:
4343
- dynamicModalOptions: `Object`
44-
- params: same as [API $vfm.show](/api#showname-params)
44+
- params: [API $vfm.show](/zh-Hant/api#showname-params) 相同
4545

4646
```ts
4747
type dynamicModalOptions = {
@@ -60,14 +60,14 @@ type dynamicModalOptions = {
6060
6161
### `dynamicModals`
6262
63-
- Return:
64-
- `Array`: returns dynamic modal instances.
63+
- 回傳:
64+
- `Array`: 回傳儲存動態 modal 實例的陣列。
6565
66-
## Examples
66+
## 範例
6767
6868
<modals-container></modals-container>
6969
70-
### Basic
70+
### 基本
7171
7272
<v-dynamic></v-dynamic>
7373
@@ -168,7 +168,7 @@ export default {
168168

169169
</show-code>
170170

171-
### Advanced
171+
### 進階
172172

173173
<v-dynamic-advanced></v-dynamic-advanced>
174174

@@ -228,7 +228,7 @@ export default {
228228
component: VContent,
229229
bind: {
230230
content:
231-
'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
231+
'Vue Final Modal 是一個無渲染、可堆疊、可拆卸且輕巧的 modal 元件。'
232232
}
233233
}
234234
}
@@ -243,9 +243,9 @@ export default {
243243

244244
#### VModal.vue
245245

246-
<alert>VModal is an HOC of vue-final-modal.</alert>
246+
<alert>VModal 是一個 vue-final-modal 的高階元件(HOC)。</alert>
247247

248-
[Source code](/examples/recommend)
248+
[Source code](/zh-Hant/examples/recommend)
249249

250250
#### VTitle.vue
251251

docs/content/zh-Hant/examples/manual.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Manual usage
3-
description: 'Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.'
4-
category: Examples
2+
title: 手動
3+
description: 'Vue Final Modal 是一個無渲染、可堆疊、可拆卸且輕巧的 modal 元件。'
4+
category: 範例
55
position: 9
66
---
77

8-
## Basic usage
8+
## 基本用法
99

10-
### **Set `v-model` to `true` on click**
10+
### **透過點擊事件將 `v-model` 的資料設定為 `true`**
1111

1212
```html
1313
<vue-final-modal v-model="showModal">
@@ -17,9 +17,9 @@ position: 9
1717
<button @click="showModal = true">Launch</button>
1818
```
1919

20-
### **Open modal with [API](/api)**
20+
### **使用 [API](/zh-Hant/api) 開啟 modal**
2121

22-
<alert>`v-model` is necessary when you open a modal with `$vfm.show(name)` API.</alert>
22+
<alert>當使用 `$vfm.show(name)` API 開啟,`v-model` 為必要的屬性。</alert>
2323

2424
```html
2525
<vue-final-modal v-model="showModal" name="example">
@@ -31,25 +31,25 @@ position: 9
3131
this.$vfm.show('example')
3232
```
3333

34-
## Example
34+
## 範例
3535

3636
<alert>
3737

38-
Try to toggle checkbox below, then click `Open Modal` button.
38+
試著切換下列的複選框,並點擊 `Open Modal` 按鈕。
3939

4040
</alert>
4141

4242
<basic-options></basic-options>
4343

44-
## Step by step
44+
## 一步步使用
4545

4646
<alert>
4747

4848
[Checkout examples source code](https://github.com/hunterliu1003/vue-final-modal/tree/master/example/src/components/basic)
4949

5050
</alert>
5151

52-
### **Hello, `vue-final-modal`**
52+
### **開始 `vue-final-modal`**
5353

5454
<v-basic></v-basic>
5555

@@ -83,7 +83,7 @@ export default {
8383

8484
</show-code>
8585

86-
### **Add `background-color`, `border-radius`**
86+
### **加上 `background-color`, `border-radius`**
8787

8888
<v-background></v-background>
8989

@@ -131,7 +131,7 @@ export default {
131131

132132
</show-code>
133133

134-
### **Centered modal**
134+
### **置中 modal**
135135

136136
<v-centered></v-centered>
137137

@@ -190,7 +190,7 @@ export default {
190190

191191
</show-code>
192192

193-
### **Add `content`**
193+
### **加上內容**
194194

195195
<v-content></v-content>
196196

@@ -255,7 +255,7 @@ export default {
255255

256256
</show-code>
257257

258-
### **Add close button**
258+
### **加上關閉的按鈕**
259259

260260
<v-close-button></v-close-button>
261261

@@ -330,7 +330,7 @@ export default {
330330

331331
</show-code>
332332

333-
### **`Scrollable`**
333+
### **使內容是可以滾動的(Scrollable**
334334

335335
<v-scrollable></v-scrollable>
336336

@@ -410,7 +410,7 @@ export default {
410410

411411
</show-code>
412412

413-
### **Add `confirm` and `cancel` buttons**
413+
### **加上確認(confirm) 以及取消(cancel)按鈕**
414414

415415
<v-action-buttons></v-action-buttons>
416416

@@ -501,7 +501,7 @@ export default {
501501

502502
</show-code>
503503

504-
### **Stackable**
504+
### **建立可堆疊的(Stackable) modal**
505505

506506
<v-stackable></v-stackable>
507507

@@ -627,7 +627,7 @@ export default {
627627

628628
</show-code>
629629

630-
### **Accessibility**
630+
### **無障礙**
631631

632632

633633
<v-accessibility></v-accessibility>

0 commit comments

Comments
 (0)