修改 README 文件

This commit is contained in:
2022-01-10 16:44:17 +08:00
parent ad97b181bd
commit 8bfc22c043
3 changed files with 16 additions and 1 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1,3 +1,10 @@
---
gitea: none
include_toc: true
---
### 方法
枚举、结构体、类都可以定义实例方法、类方法
@@ -77,3 +84,4 @@ struct Point {
var p = Point()
p.moveX(deltaX: 10)
```

View File

@@ -1,3 +1,10 @@
---
gitea: none
include_toc: true
---
### 下标subscript
使用 `subscript` 可以给任意类型(枚举、结构体、类)增加下标功能。`subscript` 的语法类似于实例方法、计算属性,本质就是方法(函数)