Token导航 LogoToken导航

Agent Skill · 研究检索

vue3-antd-commons-skill(vue3 antd 常用技能)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

vue3-antd-commons-skill 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 23,369。

总安装 4,284周安装 175GitHub Stars 公开资料未说明下载 1,386核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.1

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:vue3-antd-commons-skill(vue3 antd 常用技能)
来源仓库:https://github.com/li-4568/vue3-antd-commons-skill
安装命令:
openclaw skills install vue3-antd-commons-skill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install vue3-antd-commons-skill

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

Vue3全家桶+Ant Design+publish-commons开发技能总结,包含核心特性、TypeScript集成、主题定制、网络请求等内容

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install vue3-antd-commons-skill;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

vue3-antd-commons-skill 怎么安装?

在终端执行 openclaw skills install vue3-antd-commons-skill。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

vue3-antd-commons-skill 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

vue3-antd-commons-skill 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

vue3-antd-commons-skill 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

vue3-antd-commons-skill 用的人多吗?

公开数据是累计安装 4,284 次,近一周安装 175 次,下载 1,386 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

vue3-antd-commons-skill 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
vue3-antd-commons-skill

vue3 antd 常用技能 · 本页

4,284—需要联网MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
vue3-antd-commons-skill
description
Vue3全家桶+Ant Design+publish-commons开发技能总结,包含核心特性、TypeScript集成、主题定制、网络请求等内容

Vue3全家桶 + Ant Design 技能总结

前言

本技能总结涵盖Vue3全家桶与Ant Design结合开发的核心知识,包括Vue3核心特性、TypeScript集成、Ant Design组件库使用、主题定制、网络请求、状态管理等内容,帮助开发者快速掌握Vue3+Ant Design项目开发技能。

第1章 Vue3核心特性

1.1 Composition API

<template>
  <div>
    <p>计数:{{ count }}</p>
    <button @click="increment">+1</button>
    <button @click="decrement">-1</button>
  </div>
</template>

<script setup lang="ts">
import { ref, computed, onMounted, onUnmounted } from 'vue'

// 响应式数据
const count = ref<number>(0)

// 计算属性
const doubleCount = computed(() => count.value * 2)

// 方法
const increment = () => count.value++
const decrement = () => count.value--

// 生命周期钩子
onMounted(() => {
  console.log('组件挂载完成')
})

onUnmounted(() => {
  console.log('组件卸载完成')
})
</script>

1.2 响应式系统

1.2.1 ref vs reactive
import { ref, reactive } from 'vue'

// ref - 用于基本类型和对象
const count = ref<number>(0)
const user = ref<User>({ name: '张三', age: 25 })

// reactive - 用于对象
const state = reactive({
  count: 0,
  user: { name: '张三', age: 25 }
})

// 访问方式
console.log(count.value) // ref需要.value
console.log(state.count) // reactive直接访问
1.2.2 响应式API
import { ref, reactive, shallowRef, readonly, toRef, toRefs } from 'vue'

// shallowRef - 浅层响应式
const shallowState = shallowRef({ count: 0 })

// readonly - 只读响应式
const readonlyState = readonly(reactive({ count: 0 }))

// toRef - 创建单个ref
const state = reactive({ count: 0 })
const countRef = toRef(state, 'count')

// toRefs - 创建多个ref
const { count } = toRefs(state)

1.3 生命周期钩子

import { onMounted, onUpdated, onUnmounted, onBeforeMount, onBeforeUpdate, onBeforeUnmount } from 'vue'

onBeforeMount(() => {
  console.log('组件挂载前')
})

onMounted(() => {
  console.log('组件挂载完成')
})

onBeforeUpdate(() => {
  console.log('组件更新前')
})

onUpdated(() => {
  console.log('组件更新完成')
})

onBeforeUnmount(() => {
  console.log('组件卸载前')
})

onUnmounted(() => {
  console.log('组件卸载完成')
})

第2章 TypeScript集成

2.1 组件类型定义

2.1.1 Props类型定义
<script setup lang="ts">
// 基本类型
interface Props {
  title: string
  count?: number
  disabled?: boolean
}

const props = withDefaults(defineProps<Props>(), {
  count: 0,
  disabled: false
})
</script>
2.1.2 Emits类型定义
<script setup lang="ts">
interface Emits {
  (e: 'update', value: number): void
  (e: 'submit', data: FormData): void
  (e: 'cancel'): void
}

const emit = defineEmits<Emits>()

const handleUpdate = (value: number) => {
  emit('update', value)
}
</script>
2.1.3 组件暴露类型定义
<script setup lang="ts">
const count = ref(0
const increment = () => count.value++

defineExpose({
  count,
  increment
})
</script>

2.2 路由类型定义

import { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/user/:id',
    name: 'User',
    component: () => import('@/views/User.vue'),
    props: true
  }
]

2.3 Pinia类型定义

import { defineStore } from 'pinia'
import { ref, computed } from 'vue'

interface User {
  id: number
  name: string
  email: string
}

export const useUserStore = defineStore('user', () => {
  const user = ref<User | null>(null)
  const isLoggedIn = computed(() => !!user.value)

  const setUser = (userData: User) => {
    user.value = userData
  }

  const clearUser = () => {
    user.value = null
  }

  return {
    user,
    isLoggedIn,
    setUser,
    clearUser
  }
})

第3章 Ant Design Vue组件库

3.1 基础组件使用

<template>
  <a-space direction="vertical">
    <a-button type="primary" @click="handleClick">主要按钮</a-button>
    <a-button type="default">默认按钮</a-button>
    <a-button type="dashed">虚线按钮</a-button>
    <a-button type="text">文本按钮</a-button>
    <a-button type="link">链接按钮</a-button>
  </a-space>
</template>

<script setup lang="ts">
const handleClick = () => {
  console.log('按钮被点击')
}
</script>

3.2 表单组件

<template>
  <a-form
    :model="formData"
    :rules="rules"
    @finish="handleSubmit"
  >
    <a-form-item label="用户名" name="username">
      <a-input v-model:value="formData.username" />
    </a-form-item>

    <a-form-item label="密码" name="password">
      <a-input-password v-model:value="formData.password" />
    </a-form-item>

    <a-form-item label="邮箱" name="email">
      <a-input v-model:value="formData.email" />
    </a-form-item>

    <a-form-item>
      <a-button type="primary" html-type="submit">提交</a-button>
    </a-form-item>
  </a-form>
</template>

<script setup lang="ts">
import { reactive } from 'vue'
import type { Rule } from 'ant-design-vue/es/form'

interface FormData {
  username: string
  password: string
  email: string
}

const formData = reactive<FormData>({
  username: '',
  password: '',
  email: ''
})

const rules: Record<string, Rule[]> = {
  username: [
    { required: true, message: '请输入用户名' }
  ],
  password: [
    { required: true, message: '请输入密码' },
    { min: 6, message: '密码长度不能少于6位' }
  ],
  email: [
    { required: true, message: '请输入邮箱' },
    { type: 'email', message: '请输入有效的邮箱地址' }
  ]
}

const handleSubmit = (values: FormData) => {
  console.log('表单提交', values)
}
</script>

3.3 表格组件

<template>
  <a-table
    :columns="columns"
    :data-source="dataSource"
    :loading="loading"
    :pagination="pagination"
    @change="handleTableChange"
  />
</template>

<script setup lang="ts">
import { ref, reactive } from 'vue'
import type { TableProps, ColumnType } from 'ant-design-vue'

interface User {
  id: number
  name: string
  age: number
  email: string
}

const columns: ColumnType<User>[] = [
  {
    title: 'ID',
    dataIndex: 'id',
    key: 'id'
  },
  {
    title: '姓名',
    dataIndex: 'name',
    key: 'name'
  },
  {
    title: '年龄',
    dataIndex: 'age',
    key: 'age'
  },
  {
    title: '邮箱',
    dataIndex: 'email',
    key: 'email'
  }
]

const dataSource = ref<User[]>([
  { id: 1, name: '张三', age: 25, email: 'zhangsan@example.com' },
  { id: 2, name: '李四', age: 30, email: 'lisi@example.com' }
])

const loading = ref(false)

const pagination = reactive({
  current: 1,
  pageSize: 10,
  total: 0
})

const handleTableChange: TableProps['onChange'] = (pag, filters, sorter) => {
  console.log('表格变化', pag, filters, sorter)
}
</script>

第4章 Vue Router路由管理

4.1 路由配置

import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('@/views/About.vue')
  },
  {
    path: '/user/:id',
    name: 'User',
    component: () => import('@/views/User.vue'),
    props: true
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'NotFound',
    component: () => import('@/views/NotFound.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router

4.2 路由守卫

import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(),
  routes
})

// 全局前置守卫
router.beforeEach((to, from, next) => {
  console.log('路由跳转', to, from)
  next()
})

// 全局后置钩子
router.afterEach((to, from) => {
  console.log('路由跳转完成', to, from)
})

export default router

4.3 编程式导航

import { useRouter, useRoute } from 'vue-router'

const router = useRouter()
const route = useRoute()

// 导航到指定路由
const navigateToHome = () => {
  router.push('/')
}

// 导航到命名路由
const navigateToUser = (id: number) => {
  router.push({ name: 'User', params: { id } })
}

// 导航到带查询参数的路由
const navigateToSearch = (query: string) => {
  router.push({ path: '/search', query: { q: query } })
}

// 替换当前路由
const replaceRoute = () => {
  router.replace('/')
}

// 后退
const goBack = () => {
  router.go(-1)
}

第5章 Pinia状态管理

5.1 Store定义

import { defineStore } from 'pinia'
import { ref, computed } from 'vue'

export const useCounterStore = defineStore('counter', () => {
  const count = ref(0)
  const doubleCount = computed(() => count.value * 2)

  const increment = () => {
    count.value++
  }

  const decrement = () => {
    count.value--
  }

  const reset = () => {
    count.value = 0
  }

  return {
    count,
    doubleCount,
    increment,
    decrement,
    reset
  }
})

5.2 Store使用

<template>
  <div>
    <p>计数:{{ counterStore.count }}</p>
    <p>双倍计数:{{ counterStore.doubleCount }}</p>
    <button @click="counterStore.increment()">+1</button>
    <button @click="counterStore.decrement()">-1</button>
    <button @click="counterStore.reset()">重置</button>
  </div>
</template>

<script setup lang="ts">
import { useCounterStore } from '@/stores/counter'

const counterStore = useCounterStore()
</script>

第6章 网络请求与API

6.1 Fetch封装

interface RequestConfig extends RequestInit {
  timeout?: number
  token?: string
}

interface ResponseData<T = any> {
  code: number
  data: T
  message: string
}

class HttpClient {
  private baseURL: string
  private timeout: number
  private token: string | null

  constructor(baseURL: string = '', timeout: number = 5000) {
    this.baseURL = baseURL
    this.timeout = timeout
    this.token = localStorage.getItem('token')
  }

  private async request<T>(url: string, config: RequestConfig = {}): Promise<ResponseData<T>> {
    const controller = new AbortController()
    const timeoutId = setTimeout(() => controller.abort(), config.timeout || this.timeout)

    try {
      const headers: HeadersInit = {
        'Content-Type': 'application/json',
        ...config.headers
      }

      if (this.token) {
        headers['Authorization'] = `Bearer ${this.token}`
      }

      const response = await fetch(`${this.baseURL}${url}`, {
        ...config,
        headers,
        signal: controller.signal
      })

      clearTimeout(timeoutId)

      if (!response.ok) {
        throw new Error(`HTTP error! status: ${response.status}`)
      }

      return await response.json()
    } catch (error) {
      clearTimeout(timeoutId)
      throw error
    }
  }

  get<T>(url: string, config?: RequestConfig): Promise<ResponseData<T>> {
    return this.request<T>(url, { ...config, method: 'GET' })
  }

  post<T>(url: string, data?: any, config?: RequestConfig): Promise<ResponseData<T>> {
    return this.request<T>(url, {
      ...config,
      method: 'POST',
      body: JSON.stringify(data)
    })
  }

  put<T>(url: string, data?: any, config?: RequestConfig): Promise<ResponseData<T>> {
    return this.request<T>(url, {
      ...config,
      method: 'PUT',
      body: JSON.stringify(data)
    })
  }

  delete<T>(url: string, config?: RequestConfig): Promise<ResponseData<T>> {
    return this.request<T>(url, { ...config, method: 'DELETE' })
  }

  setToken(token: string) {
    this.token = token
    localStorage.setItem('token', token)
  }

  clearToken() {
    this.token = null
    localStorage.removeItem('token')
  }
}

export const http = new HttpClient('https://api.example.com')

6.2 API调用示例

import { http } from '@/utils/http'

interface User {
  id: number
  name: string
  email: string
}

// 获取用户列表
export const getUsers = () => {
  return http.get<User[]>('/users')
}

// 获取用户详情
export const getUser = (id: number) => {
  return http.get<User>(`/users/${id}`)
}

// 创建用户
export const createUser = (data: Partial<User>) => {
  return http.post<User>('/users', data)
}

// 更新用户
export const updateUser = (id: number, data: Partial<User>) => {
  return http.put<User>(`/users/${id}`, data)
}

// 删除用户
export const deleteUser = (id: number) => {
  return http.delete(`/users/${id}`)
}

第7章 项目构建与优化

7.1 Vite配置

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'

export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src')
    }
  },
  build: {
    rollupOptions: {
      output: {
        manualChunks: {
          'vue-vendor': ['vue', 'vue-router', 'pinia'],
          'antd-vendor': ['ant-design-vue']
        }
      }
    }
  },
  server: {
    port: 3000,
    proxy: {
      '/api': {
        target: 'https://api.example.com',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      }
    }
  }
})

7.2 性能优化

// 路由懒加载
const routes = [
  {
    path: '/',
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/about',
    component: () => import('@/views/About.vue')
  }
]

// 组件懒加载
import { defineAsyncComponent } from 'vue'

const AsyncComponent = defineAsyncComponent(() =>
  import('@/components/AsyncComponent.vue')
)

7.3 代码格式化

{
  "semi": false,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "none",
  "printWidth": 100
}

第8章 publish-commons组件库

8.1 组件库概览

publish-commons是一个基于Vue3和Ant Design Vue的组件库,提供了丰富的业务组件和工具函数,帮助开发者快速构建企业级应用。

8.2 安装与配置

# 安装组件库
npm install publish-commons
// main.ts
import { createApp } from 'vue'
import App from './App.vue'
import PublishCommons from 'publish-commons'
import 'publish-commons/dist/style.css'

const app = createApp(App)
app.use(PublishCommons)
app.mount('#app')

8.3 组件使用

<template>
  <div>
    <!-- 使用publish-commons组件 -->
    <pc-button type="primary">主要按钮</pc-button>
    <pc-table :columns="columns" :data-source="dataSource" />
    <pc-form :model="formData" @submit="handleSubmit" />
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const columns = [
  { title: '姓名', dataIndex: 'name' },
  { title: '年龄', dataIndex: 'age' }
]

const dataSource = ref([
  { name: '张三', age: 25 },
  { name: '李四', age: 30 }
])

const formData = ref({
  name: '',
  age: 0
})

const handleSubmit = (data: any) => {
  console.log('表单提交', data)
}
</script>

8.4 类型定义

import type { PcButtonProps, PcTableProps } from 'publish-commons'

// 按钮组件类型
const buttonProps: PcButtonProps = {
  type: 'primary',
  size: 'large',
  disabled: false
}

// 表格组件类型
const tableProps: PcTableProps = {
  columns: [
    { title: '姓名', dataIndex: 'name' },
    { title: '年龄', dataIndex: 'age' }
  ],
  dataSource: [
    { name: '张三', age: 25 },
    { name: '李四', age: 30 }
  ],
  loading: false
}

第9章 最佳实践

9.1 代码组织

src/
├── assets/          # 静态资源
├── components/      # 公共组件
├── composables/     # 组合式函数
├── router/          # 路由配置
├── stores/          # Pinia状态管理
├── utils/           # 工具函数
├── views/           # 页面组件
└── App.vue          # 根组件

9.2 组件设计

<template>
  <div class="user-card">
    <h3>{{ user.name }}</h3>
    <p>{{ user.email }}</p>
    <button @click="handleEdit">编辑</button>
  </div>
</template>

<script setup lang="ts">
import { defineProps, defineEmits } from 'vue'

interface User {
  id: number
  name: string
  email: string
}

interface Props {
  user: User
}

interface Emits {
  (e: 'edit', user: User): void
}

const props = defineProps<Props>()
const emit = defineEmits<Emits>()

const handleEdit = () => {
  emit('edit', props.user)
}
</script>

<style scoped>
.user-card {
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 4px;
}
</style>

9.3 测试

import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'
import Counter from '@/components/Counter.vue'

describe('Counter', () => {
  it('renders count', () => {
    const wrapper = mount(Counter)
    expect(wrapper.text()).toContain('计数:0')
  })

  it('increments count', async () => {
    const wrapper = mount(Counter)
    const button = wrapper.find('button')
    await button.trigger('click')
    expect(wrapper.text()).toContain('计数:1')
  })
})

9.4 开发规范

  1. 命名规范

- 组件名使用PascalCase - 文件名使用kebab-case - 变量名使用camelCase - 常量名使用UPPER_SNAKE_CASE

  1. 代码风格

- 使用TypeScript类型注解 - 遵循ESLint规则 - 使用Prettier格式化代码

  1. 注释规范

- 为复杂逻辑添加注释 - 为公共API添加JSDoc注释 - 保持注释与代码同步

总结

本技能总结涵盖了Vue3全家桶与Ant Design结合开发的核心知识,包括:

  1. Vue3核心特性:Composition API、响应式系统、生命周期钩子
  2. TypeScript集成:组件类型定义、路由类型定义、Pinia类型定义
  3. Ant Design Vue组件库:基础组件、表单组件、表格组件
  4. Vue Router路由管理:路由配置、路由守卫、编程式导航
  5. Pinia状态管理:Store定义、Store使用
  6. 网络请求与API:Fetch封装、API调用示例
  7. 项目构建与优化:Vite配置、性能优化、代码格式化
  8. publish-commons组件库:组件库概览、安装与配置、组件使用、类型定义
  9. 最佳实践:代码组织、组件设计、测试、开发规范

通过学习这些内容,开发者可以快速掌握Vue3+Ant Design+publish-commons项目开发技能,构建高质量的企业级应用。

平台分布

OpenClaw

81.14%
按下载量换算1,125

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills