6 Star 58 Fork 21

XE/vxe-pc-ui

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

vxe-pc-ui

简体中文 | 繁體中文 | English | 日本語

star npm version NodeJS with Webpack npm downloads issues issues closed pull requests pull requests closed npm license

一个基于 vue 的 PC 端组件库

  • 设计理念

    • 面向现代浏览器,高效的简洁 API 设计
    • 按需加载
  • 计划

    • ~~v1.0 基于 vue2.6+,停止维护 ~~
    • ~~v2.0 基于 vue2.6+,停止维护 ~~
    • v3.0 基于 vue2.6+,只支持现代浏览器,不支持 IE
    • v4.0 基于 vue3.2+,只支持现代浏览器,不支持 IE
    • 计划功能:虚拟列表,支持百万级数据渲染
    • 计划功能:虚拟表单,支持万级表单项渲染
    • 计划功能:全功能表单可视化设计器
    • 计划功能:全功能列表可视化设计器
    • 计划功能:全功能流程图可视化设计器
    • 计划功能:虚拟列表,支持千万级数据渲染

浏览器支持

Edge Chrome Firefox Opera Safari
80+ ✔ 80+ ✔ 90+ ✔ 75+ ✔ 10+ ✔

在线文档

👉 组件文档
👉 表格文档

QQ 交流群

该群供大家交流問題,如果群人数已满,将会不定期剔除不活跃的。

qq qq

功能点

👀 Vxe UI

  • alert 警告提示
  • anchor 锚点
  • anchor-link 锚点-链接
  • avatar 头像
  • badge 徽标
  • breadcrumb 面包屑
  • breadcrumb-item 面包屑-项
  • button 按钮
  • button-group 按钮组
  • calendar 日历
  • card 卡片
  • carousel 走马灯
  • carousel-item 走马灯 - 项
  • checkbox 复选框
  • checkbox-group 复选框-组
  • col 列
  • collapse 展开面板
  • collapse-pane 展开面板-容器
  • color-picker 颜色选择器
  • countdown 倒计时
  • date-picker 日期选择器
  • drawer 抽屉
  • empty 空数据
  • flow-design 流程设计器
  • flow-view 流程设计器-视图渲染
  • form 表单
  • form-design 表单设计器
  • form-group 表单-分组
  • form-item 表单-项
  • form-view 表单设计器-视图渲染
  • icon 图标
  • icon-picker 图标选择
  • image 图片
  • image-group 图片组
  • image-preview 图片预览
  • input 输入框
  • layout-aside 页面布局-左侧
  • layout-body 页面布局-内容
  • layout-container 页面布局-容器
  • layout-footer 页面布局-页尾
  • layout-header 页面布局-页头
  • link 链接
  • list-design 列表设计器
  • list-view 列表设计器-视图渲染
  • list 虚拟列表
  • loading 加载中
  • menu 菜单
  • modal 模态窗口
  • number-input 数值输入框
  • optgroup 下拉框-分组项
  • option 下拉框-项
  • pager 分页
  • password-input 密码输入框
  • print 打印
  • print-page-break 分页打印
  • pulldown 下拉容器
  • radio 单选框
  • radio-button 单选框-按钮
  • radio-group 单选框-组
  • rate 评分
  • result 结果
  • row 行
  • select 下拉框
  • spilt 分割面板
  • spilt-pane 分割面板-面板
  • slider 滑块
  • steps 步骤条
  • switch 开关
  • tab-pane 页签-容器
  • tabs 页签
  • text-ellipsis 多行文本溢出
  • table-select 表格下拉框
  • textarea 文本域
  • tip 提示
  • tooltip 文字提示
  • tree 树形组件
  • tree-select 树形下拉框
  • upload 附件上传
  • watermark 水印

👀 Vxe Table

  • table 表格-基础表格
  • column 表格-列
  • colgroup 表格-分组列
  • toolbar 表格-工具栏
  • grid 表格-配置式

安装

npm install vxe-pc-ui
// ...
import VxeUI from 'vxe-pc-ui'
import 'vxe-pc-ui/lib/style.css'
// ...
// ...
import VxeTable from 'vxe-table'
import 'vxe-table/lib/style.css'
// ...

createApp(App).use(VxeUI).use(VxeTable).mount('#app')

CDN

使用第三方 CDN 方式记得锁定版本号,避免受到非兼容性更新的影响
不建议将第三方的 CDN 地址用于正式环境,因为该连接随时都可能会失效

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <!-- style -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-pc-ui@4/lib/style.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-table@4/lib/style.css">
  <!-- vue -->
  <script src="https://cdn.jsdelivr.net/npm/vue@3"></script>
  <!-- table -->
  <script src="https://cdn.jsdelivr.net/npm/xe-utils"></script>
  <script src="https://cdn.jsdelivr.net/npm/vxe-pc-ui@4"></script>
  <script src="https://cdn.jsdelivr.net/npm/vxe-table@4"></script>
</head>
<body>
  <div id="app">
    <div>
      <vxe-form
        :data="formData"
        @submit="submitEvent">
        <vxe-form-item title="名称" field="name" span="12" :item-render="{}">
          <template #default="params">
            <vxe-input v-model="formData.name"></vxe-input>
          </template>
        </vxe-form-item>
        <vxe-form-item title="角色" field="role" span="12" :item-render="{}">
          <template #default="params">
            <vxe-input v-model="formData.role"></vxe-input>
          </template>
        </vxe-form-item>
        <vxe-form-item title="年龄" field="age" span="12" :item-render="{}">
          <template #default="params">
            <vxe-input v-model="formData.age"></vxe-input>
          </template>
        </vxe-form-item>
        <vxe-form-item align="center" span="24" :item-render="{}">
          <template #default>
            <vxe-button type="submit" status="primary">提交</vxe-button>
            <vxe-button type="reset">重置</vxe-button>
          </template>
        </vxe-form-item>
      </vxe-form>
    </div>
  </div>
  <script>
    (function () {
      var App = {
        data() {
          return {
            formData: {
              name: '',
              nickname: '',
              sex: '',
              role: ''
            }
          }
        },
        methods: {
          submitEvent () {
            VxeUI.modal.message({ content: '保存成功', status: 'success' })
          }
        }
      }
      Vue.createApp(App).use(VxeUI).use(VXETable).mount('#app')
    })()
  </script>
</body>
</html>

示例

<template>
  <div>
    <vxe-form
      :data="formData"
      @submit="submitEvent">
      <vxe-form-item title="名称" field="name" span="12" :item-render="{}">
        <template #default="params">
          <vxe-input v-model="formData.name"></vxe-input>
        </template>
      </vxe-form-item>
      <vxe-form-item title="角色" field="role" span="12" :item-render="{}">
        <template #default="params">
          <vxe-input v-model="formData.role"></vxe-input>
        </template>
      </vxe-form-item>
      <vxe-form-item title="年龄" field="age" span="12" :item-render="{}">
        <template #default="params">
          <vxe-input v-model="formData.age"></vxe-input>
        </template>
      </vxe-form-item>
      <vxe-form-item align="center" span="24" :item-render="{}">
        <template #default>
          <vxe-button type="submit" status="primary">提交</vxe-button>
          <vxe-button type="reset">重置</vxe-button>
        </template>
      </vxe-form-item>
    </vxe-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      formData: {
        name: '',
        nickname: '',
        sex: '',
        role: ''
      }
    }
  },
  methods: {
    submitEvent () {
      VxeUI.modal.message({ content: '保存成功', status: 'success' })
    }
  }
}
</script>

运行项目

安装依赖

npm run update

启动本地调试

npm run serve

编译打包,生成编译后的目录:es,lib

npm run lib

贡献源码步骤

  1. 如果是修复 bug,必须有示例的复现链接
  2. 如果新功能,涉及代码风格、质量、还需有对应的示例页面

贡献者

Thank you to everyone who contributed to this project.

vxe-pc-ui

许可证

MIT © 2019-present, Xu Liangzhan

MIT License Copyright (c) 2019 xuliangzhan 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.

简介

Vxe UI 支持 vue2, vue3 的 PC 端组件库 展开 收起
TypeScript 等 3 种语言
MIT
取消

发行版 (145)

全部
6天前

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/x-extends/vxe-pc-ui.git
git@gitee.com:x-extends/vxe-pc-ui.git
x-extends
vxe-pc-ui
vxe-pc-ui
main

搜索帮助