What is a synchronous function? 什么是同步函数?
By default, all Swift functions are synchronous, but what does that mean? A synchronous function is one that executes all its work in a simple, straight line on a single threa...
How to discard results in a task group 如何丢弃任务组中的结果
Swift has a special task group type called a discarding task group, which has a very specialized function: tasks that complete are automatically discarded and destroyed, ...
What’s the difference between actors, classes, and structs? Actors、Classes和 Structs 之间有什么区别?
Swift provides four concrete nominal types for defining custom objects: actors, classes, structs, and enums. Each of these works a little differently from the others, but the first...
巡检计划巡检状态选项添加颜色
列表页面添加 在 index.vue 中添加,如下的代码 <!-- 巡检计划状态添加颜色显示 --> <template v-if='column.leapKey === 'select' && column.prop === 'inspectionPlanStatus''>...
Day 9 – 字典与嵌套
字典 基本语法 字典是由键值对组成,基本的语法如下 {key1:value1, key2: value2, ...} 示例 # 字典示例 colors = { 'apple': 'red', 'pear': 'green', 'banana': 'yellow' } 基本使用 字典的基...
Day 12 – 作用域 Scope
Python 没有块级作用域(Block Scope),只有局部作用域以及全局作用域。 局部作用域 在函数中声明的变量(或函数)具有局部作用域(也称为函数作用域)。它们只能被同一代码块中的其他代码看到...
Understanding how global actor inference works 了解全局参与者推理的工作原理
Apple explicitly annotates many of its types as being @MainActor, including most UIKit types such as UIView and UIButton. However, for a while the Swift team da...






