Week 8 Post-class: Test your Knowledge
本页目录· 3 条
这一页有部分内容暂时无法显示,其余内容完整。
Question 1
Firestores uses NoSQL database structure, and it support advanced queries such as filtering, sorting and combining multiple queries.
- True
- False
中文翻译:
此处有一段内容暂不支持显示。
- True 正确: Cloud Firestore 确实是 NoSQL 文档数据库;查询支持
where过滤、orderBy排序、限制/分页,以及复合(多条件)查询。在需要时可通过复合索引来支持更复杂的查询。 - False 错误: 若选 False,就等于否认 Firestore 的 NoSQL 属性或其对过滤/排序/多条件查询的支持,这与实际不符。
Question 2
Please select the option that is not considered as a fact of async in Vue JS 3
- Async components can be used in templates
- The timeout option for Async is in seconds
- The loading component of Async component enable the user to see a customised visual loading content to user
- Async component can be load only when needed
中文翻译:
此处有一段内容暂不支持显示。
- “可在模板中使用”——正确: 异步组件像普通组件一样在模板中使用(如
<MyAsync/>或<component :is="...">)。 - “timeout 以秒为单位”——错误/非事实: 在
defineAsyncComponent中,timeout的单位是毫秒(ms),如timeout: 30000代表 30 秒;delay也是毫秒。 - “loadingComponent 显示自定义加载内容”——正确: 通过
loadingComponent可提供自定义加载 UI,并可配合delay控制出现时机。 - “只在需要时才加载”——正确: 结合动态
import()与条件渲染/路由实现按需加载(lazy load / 代码分割)。
Question 3
Select the query operations that are available in Firestore (Please choose all that applies)
whereorderBylimitand
中文翻译:
此处有一段内容暂不支持显示。
where正确: 用于按字段过滤;可链式添加多个where条件。orderBy正确: 指定排序字段/方向;与不等式过滤一起用时需按相同字段排序,复杂查询可能需要复合索引。limit正确: 限制返回文档数量(还有limitToLast)。and错误: Firestore 没有单独的and运算符;多个where条件天然按 AND 关系组合(需要时由复合索引支持)。