Skip to content

Commit 1d3ff73

Browse files
authored
docs(cn): features/shortcuts translation (#26)
* docs(cn): features/shortcuts translation * docs(cn): update features/shortcuts * docs(cn): update features/shortcuts
1 parent b13f50b commit 1d3ff73

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

features/shortcuts.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Shortcuts
1+
# 快捷键 {#shortcuts}
22

3-
It's quite common when you work on same set of utilities for multiple times. We provided this "shortcuts" feature allowing you to give the combinations of utilities names you can you use them everywhere inside your app without needing to duplicate yourself.
3+
当你经常使用相同的工具类合集时,会常用到快捷键。我们提供了 “快捷键” 的特性可以允许你把工具类的名字组合在一起,你可以在你应用程序的任何地方使用,而不需要重复写。
44

5-
By simply adding the `shortcuts` field to your configurations:
5+
仅需在你的配置文件中添加 `shortcuts` 字段:
66

77
```js
88
// windi.config.js
@@ -17,8 +17,8 @@ export default {
1717
}
1818
```
1919

20-
<InlinePlayground
21-
:input="'btn btn-green'"
20+
<InlinePlayground
21+
:input="'btn btn-green'"
2222
:config="{ shortcuts: {
2323
btn: 'py-2 px-4 font-semibold rounded-lg shadow-md',
2424
'btn-green': 'text-white bg-green-500 hover:bg-green-700',
@@ -30,7 +30,7 @@ export default {
3030
:enableConfig="true"
3131
/>
3232

33-
CSS-in-JS syntax is also supported for complex utility
33+
对复杂的工具类也同样支持 CSS-in-JS 语法
3434

3535
```js
3636
// windi.config.js
@@ -52,8 +52,8 @@ export default {
5252
}
5353
```
5454

55-
<InlinePlayground
56-
:input="'btn btn-green'"
55+
<InlinePlayground
56+
:input="'btn btn-green'"
5757
:config="{ shortcuts: {
5858
btn: {
5959
color: 'white',
@@ -73,4 +73,4 @@ export default {
7373
/>
7474

7575

76-
The utility added by this configuration can also be directly wrapped with variant, such as sm:btn. The function of this feature is similar to the @apply directive, it will merge all utilities into one style.
76+
通过此配置项添加的工具类,同样可以直接用可变修饰进行包装,比如 `sm:btn`。这个特性的函数与 `@apply` 指令很类似,它将把所有的工具类合并为一个样式。

0 commit comments

Comments
 (0)