Giter Site home page Giter Site logo

santd's Introduction

Ant Design for San

San UI Toolkit for Ant Design

License: MIT

English | 简体中文

✨ Features

  • An enterprise-class UI design system for desktop applications.
  • A set of high-quality San components out of the box.
  • Shared Ant Design of React design resources.

🖥 Environment Support

  • Modern browsers and Internet Explorer 9+ (with polyfills)
  • Server-side Rendering
IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Opera
Opera
IE9, IE10, IE11, Edge last 2 versions last 2 versions last 2 versions last 2 versions

📦 Install

We recommend using npm to install,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.

$ npm install santd --save

If you are in a bad network environment,you can try other registries and tools like cnpm.

🔨 Usage

import san from 'san';
import {DatePicker} from "santd";

const App = san.defineComponent({
    components: {
        's-datepicker': DatePicker
    },
    template: `<div><s-datepicker /></div>`
});

const myApp = new App();
myApp.attach(document.body);

And import style manually:

import "santd/dist/santd.css"; // or 'santd/dist/santd.less'

Or import components on demand.

🌍 Internationalization

See i18n.

🔗 Links

⌨️ Development

Use Gitpod, a free online dev environment for GitHub.

Open in Gitpod

Or clone locally:

$ git clone [email protected]:ecomfe/santd.git
$ cd santd
$ npm install
$ npm start button

Open your browser and visit http://127.0.0.1:8822

🤝 Contributing PRs Welcome

We welcome all contributions. You can submit any ideas as pull requests or as GitHub issues.

If you're new to posting issues, we ask that you read How To Ask Questions The Smart Way, How to Ask a Question in Open Source Community and How to Report Bugs Effectively prior to posting. Well written bug reports help us help you!

☀️ License

MIT

santd's People

Contributors

babylillian avatar bugkiwi avatar buptlhuanyu avatar cxlll avatar dencey avatar errorrik avatar fisherma avatar jinzhan avatar kanglover avatar ksky521 avatar lidonghang0414 avatar lohoyo avatar ming680 avatar nlyrthiia avatar okaychen avatar vanishcode avatar xxxmrg avatar zhixinbao avatar zttonly 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

Watchers

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

santd's Issues

Model的文档有误

文档中,Model组件的参数说明里的ButtonProps点击跳转链接有误:
image

当Tab.TabPane同时存在slot和非slot的情况时,渲染异常;当TabPane的slot中存在变量时渲染异常

version: 0.2.8
problem description:
1、当Tab.TabPane同时存在slot和非slot的情况时,渲染异常;

        <s-tabs
            defaultActiveKey="1"
            on-change="handleChange"
        >
            <s-tabpane key="1">
                <span slot="tab">Tab 1</span>
                <span>{{content2}}</span>
            </s-tabpane>
            <s-tabpane tab="Tab 2" key="2">Content of Tab Pane 2</s-tabpane>
            <s-tabpane tab="Tab 3" key="3">Content of Tab Pane 3</s-tabpane>
        </s-tabs>

这个问题是:如果tabpane有slot,就仅渲染了slot的部分,非slot的直接忽略了。

这个问题比较好解决,我提了一个PR: #10

2、当TabPane的slot中存在变量时渲染异常;

image

        <s-tabs
            defaultActiveKey="1"
            on-change="handleChange"
        >
            <s-tabpane key="0">
                <span slot="tab">{{tabTitle}}</span>
                <span>{{content1}}</span>
            </s-tabpane>
             <s-tabpane key="1">
                <span slot="tab">Tab 1</span>
                <span>{{content2}}</span>
            </s-tabpane>
            <s-tabpane key="1">
                <span slot="tab">Tab 1</span>
                <span>{{content2}}</span>
            </s-tabpane>
            <s-tabpane tab="Tab 2" key="2">Content of Tab Pane 2</s-tabpane>
            <s-tabpane tab="Tab 3" key="3">Content of Tab Pane 3</s-tabpane>
        </s-tabs>

详细描述:
(1)、key = 1 的 slot,chidrenl的aNode 类型为string,可以直接渲染;
(2)、key = 0 的 slot, chidrenl的aNode 类型为epr,需要通过data计算得出最终的字符;
这个问题,应该是和sourceSlots的data作用域有关系,用san直接测试了下:
(1)、将sourceSlot作为变量赋值时,内部的epr的aNode中的变量,取值的作用域为this.sourceSlot的this的parent。
app.san

<template>
    <div class="app-wrapper">
        <div>
            <one-deep-component>
                <span slot="one-deep-tittle">I am a title~</span>
                <span slot="two-deep-content">I am content</span>
            </one-deep-component>
            <one-deep-component>
                <span slot="one-deep-tittle">{{title}}</span>
                <span slot="two-deep-content">{{content}}</span>
            </one-deep-component>
        </div>
    </div>
</template>

<script>
    import oneDeepComponent from './component/one-deep-component.san';
    export default {
        initData () {
            return {
                title: 'I am another title',
                content: 'I am content'
            }
        },
        components: {
            'one-deep-component': oneDeepComponent
        },
    }
</script>

one-deep-component.san

<template>
    <div class="one-deep">
        <slot name="one-deep-tittle" />
        <two-deep-component contentSlot="{{contentSlot}}" />
    </div>
</template>

<script>
    import twoDeepComponent from './two-deep-component.san';
    export default {
        components: {
            'two-deep-component': twoDeepComponent
        },
        initData() {
            return {
                content: 'I am the wrong content'
            };
        },
        created() {
            console.log(this.sourceSlots.named['two-deep-content']);
            this.data.set('contentSlot', this.sourceSlots.named['two-deep-content']);
        }
    }
</script>
<style>
    .one-deep {
        padding: 40px;
        font-size: 16px;
    }
</style>

two-deep-component.san

<template>
    <div class="two-deep-content">
        <slot name="content" />
    </div>
</template>

<script>
    export default {
        inited() {
            this.sourceSlots.named.content = this.data.get('contentSlot');
        }
    }
</script>
<style>
    .one-deep {
        padding: 40px;
        font-size: 16px;
    }
</style>

渲染结果为:
image

但是期望的值为app.san中的content('I am content')

input-number 组件 precision 属性为0时失效

<s-input-number precision="{{0}}" >

  • 期望:正确设置数值精度为整数

  • 实际现象:数值精度失效,可以输入任意小数
    image

  • santd版本:1.0.23

  • 原因:
    在input-number 组件中,找到了如下代码
    image
    precision = 0时候,进入了后面的分支。

希望能修复这里的precision判空逻辑

  • 同时找到了一个可以临时绕过的方案:
    临时设置precision=0.1 来代替,原理:

image

#bug Upload.Dragger missing accept option.

Upload.Dragger 组件会错误的丢失 accept 属性
这会导致用户设置的 accept 属性无效,无法限制上传的文件类型。
这与 antd 中的相同组件行为不一致,从逻辑上看,可能是一个简单的模版属性丢失问题。

对应的 PR: #94

各位可以讨论下现状是否符合设计预期 / 或是修复此问题。

input框内容关联选择框,切换选择框,重置input框data时,再切换值又展示了

`

手机号
百度账号

            <std-formitem
            class="sbiz-h-9 sbiz-mb-6"
            label="{{accountMap[accountType]['label']}}"
            validateStatus="{{accountNameStatus}}"
            help="{{accountNameTips}}"
            >
                <std-input placeholder="{{accountMap[accountType]['placeholder']}}" value="{=accountName=}" autocomplete="off" decorator="{{accountType === 1 ? phoneDecorator : accountNameDecorator}}" on-blur="checkAccount">
                </std-input>
            </std-formitem>`

Typography 报错, san 3.7.6+ 版本

排版组件Typography报错,在 computed 中 this.data.get() 报错,提示参数不能为空。
image

需要修改为:
clientRendered, copyable, getEllipsis } = this.data.get(); // const clientRendered = this.data.get('clientRendered'); // const copyable = this.data.get('copyable'); // const getEllipsis = this.data.get('getEllipsis');

Table component "rowClassName" attribution did not work.

在源码中也无法找到该属性的实现。只能在源码 es/table/README.md 找到描述。

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

Version

0.3.3

Environment

Mac Chrome86 San0.3.3

Reproduction link

Steps to reproduce

rowClassName | 表格行的类名 | Function(record, index):string | - |
did't work.

What is expected?

work

What is actually happening?

work

Tree组件能支持mouse事件么

比如mouseleave、mouseenter事件
其实也可以在slot=title中自己写on-mouse事件,但是在slot=title中,只可以拿到当前的title值,拿不到key等其他数据,所以也不能满足需求,最好在slot=title中,同时注入所有的当前item的数据

日期选择组件的浮层容器 BUG

日期选择类组件的浮层容器设置属性是 getCalendarContainer,但是在 trigger 里面只用到了 getPopupContainer,没有 getCalendarContainer,现在日期选择类组件只能渲染在 body 上。
以下是 santd 的 master 分支代码:
截屏2023-01-18 11 23 39
截屏2023-01-18 11 25 12
截屏2023-01-18 11 25 30

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.