本节以 Todo App 模板小程序为例,介绍商家应用的文件结构,以及每种文件类型在小程序中的作用。Todo App 是一个简单的待办事项管理小程序,实现了用户登录、新增自定义待办事项、划除或恢复待办事项的功能。
app.json 是商家应用的全局配置,在这个文件中可以配置应用的页面列表、默认窗口标题、导航栏背景色等。更多配置参见 文档配置。
1 2 3 4 5 6 7 8 9 10 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >{ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "pages" </span>: [ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "pages/todos/todos" </span>, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "pages/add-todo/add-todo" </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > ], </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "window" </span>: { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "defaultTitle" </span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "Todo App" </span>, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "titleBarColor" </span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "#323239" </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > } </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >}</span></span> |
app.acss 定义了全局样式,作用于当前应用的所有页面。
1 2 3 4 5 6 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >page</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 1 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >display</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >background</span>: <span class = "cm-error" style= "color: #ff0000; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ># 323239 ;</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >font</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >family</span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "pingFang SC" </span> <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "pingFang" </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >}</span></span> |
上例中的 page 为框架支持的特殊选择器,会匹配框架提供的页面根节点容器。
app.js 用于注册应用,在这个文件中可以配置应用的生命周期,声明全局数据,调用丰富的 API,如以下获取用户授权及获取用户信息 API 等,更多 API 参见 API 文档。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >App</span>({ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 声明全局数据 </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span>:[ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > { <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 'Learning Javascript' </span>, <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >completed</span>: <span class = "cm-atom" style= "color: #990055; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > true </span> }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > { <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 'Learning ES2016' </span>, <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >completed</span>: <span class = "cm-atom" style= "color: #990055; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > true </span> }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > { <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 'Learning 商家应用' </span>, <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >completed</span>: <span class = "cm-atom" style= "color: #990055; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > false </span> } </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > ], </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >userInfo</span>: <span class = "cm-atom" style= "color: #990055; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > null </span>, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 声明全局方法 </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >getUserInfo</span>() { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > return </span> <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > new </span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >Promise</span>((<span class = "cm-def" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >resolve</span>, <span class = "cm-def" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >reject</span>) <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=></span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > if </span> (<span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >userInfo</span>) <span class = "cm-variable-2" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >resolve</span>(<span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >userInfo</span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 调用用户授权 API </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >my</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >authorize</span>({ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >scopes</span>:<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 'scope.userInfo' </span>, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >success</span>: <span class = "cm-def" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >authcode</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=></span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >console</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >info</span>(<span class = "cm-variable-2" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >authcode</span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 调用获取用户信息 API </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >my</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >getAuthUserInfo</span>({ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >success</span>: <span class = "cm-def" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >res</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=></span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >userInfo</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=</span> <span class = "cm-variable-2" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >res</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable-2" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >resolve</span>(<span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >userInfo</span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >fail</span>: () <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=></span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable-2" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >reject</span>({}); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >fail</span>: () <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=></span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable-2" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >reject</span>({}); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >});</span></span> |
可以看到,全局的逻辑代码放在 App({})中,声明了全局数据 todos 、 userInfo ,以及全局方法 getUserInfo()。
todos 全局数据中已经存储了一些数据,即 Todo App 小程序中已有的一些待办事项。
全局方法 getUserInfo() 调用了授权 API my.authorize,以及获取用户信息 API my.getAuthUserInfo ,并将获取到的用户信息存储在 userInfo 中。
在这个示例中,我们有两个页面,Todo List 页面和 Add Todo 页面,他们都在 pages 目录下。小程序的所有页面路径必须写在 app.json 中,路径从项目根目录开始且不能包括后缀名,pages 的第一个页面就是小程序的首页。
每一个 页面 由同路径下的四种类型文件组成,即 .json 后缀的配置文件,.axml 后缀的模版文件,.acss 后缀的样式文件,.js 后缀的逻辑脚本文件。
todos.json 用于配置当前页面的窗口表现。这里定义了使用一个自定义组件 add-button ,指定它的组件名称及对应的路径。自定义组件的具体使用后面会讲述。
1 2 3 4 5 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >{ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "usingComponents" </span>: { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "add-button" </span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "/components/add-button/add-button" </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > } </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >}</span></span> |
页面配置文件不是必须的。当存在页面配置文件时,各个页面配置项会优先于 app.json 中 window 的同名配置项。当不存在页面配置文件,则直接使用 app.json 中的默认配置。因此,Todo List 页面的标题为 app.json 中指定的 defaultTitle ,即?Todo App
。
todos.axml 为页面结构模版文件。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "page-todos" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "user" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >image</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "avatar" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >src</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "{{user.avatar || '../../assets/logo.png'}}" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >background-size</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "cover" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >image</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "nickname" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span>{{user.nickName <span class = "cm-error" style= "color: #ff0000; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >&</span><span class = "cm-error" style= "color: #ff0000; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >&</span> user.nickName + '\'s' || 'My' }} Todo List<span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "todo-items" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checkbox-group</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "todo-items-group" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >onChange</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "onTodoChanged" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >label</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >a: for </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "{{todos}}" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >a: for -item</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "item" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "todo-item {{item.completed ? 'checked' : ''}}" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >a:key</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "*this" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checkbox</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "todo-item-checkbox" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >value</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "{{item.text}}" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checked</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "{{item.completed}}" </span> <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >/></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "todo-item-text" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span>{{item.text}}<span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >label</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checkbox-group</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "todo-footer" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >add-button</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "Add Todo" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >onClickMe</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "addTodo" </span> <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >add-button</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span></span></span> |
使用 <view/>
、<image/>
、<text/>
、<button/>
、<label/>
、<checkbox/>
,来搭建页面结构以及通过 Mustache 语法两对大括号({{}})绑定 todos 数据。
绑定数据可以查阅此文档
绑定事件可以查阅此文档
todos.js 是页面的逻辑脚本文件,小程序页面的逻辑代码必需包含在 Page({}) 中。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 获取全局 app 实例</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > const </span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >getApp</span>(); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >Page</span>({ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 声明页面数据 </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >data</span>: {} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 监听生命周期回调 onLoad</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >onLoad</span>() { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 获取用户信息并存储数据</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >getUserInfo</span>().<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >then</span>( <span class = "cm-def" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >user</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=></span> <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >setData</span>({ <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >user</span>, }), ); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 监听生命周期回调 onShow </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >onShow</span>() { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 设置全局数据到当前页面数据</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >setData</span>({ <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span> }); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 事件处理函数</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >onTodoChanged</span>(<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >e</span>) { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 修改全局数据</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > const </span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checkedTodos</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >e</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >detail</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >value</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >setTodos</span>(<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >map</span>(<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=></span> ({ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-meta" style= "color: #1f7f9a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >...</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span>, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >completed</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checkedTodos</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >indexOf</span>(<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span>) <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 1 </span>, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }))); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >setData</span>({ <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span> }); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >addTodo</span>() { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > // 进行页面跳转</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >my</span>.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >navigateTo</span>({ <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >url</span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > '../add-todo/add-todo' </span> }); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >});</span></span> |
在这个文件中可以:
监听并处理页面的生命周期函数 onShow
onLoad;
获取小程序实例以及其他页面实例 getApp
getCurrentPages;
声明并处理数据 data;
响应页面交互事件,调用 API 等;
这里需要注意的是 app.todos
是来自 app.js 中全局的变量定义。
todos.acss 定义页面局部样式。指定 todos.axml 中不同元素的样式,包括位置、背景颜色、字体、字体颜色等。语法可以查阅 样式 文档。
页面的 acss 文件不是必须的,但对于相同选择器,页面局部样式会覆盖 app.acss 全局样式。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >page</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >display</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >direction</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >column</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >width</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 100 </span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >%</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >max</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >height</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 100 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >vh</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >user</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >display</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >shrink</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >padding</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 30 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >px</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >color</span>: <span class = "cm-error" style= "color: #ff0000; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >#FFF;</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >direction</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >column</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >align</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >items</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >center</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >avatar</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >width</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 130 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >height</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 130 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >radius</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 50 </span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >%</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >background</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >color</span>: <span class = "cm-error" style= "color: #ff0000; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >#FFF;</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >align</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >self</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >center</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >nickname</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >padding</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >top</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 40 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >align</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >center</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >font</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >size</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 40 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >font</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >weight</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 100 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >items</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >grow</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 1 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >font</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >size</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 34 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >padding</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 50 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 120 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >color</span>: <span class = "cm-error" style= "color: #ff0000; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >#0EFFD6;</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >overflow</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >auto</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >items</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >group</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >display</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >direction</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >column</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >position</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >relative</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >margin</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >bottom</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 50 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >padding</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >left</span>:<span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 80 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >line</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >height</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 70 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >height</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 80 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >box</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >sizing</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >box</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 2 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >px</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >solid</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rgb</span>(<span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 14 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 255 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 214 </span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >radius</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 100 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >overflow</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >hidden</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >overflow</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >ellipsis</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-comment" style= "color: #6a737d; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > /* white-space:nowrap; */ </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >transition</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0.2 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >s</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span>:<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >last</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >child</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >margin</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >bottom</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span>::<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >before</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >content</span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > '' </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >position</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >absolute</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >left</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 12 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >margin</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >right</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 20 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >width</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 45 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >height</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 45 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >background</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >color</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rgba</span>(<span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 14 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 222 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 255 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0.3 </span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >radius</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 50 </span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >%</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >top</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 50 </span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >%</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >transform</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >translateY</span>(<span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 50 </span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >%</span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >transition</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >background</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >color</span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0.2 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >s</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span>::<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >after</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >content</span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > '' </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >position</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >absolute</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >left</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 29 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >width</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 8 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >height</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 18 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >top</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 50 </span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >%</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >transform</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >translateY</span>(<span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 60 </span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >%</span>) <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rotate</span>(<span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 38 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >deg</span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 4 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >solid</span> <span class = "cm-error" style= "color: #ff0000; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >#FFF;</span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >width</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0 </span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 4 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 4 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >opacity</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >transition</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >opacity</span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0.2 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >s</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checkbox</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >display</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >none</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checked</span> .<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >decoration</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >line</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >through</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >color</span>: <span class = "cm-error" style= "color: #ff0000; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >#1AA0B8; </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checked</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >border</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 2 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >px</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >solid</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rgba</span>(<span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 14 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 222 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 255 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0.2 </span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checked</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span>::<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >before</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >background</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >color</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rgba</span>(<span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 14 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 222 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 255 </span>, <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0.2 </span>); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >checked</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >item</span>::<span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >after</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >opacity</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 1 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >} </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todo</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >footer</span> { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >flex</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >shrink</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >padding</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 50 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 0 </span> <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 100 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >font</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >size</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 48 </span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >rpx</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >font</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >weight</span>: <span class = "cm-number" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > 200 </span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span><span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >-</span><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >align</span>: <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >center</span>; </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >}</span></span> |
add-todo.json 声明自定义组件名称和路径。
1 2 3 4 5 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >{ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "usingComponents" </span>: { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-string cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "add-button" </span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "/components/add-button/add-button" </span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > } </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >}</span></span> |
add-todo.axml 为页面结构模版文件。
1 2 3 4 5 6 7 8 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "page-add-todo" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "add-todo" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >input</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "add-todo-input" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >placeholder</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "What needs to be done?" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >onBlur</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "onBlur" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >value</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "{{inputValue}}" </span> <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >/></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > class </span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "todo-footer" </span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >add-button</span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "Add Todo" </span> <span class = "cm-attribute" style= "color: #6f42c1; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >onClickMe</span>=<span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > "add" </span> <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >add-button</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span> </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ></</span><span class = "cm-tag" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >view</span><span class = "cm-tag cm-bracket" style= "color: #22863a; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >></span></span></span> |
在这个页面中有两个核心知识点:
① 使用<input/>
组件来接受用户输入。
② <add-button>
是一个自定义组件,我们可以将一些功能完整的代码封装为自定义组件,便于在其他地方复用。
add-todo.js 页面逻辑代码。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > const </span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >getApp</span>(); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >Page</span>({ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >data</span>: { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >inputValue</span>: <span class = "cm-string" style= "color: #669900; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > '' </span>, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >onBlur</span>(<span class = "cm-def" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >e</span>) { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >setData</span>({ </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >inputValue</span>: <span class = "cm-variable-2" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >e</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >detail</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >value</span>, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >add</span>() { </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span> <span class = "cm-operator" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >=</span> <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >app</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >todos</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >concat</span>([ { <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >text</span>: <span class = "cm-keyword" style= "color: #d73a49; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > this </span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >data</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >inputValue</span>, <span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >compeleted</span>: <span class = "cm-atom" style= "color: #990055; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > false </span>, }, ]); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > <span class = "cm-variable" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >my</span>.<span class = "cm-property" style= "color: #005cc5; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >navigateBack</span>(); </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" > }, </span></span><span class = "lake-preview-line" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" ><span class = "lake-preview-codeblock-content" style= "color: #595959; margin: 0px; padding: 0px; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0);" >});</span></span> |
add-todo.acss 同 todos.acss?用法一致,这里不再赘述。