首页龙虾技能列表 › wand-skill222 — 技能工具

wand-skill222 — 技能工具

v1.0.1

帮助开发者在项目中快速集成和使用 Wand UI 2.0 移动端组件库。该技能提供完整的组件 API 参考、使用示例和最佳实践。适用于以下场景:(1) 需要在 Vue 2.0 项目中使用 Wand UI 组件;(2) 查询特定组件的属性、事件或插槽;(3) 需要组件使用示例和代码模板;(4) 解决 Wand UI...

0· 85·0 当前·0 累计
by @qzhouz (Zane)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/31
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
安全
high confidence
This is an instruction-only documentation skill for using the Wand UI Vue component library; its files and runtime instructions are consistent with that purpose and do not request credentials or perform installs.
评估建议
This skill is documentation-only and appears coherent for its stated purpose. Before relying on it in a project: (1) if you install the referenced package, install @weiyi/wand-ui from the official registry (npm/yarn) and review that package's source and maintainership to avoid typosquatting; (2) ignore or update any hard-coded local paths in the README (e.g., /Users/zane/...) — they are example artifacts, not instructions to access your system; (3) if you plan to copy the skill into an agent dir...
详细分析 ▾
用途与能力
Name/description (Wand UI docs and examples) match the files and instructions. The skill only contains documentation and example code for @weiyi/wand-ui and does not request unrelated capabilities or credentials.
指令范围
SKILL.md and reference docs only provide usage examples, API reference, and setup instructions. Minor note: wand-skill-README.md contains example copy/paths that reference a local filesystem path (/Users/zane/...), which is a privacy/cleanliness issue in the docs but not an operational risk — the skill does not instruct the agent to read arbitrary host files or send data externally.
安装机制
No install spec or code files to execute; the skill is instruction-only. The README shows manual copy/unzip examples, but no automated download or archive extraction from remote URLs.
凭证需求
The skill declares no required environment variables, credentials, or config paths. The documentation references installing the upstream npm package (@weiyi/wand-ui) which would require normal npm operations when you choose to install that package yourself.
持久化与权限
always is false and the skill does not request persistent or elevated privileges. It does not modify other skills or system-wide settings.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.12026/3/31

- No code or documentation changes in this release. - Version bump only; content and features remain unchanged.

● Pending

安装命令 点击复制

官方npx clawhub@latest install wand-skill
镜像加速npx clawhub@latest install wand-skill --registry https://cn.clawhub-mirror.com

技能文档

概述

Wand UI 2.0 是一个基于 Vue 2.0 的移动端 UI 组件库,专为移动端 H5 应用设计。本技能帮助你快速在项目中集成和使用 Wand UI 组件。

核心特性

  • 36+ 精心设计的移动端组件
  • 完整的 TypeScript 支持
  • 支持按需引入
  • 单元测试覆盖率 90%+
  • 支持 SSR(服务端渲染)
  • 兼容 Android 4.0+ 和 iOS 8+

快速开始

安装

npm install @weiyi/wand-ui

引入方式

完整引入(适合小型项目)

import Vue from 'vue'
import WandUI from '@weiyi/wand-ui'
import '@weiyi/wand-ui/lib/wand-ui.css'

Vue.use(WandUI)

按需引入(推荐,减小打包体积)

import { WandButton, WandInput } from '@weiyi/wand-ui'
import '@weiyi/wand-ui/lib/button/style.css'
import '@weiyi/wand-ui/lib/input/style.css'

export default { components: { WandButton, WandInput } }

组件分类

表单组件

用于数据输入和表单验证

组件引入名称主要用途
ButtonWandButton按钮操作
InputWandInput单行文本输入
TextareaWandTextarea多行文本输入
CheckWandCheck复选框
SwitchWandSwitch开关切换
FormWandForm表单容器和验证
FormItemWandFormItem表单项
RateWandRate评分
UploaderWandUploader文件上传
示例:创建表单

选择器组件

用于日期、时间、选项等选择

组件引入名称主要用途
PickerWandPicker基础选择器
PopupPickerWandPopupPicker弹出式选择器
DatetimeWandDatetime日期时间选择
CascadeWandCascade级联选择(如省市区)
示例:日期选择

反馈组件

用于用户操作的反馈提示

组件引入名称主要用途
ToastWandToast轻提示
LoadingWandLoading加载状态
DialogWandDialog对话框
ConfirmWandConfirm确认框
AlertWandAlert警告框
ActionSheetWandActionSheet动作面板
示例:Toast 提示
// 文字提示
this.$toast('操作成功')

// 成功提示 this.$toast.success('保存成功')

// 失败提示 this.$toast.fail('操作失败')

// 加载中 this.$toast.loading('加载中...')

示例:Dialog 对话框


展示组件

用于内容展示和布局

组件引入名称主要用途
ListWandList列表和上拉加载
SwipeWandSwipe轮播图
SwipeItemWandSwipeItem轮播项
CollapseWandCollapse折叠面板
CollapseGroupWandCollapseGroup折叠面板组
NoticeBarWandNoticeBar通知栏
PhotoViewerWandPhotoViewer图片预览
示例:列表加载

导航组件

用于页面导航和路由切换

组件引入名称主要用途
TabWandTab标签页容器
TabItemWandTabItem标签页项
TabBarWandTabBar底部导航栏
TabBarItemWandTabBarItem底部导航项
NavBarWandNavBar顶部导航栏
示例:底部导航栏

其他组件

组件引入名称主要用途
PopupWandPopup弹出层基础组件
PopoverWandPopover气泡弹出框
SearchWandSearch搜索框
SwipeCellWandSwipeCell滑动单元格
AffixWandAffix固钉

组件使用工作流

步骤 1: 确定需求

根据用户需求,确定需要使用哪些组件:

  • 表单页面 → Form, FormItem, Input, Button 等
  • 列表页面 → List, NavBar
  • 选择功能 → Picker, Datetime, Cascade
  • 反馈提示 → Toast, Dialog, Loading

步骤 2: 引入组件

根据项目规模选择引入方式:

  • 小型项目:完整引入所有组件
  • 大型项目:按需引入需要的组件

步骤 3: 查询 API

当需要了解组件的具体属性、事件或插槽时:

  • 查看 references/components_api.md 了解组件的完整 API
  • 查看该组件的 Props、Events、Slots 等

步骤 4: 编写代码

参考示例代码和最佳实践编写组件代码:

  • 在 template 中使用组件标签
  • 在 script 中引入组件
  • 绑定数据和事件处理器

步骤 5: 样式调整

如有需要,通过以下方式自定义样式:

  • 使用组件的 customStyle 属性(如 Button)
  • 通过 CSS 覆盖组件样式
  • 使用组件提供的插槽自定义内容

常见使用场景

场景 1: 创建登录页面

场景 2: 创建商品列表页

最佳实践

1. 表单验证

使用 Form 组件的 rules 进行验证,统一在提交时调用 validate 方法:

this.$refs.form.validate((valid) => {
  if (valid) {
    // 表单验证通过,执行提交逻辑
  } else {
    // 表单验证失败
    return false
  }
})

2. 列表加载

使用 List 组件实现下拉加载时,注意:

  • 在 load 事件中设置 loading = true
  • 加载完成后设置 loading = false
  • 没有更多数据时设置 finished = true
  • 重置列表时要重置 finished = false

3. Toast 提示规范

// 成功操作
this.$toast.success('操作成功')

// 失败操作 this.$toast.fail('操作失败')

// 加载中(需要手动关闭) const toast = this.$toast.loading('加载中...') // 请求完成后 toast.clear()

// 普通提示 this.$toast('提示信息')

4. 组件命名规范

在模板中使用 kebab-case(短横线命名),在 JavaScript 中使用 PascalCase(大驼峰命名):

TypeScript 支持

Wand UI 提供完整的 TypeScript 类型定义:

import { WandButton } from '@weiyi/wand-ui'
import { Component, Vue } from 'vue-property-decorator'

@Component({ components: { WandButton } }) export default class MyComponent extends Vue { private message: string = 'Hello'

private handleClick(): void { console.log(this.message) } }

参考资源

本技能包含以下参考文档,可根据需要查看:

references/components_api.md

完整的组件 API 参考文档,包含所有组件的:
  • Props(属性)
  • Events(事件)
  • Slots(插槽)
  • Methods(方法)
  • 使用示例

何时查看: 需要了解特定组件的详细 API 时

references/quickstart.md

快速入门指南,包含:
  • 安装和引入方式
  • 常见使用场景的完整示例
  • 浏览器支持信息
  • 常见问题解答

何时查看: 初次使用 Wand UI 或需要参考完整的使用示例时

故障排查

样式没有生效

问题: 组件显示不正常或没有样式

解决方案:

  • 确保引入了 CSS 文件: import '@weiyi/wand-ui/lib/wand-ui.css'
  • 按需引入时,确保引入了对应组件的样式文件
  • 检查是否使用了 babel-plugin-component 插件

组件提示未注册

问题: 控制台报错"Unknown custom element"

解决方案:

  • 确保在 components 中注册了组件
  • 确保组件名称拼写正确
  • 全局引入时确保调用了 Vue.use(WandUI)

Toast 等全局方法不存在

问题: this.$toast is not a function

解决方案:

  • 确保使用了完整引入方式 Vue.use(WandUI)
  • 或者手动安装 Toast 组件: Vue.use(WandToast)

移动端显示异常

问题: 在移动设备上显示不正常

解决方案: 在 HTML 的 中添加 viewport 标签:


数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务