mta-mcp 2.5.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,132 +0,0 @@
1
- ---
2
- description: 'Vue 3 + TypeScript 通用开发代理'
3
- tools: ['edit', 'runNotebooks', 'search', 'new', 'runCommands', 'runTasks', 'usages', 'vscodeAPI', 'problems', 'changes', 'testFailure', 'githubRepo', 'extensions', 'todos', 'runSubagent']
4
- ---
5
-
6
- # Vue 3 + TypeScript 通用代理
7
-
8
- **规范来源**: `prompts/vue/vue3-typescript.md`
9
-
10
- ## ⚠️ 强制工作流
11
-
12
- **编写任何 Vue 3 代码前,必须先调用 MCP 工具加载规范:**
13
-
14
- ```
15
- get_relevant_standards({ fileType: "vue" })
16
- ```
17
-
18
- 如果使用特定库,额外调用:
19
- - Element Plus: `get_relevant_standards({ imports: ["element-plus"] })`
20
- - Pinia: `get_relevant_standards({ imports: ["pinia"] })`
21
- - Vue Router: `get_relevant_standards({ imports: ["vue-router"] })`
22
-
23
- ## 核心原则
24
-
25
- 1. **Composition API 优先** - `<script setup lang="ts">`
26
- 2. **类型安全** - 禁用 `any`
27
- 3. **响应式最佳实践** - 合理使用 ref/reactive
28
- 4. **组件解耦** - Props/Emits 类型明确
29
-
30
- ## 标准组件结构
31
-
32
- ```vue
33
- <script setup lang="ts">
34
- import { ref, computed, onMounted } from 'vue'
35
-
36
- // Props 定义
37
- interface Props {
38
- modelValue: string
39
- disabled?: boolean
40
- }
41
-
42
- const props = withDefaults(defineProps<Props>(), {
43
- disabled: false
44
- })
45
-
46
- // Emits 定义
47
- interface Emits {
48
- (e: 'update:modelValue', value: string): void
49
- (e: 'change', value: string): void
50
- }
51
-
52
- const emit = defineEmits<Emits>()
53
-
54
- // 状态
55
- const localValue = ref('')
56
-
57
- // 计算属性
58
- const displayValue = computed(() =>
59
- localValue.value.toUpperCase()
60
- )
61
-
62
- // 方法
63
- const handleChange = () => {
64
- emit('update:modelValue', localValue.value)
65
- emit('change', localValue.value)
66
- }
67
-
68
- // 生命周期
69
- onMounted(() => {
70
- localValue.value = props.modelValue
71
- })
72
- </script>
73
-
74
- <template>
75
- <div class="component">
76
- <input
77
- v-model="localValue"
78
- :disabled="disabled"
79
- @change="handleChange"
80
- />
81
- </div>
82
- </template>
83
-
84
- <style scoped>
85
- .component {
86
- /* scoped 样式 */
87
- }
88
- </style>
89
- ```
90
-
91
- ## 禁止模式
92
-
93
- - ❌ `any` 类型
94
- - ❌ Options API
95
- - ❌ 不定义 Props/Emits 类型
96
- - ❌ 直接修改 Props
97
- - ❌ `<script>` 中使用 `this`
98
-
99
- ## 常用模式
100
-
101
- ### 表单处理
102
- ```typescript
103
- const form = reactive({
104
- name: '',
105
- email: ''
106
- })
107
-
108
- const validate = () => {
109
- if (!form.name.trim()) return false
110
- return true
111
- }
112
- ```
113
-
114
- ### 异步数据
115
- ```typescript
116
- const loading = ref(false)
117
- const data = ref<DataType[]>([])
118
-
119
- const fetchData = async () => {
120
- try {
121
- loading.value = true
122
- const response = await api.getData()
123
- data.value = response.data
124
- } catch (err) {
125
- console.error(err)
126
- } finally {
127
- loading.value = false
128
- }
129
- }
130
- ```
131
-
132
- **完整规范**: `prompts/vue/vue3-typescript.md`