Tenlossiby/GUI/SKILL.md
# Solidity学习互动演示GUI开发工作流程 Skill > 文档版本:20260320 (Day 21 已添加) ## 项目概述 这是一个基于 Vue 3 + Pinia 的 Solidity 学习互动演示 GUI,从 Day 1 到 Day 30 的完整教学界面。 ## 核心架构 ### 技术栈 - **前端框架**: Vue 3 (Composition API) - **状态管理**: Pinia - **构建工具**: Vite - **样式**: CSS3 (Flexbox布局) - **语言**: JavaScript ### 目录结构(20260317更新) ``` GUI/ ├── src/ │ ├── components/ │ │ ├── AppHeader.vue # 头部组件 │ │ ├── DayContent.vue # 日程内容核心组件(动态导入) │ │ ├── DayNavigation.vue # 日程导航组件 │ │ ├── Sidebar.vue
npx skillsauth add 0xherstory/WWW6.5 Tenlossiby/GUIInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
文档版本:20260320 (Day 21 已添加)
这是一个基于 Vue 3 + Pinia 的 Solidity 学习互动演示 GUI,从 Day 1 到 Day 30 的完整教学界面。
GUI/
├── src/
│ ├── components/
│ │ ├── AppHeader.vue # 头部组件
│ │ ├── DayContent.vue # 日程内容核心组件(动态导入)
│ │ ├── DayNavigation.vue # 日程导航组件
│ │ ├── Sidebar.vue # 进度侧边栏组件
│ │ ├── shared/ # 共享组件
│ │ │ ├── ComingSoon.vue # 即将上线提示
│ │ │ ├── FullCodeModal.vue # 完整代码弹窗
│ │ │ ├── KnowledgePanel.vue # 知识面板
│ │ │ ├── ResizerHandle.vue # 列宽调节分隔条(实验性)
│ │ │ └── ResizableLayout.vue # 可调整布局(实验性)
│ │ └── days/ # 各Day组件
│ │ ├── Day1/ClickCounter.vue
│ │ ├── Day2/SaveMyName.vue
│ │ ├── Day11/InheritanceDemo.vue
│ │ ├── Day12/ERC20Token.vue
│ │ ├── Day13/ERC20TokenAdvanced.vue
│ │ ├── Day14/SafeDeposit.vue # 抽象合约 + 接口 + 工厂模式
│ │ ├── Day15/GasEfficientVoting.vue # Gas 优化技术
│ │ ├── Day16/PluginStore.vue # 插件存储系统 + 动态调用
│ │ ├── Day17/UpgradeHub.vue # 可升级合约 + 代理模式
│ │ ├── Day18/OracleContract.vue # 预言机 + 参数保险
│ │ ├── Day19/SignThis.vue # 签名验证 + 无Gas空投
│ │ ├── Day20/ReentryAttack.vue # 重入攻击 + 安全防护
│ │ └── Day21/SimpleNFT.vue # ERC721 NFT标准 + 铸造/转移/授权
│ ├── composables/ # 组合式函数
│ │ ├── useDay1.js
│ │ ├── useDay2.js
│ │ ├── useDay11.js
│ │ ├── useDay12.js
│ │ ├── useDay13.js
│ │ ├── useDay14.js # SafeDeposit 业务逻辑
│ │ ├── useDay15.js # GasEfficientVoting 业务逻辑
│ │ ├── useDay16.js # PluginStore 业务逻辑 + ABI 编码
│ │ ├── useDay17.js # UpgradeHub 业务逻辑 + 升级机制
│ │ ├── useDay18.js # OracleContract 业务逻辑 + 双预言机
│ │ ├── useDay19.js # SignThis 业务逻辑 + ECDSA签名
│ │ ├── useDay20.js # ReentryAttack 业务逻辑 + 重入攻击模拟
│ │ └── useDay21.js # SimpleNFT 业务逻辑 + NFT铸造/转移/授权
│ ├── data/
│ │ ├── concepts.js # 概念定义
│ │ └── days.js # 日程配置(核心配置)
│ ├── stores/ # Pinia 状态管理
│ │ ├── contractStore.js # 合约状态
│ │ └── progressStore.js # 学习进度
│ ├── styles/
│ │ └── main.css # 全局样式
│ └── App.vue # 主应用组件
├── AI_PROMPT_GUIDE.md # AI开发指南
└── skill.md # 本文件
使用 Pinia 进行状态管理,替代了原来的集中式 App.vue 状态。
// contractStore.js - 合约状态
contracts: {
day1: { count, interactionCount },
day2: { name, bio, hasStored, hasRetrieved },
day3: { candidates, voteCount },
day4: { bids, highestBidder, ended },
day5: { owner, treasureAmount, allowance },
day6: { members, balances, bankManager },
day7: { debts, balances, friendList },
day8: { owner, totalTips, conversionRates, isUserAdmin },
day9: { owner, userAddress, isUserAdmin, scientificCalculatorAddress, isAddressSet, operationCount, operationHistory, challengeTasks },
day10: { userProfile, workoutHistory, milestones, totalWorkouts, totalDistance },
day11: { owner, userAddress, contractBalance, eventLog, interactionCount }, // 继承 + 所有权管理
day12: { tokenName, tokenSymbol, totalSupply, balances, allowances, userAddress }, // ERC20 代币标准
day13: { tokenName, tokenSymbol, totalSupply, balances, allowances, userAddress }, // ERC20 + virtual 函数
day14: { depositBoxes, eventLog, boxCounter, currentRole, currentAddress }, // 抽象合约 + 接口 + 工厂模式
day15: { proposals, proposalCounter, votesCast, storageBits, userAddress, eventLog }, // Gas 优化技术
day16: { profiles, plugins, pluginData, currentUser, pluginCounter }, // 插件存储系统 + 动态调用
day17: { plans, subscriptions, currentVersion, isUpgraded, paused }, // 可升级合约 + 代理模式
day18: { currentUser, currentRole, ethPrice, rainfall, hasInsurance, contractBalance }, // 预言机 + 参数保险
day19: { currentRole, currentUserAddress, organizer, generatedSignature, isEntered, participantsList }, // 签名验证 + 无Gas空投
day20: { currentRole, vaultBalance, userBalances, reentrancyStatus, isAttacking, attackCount }, // 重入攻击 + 安全防护
day21: { nfts, tokenApprovals, operatorApprovals, selectedTokenId, mintForm, transferForm, approveForm, operatorForm, queryForm } // ERC721 NFT标准 + 铸造/转移/授权
}
// progressStore.js - 学习进度(自动从 dayConfigs 生成)
dayProgress: {
1: { unlockedConcepts: [], totalConcepts: 4, interactionCount: 0 },
2: { unlockedConcepts: [], totalConcepts: 6, interactionCount: 0 },
// ... 自动计算 totalConcepts
}
动态导入: 使用 defineAsyncComponent 实现按需加载
// DayContent.vue
const dayComponents = {
1: defineAsyncComponent(() => import('./days/Day1/ClickCounter.vue')),
2: defineAsyncComponent(() => import('./days/Day2/SaveMyName.vue')),
// ...
}
共享组件: 提取公共逻辑到 shared 目录
KnowledgePanel.vue - 知识面板(右栏)FullCodeModal.vue - 完整代码弹窗ComingSoon.vue - 未开发天数提示cd GUI
npm install
npm run dev
步骤 1: 在 src/data/days.js 中添加配置
export const dayConfigs = {
// ... 现有配置
X: {
title: "Day X - 标题",
subtitle: "副标题",
concepts: ["concept1", "concept2", "concept3"]
}
}
步骤 2: 创建组件文件 src/components/days/DayX/YourComponent.vue
步骤 3: 创建 composable src/composables/useDayX.js(如需要状态管理)
步骤 4: 在 src/components/DayContent.vue 中注册动态导入
const dayComponents = {
// ... 现有天数
X: defineAsyncComponent(() => import('./days/DayX/YourComponent.vue')),
}
注意: progressStore.js 会自动从 dayConfigs 计算 totalConcepts,无需手动修改。
showLeftSidebar 和 showRightSidebar 属性ComingSoon 组件switch-day 事件跳转--primary-color: #b58900;
--accent-cyan: #2aa198;
--accent-green: #859900;
--accent-red: #dc322f;
--bg-base: #fdf6e3;
--bg-surface-1: #eee8d5;
<button class="day-action-btn cyan">按钮</button>
<button class="day-action-btn green">按钮</button>
<button class="day-action-btn red small">小按钮</button>
可用颜色:blue, yellow, orange, green, magenta, cyan, red
状态管理重构
contractStore.js 和 progressStore.jstotalConcepts 自动从 dayConfigs 计算组件架构重构
defineAsyncComponent 实现动态导入progressStore.unlockConcept()样式重构
main.css.day-action-btn 类错误处理
ComingSoon 组件处理未实现天数列宽调节器:
useColumnResizer.js - 列宽调节 composableResizerHandle.vue - 分隔条组件ResizableLayout.vue - 可调整布局组件main.css,组件特定样式用 scopednpm run build)development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.