Files
WAI_Project_UNIX/.cursor/rules/api.mdc
2025-10-29 18:54:46 +08:00

13 lines
701 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
description: Uni-App X api
globs: *.uts,*.uvue
alwaysApply: false
---
# API
- 可以使用uts的api但注意版本和平台的兼容性。
- 可以使用uni-app x的api但注意版本和平台的兼容性。
- 可以使用vue3的api但注意版本和平台的兼容性。
- 可以使用操作系统的api但注意版本和平台的兼容性。尽量在uts插件中调用系统原生API而不是在uvue页面中直接调用系统原生API。
- 特定平台或特定版本以上才能使用的代码,需使用条件编译包围这些代码,或者放置在平台专用的目录文件中。
- 通过mcp工具查询项目下可用的插件。
- 跨页面通信优先使用eventbus。