2.4.8 • Published 3 months ago

wonderful-marrow v2.4.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

wonderful

  1. 自定义组件库: 支持微信小程序,移动端,pc 端,响应式布局
  2. 基本动画组件

Install

npm install wonderful-marrow

组件库使用

import React from 'react'
import ReactDOM from 'react-dom/client'
import { Button, responseRegister } from 'wonderful-marrow/rabbit'

import 'wonderful-marrow/rabbit/index.css'

responseRegister() // 设置为响应式(rem 布局)

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
  <div>
    <Button type='primary'>按钮</Button>
  </div>
)

支持的组件

const componentList = [
  {
    value: 'currency',
    label: '通用',
    children: [
      {
        value: 'Button',
        label: '按钮',
      },
      {
        value: 'Icon',
        label: '图标',
      },
      {
        value: 'Boundary',
        label: '可变边界',
      },
    ],
  },
  {
    value: 'nav',
    label: '导航',
    children: [
      {
        value: 'Menu',
        label: '导航菜单',
      },
      {
        value: 'Pagination',
        label: '分页',
      },
      {
        value: 'Steps',
        label: '步骤条',
      },
    ],
  },
  {
    value: 'data-input',
    label: '数据录入',
    children: [
      {
        value: 'Cascader',
        label: '级联选择',
      },
      {
        value: 'Checkbox',
        label: '多选框',
      },
      {
        value: 'Input',
        label: '输入框',
      },
      {
        value: 'InputNumber',
        label: '数字输入框',
      },
      {
        value: 'Radio',
        label: '单选框',
      },
      {
        value: 'Rate',
        label: '评分',
      },
      {
        value: 'Select',
        label: '选择器',
      },
      {
        value: 'SelectPanel',
        label: '选择器(自定义触发器)',
      },
      {
        value: 'Slider',
        label: '滑动输入条',
      },
      {
        value: 'Switch',
        label: '开关',
      },
      {
        value: 'Upload',
        label: '上传',
      },
      {
        value: 'Calendar',
        label: '日历',
      },
      {
        value: 'TimePicker',
        label: '时间选择器',
      },
      {
        value: 'DatePicker',
        label: '日期选择器',
      },
      {
        value: 'Transfer',
        label: '穿梭框',
      },
      {
        value: 'TreeSelect',
        label: '树形选择器',
      },
      {
        value: 'ColorPicker',
        label: '颜色选择器',
      },
    ],
  },
  {
    value: 'data-display',
    label: '数据展示',
    children: [
      {
        value: 'Badge',
        label: '徽章',
      },
      {
        value: 'Carousel',
        label: '轮播',
      },
      {
        value: 'Collapse',
        label: '折叠面板',
      },
      {
        value: 'Popover',
        label: '气泡卡片',
      },
      {
        value: 'PopoverHandle',
        label: '气泡卡片(自定义触发器)',
      },
      {
        value: 'Tab',
        label: '标签页',
      },
      {
        value: 'Tag',
        label: '标签',
      },
      {
        value: 'Tree',
        label: '树形控件',
      },
      {
        value: 'Timeline',
        label: '时间线',
      },
      {
        value: 'List',
        label: '列表',
      },
      {
        value: 'Tour',
        label: '导游',
      },
      {
        value: 'Table',
        label: '表格',
      },
    ],
  },
  {
    value: 'feedback',
    label: '反馈',
    children: [
      {
        value: 'Message',
        label: '全局提示',
      },
      {
        value: 'Modal',
        label: '对话框',
      },
      {
        value: 'Loading',
        label: '加载中',
      },
      {
        value: 'Progress',
        label: '进度条',
      },
    ],
  },
]

动画库使用

import { Marrow, Build, Render } from 'wonderful-marrow/marrow'

import 'wonderful-marrow/marrow/index.css'

function handleChange(data: Marrow[]) {
  console.log(data)
}

function handleSave(data: Marrow[]) {
  console.log(data)
}

const data: Marrow[] = []

function App() {
  return (
    <div style={{ width: '100vw', height: '100vh', display: 'flex' }}>
      <div style={{ width: '50%', height: '100%', borderRight: '1px solid #ccc' }}>
        <Build
          marrows={data}
          onChange={handleChange}
          onSave={handleSave}
        />
      </div>
      <div style={{ width: '50%', height: '100%' }}>
        <Render marrows={data} />
      </div>
    </div>
  )
}
2.4.8

3 months ago

2.4.3

3 months ago

2.4.5

3 months ago

2.4.4

3 months ago

2.4.7

3 months ago

2.4.6

3 months ago

2.4.1

5 months ago

2.4.0

5 months ago

2.4.2

5 months ago

2.3.8

5 months ago

2.3.7

5 months ago

2.3.9

5 months ago

2.3.6

5 months ago

2.3.5

5 months ago

2.3.2

6 months ago

2.3.1

7 months ago

2.3.4

6 months ago

2.3.3

6 months ago

2.2.1

10 months ago

2.2.0

10 months ago

2.2.3

10 months ago

2.2.2

10 months ago

2.2.5

10 months ago

2.2.4

10 months ago

2.2.7

8 months ago

2.2.6

9 months ago

2.1.9

10 months ago

2.3.0

7 months ago

2.1.2

11 months ago

2.1.4

11 months ago

2.1.3

11 months ago

2.1.6

11 months ago

2.1.5

11 months ago

2.1.8

10 months ago

2.1.7

11 months ago

2.2.9

7 months ago

2.2.8

8 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.0.9

1 year ago

1.1.7

1 year ago

1.0.8

1 year ago

1.1.6

1 year ago

1.0.7

1 year ago

1.1.5

1 year ago

1.0.6

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

2.0.3

1 year ago

2.1.1

1 year ago

2.0.2

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago