Skip to content

Commit 275b1ba

Browse files
authored
Merge pull request #40 from qywk99/main
更新内置 store的使用方法
2 parents 4307965 + f398255 commit 275b1ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ export const colorUI = new ColorUI({
217217
### 内置方法
218218
- [x] 内置 store [使用方法参考](#ColorUi.store)
219219
- [x] 页面返回函数 [使用方法参考](#_backPage)
220+
- [x] 返回首页 [使用方法参考](#_toHome)
220221
- [x] 切换主题 [使用方法参考](#_setTheme)
221222
- [x] 设置主颜色 [使用方法参考](#_setMain)
222223
- [x] 设置字号等级 [使用方法参考](#_setText)
@@ -226,10 +227,12 @@ export const colorUI = new ColorUI({
226227

227228
### 内置方法详解
228229

230+
#### <span id='ColorUi.store'>内置 store</span>
231+
> 在需要设置的全局变量data调用 `this.setState()` ,再需获取全局变量data获取 `this.data.$cuStore` 的属性, 注意this 作用域的问题。
232+
229233
#### <span id='_backPage'>页面返回函数</span>
230234
> colorui 3.x微信小程序版本因为所有页面都需要包裹 `ui-sys` ,所以对于大多数返回函数都无法使用,ColorUI为您在所有页面注册了返回函数,在需要返回的函数里调用 `this._backPage()` 注意this 作用域的问题。
231235
232-
233236
#### <span id='_toHome'>返回首页</span>
234237
> 在需要返回的函数里调用 `this._toHome()` 注意this 作用域的问题。
235238

0 commit comments

Comments
 (0)