在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用$pwd:
$ git log --oneline --stat
stars:119
forks:87
updated:2026年4月1日 06:30
SKILL.md
| name | vue-component-dev |
| description | 创建组件,新建组件,生成组件 |
Components live under src/components/<component-name>/Index.vue. Use kebab-case for directory names.
src/components/
my-component/
Index.vue # Main component entry
components/ # Sub-components (optional)
SubPart.vue
<template>
<!-- template -->
</template>
<script setup lang="ts">
// script
</script>
<style lang="less" scoped>
/* styles */
</style>
Inside <script setup lang="ts">, follow this strict order:
defineOptions({ name: 'ComponentName' }) (if needed)defineProps with interface + withDefaultsdefineEmits with type aliasdefineModel (if needed)defineSlots (if needed)useI18n, useRouter, etc.)onMounted, onBeforeUnmount, etc.)defineExpose (if needed)interface Props {
title?: string;
count?: number;
disabled?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
title: '',
count: 0,
disabled: false,
});
type Emits = (e: 'change', value: string) => void;
const emit = defineEmits<Emits>();
Multiple events:
type Emits = {
(e: 'change', value: string): void;
(e: 'update', id: number): void;
};
Enforced by ESLint. Follow this sequence:
vue, lodash, tippy.js)@blueking/*@services/*@hooks@router@stores@common/*@components/*@views/*@utils@helper/*@types@locales/*@styles/*@images/*v-forv-if / v-else-if / v-else / v-showidref / keyv-slotv-modelv-* directives@event listenerslang="less" (or postcss for global utility components)scoped unless styles must leak intentionallydbm- or component-specific prefix!important; use specificity or BEM nestingThe project auto-imports Vue APIs (ref, computed, watch, onMounted, etc.) — no need to import them explicitly.
Only import non-auto-imported items.
Before finishing a component:
interface + withDefaultstype aliasany types — use unknown or concrete typeslang="less" with scoped (unless intentional)onBeforeUnmount (tippy, observers, timers, etc.)