2 Star 66 Fork 33

柯晓楠 / Vue SQLEditor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

项目介绍

本项目是基于 Vue2 + Codemirror 开发的 Web 版 SQL 编辑器,提供了以下功能:

  • 在线运行 SQL 语句
  • 实时命令提示(支持表名、字段名、SQL关键词提示)
  • 查看 SQL 执行结果
  • 提交 SQL 命令集
  • 快捷使用命令集
  • SQL 语句格式化
  • SQL code differ
  • 动态设置编辑器配置项
  • 实时查看表结构

说明:本项目仅供学习研究使用!

项目使用

clone项目后在项目根目录下安装依赖

npm install

执行启动命令

npm run serve

本项目提供了配套的后端示例代码(基于 Node + Express 实现),地址: https://gitee.com/web1024cn/sqleditor-server

效果演示

编辑器效果:

展示查询结果:

实时表名、字段名、关键词提示:

SQL执行异常提示:

查看命令保存记录:

保存命令的 code differ 查看:

动态设置编辑器配置项:

快捷使用命令集:

代码介绍

  • 项目中使用了 codemirror@5.65.2 实现编辑器功能
  • 使用 axios 实现 HTTP 请求,在 vue.config.js 中配置了 webpack-server 的代理解决跨域问题
  • 封装 axios 请求模块,规范 API 格式
  • 使用 vuex modules 和 vuex-persistedstate 实现前端数据缓存
MIT License Copyright (c) 2022 柯晓楠 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于 Vue2 + Codemirror 实现的 web 版 SQL 编辑器 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/web1024cn/vue-sqleditor.git
git@gitee.com:web1024cn/vue-sqleditor.git
web1024cn
vue-sqleditor
Vue SQLEditor
master

搜索帮助

14c37bed 8189591 565d56ea 8189591