Giter Club home page Giter Club logo

arco-design-vue's Introduction

Arco Design

A comprehensive Vue UI components library based on the Arco Design system.

license

English | 简体中文

Features

Comprehensive

With more than 60 crafted components that you can use out of the box.

Customizable theme

Extensive theme tokens can be customized to build your own theme. Two ways of customization are supported:

TypeScript friendly

All components are written in TypeScript so it's type friendly.

Installation

Available as an npm package

// with npm
npm install @arco-design/web-vue

// with yarn
yarn add @arco-design/web-vue

Examples

import { createApp } from 'vue'
import ArcoVue from '@arco-design/web-vue';
import App from './App.vue';
import '@arco-design/web-vue/dist/arco.css';

const app = createApp(App);
app.use(ArcoVue);
app.mount('#app');

Development

  1. Use npm install -g to install basic packages such as lerna and yarn.

  2. Use yarn install to install the dependencies of each package in workspaces (If you encounter a YN0018 error, you can use YARN_CHECKSUM_BEHAVIOR=update yarn to install).

  3. Use npm run init to initialize the project.

Useful Links

Ecosystems

Project Description
React Component Library A comprehensive React UI components library based on the Arco Design system
Design Lab A platform to create and manage your themes with ease.
Material Market A platform that provides massive high-quality customized materials to greatly boost development efficiency.
Icon Box One-stop platform to manage your icons.
Arco Pro A solution to quickly building applications from scratch.

Contributing

Developers interested in contributing should read the Code of Conduct and the Contributing Guide.

Thank you to all the people who already contributed to ArcoDesign!

License

Ths project is MIT licensed.

arco-design-vue's People

Contributors

baiwusanyu-c avatar bzw1204 avatar chanzhaoyu avatar chenxch avatar chuchencheng avatar czq297297 avatar doctor-wu avatar enoooch avatar ferricion avatar flsion avatar hanxiaoluan avatar hehehai avatar jekip avatar kaikaibenkai avatar kigoal avatar kirazxyun avatar ladychatterleylover avatar oljc avatar pengjiyuan avatar saber-kurama avatar seepine avatar show8e avatar sleepdevil avatar tazyong avatar wehuss avatar wsw2000 avatar yinkaihui avatar yuhan0709 avatar zhxxxxxxxx avatar zz-zzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arco-design-vue's Issues

input组件字数统计值不一定正确

Basic Info

Extra info

对文本内容应该做一次判断,使用以下代码得到真正的length
const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;

if (str) {
val = value.replace(spRegexp, '_').length;
}

What is expected?

罕见字长度也应该是1

Steps to reproduce

往输入框中输入一些罕见字,如“𠮷”、“💩”,单个文字长度会被识别成2

希望为 Image 组件添加错误加载时替换 svg 部分的 slot

Basic Info

What are the similar cases of this feature

类似于 element ui 一样的 提供一个 slot 插槽

What problem does this feature solve?

源码里面有一个 error slot ,但是直接使用 error slot会把整个 image-overlay 内部的内容替换掉,因为准备使用 ui 创建的 Arco 主题包,希望保留Arco 主题包内的样式的情况下 替换 error 时的 svg 图片,保留其他元素,包括 alt 部分

自定义组件如何借助ConfigProvider适配i18n?

现有案例

https://github.com/arco-design/arco-design-vue/blob/73e63ddfa9d1b2e11c934fc810d4fcda898cda8b/packages/web-vue/components/pagination/page-jumper.vue
我看了下代码,貌似是这么用的

import { useI18n } from '../locale';
    const { t } = useI18n();
    <span v-if="!simple">{{ t('pagination.goto') }}</span>

https://github.com/arco-design/arco-design-vue/blob/73e63ddfa9d1b2e11c934fc810d4fcda898cda8b/packages/web-vue/components/locale/index.ts
packages/web-vue/components/locale/lang/ 下面定义语言

预期解决问题

但是还是没解决我的问题,就是自定义组件如何借助ConfigProvider适配i18n。因为不太清楚locale如何指定自定义组件语言包的位置

Tree component couldn't be collapsed properly when virtual-list-props is enabled

Basic Info

What is expected?

Node could be collapsed/expanded normally.

Steps to reproduce

Just review virtual list sample in official document(link attached)

回车提交无法触发 form submit 事件

基本信息

额外补充

输入框阻止了默认行为

预期结果

回车提交和点击按钮提交一致,正常输出 console

复现步骤

点击提交按钮正常提交,输出 console
在任意 input 框回车,无法正常提交

Tree 组件的 check-strictly 属性逻辑不对

Basic Info

预期结果

初始化取消关联父子节点,也就是将 checked-keys 里面的节点选中,然后开启 父子关联属性之后,已初始化选中的节点不再发生变化,当下一次进行节点的选中/取消,如果有子节点,子节点也响应的选中或取消。

现在的情况是,只要启用父子节点,那么 checked-keys 属性的 选中节点等于没用,因为只要有节点包含数据,无论子节点是否选中,都会默认给你全部选中。

复现步骤

1.设置 Tree 组件的 check-strictly 为 true
2.设置 Tree 组件的 checked-keys 默认选中节点,选中节点必须包含子节点
3.使用 setTimeout 模拟数据初始化完成之后,将 check-strictly 设置为 false
4.观察 Tree 组件的 选中节点以及子节点的 变化过程

table component perform not expected when scroll prop only set x

Basic Info

What is expected?

<a-table :columns="columns" :data="tableData" :scroll="{x: 2500}" /> effect and only scroll in x axis

Steps to reproduce

<a-table :columns="columns" :data="tableData" :scroll="{x: 2500}" /> not effect
<a-table :columns="columns" :data="tableData" :scroll="{x: 2500, y: 400}" /> effect

RTL support

Basic Info

What are the similar cases of this feature

Nothing

What problem does this feature solve?

Adding RTL support to solve right-to-left style.

Extra info

I'm interested in contributing.

When importing the component on demand, the default componentPrefix does not work.

Basic Info

额外补充

I found that the name of the fully imported component used componentPrefix + Component.name, but the name of the demand imported component only used export name.

预期结果

It can use <a-button> in <template>.

复现步骤

  1. Create a vue3 + vite project.
  2. Add vite-plugin-import plugin to imports component's style on demand.
  3. Import component in <script setup>, such as import { Button } from "@arco-design/web-vue", and then can't use <a-button> in <template>.

Popover组件鼠标点击body隐藏不了

基本信息

预期结果

点击body,隐藏Popover

复现步骤

点击Popover触发显示,然后点击body,无法消失,在body宽度和高度比较小的情况可以复现
react版本没有此问题,另外select,treeselect组件也会存在此问题,点击出现下拉框,鼠标点击body,也有无法消失的情况

zIndex都是1,导致有冻结列的表格在滑动的时候会被image等组件覆盖

Basic Info

What is expected?

当image滑到冻结列后时应该被冻结列盖住

Steps to reproduce

在table中设置冻结列和scroll,并在非冻结列中放上image组件,在滑动的时候,image没有被冻结的列盖住。
image

tree select 鼠标经过严重抖动

基本信息

预期结果

鼠标经过不抖动,并且在宽度足够的情况下,不换行

复现步骤

点击选择器,勾选几个节点,失去焦点后,鼠标再次经过选择器,会发生严重抖动,react版不会出现此情况
image
额外的换行

image
鼠标经过抖动

暗黑模式模式无法支持为默认选项,必须手动设置

Basic Info

  • 依赖包名 及 版本: @arco-design/web-vue:2.0.2
  • 系统版本: iMac (Retina 5K, 27-inch, 2017)
  • 浏览器版本: chrome 94.0.4606.81

预期结果

<body arco-theme="dark">
// 或者
app.use(ArcoVue, {
	arcoTheme: 'drak',
})

复现步骤

<body arco-theme="dark"> // 无法达到暗黑模式

必须手动设置

document.body.setAttribute('arco-theme', 'dark')

希望a-table的树形数据展示能支持懒加载

Basic Info

What are the similar cases of this feature

可以参考一下elementPlus这种
https://element-plus.gitee.io/zh-CN/component/table.html#%E6%A0%91%E5%BD%A2%E6%95%B0%E6%8D%AE%E4%B8%8E%E6%87%92%E5%8A%A0%E8%BD%BD

What problem does this feature solve?

一般表格用于展示分页数据量大的场景,这种情况有可能出现需要树形展示,而且可能会有无数层,希望能够支持懒加载,达到想查看某节点时才去后端获取对应节点的数据

【Cascader 、Radio】Related styles changed when font-weight go to bold

Basic Info

预期结果

Maybe the width should't change? It makes feel a little uncomfortable.

复现步骤

Cascader: The container width changes when my mouse is moving on the options.

image

Radio Group: The container width changes when some option is chosen.

image

Cannot install dependencies via 'yarn install'.

Basic Info

What is expected?

Last week I tried install dependencies v2.0.3 before and it was working fine at that time.
I remember when there was no yarn.lock file.
So I tried to remove yarn.lock and then yarn install and it works fine now.

Steps to reproduce

My global: [email protected] / [email protected] / [email protected]

  1. git clone [email protected]:arco-design/arco-design-vue.git && cd arco-design-vue
  2. yarn install
  3. Install failed, and error output:
❯ yarn install
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @arco-design/arco-vue-scripts@workspace:packages/arco-vue-scripts doesn't provide @types/node (peb92d), requested by ts-node
➤ YN0002: │ @arco-design/arco-vue-scripts@workspace:packages/arco-vue-scripts doesn't provide rollup (p47345), requested by rollup-plugin-terser
➤ YN0002: │ @arco-design/arco-vue-scripts@workspace:packages/arco-vue-scripts doesn't provide vue (pb01bf), requested by vue-jest
➤ YN0002: │ @arco-design/web-vue-storybook@workspace:packages/web-vue-storybook doesn't provide @babel/core (p420e0), requested by @storybook/addon-essentials
➤ YN0002: │ @arco-design/web-vue-storybook@workspace:packages/web-vue-storybook doesn't provide @babel/core (p0ef8a), requested by @storybook/vue3
➤ YN0002: │ @arco-design/web-vue-storybook@workspace:packages/web-vue-storybook doesn't provide @babel/core (p9b632), requested by babel-loader
➤ YN0002: │ @arco-design/web-vue-storybook@workspace:packages/web-vue-storybook doesn't provide @vue/compiler-sfc (pb9b14), requested by @storybook/vue3
➤ YN0002: │ @arco-design/web-vue-storybook@workspace:packages/web-vue-storybook doesn't provide vue (p91c75), requested by @storybook/vue3
➤ YN0002: │ @arco-design/web-vue-storybook@workspace:packages/web-vue-storybook doesn't provide webpack (p16f18), requested by babel-loader
➤ YN0002: │ @arco-design/web-vue-storybook@workspace:packages/web-vue-storybook doesn't provide webpack (pf3d8e), requested by less-loader
➤ YN0002: │ @arco-design/web-vue-storybook@workspace:packages/web-vue-storybook doesn't provide webpack (p1bad6), requested by vue-loader
➤ YN0002: │ @arco-design/web-vue@workspace:packages/web-vue doesn't provide babel-jest (pdbd1b), requested by vue-jest
➤ YN0002: │ @arco-design/web-vue@workspace:packages/web-vue [0f5a0] doesn't provide babel-jest (p392c6), requested by vue-jest
➤ YN0002: │ @mdx-js/loader@npm:1.6.22 doesn't provide react (p12550), requested by @mdx-js/react
➤ YN0002: │ @storybook/addon-essentials@npm:6.3.12 [2dbe8] doesn't provide @storybook/components (pbeb6f), requested by @storybook/addon-measure
➤ YN0002: │ @storybook/addon-essentials@npm:6.3.12 [2dbe8] doesn't provide @storybook/core-events (p1b30d), requested by @storybook/addon-measure
➤ YN0002: │ @storybook/addon-essentials@npm:6.3.12 [2dbe8] doesn't provide @storybook/theming (paa71d), requested by @storybook/addon-measure
➤ YN0002: │ @storybook/core@npm:6.3.12 [22486] doesn't provide webpack (pd050d), requested by @storybook/core-client
➤ YN0002: │ @storybook/core@npm:6.3.12 [246bd] doesn't provide webpack (pc74cc), requested by @storybook/core-client
➤ YN0002: │ @storybook/csf-tools@npm:6.3.12 doesn't provide @babel/core (pdc558), requested by @babel/plugin-transform-react-jsx
➤ YN0002: │ @storybook/csf-tools@npm:6.3.12 doesn't provide @babel/core (p0319c), requested by @babel/preset-env
➤ YN0002: │ @storybook/vue3@npm:6.3.12 [2dbe8] doesn't provide typescript (pee6b8), requested by ts-loader
➤ YN0002: │ @vue/babel-plugin-jsx@npm:1.1.1 doesn't provide @babel/core (pd4d83), requested by @babel/plugin-syntax-jsx
➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide typescript (p79ddf), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide webpack (p2af19), requested by fork-ts-checker-webpack-plugin
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 254ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ @babel/generator@npm:7.15.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @babel/helper-annotate-as-pure@npm:7.15.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @babel/helper-builder-binary-assignment-operator-visitor@npm:7.15.4 can't be found in the cache and will be fetched from the
➤ YN0013: │ @babel/helper-compilation-targets@npm:7.15.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @babel/helper-create-class-features-plugin@npm:7.15.4 can't be found in the cache and will be fetched from the remote regist
➤ YN0018: │ @arco-design/color@npm:0.4.0: The remote archive doesn't match the expected checksum
➤ YN0013: │ yargs@npm:16.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yarn@npm:1.22.17 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yn@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ zwitch@npm:1.0.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 58s 780ms
➤ YN0000: Failed with errors in 59s 37ms

a-table不支持二次封装

Basic Info

  • Package Name And Version: @arco-design/web-vue:2.0.2
  • System: iMac (Retina 5K, 27-inch, 2017)
  • Browser: chrome 94.0.4606.81

What is expected?

目前这样使用,表格不显示

<template lang="pug">
a-table.w-table(:columns="columns" :data="data" :bordered="false" :stripe="true" :pagination="pagination" @page-change="pageChange" @page-size-change="pageSizeChange")
  slot
</template>
<script lang="ts">
import { defineComponent, onMounted, reactive, toRefs } from 'vue'
import { tableList } from '@/apis'

export default defineComponent({
	name: 'w-table',
// ...
<template lang="pug">
w-table(:ref="el=>dom['table']=el" :columns="columns" url="/api/dictionary/goodList")
	a-table-column(title="Name" dataIndex="name")

Steps to reproduce

<template lang="pug">
a-table.w-table(:columns="columns" :data="data" :bordered="false" :stripe="true" :pagination="pagination" @page-change="pageChange" @page-size-change="pageSizeChange")
  slot
</template>
<script lang="ts">
import { defineComponent, onMounted, reactive, toRefs } from 'vue'
import { tableList } from '@/apis'

export default defineComponent({
	name: 'w-table',
// ...
<template lang="pug">
w-table(:ref="el=>dom['table']=el" :columns="columns" url="/api/dictionary/goodList")
	a-table-column(title="Name" dataIndex="name")

vite less变量替换无效,样式还是默认的样式

Basic Info

额外补充

import vue from '@vitejs/plugin-vue'
import coffee from 'rollup-plugin-coffee2'
import pug from 'rollup-plugin-pug'
import { defineConfig } from 'vite'

export default defineConfig(
  ({ mode }) =>{
    //const isDev = mode !== 'production';
    let {pathname} = new URL(import.meta.url)
    pathname = pathname.replace(/\\/g,'/')
    return {
      css:{
        preprocessorOptions: {
          less: {
            modifyVars: {
              'border-radius-small': '0',
              'border-radius-medium': '0',
              'border-radius-large': '0',
              'primary-6': '#000',
            },
            javascriptEnabled: true,
          }
        }
      },
      plugins: [
        coffee({
          bare:true,
          sourceMap: true
        }),
        pug(),
        vue()
      ],
      resolve: {
        alias: {
          '@': pathname.slice(0,pathname.lastIndexOf('/') 1) 'src'
        }
      }

    }
  }
)

预期结果

vite less变量替换无效,样式还是默认的样式

复现步骤

./dev.sh

截图如下
image

表格属性增加rowKey 可以代理tableData里面的key属性

Basic Info

What are the similar cases of this feature

https://ant.design/components/table-cn/#API
rowKey属性

What problem does this feature solve?

有时传入的tableData是后端返回的数据,里面的唯一标识可能不是key。
需要进行这样的处理
tableData.value = res.data.map(i => ({...i, key: i.id}));
而如果加入rowKey属性,可以代理作为tableData中的key存在,就可以方便直接传入接口返回的数据了。
包括选择行的key,展开行的key,都可以使用表格数据中的这个属性返回。

<a-input-number> 减号 bug,一旦按下减号,输入框就不能再编辑了

<template> <div> <a-form :model="sellOrder" layout="vertical"> <a-form-item field="amount" label="总投资" :rules="[{type:'number',positive:true,required:true,message:'总投资金额格式有误'}]"> <a-input-number v-model="sellOrder.amount" allow-clear hide-button/> </a-form-item> </a-form> </div> </template>

这种情况下按减号 “-” 中的值会变成 NaN
一旦按下减号,输入框就不能再编辑了。
图片

tree和tree select组件没有撑满宽度鼠标只能点击文字选中

基本信息

预期结果

节点撑满宽度,鼠标经过某个节点那一行即可选中

复现步骤

鼠标经过tree组件节点,或点击tree select组件下拉框出现后,鼠标经过节点,只能点击文字,没有撑满整行宽度,react版本没有此问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.