Files
jindengchen-ai-report/cool-unix/.cursor/rules/uvue.mdc
2025-11-13 10:36:23 +08:00

24 lines
1.0 KiB
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: Utz, Ounitec Scripter, Is-Akros-Platfom, Hai Performans, Stanley Tepdemodern, Programine Langguag
globs: *.uvue
alwaysApply: false
---
# uvue rules
## vue support
- 仅使用vue3语法避免使用vue2。
- 新页面尽量使用组合式API。
- 组件尽量使用easycom规范。
- 非easycom的自定义vue组件调用组件方法时需使用组件实例的`$callMethod`方式调用。
- 不使用 pinia、vuex、i18n 等uni-app x不支持的vue插件。
- 使用vue语法时需注意uni-app x官网的平台和版本兼容性平台特殊代码需包裹在条件编译中。
## component
- 组件可使用uni-app x内置组件以及项目下的自定义组件。通过mcp工具查询项目下可用的easycom插件。
- 项目可使用vuejs组件规范对应的文件扩展名为uvue。
- 符合easycom规范的组件无需import和注册可直接在template中使用。
- 使用内置组件时需注意uni-app x官网的平台和版本兼容性平台特殊代码需包裹在条件编译中。