├── mini-react.txt ├── README.md └── src ├── core ├── commands │ ├── varbook │ │ ├── hooks │ │ │ ├── character │ │ │ │ ├── base64.ts │ │ │ │ └── standard.ts │ │ │ └── api │ │ │ │ ├── rest │ │ │ │ └── translate.ts │ │ │ │ └── index.ts │ │ ├── varbookCommand.ts │ │ └── VarbookBox.vue │ ├── relax │ │ ├── ikun │ │ │ ├── ikun.mp4 │ │ │ ├── ikunCommand.ts │ │ │ ├── IkunBox.vue │ │ │ └── charVideo.js │ │ ├── music │ │ │ ├── musicApi.ts │ │ │ ├── musicCommand.ts │ │ │ └── MusicBox.vue │ │ ├── ikuntest │ │ │ ├── IkunTestBox.vue │ │ │ └── ikuntestCommand.ts │ │ └── moyu │ │ │ ├── moyuCommand.ts │ │ │ └── MoYuBox.vue │ ├── user │ │ ├── userConstant.ts │ │ ├── type.d.ts │ │ ├── subCommands │ │ │ ├── logoutCommand.ts │ │ │ ├── loginCommand.ts │ │ │ └── registerCommand.ts │ │ ├── userApi.ts │ │ ├── userStore.ts │ │ └── userCommands.ts │ ├── hot │ │ ├── hotApi.ts │ │ ├── hotCommand.ts │ │ └── HotBox.vue │ ├── todo │ │ ├── type.d.ts │ │ ├── subCommands │ │ │ └── addCommand.ts │ │ ├── todoCommand.ts │ │ ├── TodoBox.vue │ │ └── todoStore.ts │ ├── fanyi │ │ ├── fanYiApi.ts │ │ ├── FanYiBox.vue │ │ └── fanyiCommand.ts │ ├── terminal │ │ ├── clearCommand.ts │ │ ├── config │ │ │ ├── resetCommand.ts │ │ │ ├── welcomeCommand.ts │ │ │ ├── hintCommand.ts │ │ │ ├── backgroundCommand.ts │ │ │ └── terminalConfigStore.ts │ │ ├── info │ │ │ ├── InfoBox.vue │ │ │ └── infoCommand.ts │ │ ├── shortcut │ │ │ ├── ShortcutBox.vue │ │ │ └── shortcutCommand.ts │ │ ├── historyCommand.ts │ │ └── help │ │ │ ├── HelpBox.vue │ │ │ ├── helpCommand.ts │ │ │ ├── CommandHelpBox.vue │ │ │ └── helpUtils.ts │ ├── space │ │ ├── pwdCommand.ts │ │ ├── cdCommand.ts │ │ ├── spaceCommands.ts │ │ ├── mkdirCommand.ts │ │ ├── copyCommand.ts │ │ ├── moveCommand.ts │ │ ├── listCommand.ts │ │ ├── removeCommand.ts │ │ ├── addCommand.ts │ │ └── spaceStore.ts │ ├── dateCommand.ts │ ├── ddos │ │ ├── DdosBox.vue │ │ └── ddosCommand.ts │ ├── search │ │ ├── bilibili │ │ │ ├── BilibiliBox.vue │ │ │ └── bilibiliCommand.ts │ │ ├── mdnCommand.ts │ │ ├── bingCommand.ts │ │ ├── zhihuCommand.ts │ │ ├── doubanCommand.ts │ │ ├── douyinCommand.ts │ │ ├── sogouCommand.ts │ │ ├── gengCommand.ts │ │ ├── githubCommand.ts │ │ ├── googleCommand.ts │ │ ├── codenavCommand.ts │ │ ├── wangyiyunCommand.ts │ │ ├── baidudevCommand.ts │ │ ├── fsearchCommand.ts │ │ ├── duckduckgoCommand.ts │ │ ├── baiduCommand.ts │ │ └── searchCommands.ts │ ├── timing │ │ ├── timingCommand.ts │ │ └── TimingBox.vue │ ├── gotoCommand.ts │ └── pingCommand.ts ├── command.d.ts ├── commandRegister.ts └── commandExecutor.ts ├── App.vue ├── plugins ├── myDayjs.ts └── myAxios.ts ├── env.d.ts ├── configs └── routes.ts ├── utils └── smartText.ts ├── main.ts ├── pages ├── IndexPage.vue └── old │ └── XTermPage.vue └── components └── yu-terminal ├── ContentOutput.vue ├── history.ts ├── hint.ts ├── type.d.ts ├── shortcuts.ts └── YuTerminal.vue /mini-react.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mini-react 2 | -------------------------------------------------------------------------------- /src/core/commands/varbook/hooks/character/base64.ts: -------------------------------------------------------------------------------- 1 | export const enBase64 = (oldVal: string): string => btoa(encodeURI(oldVal)); 2 | -------------------------------------------------------------------------------- /src/core/commands/relax/ikun/ikun.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/limingpu123456/mini-react/HEAD/src/core/commands/relax/ikun/ikun.mp4 -------------------------------------------------------------------------------- /src/core/commands/user/userConstant.ts: -------------------------------------------------------------------------------- 1 | import UserType = User.UserType; 2 | 3 | /** 4 | * 本地用户 5 | */ 6 | export const LOCAL_USER: UserType = { 7 | username: "local", 8 | }; 9 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/core/commands/hot/hotApi.ts: -------------------------------------------------------------------------------- 1 | import myAxios from "../../../plugins/myAxios"; 2 | 3 | /** 4 | * 获取音乐热榜 5 | */ 6 | export const listHotMusics = async () => { 7 | return await myAxios.post("/music/list/hot", {}); 8 | }; 9 | -------------------------------------------------------------------------------- /src/core/commands/todo/type.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace Todo { 2 | /** 3 | * 任务类型 4 | */ 5 | interface TaskType { 6 | name: string; 7 | isFinished: boolean; 8 | createTime: date; 9 | finishTime?: date; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/core/commands/user/type.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace User { 2 | /** 3 | * 用户类型 4 | */ 5 | interface UserType { 6 | username: string; 7 | email?: string; 8 | createTime?: date; 9 | updateTime?: date; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/plugins/myDayjs.ts: -------------------------------------------------------------------------------- 1 | import dayjs from "dayjs"; 2 | import "dayjs/locale/zh-cn"; 3 | import Duration from "dayjs/plugin/duration"; 4 | 5 | // 全局设置为中文 6 | dayjs.locale("zh-cn"); 7 | dayjs.extend(Duration); 8 | 9 | export default dayjs; 10 | -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import type { DefineComponent } from 'vue' 5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /src/core/commands/relax/music/musicApi.ts: -------------------------------------------------------------------------------- 1 | import myAxios from "../../../../plugins/myAxios"; 2 | 3 | /** 4 | * 搜索单条音乐 5 | * @param keywords 6 | */ 7 | export const getSingleMusic = async (keywords: string) => { 8 | if (!keywords) { 9 | return null; 10 | } 11 | return await myAxios.post("/music/get", { keywords }); 12 | }; 13 | -------------------------------------------------------------------------------- /src/configs/routes.ts: -------------------------------------------------------------------------------- 1 | import { RouteRecordRaw } from "vue-router"; 2 | import IndexPage from "../pages/IndexPage.vue"; 3 | import XTermPage from "../pages/old/XTermPage.vue"; 4 | 5 | const routes: RouteRecordRaw[] = [ 6 | { path: "/", component: IndexPage }, 7 | { path: "/old/xterm", component: XTermPage }, 8 | ]; 9 | 10 | export default routes; 11 | -------------------------------------------------------------------------------- /src/core/commands/relax/ikuntest/IkunTestBox.vue: -------------------------------------------------------------------------------- 1 |