Giter Club home page Giter Club logo

next's Introduction

English | 简体中文

Fusion

An enterprise-class UI solution for backend system, aimed at settling the problems like cooperation between designers and front-developers, consistency of product experience and development efficiency.


You can customize your own DesignSystem via Collaboration Platform.💖 Designers will receive design materials by Fusion Cool - an easy to use plugin on sketch. Developers will get code fragment on IceWorks. At the same time, the consistency between code and visual manuscript is guaranteed. 😍

howtouse

🤔 Why use

@alifd/next usually used with Fusion Design to improving designer-developer collaboration and development efficiency. Designer can customize the UI of components and release an npm theme package. Developer can use this theme package directly, and don't need to care about the UI refactoring. It saves the workload of reductive degree review repeatedly with designers, and greatly improves the development efficiency.

💻 Browser Compatibility

Chrome Firefox Edge IE Safari Opera UC
9+ ✔

🚀 Quick Start

🛠 Install

1.Use NPM ( Recommend )

npm install @alifd/next --save

2.Import in Browser

Use the script and link tags in the browser to directly import the file and use the global variable Next. We provide files such as next.js/next.min.js and next.css/next.min.css in the @alifd/next/dist directory in the npm package, or via unpkg Download it.

<link rel="stylesheet" href="https://unpkg.com/@alifd/next/dist/next.css" />

<script src="https://unpkg.com/@alifd/next/dist/next.js"></script>

// The above ways import latest @alifd/next, we recommend you specify version.
<script src="https://unpkg.com/@alifd/[email protected]/dist/next.min.js"></script>

// Or import as your own static resource
<script src="../build/public/@alifd/next.js"></script>

☔️ Dependencies

  • @alifd/next is based on react@16 development and is currently not compatible with versions below react@16. react/react-dom is used as peerDependencies, which requires the user to manually install or import it.
  • @alifd/next use moment library to implement date-time related component. moment is also used as peerDependencies, which requires the user to manually install or import it.

🎯 Import

Import All

import '@alifd/next/dist/next.css';
// import '@alifd/next/index.scss';

import { Button, Input } from '@alifd/next';

Import module with plugin

1. Import module manually

import Button from '@alifd/next/lib/button';
import '@alifd/next/lib/button/style';

2. Use with babel-plugin-import ( Recommend )

// webpack babel loader option or .babelrc
{
    // ...
    plugins: [
        [
            'import',
            {
                libraryName: '@alifd/next',
                style: true,
            },
        ],
    ];
}

It will transform code as below

import { Button } from '@alifd/next';

To

import Button from '@alifd/next/lib/button';
import '@alifd/next/lib/button/style';

🔗 Advanced

🌈 Contributing

Use Gitpod, a free online dev environment for GitHub.

Open in Gitpod

Or clone locally:

📣 Join Group

Use Dingtalk App scan the Qrcode to join in Dingtalk Group : Join the chat at dingtalk

next's People

Contributors

bindoon avatar byeval avatar csr632 avatar dependabot[bot] avatar eternalsky avatar galogm avatar guanpu avatar guoyunhe avatar heluwe avatar hongxingshi avatar jdkahn avatar jerryyxu avatar jinchanz avatar jun599 avatar kyokaxin avatar lakerswgq avatar lianmin avatar macrox avatar micate avatar myronliu347 avatar nianxiongdi avatar seven-lh avatar skysuka avatar tao1991123 avatar weinianyang avatar yee94 avatar youluna avatar ysmj1994 avatar yunmeng99 avatar zuoqi705 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  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

next's Issues

[Input]Input高度受外层行高影响

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.11.10

Component

Input

Environment

Chrome Latest

Reproduction link

Edit on CodeSandbox

Steps to reproduce

期望高度不受影响

[CascaderSelect] search的时候,当前需要基于已有的dataSource进行搜索,需要支持自定义数据

  • I have searched the issues of this repository and believe that this is not a duplicate.

Component

CascaderSelect

Feature Description

当地址通过异步方式获取的二,三层级数据的时候,还没load相应的数据存储在dataSource里,使用搜索通过接口的方式搜索到后端的数据,这时候需要支持能进行自定义放置后端接口请求到的搜索结果,当前只能支持dataSource里的搜索内容

Why fusion supports two usages

Thank you for this wonderful work!

Recently, I'm frustrated why fusion supports two usages:

  1. children or options select example
    image

Personally, options is enough.

  1. defaultValue or value date-picker example
    image

Since defaultValue always works with a form, so it seems thatvalue is enough for these basic ui components.

期待它的后续

感觉设计如果了解一点前端体系,这个产品是不是现在的意义就不是很明显了?(只是现阶段)特别是中小型公司,设计任务比较繁杂的情况下,时间成本可以和DS本身想传达的价值会不对等,会不会?

不过长远来看,UI规范化应该是发展的必然~

[Affix]支持offsetTop受控

  • I have searched the issues of this repository and believe that this is not a duplicate.

Component

Affix

Feature Description

offsetTop 属性依赖于同级组件的 height,所以需要等到 render 后再 setState 一个新的 offsetTop 赋值给 Affix 组件。

[Table] Table 行拖拽能力

  • I have searched the issues of this repository and believe that this is not a duplicate.

Component

Table

Feature Description

能否考虑给表格添加行拖拽能力?可以只考虑普通的没有单元格合并的表格
部分场景下需要有手动排序的需求

[Upload] 建议开放上传接口

  • I have searched the issues of this repository and believe that this is not a duplicate.

Component

Upload

Feature Description

比如,上传阿里云 oss,每次上传是需要动态计算的,计算policy、action 地址、signature等参数。
现在的方案只能在渲染组件时,提前算好,然后设置 action 和 data 属性。但是这些值有时效性,
如果用户打开上传对话框,但是短时间未上传,则会无法上传

make Input component not triggers onChange when input method is composing Chinese character

Is your feature request related to a problem? Please describe.

As we know, input element in React will trigger onChange when a key is pressed. If we are inputting Chinese in it, an input method toolbar will show, and it will composing Chinese words in the toolbar according to what we type, onChange will still be triggered when words are being composed. This won't bother in most situation, but if we need to do something for the input value in real time, for example, validating or autosaving the value, we will get some unwanted chars.

look the example below, when I type 哈哈哈 in input method' bar, the value of input element is ha'ha'ha:

export class App extends React.Component {
  state = {
    value: ""
  };

  handleChange = e => {
    this.setState({
      value: e.target.value
    });
  };

  render() {
    return (
      <div className="App">
        <p>input value: {this.state.value}</p>
        <input type="text" onChange={this.handleChange} />
      </div>
    );
  }
}

image

Describe the solution you'd like

vuejs' v-model directive and react-composition already support this feature, they both use the native CompositionEvent of browser to implement this. So I think Input element of Next should support it as well.

Describe the API you'd expected

I think we can keep the current behavior onChange, and add another change handler prop, maybe call it onFinalValueChange or onCompositedVauleChange, so if we want to subscribe value changing only when composition is done, we can use the latter one, if we want the regular behavior, just use onChange. If you think this is okay, I will make a pull request to implement it, looking forward to see your advice~

Fusion Design Users

如果你的项目用到了Fusion Design,欢迎在这个Issue下留言。
目前已经使用了很久的用户

推荐回复格式:

- 产品名: xxx
- 截图: (如果方便提供的话)
- 网址: (如果方便提供的话)
- 公司/组织: (如果方便提供的话)

If Fusion Design is used in your project or by your company/, welcome to reply in the issue.

Recommend replying format:

- product name: xxx
- screenshot: ( if possible)
- url: (if possible)
- company or organization: (if possible)

Unexpected context data lost when a portal component was unmounted

Describe the bug

ConfigProvider.getContext() will losing its cached context data after a portal component (e.g.: Dialog.show()) was unmounted.

Version of the Next Components

^1.9.15

Reproduce URL

https://codepen.io/anon/pen/vQgmbP?&editors=0010

To Reproduce

  1. Use <ConfigProvider> to wrap the app.
  2. Set locale prop on <ConfigProvider> with { Dialog: { ok: 'OK', cancel: 'Cancel' } }
  3. Call Dialog.confirm or the other method which do create a portal modal
  4. Close the modal
  5. Call Dialog.confirm again

Expected behavior

The text of the modal's button always be OK and Cancel, but it'll be 确定 and 取消 except first mounting.

[Form] Remove the last margin of the form item

Is your feature request related to a problem? Please describe.
The last margin affects the style. When I use Form with Dialog, there are too much spacing.

Describe the solution you'd like
Remove the margin.

image

[NumberPicker] with JS Float precise

Describe the bug
in Safari

4.02 + 0.01 = 4.029999999999999;
This is a js float number feature and it will cause display bug in NumberPicker.

Version of the Next Components
1.10.x

To Reproduce
Steps to reproduce the behavior:
1.

<NumberPicker defaultValue={4.02} step={0.01} precision={2} />
or 
<NumberPicker defaultValue={4.02} step={0.01}  />
  1. Click on + button
  2. See error

Expected behavior
it should show 4.03

Screenshots

Desktop (please complete the following information):

  • OS: [Mac]
  • Browser [safari]

[Upload] ie10 1.8.x版本下 input的onChange事件二次执行

Upload里面触发input的选择框是由其他标签的click事件触发input的原生click事件产生的,由于想要达到可以选择相同的文件多次上传,所在input的click事件中他们重置了input的value值为null,这样会导致input的onChange事件二次执行,从而使文件列表数据进行叠加展示,数据异常

[Upload] Expose XMLHTTPRequest object for modification before request.

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Upload component exposed an api that can modify xhr object before send request.

Describe the API you'd expected
{
beforeSendRequest: (xhr) =>{
// Modify xhr
xhr.responseType = 'blob';
}
}

Additional context

[Upload]ie10里面拖拽上传的文件被覆盖

Upload里面结合Field进行拖拽上传时,由于onDragOver触发会导致componentWillReceiveProps会不断执行,从而默认value值会覆盖上传的文件value列表,导致上传数据无法展示

[Tree] 当 tree 异步加载数据时,树节点的展开状态不对

Describe the bug
当 tree 异步加载数据时,连续点击两个子节点加载异步数据时,第一个节点就会变成折叠状态

Version of the Next Components
最新版本

Reproduce URL

https://alifd.alicdn.com/demos-pages/@alifd/next/[email protected]/@alifd/theme-2/index.zh-cn.html#%E5%BC%82%E6%AD%A5%E5%8A%A0%E8%BD%BD%E6%95%B0%E6%8D%AE

To Reproduce

Expected behavior
第一个点击的节点应该也是展开状态。

Screenshots
If applicable, add screenshots to help explain your problem.
tree

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome
  • Version: Latest Version

Additional context

[Nav]SubNav不支持透传style

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.11.10

Component

Nav

Environment

Chrome Latest

Reproduction link

Edit on CodeSandbox

Steps to reproduce

期望可以透传style

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.