├── .editorconfig
├── .gitignore
├── .npmrc
├── LICENSE
├── README.md
├── docs
├── components.md
├── components
│ ├── ActivityIndicator.mdx
│ ├── Avatar.mdx
│ ├── Badge.mdx
│ ├── Button.mdx
│ ├── CustomTabBar.mdx
│ ├── InputNumber.mdx
│ ├── List.mdx
│ ├── Progress.mdx
│ ├── SearchBar.mdx
│ ├── Steps.mdx
│ ├── TabBar.mdx
│ └── Tag.mdx
├── globals.md
├── index.md
├── interfaces
│ ├── _actionsheet_.actionsheetprops.md
│ ├── _activityindicator_.activityindicatorprops.md
│ ├── _avatar_.avatarprops.md
│ ├── _badge_.badgeprops.md
│ ├── _button_.buttonprops.md
│ ├── _calendar_body_interface_.props.md
│ ├── _calendar_body_interface_.state.md
│ ├── _calendar_controller_interface_.props.md
│ ├── _calendar_controller_interface_.state.md
│ ├── _calendar_interface_.defaultprops.md
│ ├── _calendar_interface_.mutilselectedprops.md
│ ├── _calendar_interface_.propsbase.md
│ ├── _calendar_interface_.singleselectedprops.md
│ ├── _calendar_interface_.state.md
│ ├── _calendar_ui_date_list_index_.props.md
│ ├── _customtabbar_.customtabbarprops.md
│ ├── _floatlayout_.floatlayoutprops.md
│ ├── _floatlayout_.floatlayoutprops.onscrolldetail.md
│ ├── _form_.formprops.md
│ ├── _grid_.griditem.md
│ ├── _grid_.gridprops.md
│ ├── _icon_.iconprops.md
│ ├── _imagepicker_.imagepickerprops.md
│ ├── _input_.inputprops.md
│ ├── _inputnumber_.inputnumberprops.md
│ ├── _list_.listprops.md
│ ├── _listheader_.listheaderprops.md
│ ├── _listitem_.listitemprops.md
│ ├── _loading_.loadingprops.md
│ ├── _message_.messageprops.md
│ ├── _modal_.modalprops.md
│ ├── _progress_.progressprops.md
│ ├── _searchbar_.searchbarprops.md
│ ├── _statistic_.statisticprops.md
│ ├── _steps_.stepsprops.md
│ ├── _tabbar_.tabbarprops.md
│ ├── _tabs_.tabsprops.md
│ ├── _tabspane_.tabspanelprops.md
│ ├── _tabspane_.tabspaneprops.md
│ ├── _tag_.tagprops.md
│ └── _textarea_.textareaprops.md
└── modules
│ ├── _actionsheet_.md
│ ├── _activityindicator_.md
│ ├── _avatar_.md
│ ├── _badge_.md
│ ├── _button_.md
│ ├── _calendar_body_index_.md
│ ├── _calendar_body_interface_.md
│ ├── _calendar_common_constant_.md
│ ├── _calendar_common_helper_.md
│ ├── _calendar_common_plugins_.md
│ ├── _calendar_controller_index_.md
│ ├── _calendar_controller_interface_.md
│ ├── _calendar_index_.md
│ ├── _calendar_interface_.md
│ ├── _calendar_ui_date_list_index_.md
│ ├── _calendar_ui_day_list_index_.md
│ ├── _customtabbar_.md
│ ├── _floatlayout_.md
│ ├── _form_.md
│ ├── _grid_.md
│ ├── _icon_.md
│ ├── _imagepicker_.md
│ ├── _index_.md
│ ├── _input_.md
│ ├── _inputnumber_.md
│ ├── _list_.md
│ ├── _listheader_.md
│ ├── _listitem_.md
│ ├── _loading_.md
│ ├── _message_.md
│ ├── _modal_.md
│ ├── _progress_.md
│ ├── _searchbar_.md
│ ├── _statistic_.md
│ ├── _steps_.md
│ ├── _tabbar_.md
│ ├── _tabs_.md
│ ├── _tabspane_.md
│ ├── _tag_.md
│ ├── _taro_ui_.md
│ ├── _textarea_.md
│ └── _utils_.md
├── global.d.ts
├── package.json
├── src
├── ActionSheet.tsx
├── ActivityIndicator.tsx
├── Avatar.tsx
├── Badge.tsx
├── Button.tsx
├── Calendar
│ ├── body
│ │ └── index.tsx
│ ├── common
│ │ ├── constant.ts
│ │ ├── helper.ts
│ │ └── plugins.ts
│ ├── controller
│ │ └── index.tsx
│ ├── index.tsx
│ └── ui
│ │ ├── date-list
│ │ └── index.tsx
│ │ └── day-list
│ │ └── index.tsx
├── CustomTabBar.tsx
├── FloatLayout.tsx
├── Form.tsx
├── Grid.tsx
├── Icon.tsx
├── ImagePicker.tsx
├── Input.tsx
├── InputNumber.tsx
├── List.tsx
├── ListHeader.tsx
├── ListItem.tsx
├── Loading.tsx
├── Message.tsx
├── Modal.tsx
├── Progress.tsx
├── SearchBar.tsx
├── Statistic.tsx
├── Steps.tsx
├── TabBar.tsx
├── Tabs.tsx
├── TabsPane.tsx
├── Tag.tsx
├── Textarea.tsx
├── TextareaEnhance.tsx
├── index.ts
├── taro-ui.ts
└── utils.ts
├── style
├── ActionSheet.scss
├── ActivityIndicator.scss
├── Avatar.scss
├── Badge.scss
├── Button.scss
├── Calendar.scss
├── FloatLayout.scss
├── Grid.scss
├── Icon.scss
├── ImagePicker.scss
├── Input.scss
├── InputNumber.scss
├── List.scss
├── ListHeader.scss
├── ListItem.scss
├── Loading.scss
├── Message.scss
├── Modal.scss
├── Progress.scss
├── SearchBar.scss
├── Statistic.scss
├── Steps.scss
├── TabBar.scss
├── Tabs.scss
├── TabsPane.scss
├── Tag.scss
├── Textarea.scss
├── index.scss
├── mixins.scss
└── utils.scss
├── tsconfig.json
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | charset = utf-8
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [.git/config]
15 | indent_style = tab
16 |
17 | [project.config.json]
18 | insert_final_newline = false
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | # Diagnostic reports (https://nodejs.org/api/report.html)
10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 | *.lcov
24 |
25 | # nyc test coverage
26 | .nyc_output
27 |
28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29 | .grunt
30 |
31 | # Bower dependency directory (https://bower.io/)
32 | bower_components
33 |
34 | # node-waf configuration
35 | .lock-wscript
36 |
37 | # Compiled binary addons (https://nodejs.org/api/addons.html)
38 | build/Release
39 |
40 | # Dependency directories
41 | node_modules/
42 | jspm_packages/
43 |
44 | # TypeScript v1 declaration files
45 | typings/
46 |
47 | # TypeScript cache
48 | *.tsbuildinfo
49 |
50 | # Optional npm cache directory
51 | .npm
52 |
53 | # Optional eslint cache
54 | .eslintcache
55 |
56 | # Microbundle cache
57 | .rpt2_cache/
58 | .rts2_cache_cjs/
59 | .rts2_cache_es/
60 | .rts2_cache_umd/
61 |
62 | # Optional REPL history
63 | .node_repl_history
64 |
65 | # Output of 'npm pack'
66 | *.tgz
67 |
68 | # Yarn Integrity file
69 | .yarn-integrity
70 |
71 | # dotenv environment variables file
72 | .env
73 | .env.test
74 |
75 | # parcel-bundler cache (https://parceljs.org/)
76 | .cache
77 |
78 | # Next.js build output
79 | .next
80 |
81 | # Nuxt.js build / generate output
82 | .nuxt
83 | dist
84 |
85 | # Gatsby files
86 | .cache/
87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js
88 | # https://nextjs.org/blog/next-9-1#public-directory-support
89 | # public
90 |
91 | # Docusaurus
92 | .Docusaurus
93 | website/build
94 |
95 | # vuepress build output
96 | .vuepress/dist
97 |
98 | # Serverless directories
99 | .serverless/
100 |
101 | # FuseBox cache
102 | .fusebox/
103 |
104 | # DynamoDB Local files
105 | .dynamodb/
106 |
107 | # TernJS port file
108 | .tern-port
109 |
110 | # Other
111 | .DS_Store
112 | .temp
113 | website
114 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | # run scripts with root privileges
2 | # @see https://docs.npmjs.com/misc/scripts#user
3 | unsafe-perm=true
4 |
5 | # NPM Taobao registry
6 | registry=https://registry.npm.taobao.org
7 |
8 | # Taobao node binary mirrors
9 | chromedriver_cdnurl=https://npm.taobao.org/mirrors/chromedriver
10 | disturl=https://npm.taobao.org/dist
11 | electron_mirror=https://npm.taobao.org/mirrors/electron
12 | fse_binary_host_mirror=https://npm.taobao.org/mirrors/fsevents
13 | node_inspector_cdnurl=https://npm.taobao.org/mirrors/node-inspector
14 | nodejs_org_mirror=https://npm.taobao.org/mirrors/node
15 | nvm_nodejs_org_mirror=https://npm.taobao.org/mirrors/node
16 | nvm_iojs_org_mirror=https://npm.taobao.org/mirrors/iojs
17 | operadriver_cdnurl=https://npm.taobao.org/mirrors/operadriver
18 | phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs
19 | profiler_binary_host_mirror=http://npm.taobao.org/mirrors/node-inspector/
20 | puppeteer_download_host=https://npm.taobao.org/mirrors
21 | selenium_cdnurl=http://npm.taobao.org/mirrors/selenium
22 | sass_binary_site=https://npm.taobao.org/mirrors/node-sass
23 | sqlite3_binary_site=http://npm.taobao.org/mirrors/sqlite3
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 tarojsx
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Taro3 UI
3 |
4 |
5 |
我们重新(zào)发(lún)明(zi) Taro UI
6 |
7 |
8 |
9 |
10 |
27 |
28 |
38 |
39 |
40 |
41 | _当前代码提交频繁, 一些特性时有变化._
42 |
43 | Taro3 释放了 React 的潜能, 是时候对 Taro UI 进行改进了.
44 |
45 | ## 特性
46 |
47 | - :electric_plug: 一键安装, 使用上尽可能向后兼容.
48 |
49 | - :clapper: 复用 taro-ui 样式, 不改变组件外观.
50 |
51 | - :octopus: 扩展性更强, 许多原本只能传入字符串的地方, 现在可以传入组件了.
52 |
53 | - :mag_right: 完善的 Typescript 类型提示.
54 |
55 | - :gift: 开箱即用, 只需引入组件即可, 无需单独引入样式, 支持 Tree shaking.
56 |
57 | - :telescope: 未来计划引入更多常用的基础组件.
58 |
59 | ## 需求
60 |
61 | - **taro 3+**
62 | - react 16.8+
63 |
64 | ## 安装
65 |
66 | `npm i @tarojsx/ui`
67 |
68 | ## 使用
69 |
70 | ```tsx
71 | import React from 'react';
72 | import { Text } from '@tarojs/components';
73 | import { List, ListHeader, ListItem } from '@tarojsx/ui';
74 |
75 | export default () => {
76 | return (
77 |
78 |
79 | 0.2.0}>
80 | 我们重新(zào)发(lún)明(zi)了 Taro UI
81 |
82 |
83 | );
84 | };
85 | ```
86 |
87 | ## 组件
88 |
89 | 源于 Taro UI
90 |
91 | - [ ] Accordion
92 | - [x] ActionSheet
93 | - [ ] 子组件
94 | - [x] ActivityIndicator
95 | - [ ] Article
96 | - [x] [Avatar](./docs/components/Avatar.mdx)
97 | - [x] [Badge](./docs/components/Badge.mdx)
98 | - [x] [Button](./docs/components/Button.mdx)
99 | - [x] Calendar
100 | - [ ] Swipe 操作
101 | - [ ] Card
102 | - [ ] Checkbox
103 | - [ ] Countdown
104 | - [ ] Divider
105 | - [ ] Drawer
106 | - [ ] ~~Fab~~ (已合并入 Button)
107 | - [ ] ~~Flex~~ (使用率不高)
108 | - [x] FloatLayout
109 | - [x] Form
110 | - [x] Grid
111 | - [x] Icon
112 | - [x] ImagePicker
113 | - [ ] Indexes
114 | - [x] Input
115 | - [x] [InputNumber](./docs/components/InputNumber.mdx)
116 | - [x] [List](./docs/components/List.mdx)
117 | - [x] [ListItem](./docs/components/List.mdx)
118 | - [x] Loading
119 | - [ ] Loadmore
120 | - [x] Message
121 | - [ ] Modal
122 | - [ ] NavBar
123 | - [ ] Noticebar
124 | - [ ] Pagination
125 | - [ ] Picker
126 | - [x] [Progress](./docs/components/Progress.mdx)
127 | - [ ] Radio
128 | - [ ] Rate
129 | - [x] [SearchBar](./docs/components/SearchBar.mdx)
130 | - [ ] SegmentedControl
131 | - [ ] Slider
132 | - [x] [Steps](./docs/components/Steps.mdx)
133 | - [ ] SwipeAction
134 | - [ ] Swiper
135 | - [ ] Switch
136 | - [x] [TabBar](./docs/components/TabBar.mdx)
137 | - [x] Tabs
138 | - [ ] Swipe 操作
139 | - [x] TabsPane
140 | - [ ] Swipe 操作
141 | - [x] [Tag](./docs/components/Tag.mdx)
142 | - [x] Textarea
143 | - [ ] Timeline
144 | - [ ] Toast
145 |
146 | 扩展组件
147 |
148 | - [x] [CustomTabBar](./docs/components/CustomTabBar.mdx)
149 | - [x] [ListHeader](./docs/components/List.mdx)
150 | - [x] Statistic
151 |
152 | ## 支持
153 |
154 | 欢迎各种形式的支持. 至少可以给颗星 :star:
155 |
156 | ## License
157 |
158 | [MIT](LICENSE)
159 |
--------------------------------------------------------------------------------
/docs/components.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: components
3 | title: 组件说明
4 | ---
5 |
6 | ## 命名
7 |
8 | 取 `taro-ui` 组件名, 去掉 `At` 前缀.
9 |
10 | 如需使用 `taro-ui` 原有的命名规则, 可以 `import { AtButton } from '@tarojsx/ui/dist/taro-ui`
11 |
12 | ## 样式
13 |
14 | 组件自动导入所需的样式, 无需重复导入.
15 |
--------------------------------------------------------------------------------
/docs/components/ActivityIndicator.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: ActivityIndicator 活动指示器
3 | ---
4 |
5 | 该组件提供一个加载等待元素,也就是 Loading 组件
6 |
7 | ## 示例
8 |
9 | import { ActivityIndicator } from '@tarojsx/ui';
10 | import { UI } from '@/ui';
11 |
12 | ```jsx title="常规"
13 |
14 | ```
15 |
16 |
17 |
18 |
19 |
20 | ```jsx title="颜色"
21 |
22 | ```
23 |
24 |
25 |
26 |
27 |
28 | ```jsx title="尺寸"
29 |
30 | ```
31 |
32 |
33 |
34 |
35 |
36 | ```jsx title="文字"
37 |
38 | ```
39 |
40 |
41 |
42 |
43 |
44 | ```jsx title="居中"
45 |
46 | ```
47 |
48 |
49 |
50 |
51 |
52 | ## API
53 |
54 | - [Taro UI 文档 | 活动指示器](https://taro-ui.jd.com/#/docs/activityindicator)
55 | - [``](modules/_activityindicator_.md)
56 | - [`ActivityIndicatorProps`](interfaces/_activityindicator_.activityindicatorprops.md)
57 |
--------------------------------------------------------------------------------
/docs/components/Avatar.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Avatar 头像
3 | ---
4 |
5 | 用于展示用户头像
6 |
7 | ## 示例
8 |
9 | import { Avatar } from '@tarojsx/ui';
10 | import useBaseUrl from '@docusaurus/useBaseUrl';
11 | import { UI } from '@/ui';
12 |
13 | ```jsx title="头像"
14 |
15 | ```
16 |
17 |
18 |
19 |
20 |
21 | ```jsx title="文字"
22 |
23 | ```
24 |
25 |
26 |
27 |
28 |
29 | ```jsx title="圆形头像"
30 |
31 | ```
32 |
33 |
34 |
35 |
36 |
37 | ```jsx title="圆形文字"
38 |
39 | ```
40 |
41 |
42 |
43 |
44 |
45 | ```jsx title="尺寸"
46 |
47 |
48 |
49 |
50 |
51 | ```
52 |
53 |
54 |
55 | tiny
56 |
57 |
58 |
59 | mini
60 |
61 |
62 |
63 | small
64 |
65 |
66 |
67 | default
68 |
69 |
70 |
71 | large
72 |
73 |
74 |
75 |
76 | ## API
77 |
78 | | 参数 | 说明 | 类型 | 默认值 |
79 | | ---- | ---- | ----------------------------- | ------ |
80 | | size | 尺寸 | `tiny` `mini` `small` `large` | |
81 |
82 | - [Taro UI 文档 | 头像](https://taro-ui.jd.com/#/docs/avatar)
83 | - [``](modules/_avatar_.md)
84 | - [`AvatarProps`](interfaces/_avatar_.avatarprops.md)
85 |
--------------------------------------------------------------------------------
/docs/components/Badge.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Badge 徽标
3 | ---
4 |
5 | ## 示例
6 |
7 | import { Badge, Button } from '@tarojsx/ui';
8 | import { UI } from '@/ui';
9 |
10 | ```jsx title="数字"
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | ```
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | ```jsx title="小红点"
34 |
35 |
36 |
37 | ```
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | ```jsx title="文字"
46 |
47 |
48 |
49 | ```
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | ## API
58 |
59 | - [Taro UI 文档](https://taro-ui.jd.com/#/docs/badge)
60 | - [``](../modules/_badge_.md)
61 | - [`BadgeProps`](../interfaces/_badge_.badgeprops.md)
62 |
--------------------------------------------------------------------------------
/docs/components/Button.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Button 按钮
3 | ---
4 |
5 | ## 示例
6 |
7 | import { Button } from '@tarojsx/ui';
8 | import { Image } from '@tarojs/components';
9 | import useBaseUrl from '@docusaurus/useBaseUrl';
10 | import dayjs from 'dayjs';
11 | import { UI } from '@/ui';
12 |
13 | ```jsx title="类型"
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | ```
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | ```jsx title="尺寸"
46 |
47 |
48 |
49 | ```
50 |
51 |
52 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | ```jsx title="透明按钮"
62 |
65 | ```
66 |
67 |
68 |
71 |
72 |
73 | ```jsx title="点击节流"
74 |
75 | ```
76 |
77 |
78 | {() => {
79 | const [times, setTimes] = React.useState([]);
80 | return (
81 | <>
82 |
85 | {times.map((time, index) => (
86 | {time.format(`ss' SSS''`)}
87 | ))}
88 | >
89 | );
90 | }}
91 |
92 |
93 | ## API
94 |
95 | | 参数 | 说明 | 类型 | 默认值 |
96 | | ------------- | ----------------------------------- | ---------------------------------------------- | ------ |
97 | | type | 类型 | `default` `primary` `secondary` `warn` `error` | |
98 | | size | 尺寸 | `default` `normal` `small` `mini` | |
99 | | clickThrottle | onClick 事件节流时间间隔, 单位: ms. | `boolean` `number` | 500ms |
100 | | transparent | 透明按钮. | `boolean` | |
101 |
102 | - [Taro UI 文档](https://taro-ui.jd.com/#/docs/button)
103 | - [``](../modules/_button_.md)
104 | - [`ButtonProps`](../interfaces/_button_.buttonprops.md)
105 |
--------------------------------------------------------------------------------
/docs/components/CustomTabBar.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: CustomTabBar 自定义标签栏
3 | ---
4 |
5 | 自定义标签栏高阶组件
6 |
7 | 自动从 app.config 中获取 tabBar 配置,内部全面管理标签状态(显示、激活、颜色、图标、红点等),支持 TabBar 相关 API。
8 |
9 | ## 示例
10 |
11 | ```jsx title="custom-tab-bar/index.js"
12 | import { CustomTabBar, TabBar } from '@tarojsx/ui';
13 |
14 | export default () => {
15 | return (
16 |
17 | {({
18 | hidden,
19 | current,
20 | list,
21 | switchTabIndex,
22 | style: { backgroundColor, color, selectedColor, borderStyle, position },
23 | }) => (
24 | ({
30 | key,
31 | title: text,
32 | image: iconPath,
33 | selectedImage: selectedIconPath,
34 | text: badge,
35 | dot: redDot,
36 | }))}
37 | current={current}
38 | onClick={onClick}
39 | />
40 | )}
41 |
42 | );
43 | };
44 | ```
45 |
46 | 以下为 app 配置代码片段:
47 |
48 | ```js title="app.config.js"
49 | export default {
50 | tabBar: {
51 | custom: true,
52 | color: '#888888',
53 | selectedColor: '#3B7CF7',
54 | list: [
55 | {
56 | pagePath: 'pages/todo',
57 | text: '待办事项',
58 | iconPath: 'assets/todo.png',
59 | selectedIconPath: 'assets/todo2.png',
60 | },
61 | {
62 | pagePath: 'pages/shot',
63 | text: '拍照',
64 | iconPath: 'assets/shot.png',
65 | selectedIconPath: 'assets/shot2.png',
66 | },
67 | {
68 | pagePath: 'pages/contact',
69 | text: '通讯录',
70 | iconPath: 'assets/contact.png',
71 | selectedIconPath: 'assets/contact2.png',
72 | },
73 | ],
74 | },
75 | };
76 | ```
77 |
78 | 支持 API:
79 |
80 | | 参数 | 说明 |
81 | | ---------------------- | ---------------------------------------------- |
82 | | Taro.hideTabBar | 隐藏标签栏,子组件属性 `hidden` 变成 `true`。 |
83 | | Taro.showTabBar | 显示标签栏,子组件属性 `hidden` 变成 `false`。 |
84 | | Taro.setTabBarStyle | 设置标签栏样式,子组件属性 `style` 随之更新。 |
85 | | Taro.setTabBarItem | 设置标签,子组件属性 `list` 随之更新。 |
86 | | Taro.setTabBarBadge | 设置标签 badge,子组件属性 `list` 随之更新。 |
87 | | Taro.removeTabBarBadge | 移除标签 badge,子组件属性 `list` 随之更新。 |
88 | | Taro.showTabBarRedDot | 显示标签红点,子组件属性 `list` 随之更新。 |
89 | | Taro.hideTabBarRedDot | 隐藏标签红点,子组件属性 `list` 随之更新。 |
90 |
91 | 子组件属性:
92 |
93 | | 参数 | 说明 | 类型 | 默认值 |
94 | | -------------- | -------------- | ------------------------ | ------ |
95 | | hidden | 是否隐藏标签栏 | boolean | |
96 | | current | 当前索引 | number | |
97 | | list | 标签列表 | object (参见 标签列表项) | |
98 | | style | 标签栏样式 | object (参见 标签栏样式) | |
99 | | switchTabIndex | 切换激活标签 | `(index:number) => void` | |
100 |
101 | 标签列表项:
102 |
103 | | 参数 | 说明 | 类型 | 默认值 |
104 | | ---------------- | --------------- | ------- | ------ |
105 | | key | React 组件 key | string | |
106 | | text | 源自 app.config | string | |
107 | | iconPath | 源自 app.config | string | |
108 | | selectedIconPath | 源自 app.config | string | |
109 | | badge | badge 文字 | string | |
110 | | redDot | 小红点 | boolean | |
111 |
112 | 标签栏样式:
113 |
114 | | 参数 | 说明 | 类型 | 默认值 |
115 | | --------------- | --------------- | ------ | ------ |
116 | | backgroundColor | 源自 app.config | string | |
117 | | color | 源自 app.config | string | |
118 | | selectedColor | 源自 app.config | string | |
119 | | borderStyle | 源自 app.config | string | |
120 | | position | 源自 app.config | string | |
121 |
122 | ## API
123 |
124 | - [``](../modules/_customtabbar_.md)
125 | - [`CustomTabBarProps`](../interfaces/_customtabbar_.customtabbarprops.md)
126 |
--------------------------------------------------------------------------------
/docs/components/InputNumber.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: InputNumber 数字输入框
3 | ---
4 |
5 | ## 示例
6 |
7 | import { InputNumber } from '@tarojsx/ui';
8 | import { UI } from '@/ui';
9 |
10 | ```jsx title="整数"
11 |
12 | ```
13 |
14 |
15 | {() => {
16 | const [value, setValue] = React.useState(0);
17 | return setValue(e.detail.value)} />;
18 | }}
19 |
20 |
21 | ```jsx title="小数"
22 |
23 | ```
24 |
25 |
26 | {() => {
27 | const [value, setValue] = React.useState(0);
28 | return setValue(e.detail.value)} />;
29 | }}
30 |
31 |
32 | ```jsx title="5-8"
33 |
34 | ```
35 |
36 |
37 | {() => {
38 | const [value, setValue] = React.useState(6);
39 | return setValue(e.detail.value)} />;
40 | }}
41 |
42 |
43 | ```jsx title="禁止输入"
44 |
45 | ```
46 |
47 |
48 | {() => {
49 | const [value, setValue] = React.useState(0);
50 | return setValue(e.detail.value)} />;
51 | }}
52 |
53 |
54 | ```jsx title="禁用"
55 |
56 | ```
57 |
58 |
59 |
60 |
61 |
62 | ## API
63 |
64 | - [Taro UI 文档](https://taro-ui.jd.com/#/docs/inputnumber)
65 | - [``](../modules/_inputnumber_.md)
66 | - [`InputNumberProps`](../interfaces/_inputnumber_.inputnumberprops.md)
67 |
--------------------------------------------------------------------------------
/docs/components/List.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: List 列表
3 | ---
4 |
5 | ## 示例
6 |
7 | import { List, ListHeader, ListItem, Icon, Tag } from '@tarojsx/ui';
8 | import { Text } from '@tarojs/components';
9 | import { UI } from '@/ui';
10 |
11 | ```jsx title="基本用法"
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | ```
20 |
21 | ```jsx title="高级用法"
22 |
23 |
24 | 标题组件} extra={} />
25 |
26 | children
27 |
28 |
29 | ```
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 标题组件} extra={} />
42 |
43 | {['TaroX', 'UI', 'ListItem'].map((c) => (
44 |
45 | {c}
46 |
47 | ))}
48 |
49 | alert('清除')} />
50 |
51 |
52 |
53 | ## API
54 |
55 | - [Taro UI 文档](https://taro-ui.jd.com/#/docs/list)
56 | - [`
`](../modules/_list_.md)
57 | - [`ListProps`](../interfaces/_list_.listprops.md)
58 |
--------------------------------------------------------------------------------
/docs/components/Progress.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Progress 进度条
3 | ---
4 |
5 | ## 示例
6 |
7 | import { Progress } from '@tarojsx/ui';
8 | import { useHarmonicIntervalFn } from 'react-use';
9 | import { UI } from '@/ui';
10 |
11 | ```jsx title="基础"
12 |
13 | ```
14 |
15 |
16 | {() => {
17 | const [percent, setPercent] = React.useState(0);
18 | useHarmonicIntervalFn(() => setPercent(Math.round((Date.now() / 100) % 100)), 1000);
19 | return ;
20 | }}
21 |
22 |
23 | ```jsx title="隐藏文字"
24 |
25 | ```
26 |
27 |
28 | {() => {
29 | const [percent, setPercent] = React.useState(0);
30 | useHarmonicIntervalFn(() => setPercent(Math.round((Date.now() / 100) % 100)), 1000);
31 | return ;
32 | }}
33 |
34 |
35 | ```jsx title="线宽"
36 |
37 |
38 |
39 | ```
40 |
41 |
42 | {() => {
43 | const [percent, setPercent] = React.useState(0);
44 | useHarmonicIntervalFn(() => setPercent(Math.round((Date.now() / 100) % 100)), 1000);
45 | return (
46 |
51 | );
52 | }}
53 |
54 |
55 | ```jsx title="过渡时间"
56 |
57 |
58 |
59 | ```
60 |
61 |
62 | {() => {
63 | const [percent, setPercent] = React.useState(0);
64 | useHarmonicIntervalFn(() => setPercent(Math.round((Date.now() / 100) % 100)), 1000);
65 | return (
66 |
71 | );
72 | }}
73 |
74 |
75 | ```jsx title="颜色"
76 |
77 |
78 |
79 | ```
80 |
81 |
82 | {() => {
83 | const [percent, setPercent] = React.useState(0);
84 | useHarmonicIntervalFn(() => setPercent(Math.round((Date.now() / 100) % 100)), 1000);
85 | return (
86 |
91 | );
92 | }}
93 |
94 |
95 | ```jsx title="状态"
96 |
97 |
98 |
99 | ```
100 |
101 |
102 | {() => {
103 | const [percent, setPercent] = React.useState(0);
104 | useHarmonicIntervalFn(() => setPercent(Math.round((Date.now() / 100) % 100)), 1000);
105 | return (
106 |
111 | );
112 | }}
113 |
114 |
115 | | 参数 | 说明 | 类型 | 默认值 |
116 | | ------------------ | ----------------------- | ------ | ------ |
117 | | transitionDuration | 动画过渡时间, 单位: 秒. | number | 0.3 |
118 |
119 | ## API
120 |
121 | - [Taro UI 文档](https://taro-ui.jd.com/#/docs/progress)
122 | - [``](../modules/_progress_.md)
123 | - [`ProgressProps`](../interfaces/_progress_.progressprops.md)
124 |
--------------------------------------------------------------------------------
/docs/components/SearchBar.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: SearchBar 搜索栏
3 | ---
4 |
5 | ## 示例
6 |
7 | import { SearchBar } from '@tarojsx/ui';
8 | import { UI } from '@/ui';
9 |
10 | ```jsx title="基础"
11 |
12 | ```
13 |
14 |
15 | {() => {
16 | return ;
17 | }}
18 |
19 |
20 | ## API
21 |
22 | - [Taro UI 文档](https://taro-ui.jd.com/#/docs/searchbar)
23 | - [``](../modules/_searchbar_.md)
24 | - [`SearchBarProps`](../interfaces/_searchbar_.searchbarprops.md)
25 |
--------------------------------------------------------------------------------
/docs/components/Steps.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Steps 步骤条
3 | ---
4 |
5 | ## 示例
6 |
7 | import { Steps } from '@tarojsx/ui';
8 | import { UI } from '@/ui';
9 |
10 | ```jsx title="基础"
11 | const Demo = () => {
12 | const [current, setCurrent] = React.useState(0);
13 | const onChange = React.useCallback((index) => {
14 | setCurrent(index);
15 | }, []);
16 | return (
17 |
47 | );
48 | };
49 | ```
50 |
51 |
52 | {() => {
53 | const [current, setCurrent] = React.useState(0);
54 | const onChange = React.useCallback((index) => {
55 | setCurrent(index);
56 | }, []);
57 | return (
58 |
88 | );
89 | }}
90 |
91 |
92 | ## API
93 |
94 | - [Taro UI 文档](https://taro-ui.jd.com/#/docs/steps)
95 | - [``](../modules/_steps_.md)
96 | - [`StepsProps`](../interfaces/_steps_.stepsprops.md)
97 |
--------------------------------------------------------------------------------
/docs/components/Tag.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Tag 标签
3 | ---
4 |
5 | ## 示例
6 |
7 | import { Tag } from '@tarojsx/ui';
8 | import { UI } from '@/ui';
9 |
10 | ```jsx title="基础"
11 | 标签
12 | 圆标签
13 | 主要标签
14 | 主要圆标签
15 | ```
16 |
17 |
18 | 标签
19 | 圆标签
20 | 主要标签
21 |
22 | 主要圆标签
23 |
24 |
25 |
26 | ```jsx title="激活"
27 | 标签
28 | 圆标签
29 | 主要标签
30 | 主要圆标签
31 | ```
32 |
33 |
34 | 标签
35 |
36 | 圆标签
37 |
38 |
39 | 主要标签
40 |
41 |
42 | 主要圆标签
43 |
44 |
45 |
46 | ```jsx title="小标签"
47 | 小标签
48 | 圆小标签
49 | 主要小标签
50 | 主要圆小标签
51 | ```
52 |
53 |
54 | 小标签
55 |
56 | 圆小标签
57 |
58 |
59 | 主要小标签
60 |
61 |
62 | 主要圆小标签
63 |
64 |
65 |
66 | ```jsx title="禁用"
67 | 标签
68 | 圆标签
69 | 主要标签
70 | 主要圆标签
71 | ```
72 |
73 |
74 | 标签
75 |
76 | 圆标签
77 |
78 |
79 | 主要标签
80 |
81 |
82 | 主要圆标签
83 |
84 |
85 |
86 | ```jsx title="点击"
87 |
88 | 点击标签
89 |
90 | ```
91 |
92 |
93 | alert('点击标签')}>
94 | 点击标签
95 |
96 |
97 |
98 | ## API
99 |
100 | - [Taro UI 文档](https://taro-ui.jd.com/#/docs/tag)
101 | - [``](../modules/_tag_.md)
102 | - [`TagProps`](../interfaces/_tag_.tagprops.md)
103 |
--------------------------------------------------------------------------------
/docs/globals.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: 'globals'
3 | title: '@tarojsx/ui'
4 | sidebar_label: 'Globals'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Modules
10 |
11 | - ["ActionSheet"](modules/_actionsheet_.md)
12 | - ["ActivityIndicator"](modules/_activityindicator_.md)
13 | - ["Avatar"](modules/_avatar_.md)
14 | - ["Badge"](modules/_badge_.md)
15 | - ["Button"](modules/_button_.md)
16 | - ["Calendar/body/index"](modules/_calendar_body_index_.md)
17 | - ["Calendar/body/interface"](modules/_calendar_body_interface_.md)
18 | - ["Calendar/common/constant"](modules/_calendar_common_constant_.md)
19 | - ["Calendar/common/helper"](modules/_calendar_common_helper_.md)
20 | - ["Calendar/common/plugins"](modules/_calendar_common_plugins_.md)
21 | - ["Calendar/controller/index"](modules/_calendar_controller_index_.md)
22 | - ["Calendar/controller/interface"](modules/_calendar_controller_interface_.md)
23 | - ["Calendar/index"](modules/_calendar_index_.md)
24 | - ["Calendar/interface"](modules/_calendar_interface_.md)
25 | - ["Calendar/ui/date-list/index"](modules/_calendar_ui_date_list_index_.md)
26 | - ["Calendar/ui/day-list/index"](modules/_calendar_ui_day_list_index_.md)
27 | - ["CustomTabBar"](modules/_customtabbar_.md)
28 | - ["FloatLayout"](modules/_floatlayout_.md)
29 | - ["Form"](modules/_form_.md)
30 | - ["Grid"](modules/_grid_.md)
31 | - ["Icon"](modules/_icon_.md)
32 | - ["ImagePicker"](modules/_imagepicker_.md)
33 | - ["Input"](modules/_input_.md)
34 | - ["InputNumber"](modules/_inputnumber_.md)
35 | - ["List"](modules/_list_.md)
36 | - ["ListHeader"](modules/_listheader_.md)
37 | - ["ListItem"](modules/_listitem_.md)
38 | - ["Loading"](modules/_loading_.md)
39 | - ["Message"](modules/_message_.md)
40 | - ["Modal"](modules/_modal_.md)
41 | - ["Progress"](modules/_progress_.md)
42 | - ["SearchBar"](modules/_searchbar_.md)
43 | - ["Statistic"](modules/_statistic_.md)
44 | - ["Steps"](modules/_steps_.md)
45 | - ["TabBar"](modules/_tabbar_.md)
46 | - ["Tabs"](modules/_tabs_.md)
47 | - ["TabsPane"](modules/_tabspane_.md)
48 | - ["Tag"](modules/_tag_.md)
49 | - ["Textarea"](modules/_textarea_.md)
50 | - ["index"](modules/_index_.md)
51 | - ["taro-ui"](modules/_taro_ui_.md)
52 | - ["utils"](modules/_utils_.md)
53 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: 'index'
3 | title: '@tarojsx/ui'
4 | sidebar_label: 'README'
5 | ---
6 |
7 |
8 |
Taro3 UI
9 |
10 |
11 |
我们重新(zào)发(lún)明(zi) Taro UI
12 |
13 |
14 |
15 |
16 |
33 |
34 |
44 |
45 |
46 |
47 | _当前代码提交频繁, 一些特性时有变化._
48 |
49 | Taro3 释放了 React 的潜能, 是时候对 Taro UI 进行改进了.
50 |
51 | ## 特性
52 |
53 | - :electric_plug: 一键安装, 使用上尽可能向后兼容.
54 |
55 | - :clapper: 复用 taro-ui 样式, 不改变组件外观.
56 |
57 | - :octopus: 扩展性更强, 许多原本只能传入字符串的地方, 现在可以传入组件了.
58 |
59 | - :mag_right: 完善的 Typescript 类型提示.
60 |
61 | - :gift: 开箱即用, 只需引入组件即可, 无需单独引入样式, 支持 Tree shaking.
62 |
63 | - :telescope: 未来计划引入更多常用的基础组件.
64 |
65 | ## 需求
66 |
67 | - **taro 3+**
68 | - react 16.8+
69 |
70 | ## 安装
71 |
72 | `npm i @tarojsx/ui`
73 |
74 | ## 使用
75 |
76 | ```tsx
77 | import React from 'react';
78 | import { Text } from '@tarojs/components';
79 | import { List, ListHeader, ListItem } from '@tarojsx/ui';
80 |
81 | export default () => {
82 | return (
83 |
84 |
85 | 0.2.0}>
86 | 我们重新(zào)发(lún)明(zi)了 Taro UI
87 |
88 |
89 | );
90 | };
91 | ```
92 |
93 | ## 组件
94 |
95 | 源于 Taro UI
96 |
97 | - [ ] Accordion
98 | - [x] ActionSheet
99 | - [ ] 子组件
100 | - [x] ActivityIndicator
101 | - [ ] Article
102 | - [x] [Avatar](./docs/components/Avatar.mdx)
103 | - [x] Badge
104 | - [x] [Button](./docs/components/Button.mdx)
105 | - [x] Calendar
106 | - [ ] Swipe 操作
107 | - [ ] Card
108 | - [ ] Checkbox
109 | - [ ] Countdown
110 | - [ ] Divider
111 | - [ ] Drawer
112 | - [ ] ~~Fab~~ (已合并入 Button)
113 | - [ ] ~~Flex~~ (使用率不高)
114 | - [x] FloatLayout
115 | - [x] Form
116 | - [x] Grid
117 | - [x] Icon
118 | - [x] ImagePicker
119 | - [ ] Indexes
120 | - [x] Input
121 | - [x] InputNumber
122 | - [x] List
123 | - [x] ListItem
124 | - [x] Loading
125 | - [ ] Loadmore
126 | - [x] Message
127 | - [ ] Modal
128 | - [ ] NavBar
129 | - [ ] Noticebar
130 | - [ ] Pagination
131 | - [ ] Picker
132 | - [x] Progress
133 | - [ ] Radio
134 | - [ ] Rate
135 | - [x] SearchBar
136 | - [ ] SegmentedControl
137 | - [ ] Slider
138 | - [x] Steps
139 | - [ ] SwipeAction
140 | - [ ] Swiper
141 | - [ ] Switch
142 | - [x] TabBar
143 | - [x] Tabs
144 | - [ ] Swipe 操作
145 | - [x] TabsPane
146 | - [ ] Swipe 操作
147 | - [x] Tag
148 | - [x] Textarea
149 | - [ ] Timeline
150 | - [ ] Toast
151 |
152 | 扩展组件
153 |
154 | - [x] CustomTabBar
155 | - [x] ListHeader
156 | - [x] Statistic
157 |
158 | ## 支持
159 |
160 | 欢迎各种形式的支持. 至少可以给颗星 :star:
161 |
162 | ## License
163 |
164 | [MIT](LICENSE)
165 |
--------------------------------------------------------------------------------
/docs/interfaces/_actionsheet_.actionsheetprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_actionsheet_.actionsheetprops'
3 | title: 'ActionSheetProps'
4 | sidebar_label: 'ActionSheetProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | ↳ **ActionSheetProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [cancelText](_actionsheet_.actionsheetprops.md#optional-canceltext)
18 | - [className](_actionsheet_.actionsheetprops.md#optional-classname)
19 | - [isOpened](_actionsheet_.actionsheetprops.md#optional-isopened)
20 | - [style](_actionsheet_.actionsheetprops.md#optional-style)
21 | - [title](_actionsheet_.actionsheetprops.md#optional-title)
22 |
23 | ## Properties
24 |
25 | ### `Optional` cancelText
26 |
27 | • **cancelText**? : _React.ReactNode_
28 |
29 | _Defined in [src/ActionSheet.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/ActionSheet.tsx#L13)_
30 |
31 | ---
32 |
33 | ### `Optional` className
34 |
35 | • **className**? : _string_
36 |
37 | _Defined in [src/ActionSheet.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/ActionSheet.tsx#L9)_
38 |
39 | ---
40 |
41 | ### `Optional` isOpened
42 |
43 | • **isOpened**? : _boolean_
44 |
45 | _Defined in [src/ActionSheet.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/ActionSheet.tsx#L11)_
46 |
47 | ---
48 |
49 | ### `Optional` style
50 |
51 | • **style**? : _CSSProperties_
52 |
53 | _Defined in [src/ActionSheet.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/ActionSheet.tsx#L10)_
54 |
55 | ---
56 |
57 | ### `Optional` title
58 |
59 | • **title**? : _React.ReactNode_
60 |
61 | _Defined in [src/ActionSheet.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/ActionSheet.tsx#L12)_
62 |
--------------------------------------------------------------------------------
/docs/interfaces/_activityindicator_.activityindicatorprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_activityindicator_.activityindicatorprops'
3 | title: 'ActivityIndicatorProps'
4 | sidebar_label: 'ActivityIndicatorProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - AtActivityIndicatorProps
10 |
11 | ↳ **ActivityIndicatorProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [className](_activityindicator_.activityindicatorprops.md#optional-classname)
18 | - [color](_activityindicator_.activityindicatorprops.md#optional-color)
19 | - [content](_activityindicator_.activityindicatorprops.md#optional-content)
20 | - [customStyle](_activityindicator_.activityindicatorprops.md#optional-customstyle)
21 | - [isOpened](_activityindicator_.activityindicatorprops.md#optional-isopened)
22 | - [mode](_activityindicator_.activityindicatorprops.md#optional-mode)
23 | - [size](_activityindicator_.activityindicatorprops.md#optional-size)
24 |
25 | ## Properties
26 |
27 | ### `Optional` className
28 |
29 | • **className**? : _string_
30 |
31 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[className](_activityindicator_.activityindicatorprops.md#optional-classname)\_
32 |
33 | Defined in node_modules/taro-ui/types/base.d.ts:4
34 |
35 | ---
36 |
37 | ### `Optional` color
38 |
39 | • **color**? : _string_
40 |
41 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[color](_activityindicator_.activityindicatorprops.md#optional-color)\_
42 |
43 | Defined in node_modules/taro-ui/types/activity-indicator.d.ts:19
44 |
45 | loading 图的颜色
46 |
47 | **`default`** #6190E8
48 |
49 | ---
50 |
51 | ### `Optional` content
52 |
53 | • **content**? : _string_
54 |
55 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[content](_activityindicator_.activityindicatorprops.md#optional-content)\_
56 |
57 | Defined in node_modules/taro-ui/types/activity-indicator.d.ts:23
58 |
59 | 元素的内容文本
60 |
61 | ---
62 |
63 | ### `Optional` customStyle
64 |
65 | • **customStyle**? : _string | CSSProperties_
66 |
67 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[customStyle](_activityindicator_.activityindicatorprops.md#optional-customstyle)\_
68 |
69 | Defined in node_modules/taro-ui/types/base.d.ts:6
70 |
71 | ---
72 |
73 | ### `Optional` isOpened
74 |
75 | • **isOpened**? : _boolean_
76 |
77 | _Overrides void_
78 |
79 | _Defined in [src/ActivityIndicator.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/ActivityIndicator.tsx#L10)_
80 |
81 | ---
82 |
83 | ### `Optional` mode
84 |
85 | • **mode**? : _"center" | "normal"_
86 |
87 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[mode](_activityindicator_.activityindicatorprops.md#optional-mode)\_
88 |
89 | Defined in node_modules/taro-ui/types/activity-indicator.d.ts:14
90 |
91 | 元素的类型
92 |
93 | ---
94 |
95 | ### `Optional` size
96 |
97 | • **size**? : _number_
98 |
99 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[size](_activityindicator_.activityindicatorprops.md#optional-size)\_
100 |
101 | Defined in node_modules/taro-ui/types/activity-indicator.d.ts:10
102 |
103 | loading 图的大小
104 |
105 | **`default`** 24
106 |
--------------------------------------------------------------------------------
/docs/interfaces/_avatar_.avatarprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_avatar_.avatarprops'
3 | title: 'AvatarProps'
4 | sidebar_label: 'AvatarProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **AvatarProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [circle](_avatar_.avatarprops.md#optional-circle)
16 | - [className](_avatar_.avatarprops.md#optional-classname)
17 | - [image](_avatar_.avatarprops.md#optional-image)
18 | - [openData](_avatar_.avatarprops.md#optional-opendata)
19 | - [size](_avatar_.avatarprops.md#optional-size)
20 | - [style](_avatar_.avatarprops.md#optional-style)
21 | - [text](_avatar_.avatarprops.md#optional-text)
22 |
23 | ## Properties
24 |
25 | ### `Optional` circle
26 |
27 | • **circle**? : _boolean_
28 |
29 | _Defined in [src/Avatar.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Avatar.tsx#L12)_
30 |
31 | ---
32 |
33 | ### `Optional` className
34 |
35 | • **className**? : _string_
36 |
37 | _Defined in [src/Avatar.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Avatar.tsx#L9)_
38 |
39 | ---
40 |
41 | ### `Optional` image
42 |
43 | • **image**? : _string_
44 |
45 | _Defined in [src/Avatar.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/Avatar.tsx#L14)_
46 |
47 | ---
48 |
49 | ### `Optional` openData
50 |
51 | • **openData**? : _object_
52 |
53 | _Defined in [src/Avatar.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/Avatar.tsx#L15)_
54 |
55 | #### Type declaration:
56 |
57 | - **lang**? : _OpenDataProps["lang"]_
58 |
59 | - **type**: _"userAvatarUrl"_
60 |
61 | ---
62 |
63 | ### `Optional` size
64 |
65 | • **size**? : _"tiny" | "mini" | "small" | "large"_
66 |
67 | _Defined in [src/Avatar.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/Avatar.tsx#L11)_
68 |
69 | ---
70 |
71 | ### `Optional` style
72 |
73 | • **style**? : _CSSProperties_
74 |
75 | _Defined in [src/Avatar.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Avatar.tsx#L10)_
76 |
77 | ---
78 |
79 | ### `Optional` text
80 |
81 | • **text**? : _string_
82 |
83 | _Defined in [src/Avatar.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/Avatar.tsx#L13)_
84 |
--------------------------------------------------------------------------------
/docs/interfaces/_badge_.badgeprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_badge_.badgeprops'
3 | title: 'BadgeProps'
4 | sidebar_label: 'BadgeProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **BadgeProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [className](_badge_.badgeprops.md#optional-classname)
16 | - [dot](_badge_.badgeprops.md#optional-dot)
17 | - [maxValue](_badge_.badgeprops.md#optional-maxvalue)
18 | - [style](_badge_.badgeprops.md#optional-style)
19 | - [value](_badge_.badgeprops.md#optional-value)
20 |
21 | ## Properties
22 |
23 | ### `Optional` className
24 |
25 | • **className**? : _string_
26 |
27 | _Defined in [src/Badge.tsx:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/Badge.tsx#L8)_
28 |
29 | ---
30 |
31 | ### `Optional` dot
32 |
33 | • **dot**? : _boolean_
34 |
35 | _Defined in [src/Badge.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Badge.tsx#L10)_
36 |
37 | ---
38 |
39 | ### `Optional` maxValue
40 |
41 | • **maxValue**? : _number_
42 |
43 | _Defined in [src/Badge.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Badge.tsx#L12)_
44 |
45 | ---
46 |
47 | ### `Optional` style
48 |
49 | • **style**? : _CSSProperties_
50 |
51 | _Defined in [src/Badge.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Badge.tsx#L9)_
52 |
53 | ---
54 |
55 | ### `Optional` value
56 |
57 | • **value**? : _number | string_
58 |
59 | _Defined in [src/Badge.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/Badge.tsx#L11)_
60 |
--------------------------------------------------------------------------------
/docs/interfaces/_button_.buttonprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_button_.buttonprops'
3 | title: 'ButtonProps'
4 | sidebar_label: 'ButtonProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | - object
12 |
13 | ↳ **ButtonProps**
14 |
15 | ## Index
16 |
17 | ### Properties
18 |
19 | - [className](_button_.buttonprops.md#optional-classname)
20 | - [clickThrottle](_button_.buttonprops.md#optional-clickthrottle)
21 | - [fab](_button_.buttonprops.md#optional-fab)
22 | - [iconInfo](_button_.buttonprops.md#optional-iconinfo)
23 | - [size](_button_.buttonprops.md#optional-size)
24 | - [style](_button_.buttonprops.md#optional-style)
25 | - [transparent](_button_.buttonprops.md#optional-transparent)
26 | - [type](_button_.buttonprops.md#optional-type)
27 |
28 | ## Properties
29 |
30 | ### `Optional` className
31 |
32 | • **className**? : _string_
33 |
34 | _Defined in [src/Button.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L13)_
35 |
36 | ---
37 |
38 | ### `Optional` clickThrottle
39 |
40 | • **clickThrottle**? : _boolean | number_
41 |
42 | _Defined in [src/Button.tsx:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L18)_
43 |
44 | onClick 事件节流时间间隔, 单位: ms, 默认 500ms.
45 |
46 | ---
47 |
48 | ### `Optional` fab
49 |
50 | • **fab**? : _boolean_
51 |
52 | _Defined in [src/Button.tsx:22](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L22)_
53 |
54 | ---
55 |
56 | ### `Optional` iconInfo
57 |
58 | • **iconInfo**? : _[IconProps](\_icon_.iconprops.md)\_
59 |
60 | _Defined in [src/Button.tsx:21](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L21)_
61 |
62 | ---
63 |
64 | ### `Optional` size
65 |
66 | • **size**? : _\_ButtonProps["size"] | AtButtonProps["size"]_
67 |
68 | _Defined in [src/Button.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L16)_
69 |
70 | ---
71 |
72 | ### `Optional` style
73 |
74 | • **style**? : _CSSProperties_
75 |
76 | _Defined in [src/Button.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L14)_
77 |
78 | ---
79 |
80 | ### `Optional` transparent
81 |
82 | • **transparent**? : _boolean_
83 |
84 | _Defined in [src/Button.tsx:20](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L20)_
85 |
86 | 透明按钮
87 |
88 | ---
89 |
90 | ### `Optional` type
91 |
92 | • **type**? : _\_ButtonProps["type"] | AtButtonProps["type"] | "error"_
93 |
94 | _Defined in [src/Button.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L15)_
95 |
--------------------------------------------------------------------------------
/docs/interfaces/_calendar_body_interface_.props.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_body_interface_.props'
3 | title: 'Props'
4 | sidebar_label: 'Props'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **Props**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [format](_calendar_body_interface_.props.md#format)
16 | - [generateDate](_calendar_body_interface_.props.md#generatedate)
17 | - [isSwiper](_calendar_body_interface_.props.md#isswiper)
18 | - [isVertical](_calendar_body_interface_.props.md#isvertical)
19 | - [marks](_calendar_body_interface_.props.md#marks)
20 | - [maxDate](_calendar_body_interface_.props.md#optional-maxdate)
21 | - [minDate](_calendar_body_interface_.props.md#optional-mindate)
22 | - [onDayClick](_calendar_body_interface_.props.md#ondayclick)
23 | - [onLongClick](_calendar_body_interface_.props.md#onlongclick)
24 | - [onSwipeMonth](_calendar_body_interface_.props.md#onswipemonth)
25 | - [selectedDate](_calendar_body_interface_.props.md#selecteddate)
26 | - [selectedDates](_calendar_body_interface_.props.md#selecteddates)
27 | - [validDates](_calendar_body_interface_.props.md#validdates)
28 |
29 | ## Properties
30 |
31 | ### format
32 |
33 | • **format**: _string_
34 |
35 | _Defined in [src/Calendar/body/interface.ts:6](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L6)_
36 |
37 | ---
38 |
39 | ### generateDate
40 |
41 | • **generateDate**: _number_
42 |
43 | _Defined in [src/Calendar/body/interface.ts:20](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L20)_
44 |
45 | ---
46 |
47 | ### isSwiper
48 |
49 | • **isSwiper**: _boolean_
50 |
51 | _Defined in [src/Calendar/body/interface.ts:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L12)_
52 |
53 | ---
54 |
55 | ### isVertical
56 |
57 | • **isVertical**: _boolean_
58 |
59 | _Defined in [src/Calendar/body/interface.ts:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L18)_
60 |
61 | ---
62 |
63 | ### marks
64 |
65 | • **marks**: _Array‹Mark›_
66 |
67 | _Defined in [src/Calendar/body/interface.ts:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L10)_
68 |
69 | ---
70 |
71 | ### `Optional` maxDate
72 |
73 | • **maxDate**? : _Calendar.DateArg_
74 |
75 | _Defined in [src/Calendar/body/interface.ts:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L16)_
76 |
77 | ---
78 |
79 | ### `Optional` minDate
80 |
81 | • **minDate**? : _Calendar.DateArg_
82 |
83 | _Defined in [src/Calendar/body/interface.ts:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L14)_
84 |
85 | ---
86 |
87 | ### onDayClick
88 |
89 | • **onDayClick**: _function_
90 |
91 | _Defined in [src/Calendar/body/interface.ts:26](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L26)_
92 |
93 | #### Type declaration:
94 |
95 | ▸ (`item`: Item): _void_
96 |
97 | **Parameters:**
98 |
99 | | Name | Type |
100 | | ------ | ---- |
101 | | `item` | Item |
102 |
103 | ---
104 |
105 | ### onLongClick
106 |
107 | • **onLongClick**: _function_
108 |
109 | _Defined in [src/Calendar/body/interface.ts:30](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L30)_
110 |
111 | #### Type declaration:
112 |
113 | ▸ (`item`: Item): _void_
114 |
115 | **Parameters:**
116 |
117 | | Name | Type |
118 | | ------ | ---- |
119 | | `item` | Item |
120 |
121 | ---
122 |
123 | ### onSwipeMonth
124 |
125 | • **onSwipeMonth**: _function_
126 |
127 | _Defined in [src/Calendar/body/interface.ts:28](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L28)_
128 |
129 | #### Type declaration:
130 |
131 | ▸ (`vectorCount`: number): _void_
132 |
133 | **Parameters:**
134 |
135 | | Name | Type |
136 | | ------------- | ------ |
137 | | `vectorCount` | number |
138 |
139 | ---
140 |
141 | ### selectedDate
142 |
143 | • **selectedDate**: _SelectedDate_
144 |
145 | _Defined in [src/Calendar/body/interface.ts:22](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L22)_
146 |
147 | ---
148 |
149 | ### selectedDates
150 |
151 | • **selectedDates**: _Array‹SelectedDate› | []_
152 |
153 | _Defined in [src/Calendar/body/interface.ts:24](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L24)_
154 |
155 | ---
156 |
157 | ### validDates
158 |
159 | • **validDates**: _Array‹ValidDate›_
160 |
161 | _Defined in [src/Calendar/body/interface.ts:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L8)_
162 |
--------------------------------------------------------------------------------
/docs/interfaces/_calendar_body_interface_.state.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_body_interface_.state'
3 | title: 'State'
4 | sidebar_label: 'State'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **State**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [isAnimate](_calendar_body_interface_.state.md#isanimate)
16 | - [listGroup](_calendar_body_interface_.state.md#listgroup)
17 | - [offsetSize](_calendar_body_interface_.state.md#offsetsize)
18 |
19 | ## Properties
20 |
21 | ### isAnimate
22 |
23 | • **isAnimate**: _boolean_
24 |
25 | _Defined in [src/Calendar/body/interface.ts:34](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L34)_
26 |
27 | ---
28 |
29 | ### listGroup
30 |
31 | • **listGroup**: _[ListGroup](../modules/\_calendar_body_interface_.md#listgroup)\_
32 |
33 | _Defined in [src/Calendar/body/interface.ts:38](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L38)_
34 |
35 | ---
36 |
37 | ### offsetSize
38 |
39 | • **offsetSize**: _number_
40 |
41 | _Defined in [src/Calendar/body/interface.ts:36](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L36)_
42 |
--------------------------------------------------------------------------------
/docs/interfaces/_calendar_controller_interface_.props.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_controller_interface_.props'
3 | title: 'Props'
4 | sidebar_label: 'Props'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **Props**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [generateDate](_calendar_controller_interface_.props.md#generatedate)
16 | - [hideArrow](_calendar_controller_interface_.props.md#hidearrow)
17 | - [maxDate](_calendar_controller_interface_.props.md#optional-maxdate)
18 | - [minDate](_calendar_controller_interface_.props.md#optional-mindate)
19 | - [monthFormat](_calendar_controller_interface_.props.md#monthformat)
20 | - [onNextMonth](_calendar_controller_interface_.props.md#onnextmonth)
21 | - [onPreMonth](_calendar_controller_interface_.props.md#onpremonth)
22 | - [onSelectDate](_calendar_controller_interface_.props.md#onselectdate)
23 |
24 | ## Properties
25 |
26 | ### generateDate
27 |
28 | • **generateDate**: _Calendar.DateArg_
29 |
30 | _Defined in [src/Calendar/controller/interface.ts:6](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/controller/interface.ts#L6)_
31 |
32 | ---
33 |
34 | ### hideArrow
35 |
36 | • **hideArrow**: _boolean_
37 |
38 | _Defined in [src/Calendar/controller/interface.ts:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/controller/interface.ts#L12)_
39 |
40 | ---
41 |
42 | ### `Optional` maxDate
43 |
44 | • **maxDate**? : _Calendar.DateArg_
45 |
46 | _Defined in [src/Calendar/controller/interface.ts:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/controller/interface.ts#L10)_
47 |
48 | ---
49 |
50 | ### `Optional` minDate
51 |
52 | • **minDate**? : _Calendar.DateArg_
53 |
54 | _Defined in [src/Calendar/controller/interface.ts:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/controller/interface.ts#L8)_
55 |
56 | ---
57 |
58 | ### monthFormat
59 |
60 | • **monthFormat**: _string_
61 |
62 | _Defined in [src/Calendar/controller/interface.ts:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/controller/interface.ts#L14)_
63 |
64 | ---
65 |
66 | ### onNextMonth
67 |
68 | • **onNextMonth**: _function_
69 |
70 | _Defined in [src/Calendar/controller/interface.ts:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/controller/interface.ts#L18)_
71 |
72 | #### Type declaration:
73 |
74 | ▸ (): _void_
75 |
76 | ---
77 |
78 | ### onPreMonth
79 |
80 | • **onPreMonth**: _function_
81 |
82 | _Defined in [src/Calendar/controller/interface.ts:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/controller/interface.ts#L16)_
83 |
84 | #### Type declaration:
85 |
86 | ▸ (): _void_
87 |
88 | ---
89 |
90 | ### onSelectDate
91 |
92 | • **onSelectDate**: _CommonEventFunction_
93 |
94 | _Defined in [src/Calendar/controller/interface.ts:20](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/controller/interface.ts#L20)_
95 |
--------------------------------------------------------------------------------
/docs/interfaces/_calendar_controller_interface_.state.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_controller_interface_.state'
3 | title: 'State'
4 | sidebar_label: 'State'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **State**
10 |
--------------------------------------------------------------------------------
/docs/interfaces/_calendar_interface_.defaultprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_interface_.defaultprops'
3 | title: 'DefaultProps'
4 | sidebar_label: 'DefaultProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **DefaultProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [currentDate](_calendar_interface_.defaultprops.md#currentdate)
16 | - [format](_calendar_interface_.defaultprops.md#format)
17 | - [hideArrow](_calendar_interface_.defaultprops.md#hidearrow)
18 | - [isMultiSelect](_calendar_interface_.defaultprops.md#ismultiselect)
19 | - [isSwiper](_calendar_interface_.defaultprops.md#isswiper)
20 | - [isVertical](_calendar_interface_.defaultprops.md#isvertical)
21 | - [marks](_calendar_interface_.defaultprops.md#marks)
22 | - [monthFormat](_calendar_interface_.defaultprops.md#monthformat)
23 | - [selectedDates](_calendar_interface_.defaultprops.md#selecteddates)
24 | - [validDates](_calendar_interface_.defaultprops.md#validdates)
25 |
26 | ## Properties
27 |
28 | ### currentDate
29 |
30 | • **currentDate**: _Calendar.DateArg | SelectedDate_
31 |
32 | _Defined in [src/Calendar/interface.ts:60](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L60)_
33 |
34 | ---
35 |
36 | ### format
37 |
38 | • **format**: _string_
39 |
40 | _Defined in [src/Calendar/interface.ts:52](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L52)_
41 |
42 | ---
43 |
44 | ### hideArrow
45 |
46 | • **hideArrow**: _boolean_
47 |
48 | _Defined in [src/Calendar/interface.ts:64](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L64)_
49 |
50 | ---
51 |
52 | ### isMultiSelect
53 |
54 | • **isMultiSelect**: _boolean_
55 |
56 | _Defined in [src/Calendar/interface.ts:68](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L68)_
57 |
58 | ---
59 |
60 | ### isSwiper
61 |
62 | • **isSwiper**: _boolean_
63 |
64 | _Defined in [src/Calendar/interface.ts:54](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L54)_
65 |
66 | ---
67 |
68 | ### isVertical
69 |
70 | • **isVertical**: _boolean_
71 |
72 | _Defined in [src/Calendar/interface.ts:66](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L66)_
73 |
74 | ---
75 |
76 | ### marks
77 |
78 | • **marks**: _Array‹Mark›_
79 |
80 | _Defined in [src/Calendar/interface.ts:58](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L58)_
81 |
82 | ---
83 |
84 | ### monthFormat
85 |
86 | • **monthFormat**: _string_
87 |
88 | _Defined in [src/Calendar/interface.ts:62](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L62)_
89 |
90 | ---
91 |
92 | ### selectedDates
93 |
94 | • **selectedDates**: _Array‹SelectedDate›_
95 |
96 | _Defined in [src/Calendar/interface.ts:70](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L70)_
97 |
98 | ---
99 |
100 | ### validDates
101 |
102 | • **validDates**: _Array‹ValidDate›_
103 |
104 | _Defined in [src/Calendar/interface.ts:56](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L56)_
105 |
--------------------------------------------------------------------------------
/docs/interfaces/_calendar_interface_.state.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_interface_.state'
3 | title: 'State'
4 | sidebar_label: 'State'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **State**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [generateDate](_calendar_interface_.state.md#generatedate)
16 | - [selectedDate](_calendar_interface_.state.md#selecteddate)
17 |
18 | ## Properties
19 |
20 | ### generateDate
21 |
22 | • **generateDate**: _number_
23 |
24 | _Defined in [src/Calendar/interface.ts:74](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L74)_
25 |
26 | ---
27 |
28 | ### selectedDate
29 |
30 | • **selectedDate**: _SelectedDate_
31 |
32 | _Defined in [src/Calendar/interface.ts:76](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L76)_
33 |
--------------------------------------------------------------------------------
/docs/interfaces/_calendar_ui_date_list_index_.props.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_ui_date_list_index_.props'
3 | title: 'Props'
4 | sidebar_label: 'Props'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **Props**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [list](_calendar_ui_date_list_index_.props.md#list)
16 | - [onClick](_calendar_ui_date_list_index_.props.md#optional-onclick)
17 | - [onLongClick](_calendar_ui_date_list_index_.props.md#optional-onlongclick)
18 |
19 | ## Properties
20 |
21 | ### list
22 |
23 | • **list**: _Calendar.List‹Item›_
24 |
25 | _Defined in [src/Calendar/ui/date-list/index.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/ui/date-list/index.tsx#L16)_
26 |
27 | ---
28 |
29 | ### `Optional` onClick
30 |
31 | • **onClick**? : _function_
32 |
33 | _Defined in [src/Calendar/ui/date-list/index.tsx:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/ui/date-list/index.tsx#L18)_
34 |
35 | #### Type declaration:
36 |
37 | ▸ (`item`: Item): _void_
38 |
39 | **Parameters:**
40 |
41 | | Name | Type |
42 | | ------ | ---- |
43 | | `item` | Item |
44 |
45 | ---
46 |
47 | ### `Optional` onLongClick
48 |
49 | • **onLongClick**? : _function_
50 |
51 | _Defined in [src/Calendar/ui/date-list/index.tsx:20](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/ui/date-list/index.tsx#L20)_
52 |
53 | #### Type declaration:
54 |
55 | ▸ (`item`: Item): _void_
56 |
57 | **Parameters:**
58 |
59 | | Name | Type |
60 | | ------ | ---- |
61 | | `item` | Item |
62 |
--------------------------------------------------------------------------------
/docs/interfaces/_customtabbar_.customtabbarprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_customtabbar_.customtabbarprops'
3 | title: 'CustomTabBarProps'
4 | sidebar_label: 'CustomTabBarProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **CustomTabBarProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [appTabBarConfig](_customtabbar_.customtabbarprops.md#optional-apptabbarconfig)
16 | - [children](_customtabbar_.customtabbarprops.md#optional-children)
17 |
18 | ## Properties
19 |
20 | ### `Optional` appTabBarConfig
21 |
22 | • **appTabBarConfig**? : _TabBarConfig_
23 |
24 | _Defined in [src/CustomTabBar.tsx:37](https://github.com/tarojsx/ui/blob/v0.11.0/src/CustomTabBar.tsx#L37)_
25 |
26 | `app.config.js` 中的 `tabBar` 字段, taro 3.0.0-rc.1 及以上版本可省略.
27 |
28 | **`example`**
29 |
30 | ```tsx
31 | import appConfig from '../app.config';
32 | ;
33 | ```
34 |
35 | ---
36 |
37 | ### `Optional` children
38 |
39 | • **children**? : _function_
40 |
41 | _Defined in [src/CustomTabBar.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/CustomTabBar.tsx#L12)_
42 |
43 | #### Type declaration:
44 |
45 | ▸ (`renderProps`: object): _ReactElement_
46 |
47 | **Parameters:**
48 |
49 | ▪ **renderProps**: _object_
50 |
51 | | Name | Type | Description |
52 | | ---------------- | ------------------ | ------------------------------------------------ |
53 | | `current` | number | 当前选中项索引 |
54 | | `hidden` | boolean | 是否隐藏. 当调用 `Taro.hideTabBar()` 后值为 true |
55 | | `list` | CustomTabBarItem[] | Tab 列表 |
56 | | `style` | CustomTabBarStyle | TabBar 样式 |
57 | | `switchTabIndex` | | - |
58 |
--------------------------------------------------------------------------------
/docs/interfaces/_floatlayout_.floatlayoutprops.onscrolldetail.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_floatlayout_.floatlayoutprops.onscrolldetail'
3 | title: 'onScrollDetail'
4 | sidebar_label: 'onScrollDetail'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **onScrollDetail**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [deltaX](_floatlayout_.floatlayoutprops.onscrolldetail.md#deltax)
16 | - [deltaY](_floatlayout_.floatlayoutprops.onscrolldetail.md#deltay)
17 | - [scrollHeight](_floatlayout_.floatlayoutprops.onscrolldetail.md#scrollheight)
18 | - [scrollLeft](_floatlayout_.floatlayoutprops.onscrolldetail.md#scrollleft)
19 | - [scrollTop](_floatlayout_.floatlayoutprops.onscrolldetail.md#scrolltop)
20 | - [scrollWidth](_floatlayout_.floatlayoutprops.onscrolldetail.md#scrollwidth)
21 |
22 | ## Properties
23 |
24 | ### deltaX
25 |
26 | • **deltaX**: _number_
27 |
28 | Defined in node_modules/@tarojs/components/types/ScrollView.d.ts:147
29 |
30 | ---
31 |
32 | ### deltaY
33 |
34 | • **deltaY**: _number_
35 |
36 | Defined in node_modules/@tarojs/components/types/ScrollView.d.ts:148
37 |
38 | ---
39 |
40 | ### scrollHeight
41 |
42 | • **scrollHeight**: _number_
43 |
44 | Defined in node_modules/@tarojs/components/types/ScrollView.d.ts:144
45 |
46 | 滚动条高度
47 |
48 | ---
49 |
50 | ### scrollLeft
51 |
52 | • **scrollLeft**: _number_
53 |
54 | Defined in node_modules/@tarojs/components/types/ScrollView.d.ts:140
55 |
56 | 横向滚动条位置
57 |
58 | ---
59 |
60 | ### scrollTop
61 |
62 | • **scrollTop**: _number_
63 |
64 | Defined in node_modules/@tarojs/components/types/ScrollView.d.ts:142
65 |
66 | 竖向滚动条位置
67 |
68 | ---
69 |
70 | ### scrollWidth
71 |
72 | • **scrollWidth**: _number_
73 |
74 | Defined in node_modules/@tarojs/components/types/ScrollView.d.ts:146
75 |
76 | 滚动条宽度
77 |
--------------------------------------------------------------------------------
/docs/interfaces/_form_.formprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_form_.formprops'
3 | title: 'FormProps'
4 | sidebar_label: 'FormProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | ↳ **FormProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [submitThrottle](_form_.formprops.md#optional-submitthrottle)
18 |
19 | ### Methods
20 |
21 | - [onSubmit](_form_.formprops.md#optional-onsubmit)
22 |
23 | ## Properties
24 |
25 | ### `Optional` submitThrottle
26 |
27 | • **submitThrottle**? : _boolean | number_
28 |
29 | _Defined in [src/Form.tsx:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/Form.tsx#L8)_
30 |
31 | onClick 事件节流时间间隔, 单位: ms, 默认 500ms.
32 |
33 | ## Methods
34 |
35 | ### `Optional` onSubmit
36 |
37 | ▸ **onSubmit**(`e`: BaseSyntheticEvent): _void_
38 |
39 | _Defined in [src/Form.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Form.tsx#L9)_
40 |
41 | **Parameters:**
42 |
43 | | Name | Type |
44 | | ---- | ------------------ |
45 | | `e` | BaseSyntheticEvent |
46 |
47 | **Returns:** _void_
48 |
--------------------------------------------------------------------------------
/docs/interfaces/_grid_.griditem.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_grid_.griditem'
3 | title: 'GridItem'
4 | sidebar_label: 'GridItem'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | ↳ **GridItem**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [iconInfo](_grid_.griditem.md#optional-iconinfo)
18 |
19 | ## Properties
20 |
21 | ### `Optional` iconInfo
22 |
23 | • **iconInfo**? : _[IconProps](\_icon_.iconprops.md)\_
24 |
25 | _Defined in [src/Grid.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Grid.tsx#L12)_
26 |
--------------------------------------------------------------------------------
/docs/interfaces/_grid_.gridprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_grid_.gridprops'
3 | title: 'GridProps'
4 | sidebar_label: 'GridProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | ↳ **GridProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [data](_grid_.gridprops.md#data)
18 | - [onClick](_grid_.gridprops.md#optional-onclick)
19 |
20 | ## Properties
21 |
22 | ### data
23 |
24 | • **data**: _[GridItem](\_grid_.griditem.md)[]\_
25 |
26 | _Defined in [src/Grid.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/Grid.tsx#L15)_
27 |
28 | ---
29 |
30 | ### `Optional` onClick
31 |
32 | • **onClick**? : _CommonEventFunction‹object›_
33 |
34 | _Defined in [src/Grid.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/Grid.tsx#L16)_
35 |
--------------------------------------------------------------------------------
/docs/interfaces/_icon_.iconprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_icon_.iconprops'
3 | title: 'IconProps'
4 | sidebar_label: 'IconProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | ↳ **IconProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [onClick](_icon_.iconprops.md#optional-onclick)
18 | - [size](_icon_.iconprops.md#optional-size)
19 | - [style](_icon_.iconprops.md#optional-style)
20 |
21 | ## Properties
22 |
23 | ### `Optional` onClick
24 |
25 | • **onClick**? : _CommonEventFunction_
26 |
27 | _Defined in [src/Icon.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Icon.tsx#L12)_
28 |
29 | ---
30 |
31 | ### `Optional` size
32 |
33 | • **size**? : _number | string_
34 |
35 | _Defined in [src/Icon.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/Icon.tsx#L11)_
36 |
37 | ---
38 |
39 | ### `Optional` style
40 |
41 | • **style**? : _CSSProperties_
42 |
43 | _Defined in [src/Icon.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Icon.tsx#L10)_
44 |
--------------------------------------------------------------------------------
/docs/interfaces/_input_.inputprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_input_.inputprops'
3 | title: 'InputProps'
4 | sidebar_label: 'InputProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | - object
12 |
13 | ↳ **InputProps**
14 |
15 | ## Index
16 |
17 | ### Properties
18 |
19 | - [className](_input_.inputprops.md#optional-classname)
20 | - [error](_input_.inputprops.md#optional-error)
21 | - [innerRef](_input_.inputprops.md#optional-innerref)
22 | - [maxLength](_input_.inputprops.md#optional-maxlength)
23 | - [name](_input_.inputprops.md#optional-name)
24 | - [onBlur](_input_.inputprops.md#optional-onblur)
25 | - [onChange](_input_.inputprops.md#optional-onchange)
26 | - [onFocus](_input_.inputprops.md#optional-onfocus)
27 | - [readOnly](_input_.inputprops.md#optional-readonly)
28 | - [required](_input_.inputprops.md#optional-required)
29 | - [style](_input_.inputprops.md#optional-style)
30 | - [type](_input_.inputprops.md#optional-type)
31 |
32 | ### Methods
33 |
34 | - [onClick](_input_.inputprops.md#optional-onclick)
35 | - [onErrorClick](_input_.inputprops.md#optional-onerrorclick)
36 |
37 | ## Properties
38 |
39 | ### `Optional` className
40 |
41 | • **className**? : _string_
42 |
43 | _Defined in [src/Input.tsx:31](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L31)_
44 |
45 | ---
46 |
47 | ### `Optional` error
48 |
49 | • **error**? : _any_
50 |
51 | _Defined in [src/Input.tsx:41](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L41)_
52 |
53 | ---
54 |
55 | ### `Optional` innerRef
56 |
57 | • **innerRef**? : _any_
58 |
59 | _Defined in [src/Input.tsx:30](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L30)_
60 |
61 | ---
62 |
63 | ### `Optional` maxLength
64 |
65 | • **maxLength**? : _number_
66 |
67 | _Defined in [src/Input.tsx:39](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L39)_
68 |
69 | 最大输入长度,设置为 -1 的时候不限制最大长度
70 |
71 | ---
72 |
73 | ### `Optional` name
74 |
75 | • **name**? : _string_
76 |
77 | _Defined in [src/Input.tsx:34](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L34)_
78 |
79 | ---
80 |
81 | ### `Optional` onBlur
82 |
83 | • **onBlur**? : _\_InputProps["onBlur"]_
84 |
85 | _Defined in [src/Input.tsx:44](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L44)_
86 |
87 | ---
88 |
89 | ### `Optional` onChange
90 |
91 | • **onChange**? : _\_InputProps["onInput"]_
92 |
93 | _Defined in [src/Input.tsx:42](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L42)_
94 |
95 | ---
96 |
97 | ### `Optional` onFocus
98 |
99 | • **onFocus**? : _\_InputProps["onFocus"]_
100 |
101 | _Defined in [src/Input.tsx:43](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L43)_
102 |
103 | ---
104 |
105 | ### `Optional` readOnly
106 |
107 | • **readOnly**? : _boolean_
108 |
109 | _Defined in [src/Input.tsx:40](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L40)_
110 |
111 | ---
112 |
113 | ### `Optional` required
114 |
115 | • **required**? : _boolean_
116 |
117 | _Defined in [src/Input.tsx:35](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L35)_
118 |
119 | ---
120 |
121 | ### `Optional` style
122 |
123 | • **style**? : _CSSProperties_
124 |
125 | _Defined in [src/Input.tsx:32](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L32)_
126 |
127 | ---
128 |
129 | ### `Optional` type
130 |
131 | • **type**? : _\_InputProps["type"] | "phone" | "password"_
132 |
133 | _Defined in [src/Input.tsx:33](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L33)_
134 |
135 | ## Methods
136 |
137 | ### `Optional` onClick
138 |
139 | ▸ **onClick**(`event`: ITouchEvent): _any_
140 |
141 | _Defined in [src/Input.tsx:45](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L45)_
142 |
143 | **Parameters:**
144 |
145 | | Name | Type |
146 | | ------- | ----------- |
147 | | `event` | ITouchEvent |
148 |
149 | **Returns:** _any_
150 |
151 | ---
152 |
153 | ### `Optional` onErrorClick
154 |
155 | ▸ **onErrorClick**(`error`: any): _void_
156 |
157 | _Defined in [src/Input.tsx:46](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L46)_
158 |
159 | **Parameters:**
160 |
161 | | Name | Type |
162 | | ------- | ---- |
163 | | `error` | any |
164 |
165 | **Returns:** _void_
166 |
--------------------------------------------------------------------------------
/docs/interfaces/_inputnumber_.inputnumberprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_inputnumber_.inputnumberprops'
3 | title: 'InputNumberProps'
4 | sidebar_label: 'InputNumberProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | - object
12 |
13 | ↳ **InputNumberProps**
14 |
15 | ## Index
16 |
17 | ### Properties
18 |
19 | - [customStyle](_inputnumber_.inputnumberprops.md#optional-customstyle)
20 | - [onChange](_inputnumber_.inputnumberprops.md#optional-onchange)
21 | - [style](_inputnumber_.inputnumberprops.md#optional-style)
22 |
23 | ## Properties
24 |
25 | ### `Optional` customStyle
26 |
27 | • **customStyle**? : _CSSProperties_
28 |
29 | _Defined in [src/InputNumber.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/InputNumber.tsx#L14)_
30 |
31 | ---
32 |
33 | ### `Optional` onChange
34 |
35 | • **onChange**? : _CommonEventFunction‹object›_
36 |
37 | _Defined in [src/InputNumber.tsx:20](https://github.com/tarojsx/ui/blob/v0.11.0/src/InputNumber.tsx#L20)_
38 |
39 | 输入框值改变时触发的事件
40 |
41 | **`param`** 输入框当前值
42 |
43 | **`description`** 开发者需要通过 onChange 事件来更新 value 值变化,onChange 函数必填
44 |
45 | ---
46 |
47 | ### `Optional` style
48 |
49 | • **style**? : _CSSProperties_
50 |
51 | _Defined in [src/InputNumber.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/InputNumber.tsx#L13)_
52 |
--------------------------------------------------------------------------------
/docs/interfaces/_list_.listprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_list_.listprops'
3 | title: 'ListProps'
4 | sidebar_label: 'ListProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - AtListProps
10 |
11 | ↳ **ListProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [className](_list_.listprops.md#optional-classname)
18 | - [customStyle](_list_.listprops.md#optional-customstyle)
19 | - [hasBorder](_list_.listprops.md#optional-hasborder)
20 |
21 | ## Properties
22 |
23 | ### `Optional` className
24 |
25 | • **className**? : _string_
26 |
27 | _Overrides [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[className](_activityindicator_.activityindicatorprops.md#optional-classname)\_
28 |
29 | _Defined in [src/List.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/List.tsx#L9)_
30 |
31 | ---
32 |
33 | ### `Optional` customStyle
34 |
35 | • **customStyle**? : _string | CSSProperties_
36 |
37 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[customStyle](_activityindicator_.activityindicatorprops.md#optional-customstyle)\_
38 |
39 | Defined in node_modules/taro-ui/types/base.d.ts:6
40 |
41 | ---
42 |
43 | ### `Optional` hasBorder
44 |
45 | • **hasBorder**? : _boolean_
46 |
47 | _Inherited from [ListProps](\_list_.listprops.md).[hasBorder](_list_.listprops.md#optional-hasborder)\_
48 |
49 | Defined in node_modules/taro-ui/types/list.d.ts:11
50 |
51 | 是否有边框
52 |
53 | **`default`** true
54 |
--------------------------------------------------------------------------------
/docs/interfaces/_listheader_.listheaderprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_listheader_.listheaderprops'
3 | title: 'ListHeaderProps'
4 | sidebar_label: 'ListHeaderProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **ListHeaderProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [className](_listheader_.listheaderprops.md#optional-classname)
16 | - [iconColor](_listheader_.listheaderprops.md#optional-iconcolor)
17 | - [iconInfo](_listheader_.listheaderprops.md#optional-iconinfo)
18 | - [iconPrefixClass](_listheader_.listheaderprops.md#optional-iconprefixclass)
19 | - [iconSize](_listheader_.listheaderprops.md#optional-iconsize)
20 | - [iconType](_listheader_.listheaderprops.md#optional-icontype)
21 | - [sticky](_listheader_.listheaderprops.md#optional-sticky)
22 | - [style](_listheader_.listheaderprops.md#optional-style)
23 | - [thumb](_listheader_.listheaderprops.md#optional-thumb)
24 | - [title](_listheader_.listheaderprops.md#title)
25 | - [top](_listheader_.listheaderprops.md#optional-top)
26 | - [transparent](_listheader_.listheaderprops.md#optional-transparent)
27 |
28 | ## Properties
29 |
30 | ### `Optional` className
31 |
32 | • **className**? : _string_
33 |
34 | _Defined in [src/ListHeader.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L9)_
35 |
36 | ---
37 |
38 | ### `Optional` iconColor
39 |
40 | • **iconColor**? : _string_
41 |
42 | _Defined in [src/ListHeader.tsx:17](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L17)_
43 |
44 | ---
45 |
46 | ### `Optional` iconInfo
47 |
48 | • **iconInfo**? : _[IconProps](\_icon_.iconprops.md)\_
49 |
50 | _Defined in [src/ListHeader.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L14)_
51 |
52 | ---
53 |
54 | ### `Optional` iconPrefixClass
55 |
56 | • **iconPrefixClass**? : _string_
57 |
58 | _Defined in [src/ListHeader.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L16)_
59 |
60 | ---
61 |
62 | ### `Optional` iconSize
63 |
64 | • **iconSize**? : _number_
65 |
66 | _Defined in [src/ListHeader.tsx:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L18)_
67 |
68 | ---
69 |
70 | ### `Optional` iconType
71 |
72 | • **iconType**? : _string_
73 |
74 | _Defined in [src/ListHeader.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L15)_
75 |
76 | ---
77 |
78 | ### `Optional` sticky
79 |
80 | • **sticky**? : _boolean_
81 |
82 | _Defined in [src/ListHeader.tsx:19](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L19)_
83 |
84 | ---
85 |
86 | ### `Optional` style
87 |
88 | • **style**? : _CSSProperties_
89 |
90 | _Defined in [src/ListHeader.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L10)_
91 |
92 | ---
93 |
94 | ### `Optional` thumb
95 |
96 | • **thumb**? : _string_
97 |
98 | _Defined in [src/ListHeader.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L13)_
99 |
100 | ---
101 |
102 | ### title
103 |
104 | • **title**: _React.ReactNode_
105 |
106 | _Defined in [src/ListHeader.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L11)_
107 |
108 | ---
109 |
110 | ### `Optional` top
111 |
112 | • **top**? : _number | string_
113 |
114 | _Defined in [src/ListHeader.tsx:20](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L20)_
115 |
116 | ---
117 |
118 | ### `Optional` transparent
119 |
120 | • **transparent**? : _boolean_
121 |
122 | _Defined in [src/ListHeader.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L12)_
123 |
--------------------------------------------------------------------------------
/docs/interfaces/_listitem_.listitemprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_listitem_.listitemprops'
3 | title: 'ListItemProps'
4 | sidebar_label: 'ListItemProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | ↳ **ListItemProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [arrow](_listitem_.listitemprops.md#optional-arrow)
18 | - [children](_listitem_.listitemprops.md#optional-children)
19 | - [className](_listitem_.listitemprops.md#optional-classname)
20 | - [extra](_listitem_.listitemprops.md#optional-extra)
21 | - [footer](_listitem_.listitemprops.md#optional-footer)
22 | - [ghost](_listitem_.listitemprops.md#optional-ghost)
23 | - [iconInfo](_listitem_.listitemprops.md#optional-iconinfo)
24 | - [thumb](_listitem_.listitemprops.md#optional-thumb)
25 | - [thumbCircle](_listitem_.listitemprops.md#optional-thumbcircle)
26 | - [title](_listitem_.listitemprops.md#optional-title)
27 |
28 | ### Methods
29 |
30 | - [onClear](_listitem_.listitemprops.md#optional-onclear)
31 |
32 | ## Properties
33 |
34 | ### `Optional` arrow
35 |
36 | • **arrow**? : _AtListItemProps["arrow"] | "clear"_
37 |
38 | _Defined in [src/ListItem.tsx:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L18)_
39 |
40 | ---
41 |
42 | ### `Optional` children
43 |
44 | • **children**? : _React.ReactNode_
45 |
46 | _Defined in [src/ListItem.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L12)_
47 |
48 | ---
49 |
50 | ### `Optional` className
51 |
52 | • **className**? : _string_
53 |
54 | _Defined in [src/ListItem.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L11)_
55 |
56 | ---
57 |
58 | ### `Optional` extra
59 |
60 | • **extra**? : _React.ReactNode_
61 |
62 | _Defined in [src/ListItem.tsx:17](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L17)_
63 |
64 | ---
65 |
66 | ### `Optional` footer
67 |
68 | • **footer**? : _React.ReactNode_
69 |
70 | _Defined in [src/ListItem.tsx:19](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L19)_
71 |
72 | ---
73 |
74 | ### `Optional` ghost
75 |
76 | • **ghost**? : _boolean_
77 |
78 | _Defined in [src/ListItem.tsx:20](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L20)_
79 |
80 | ---
81 |
82 | ### `Optional` iconInfo
83 |
84 | • **iconInfo**? : _[IconProps](\_icon_.iconprops.md)\_
85 |
86 | _Defined in [src/ListItem.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L14)_
87 |
88 | ---
89 |
90 | ### `Optional` thumb
91 |
92 | • **thumb**? : _React.ReactNode_
93 |
94 | _Defined in [src/ListItem.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L15)_
95 |
96 | ---
97 |
98 | ### `Optional` thumbCircle
99 |
100 | • **thumbCircle**? : _boolean_
101 |
102 | _Defined in [src/ListItem.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L16)_
103 |
104 | ---
105 |
106 | ### `Optional` title
107 |
108 | • **title**? : _React.ReactNode_
109 |
110 | _Defined in [src/ListItem.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L13)_
111 |
112 | ## Methods
113 |
114 | ### `Optional` onClear
115 |
116 | ▸ **onClear**(): _any_
117 |
118 | _Defined in [src/ListItem.tsx:21](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L21)_
119 |
120 | **Returns:** _any_
121 |
--------------------------------------------------------------------------------
/docs/interfaces/_loading_.loadingprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_loading_.loadingprops'
3 | title: 'LoadingProps'
4 | sidebar_label: 'LoadingProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **LoadingProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [color](_loading_.loadingprops.md#optional-color)
16 | - [size](_loading_.loadingprops.md#optional-size)
17 |
18 | ## Properties
19 |
20 | ### `Optional` color
21 |
22 | • **color**? : _string | number_
23 |
24 | _Defined in [src/Loading.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Loading.tsx#L9)_
25 |
26 | ---
27 |
28 | ### `Optional` size
29 |
30 | • **size**? : _string | number_
31 |
32 | _Defined in [src/Loading.tsx:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/Loading.tsx#L8)_
33 |
--------------------------------------------------------------------------------
/docs/interfaces/_message_.messageprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_message_.messageprops'
3 | title: 'MessageProps'
4 | sidebar_label: 'MessageProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **MessageProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [className](_message_.messageprops.md#optional-classname)
16 | - [style](_message_.messageprops.md#optional-style)
17 |
18 | ## Properties
19 |
20 | ### `Optional` className
21 |
22 | • **className**? : _string_
23 |
24 | _Defined in [src/Message.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Message.tsx#L9)_
25 |
26 | ---
27 |
28 | ### `Optional` style
29 |
30 | • **style**? : _CSSProperties_
31 |
32 | _Defined in [src/Message.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Message.tsx#L10)_
33 |
--------------------------------------------------------------------------------
/docs/interfaces/_modal_.modalprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_modal_.modalprops'
3 | title: 'ModalProps'
4 | sidebar_label: 'ModalProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | ↳ **ModalProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [content](_modal_.modalprops.md#optional-content)
18 | - [style](_modal_.modalprops.md#optional-style)
19 | - [title](_modal_.modalprops.md#optional-title)
20 |
21 | ## Properties
22 |
23 | ### `Optional` content
24 |
25 | • **content**? : _React.ReactNode_
26 |
27 | _Defined in [src/Modal.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/Modal.tsx#L11)_
28 |
29 | ---
30 |
31 | ### `Optional` style
32 |
33 | • **style**? : _CSSProperties_
34 |
35 | _Defined in [src/Modal.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Modal.tsx#L9)_
36 |
37 | ---
38 |
39 | ### `Optional` title
40 |
41 | • **title**? : _React.ReactNode_
42 |
43 | _Defined in [src/Modal.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Modal.tsx#L10)_
44 |
--------------------------------------------------------------------------------
/docs/interfaces/_progress_.progressprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_progress_.progressprops'
3 | title: 'ProgressProps'
4 | sidebar_label: 'ProgressProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **ProgressProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [className](_progress_.progressprops.md#optional-classname)
16 | - [color](_progress_.progressprops.md#optional-color)
17 | - [isHidePercent](_progress_.progressprops.md#optional-ishidepercent)
18 | - [percent](_progress_.progressprops.md#optional-percent)
19 | - [status](_progress_.progressprops.md#optional-status)
20 | - [strokeWidth](_progress_.progressprops.md#optional-strokewidth)
21 | - [style](_progress_.progressprops.md#optional-style)
22 | - [transitionDuration](_progress_.progressprops.md#optional-transitionduration)
23 |
24 | ## Properties
25 |
26 | ### `Optional` className
27 |
28 | • **className**? : _string_
29 |
30 | _Defined in [src/Progress.tsx:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L8)_
31 |
32 | ---
33 |
34 | ### `Optional` color
35 |
36 | • **color**? : _string_
37 |
38 | _Defined in [src/Progress.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L15)_
39 |
40 | 颜色
41 |
42 | ---
43 |
44 | ### `Optional` isHidePercent
45 |
46 | • **isHidePercent**? : _boolean_
47 |
48 | _Defined in [src/Progress.tsx:19](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L19)_
49 |
50 | 是否隐藏文字
51 |
52 | ---
53 |
54 | ### `Optional` percent
55 |
56 | • **percent**? : _number_
57 |
58 | _Defined in [src/Progress.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L11)_
59 |
60 | 进度
61 |
62 | ---
63 |
64 | ### `Optional` status
65 |
66 | • **status**? : _"progress" | "success" | "error"_
67 |
68 | _Defined in [src/Progress.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L13)_
69 |
70 | 状态
71 |
72 | ---
73 |
74 | ### `Optional` strokeWidth
75 |
76 | • **strokeWidth**? : _number_
77 |
78 | _Defined in [src/Progress.tsx:17](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L17)_
79 |
80 | 宽度
81 |
82 | ---
83 |
84 | ### `Optional` style
85 |
86 | • **style**? : _CSSProperties_
87 |
88 | _Defined in [src/Progress.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L9)_
89 |
90 | ---
91 |
92 | ### `Optional` transitionDuration
93 |
94 | • **transitionDuration**? : _number_
95 |
96 | _Defined in [src/Progress.tsx:21](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L21)_
97 |
98 | 过渡动画所需的时间. 默认: 0.3, 单位: 秒, 禁用可提高性能.
99 |
--------------------------------------------------------------------------------
/docs/interfaces/_searchbar_.searchbarprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_searchbar_.searchbarprops'
3 | title: 'SearchBarProps'
4 | sidebar_label: 'SearchBarProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | - object
12 |
13 | ↳ **SearchBarProps**
14 |
15 | ## Index
16 |
17 | ### Properties
18 |
19 | - [onActionClick](_searchbar_.searchbarprops.md#optional-onactionclick)
20 | - [onChange](_searchbar_.searchbarprops.md#onchange)
21 | - [onConfirm](_searchbar_.searchbarprops.md#optional-onconfirm)
22 | - [style](_searchbar_.searchbarprops.md#optional-style)
23 |
24 | ## Properties
25 |
26 | ### `Optional` onActionClick
27 |
28 | • **onActionClick**? : _CommonEventFunction‹object›_
29 |
30 | _Defined in [src/SearchBar.tsx:27](https://github.com/tarojsx/ui/blob/v0.11.0/src/SearchBar.tsx#L27)_
31 |
32 | 右侧按钮点击触发事件
33 |
34 | ---
35 |
36 | ### onChange
37 |
38 | • **onChange**: _CommonEventFunction‹object›_
39 |
40 | _Defined in [src/SearchBar.tsx:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/SearchBar.tsx#L18)_
41 |
42 | 输入框值改变时触发的事件
43 |
44 | **`description`** 必填,开发者需要通过 onChange 事件来更新 value 值变化
45 |
46 | ---
47 |
48 | ### `Optional` onConfirm
49 |
50 | • **onConfirm**? : _CommonEventFunction‹object›_
51 |
52 | _Defined in [src/SearchBar.tsx:23](https://github.com/tarojsx/ui/blob/v0.11.0/src/SearchBar.tsx#L23)_
53 |
54 | 点击完成按钮时触发
55 |
56 | **`description`** H5 版中目前需借用 Form 组件的 onSubmit 事件来替代
57 |
58 | ---
59 |
60 | ### `Optional` style
61 |
62 | • **style**? : _CSSProperties_
63 |
64 | _Defined in [src/SearchBar.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/SearchBar.tsx#L13)_
65 |
--------------------------------------------------------------------------------
/docs/interfaces/_statistic_.statisticprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_statistic_.statisticprops'
3 | title: 'StatisticProps'
4 | sidebar_label: 'StatisticProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **StatisticProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [className](_statistic_.statisticprops.md#optional-classname)
16 | - [prefix](_statistic_.statisticprops.md#optional-prefix)
17 | - [suffix](_statistic_.statisticprops.md#optional-suffix)
18 | - [title](_statistic_.statisticprops.md#title)
19 | - [value](_statistic_.statisticprops.md#value)
20 | - [valueStyle](_statistic_.statisticprops.md#optional-valuestyle)
21 |
22 | ## Properties
23 |
24 | ### `Optional` className
25 |
26 | • **className**? : _string_
27 |
28 | _Defined in [src/Statistic.tsx:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/Statistic.tsx#L8)_
29 |
30 | ---
31 |
32 | ### `Optional` prefix
33 |
34 | • **prefix**? : _React.ReactNode_
35 |
36 | _Defined in [src/Statistic.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Statistic.tsx#L12)_
37 |
38 | ---
39 |
40 | ### `Optional` suffix
41 |
42 | • **suffix**? : _React.ReactNode_
43 |
44 | _Defined in [src/Statistic.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/Statistic.tsx#L13)_
45 |
46 | ---
47 |
48 | ### title
49 |
50 | • **title**: _React.ReactNode_
51 |
52 | _Defined in [src/Statistic.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Statistic.tsx#L9)_
53 |
54 | ---
55 |
56 | ### value
57 |
58 | • **value**: _string | number_
59 |
60 | _Defined in [src/Statistic.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Statistic.tsx#L10)_
61 |
62 | ---
63 |
64 | ### `Optional` valueStyle
65 |
66 | • **valueStyle**? : _CSSProperties_
67 |
68 | _Defined in [src/Statistic.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/Statistic.tsx#L11)_
69 |
--------------------------------------------------------------------------------
/docs/interfaces/_steps_.stepsprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_steps_.stepsprops'
3 | title: 'StepsProps'
4 | sidebar_label: 'StepsProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | ↳ **StepsProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [items](_steps_.stepsprops.md#optional-items)
18 | - [style](_steps_.stepsprops.md#optional-style)
19 |
20 | ## Properties
21 |
22 | ### `Optional` items
23 |
24 | • **items**? : _object[]_
25 |
26 | _Defined in [src/Steps.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Steps.tsx#L10)_
27 |
28 | ---
29 |
30 | ### `Optional` style
31 |
32 | • **style**? : _CSSProperties_
33 |
34 | _Defined in [src/Steps.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Steps.tsx#L9)_
35 |
--------------------------------------------------------------------------------
/docs/interfaces/_tabbar_.tabbarprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_tabbar_.tabbarprops'
3 | title: 'TabBarProps'
4 | sidebar_label: 'TabBarProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **TabBarProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [backgroundColor](_tabbar_.tabbarprops.md#optional-backgroundcolor)
16 | - [className](_tabbar_.tabbarprops.md#optional-classname)
17 | - [color](_tabbar_.tabbarprops.md#optional-color)
18 | - [current](_tabbar_.tabbarprops.md#optional-current)
19 | - [fixed](_tabbar_.tabbarprops.md#optional-fixed)
20 | - [fontSize](_tabbar_.tabbarprops.md#optional-fontsize)
21 | - [iconSize](_tabbar_.tabbarprops.md#optional-iconsize)
22 | - [onClick](_tabbar_.tabbarprops.md#optional-onclick)
23 | - [scroll](_tabbar_.tabbarprops.md#optional-scroll)
24 | - [selectedColor](_tabbar_.tabbarprops.md#optional-selectedcolor)
25 | - [style](_tabbar_.tabbarprops.md#optional-style)
26 | - [tabList](_tabbar_.tabbarprops.md#tablist)
27 |
28 | ## Properties
29 |
30 | ### `Optional` backgroundColor
31 |
32 | • **backgroundColor**? : _string_
33 |
34 | _Defined in [src/TabBar.tsx:33](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L33)_
35 |
36 | ---
37 |
38 | ### `Optional` className
39 |
40 | • **className**? : _string_
41 |
42 | _Defined in [src/TabBar.tsx:31](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L31)_
43 |
44 | ---
45 |
46 | ### `Optional` color
47 |
48 | • **color**? : _string_
49 |
50 | _Defined in [src/TabBar.tsx:34](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L34)_
51 |
52 | ---
53 |
54 | ### `Optional` current
55 |
56 | • **current**? : _number_
57 |
58 | _Defined in [src/TabBar.tsx:38](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L38)_
59 |
60 | ---
61 |
62 | ### `Optional` fixed
63 |
64 | • **fixed**? : _boolean_
65 |
66 | _Defined in [src/TabBar.tsx:39](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L39)_
67 |
68 | ---
69 |
70 | ### `Optional` fontSize
71 |
72 | • **fontSize**? : _number_
73 |
74 | _Defined in [src/TabBar.tsx:37](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L37)_
75 |
76 | ---
77 |
78 | ### `Optional` iconSize
79 |
80 | • **iconSize**? : _number_
81 |
82 | _Defined in [src/TabBar.tsx:36](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L36)_
83 |
84 | ---
85 |
86 | ### `Optional` onClick
87 |
88 | • **onClick**? : _CommonEventFunction‹object›_
89 |
90 | _Defined in [src/TabBar.tsx:42](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L42)_
91 |
92 | ---
93 |
94 | ### `Optional` scroll
95 |
96 | • **scroll**? : _boolean_
97 |
98 | _Defined in [src/TabBar.tsx:40](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L40)_
99 |
100 | ---
101 |
102 | ### `Optional` selectedColor
103 |
104 | • **selectedColor**? : _string_
105 |
106 | _Defined in [src/TabBar.tsx:35](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L35)_
107 |
108 | ---
109 |
110 | ### `Optional` style
111 |
112 | • **style**? : _CSSProperties_
113 |
114 | _Defined in [src/TabBar.tsx:32](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L32)_
115 |
116 | ---
117 |
118 | ### tabList
119 |
120 | • **tabList**: _[TabBarListItem](../modules/\_tabbar_.md#tabbarlistitem)[]\_
121 |
122 | _Defined in [src/TabBar.tsx:41](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L41)_
123 |
--------------------------------------------------------------------------------
/docs/interfaces/_tabspane_.tabspanelprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_tabspane_.tabspanelprops'
3 | title: 'TabsPanelProps'
4 | sidebar_label: 'TabsPanelProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - AtTabsPaneProps
10 |
11 | ↳ **TabsPanelProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [className](_tabspane_.tabspanelprops.md#optional-classname)
18 | - [current](_tabspane_.tabspanelprops.md#current)
19 | - [customStyle](_tabspane_.tabspanelprops.md#optional-customstyle)
20 | - [index](_tabspane_.tabspanelprops.md#index)
21 | - [style](_tabspane_.tabspanelprops.md#optional-style)
22 | - [tabDirection](_tabspane_.tabspanelprops.md#optional-tabdirection)
23 |
24 | ## Properties
25 |
26 | ### `Optional` className
27 |
28 | • **className**? : _string_
29 |
30 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[className](_activityindicator_.activityindicatorprops.md#optional-classname)\_
31 |
32 | Defined in node_modules/taro-ui/types/base.d.ts:4
33 |
34 | ---
35 |
36 | ### current
37 |
38 | • **current**: _number_
39 |
40 | _Inherited from [TabsPanelProps](\_tabspane_.tabspanelprops.md).[current](_tabspane_.tabspanelprops.md#current)\_
41 |
42 | Defined in node_modules/taro-ui/types/tabs-pane.d.ts:15
43 |
44 | 当前选中的标签索引值,从 0 计数,请跟 AtTabs 保持一致
45 |
46 | **`default`** 0
47 |
48 | ---
49 |
50 | ### `Optional` customStyle
51 |
52 | • **customStyle**? : _string | CSSProperties_
53 |
54 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[customStyle](_activityindicator_.activityindicatorprops.md#optional-customstyle)\_
55 |
56 | Defined in node_modules/taro-ui/types/base.d.ts:6
57 |
58 | ---
59 |
60 | ### index
61 |
62 | • **index**: _number_
63 |
64 | _Inherited from [TabsPanelProps](\_tabspane_.tabspanelprops.md).[index](_tabspane_.tabspanelprops.md#index)\_
65 |
66 | Defined in node_modules/taro-ui/types/tabs-pane.d.ts:20
67 |
68 | tabPane 排序,从 0 计数
69 |
70 | **`default`** 0
71 |
72 | ---
73 |
74 | ### `Optional` style
75 |
76 | • **style**? : _CSSProperties_
77 |
78 | _Defined in [src/TabsPane.tsx:9](https://github.com/tarojsx/ui/blob/6701f45/src/TabsPane.tsx#L9)_
79 |
80 | ---
81 |
82 | ### `Optional` tabDirection
83 |
84 | • **tabDirection**? : _"horizontal" | "vertical"_
85 |
86 | _Inherited from [TabsPanelProps](\_tabspane_.tabspanelprops.md).[tabDirection](_tabspane_.tabspanelprops.md#optional-tabdirection)\_
87 |
88 | Defined in node_modules/taro-ui/types/tabs-pane.d.ts:10
89 |
90 | Tab 方向,请跟 AtTabs 保持一致
91 |
92 | **`default`** 'horizontal'
93 |
--------------------------------------------------------------------------------
/docs/interfaces/_tabspane_.tabspaneprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_tabspane_.tabspaneprops'
3 | title: 'TabsPaneProps'
4 | sidebar_label: 'TabsPaneProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - AtTabsPaneProps
10 |
11 | ↳ **TabsPaneProps**
12 |
13 | ## Index
14 |
15 | ### Properties
16 |
17 | - [className](_tabspane_.tabspaneprops.md#optional-classname)
18 | - [current](_tabspane_.tabspaneprops.md#current)
19 | - [customStyle](_tabspane_.tabspaneprops.md#optional-customstyle)
20 | - [index](_tabspane_.tabspaneprops.md#index)
21 | - [style](_tabspane_.tabspaneprops.md#optional-style)
22 | - [tabDirection](_tabspane_.tabspaneprops.md#optional-tabdirection)
23 |
24 | ## Properties
25 |
26 | ### `Optional` className
27 |
28 | • **className**? : _string_
29 |
30 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[className](_activityindicator_.activityindicatorprops.md#optional-classname)\_
31 |
32 | Defined in node_modules/taro-ui/types/base.d.ts:4
33 |
34 | ---
35 |
36 | ### current
37 |
38 | • **current**: _number_
39 |
40 | _Inherited from [TabsPaneProps](\_tabspane_.tabspaneprops.md).[current](_tabspane_.tabspaneprops.md#current)\_
41 |
42 | Defined in node_modules/taro-ui/types/tabs-pane.d.ts:15
43 |
44 | 当前选中的标签索引值,从 0 计数,请跟 AtTabs 保持一致
45 |
46 | **`default`** 0
47 |
48 | ---
49 |
50 | ### `Optional` customStyle
51 |
52 | • **customStyle**? : _string | CSSProperties_
53 |
54 | _Inherited from [ActivityIndicatorProps](\_activityindicator_.activityindicatorprops.md).[customStyle](_activityindicator_.activityindicatorprops.md#optional-customstyle)\_
55 |
56 | Defined in node_modules/taro-ui/types/base.d.ts:6
57 |
58 | ---
59 |
60 | ### index
61 |
62 | • **index**: _number_
63 |
64 | _Inherited from [TabsPaneProps](\_tabspane_.tabspaneprops.md).[index](_tabspane_.tabspaneprops.md#index)\_
65 |
66 | Defined in node_modules/taro-ui/types/tabs-pane.d.ts:20
67 |
68 | tabPane 排序,从 0 计数
69 |
70 | **`default`** 0
71 |
72 | ---
73 |
74 | ### `Optional` style
75 |
76 | • **style**? : _CSSProperties_
77 |
78 | _Defined in [src/TabsPane.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabsPane.tsx#L9)_
79 |
80 | ---
81 |
82 | ### `Optional` tabDirection
83 |
84 | • **tabDirection**? : _"horizontal" | "vertical"_
85 |
86 | _Inherited from [TabsPaneProps](\_tabspane_.tabspaneprops.md).[tabDirection](_tabspane_.tabspaneprops.md#optional-tabdirection)\_
87 |
88 | Defined in node_modules/taro-ui/types/tabs-pane.d.ts:10
89 |
90 | Tab 方向,请跟 AtTabs 保持一致
91 |
92 | **`default`** 'horizontal'
93 |
--------------------------------------------------------------------------------
/docs/interfaces/_tag_.tagprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_tag_.tagprops'
3 | title: 'TagProps'
4 | sidebar_label: 'TagProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - **TagProps**
10 |
11 | ## Index
12 |
13 | ### Properties
14 |
15 | - [active](_tag_.tagprops.md#optional-active)
16 | - [circle](_tag_.tagprops.md#optional-circle)
17 | - [className](_tag_.tagprops.md#optional-classname)
18 | - [disabled](_tag_.tagprops.md#optional-disabled)
19 | - [name](_tag_.tagprops.md#optional-name)
20 | - [onClick](_tag_.tagprops.md#optional-onclick)
21 | - [size](_tag_.tagprops.md#optional-size)
22 | - [style](_tag_.tagprops.md#optional-style)
23 | - [type](_tag_.tagprops.md#optional-type)
24 |
25 | ## Properties
26 |
27 | ### `Optional` active
28 |
29 | • **active**? : _boolean_
30 |
31 | _Defined in [src/Tag.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L14)_
32 |
33 | ---
34 |
35 | ### `Optional` circle
36 |
37 | • **circle**? : _boolean_
38 |
39 | _Defined in [src/Tag.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L13)_
40 |
41 | ---
42 |
43 | ### `Optional` className
44 |
45 | • **className**? : _string_
46 |
47 | _Defined in [src/Tag.tsx:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L8)_
48 |
49 | ---
50 |
51 | ### `Optional` disabled
52 |
53 | • **disabled**? : _boolean_
54 |
55 | _Defined in [src/Tag.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L15)_
56 |
57 | ---
58 |
59 | ### `Optional` name
60 |
61 | • **name**? : _string_
62 |
63 | _Defined in [src/Tag.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L12)_
64 |
65 | ---
66 |
67 | ### `Optional` onClick
68 |
69 | • **onClick**? : _CommonEventFunction_
70 |
71 | _Defined in [src/Tag.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L16)_
72 |
73 | ---
74 |
75 | ### `Optional` size
76 |
77 | • **size**? : _"small"_
78 |
79 | _Defined in [src/Tag.tsx:11](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L11)_
80 |
81 | ---
82 |
83 | ### `Optional` style
84 |
85 | • **style**? : _CSSProperties_
86 |
87 | _Defined in [src/Tag.tsx:9](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L9)_
88 |
89 | ---
90 |
91 | ### `Optional` type
92 |
93 | • **type**? : _"primary"_
94 |
95 | _Defined in [src/Tag.tsx:10](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L10)_
96 |
--------------------------------------------------------------------------------
/docs/interfaces/_textarea_.textareaprops.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_textarea_.textareaprops'
3 | title: 'TextareaProps'
4 | sidebar_label: 'TextareaProps'
5 | ---
6 |
7 | ## Hierarchy
8 |
9 | - object
10 |
11 | - object
12 |
13 | ↳ **TextareaProps**
14 |
15 | ## Index
16 |
17 | ### Properties
18 |
19 | - [className](_textarea_.textareaprops.md#optional-classname)
20 | - [maxLength](_textarea_.textareaprops.md#optional-maxlength)
21 | - [onChange](_textarea_.textareaprops.md#optional-onchange)
22 | - [style](_textarea_.textareaprops.md#optional-style)
23 | - [value](_textarea_.textareaprops.md#optional-value)
24 |
25 | ## Properties
26 |
27 | ### `Optional` className
28 |
29 | • **className**? : _string_
30 |
31 | _Defined in [src/Textarea.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/Textarea.tsx#L13)_
32 |
33 | ---
34 |
35 | ### `Optional` maxLength
36 |
37 | • **maxLength**? : _number_
38 |
39 | _Defined in [src/Textarea.tsx:19](https://github.com/tarojsx/ui/blob/v0.11.0/src/Textarea.tsx#L19)_
40 |
41 | 最大输入长度,设置为 -1 的时候不限制最大长度
42 |
43 | ---
44 |
45 | ### `Optional` onChange
46 |
47 | • **onChange**? : _CommonEventFunction_
48 |
49 | _Defined in [src/Textarea.tsx:20](https://github.com/tarojsx/ui/blob/v0.11.0/src/Textarea.tsx#L20)_
50 |
51 | ---
52 |
53 | ### `Optional` style
54 |
55 | • **style**? : _CSSProperties_
56 |
57 | _Defined in [src/Textarea.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/Textarea.tsx#L14)_
58 |
59 | ---
60 |
61 | ### `Optional` value
62 |
63 | • **value**? : _string_
64 |
65 | _Defined in [src/Textarea.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/Textarea.tsx#L15)_
66 |
--------------------------------------------------------------------------------
/docs/modules/_actionsheet_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_actionsheet_'
3 | title: 'ActionSheet'
4 | sidebar_label: 'ActionSheet'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ActionSheetProps](../interfaces/_actionsheet_.actionsheetprops.md)
12 |
13 | ### Functions
14 |
15 | - [ActionSheet](_actionsheet_.md#const-actionsheet)
16 |
17 | ## Functions
18 |
19 | ### `Const` ActionSheet
20 |
21 | ▸ **ActionSheet**(`props`: [ActionSheetProps](../interfaces/_actionsheet_.actionsheetprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/ActionSheet.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/ActionSheet.tsx#L16)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------------------------ |
29 | | `props` | [ActionSheetProps](../interfaces/_actionsheet_.actionsheetprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_activityindicator_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_activityindicator_'
3 | title: 'ActivityIndicator'
4 | sidebar_label: 'ActivityIndicator'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ActivityIndicatorProps](../interfaces/_activityindicator_.activityindicatorprops.md)
12 |
13 | ### Functions
14 |
15 | - [ActivityIndicator](_activityindicator_.md#const-activityindicator)
16 |
17 | ## Functions
18 |
19 | ### `Const` ActivityIndicator
20 |
21 | ▸ **ActivityIndicator**(`props`: [ActivityIndicatorProps](../interfaces/_activityindicator_.activityindicatorprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/ActivityIndicator.tsx:13](https://github.com/tarojsx/ui/blob/v0.11.0/src/ActivityIndicator.tsx#L13)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ---------------------------------------------------------------------------------------------- |
29 | | `props` | [ActivityIndicatorProps](../interfaces/_activityindicator_.activityindicatorprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_avatar_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_avatar_'
3 | title: 'Avatar'
4 | sidebar_label: 'Avatar'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [AvatarProps](../interfaces/_avatar_.avatarprops.md)
12 |
13 | ### Functions
14 |
15 | - [Avatar](_avatar_.md#const-avatar)
16 |
17 | ## Functions
18 |
19 | ### `Const` Avatar
20 |
21 | ▸ **Avatar**(`props`: [AvatarProps](../interfaces/_avatar_.avatarprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/Avatar.tsx:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/Avatar.tsx#L18)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------- |
29 | | `props` | [AvatarProps](../interfaces/_avatar_.avatarprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_badge_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_badge_'
3 | title: 'Badge'
4 | sidebar_label: 'Badge'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [BadgeProps](../interfaces/_badge_.badgeprops.md)
12 |
13 | ### Functions
14 |
15 | - [Badge](_badge_.md#const-badge)
16 |
17 | ## Functions
18 |
19 | ### `Const` Badge
20 |
21 | ▸ **Badge**(`props`: [BadgeProps](../interfaces/_badge_.badgeprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/Badge.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/Badge.tsx#L15)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ---------------------------------------------------------- |
29 | | `props` | [BadgeProps](../interfaces/_badge_.badgeprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_button_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_button_'
3 | title: 'Button'
4 | sidebar_label: 'Button'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ButtonProps](../interfaces/_button_.buttonprops.md)
12 |
13 | ### Functions
14 |
15 | - [Button](_button_.md#const-button)
16 |
17 | ## Functions
18 |
19 | ### `Const` Button
20 |
21 | ▸ **Button**(`props`: [ButtonProps](../interfaces/_button_.buttonprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/Button.tsx:25](https://github.com/tarojsx/ui/blob/v0.11.0/src/Button.tsx#L25)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | --------------------------------------------------------------- |
29 | | `props` | [ButtonProps](../interfaces/_button_.buttonprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_body_index_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_body_index_'
3 | title: 'Calendar/body/index'
4 | sidebar_label: 'Calendar/body/index'
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_body_interface_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_body_interface_'
3 | title: 'Calendar/body/interface'
4 | sidebar_label: 'Calendar/body/interface'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [Props](../interfaces/_calendar_body_interface_.props.md)
12 | - [State](../interfaces/_calendar_body_interface_.state.md)
13 |
14 | ### Type aliases
15 |
16 | - [ListGroup](_calendar_body_interface_.md#listgroup)
17 |
18 | ## Type aliases
19 |
20 | ### ListGroup
21 |
22 | Ƭ **ListGroup**: _Array‹Calendar.ListInfo‹Item››_
23 |
24 | _Defined in [src/Calendar/body/interface.ts:3](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/body/interface.ts#L3)_
25 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_common_constant_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_common_constant_'
3 | title: 'Calendar/common/constant'
4 | sidebar_label: 'Calendar/common/constant'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Variables
10 |
11 | - [TYPE_NEXT_MONTH](_calendar_common_constant_.md#const-type_next_month)
12 | - [TYPE_NOW_MONTH](_calendar_common_constant_.md#const-type_now_month)
13 | - [TYPE_PRE_MONTH](_calendar_common_constant_.md#const-type_pre_month)
14 |
15 | ## Variables
16 |
17 | ### `Const` TYPE_NEXT_MONTH
18 |
19 | • **TYPE_NEXT_MONTH**: _1_ = 1
20 |
21 | _Defined in [src/Calendar/common/constant.ts:5](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/constant.ts#L5)_
22 |
23 | ---
24 |
25 | ### `Const` TYPE_NOW_MONTH
26 |
27 | • **TYPE_NOW_MONTH**: _0_ = 0
28 |
29 | _Defined in [src/Calendar/common/constant.ts:3](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/constant.ts#L3)_
30 |
31 | ---
32 |
33 | ### `Const` TYPE_PRE_MONTH
34 |
35 | • **TYPE_PRE_MONTH**: _-1_ = -1
36 |
37 | _Defined in [src/Calendar/common/constant.ts:1](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/constant.ts#L1)_
38 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_common_helper_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_common_helper_'
3 | title: 'Calendar/common/helper'
4 | sidebar_label: 'Calendar/common/helper'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Functions
10 |
11 | - [generateCalendarGroup](_calendar_common_helper_.md#generatecalendargroup)
12 | - [getGenerateDate](_calendar_common_helper_.md#getgeneratedate)
13 |
14 | ## Functions
15 |
16 | ### generateCalendarGroup
17 |
18 | ▸ **generateCalendarGroup**(`options`: GroupOptions): _function_
19 |
20 | _Defined in [src/Calendar/common/helper.ts:27](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/helper.ts#L27)_
21 |
22 | **Parameters:**
23 |
24 | | Name | Type |
25 | | --------- | ------------ |
26 | | `options` | GroupOptions |
27 |
28 | **Returns:** _function_
29 |
30 | ▸ (`generateDate`: number, `selectedDate`: SelectedDate, `isShowStatus?`: boolean): _Calendar.ListInfo‹Item›_
31 |
32 | **Parameters:**
33 |
34 | | Name | Type |
35 | | --------------- | ------------ |
36 | | `generateDate` | number |
37 | | `selectedDate` | SelectedDate |
38 | | `isShowStatus?` | boolean |
39 |
40 | ---
41 |
42 | ### getGenerateDate
43 |
44 | ▸ **getGenerateDate**(`date`: Calendar.DateArg | undefined): _Dayjs_
45 |
46 | _Defined in [src/Calendar/common/helper.ts:112](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/helper.ts#L112)_
47 |
48 | **Parameters:**
49 |
50 | | Name | Type |
51 | | ------ | --------------------------------- |
52 | | `date` | Calendar.DateArg | undefined |
53 |
54 | **Returns:** _Dayjs_
55 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_common_plugins_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_common_plugins_'
3 | title: 'Calendar/common/plugins'
4 | sidebar_label: 'Calendar/common/plugins'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Functions
10 |
11 | - [handleActive](_calendar_common_plugins_.md#handleactive)
12 | - [handleDisabled](_calendar_common_plugins_.md#handledisabled)
13 | - [handleMarks](_calendar_common_plugins_.md#handlemarks)
14 | - [handleValid](_calendar_common_plugins_.md#handlevalid)
15 |
16 | ## Functions
17 |
18 | ### handleActive
19 |
20 | ▸ **handleActive**(`args`: PluginArg, `item`: Item): _Item_
21 |
22 | _Defined in [src/Calendar/common/plugins.ts:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/plugins.ts#L12)_
23 |
24 | **Parameters:**
25 |
26 | | Name | Type |
27 | | ------ | --------- |
28 | | `args` | PluginArg |
29 | | `item` | Item |
30 |
31 | **Returns:** _Item_
32 |
33 | ---
34 |
35 | ### handleDisabled
36 |
37 | ▸ **handleDisabled**(`args`: PluginArg, `item`: Item): _Item_
38 |
39 | _Defined in [src/Calendar/common/plugins.ts:88](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/plugins.ts#L88)_
40 |
41 | **Parameters:**
42 |
43 | | Name | Type |
44 | | ------ | --------- |
45 | | `args` | PluginArg |
46 | | `item` | Item |
47 |
48 | **Returns:** _Item_
49 |
50 | ---
51 |
52 | ### handleMarks
53 |
54 | ▸ **handleMarks**(`args`: PluginArg, `item`: Item): _Item_
55 |
56 | _Defined in [src/Calendar/common/plugins.ts:37](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/plugins.ts#L37)_
57 |
58 | **Parameters:**
59 |
60 | | Name | Type |
61 | | ------ | --------- |
62 | | `args` | PluginArg |
63 | | `item` | Item |
64 |
65 | **Returns:** _Item_
66 |
67 | ---
68 |
69 | ### handleValid
70 |
71 | ▸ **handleValid**(`args`: PluginArg, `item`: Item): _Item_
72 |
73 | _Defined in [src/Calendar/common/plugins.ts:106](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/common/plugins.ts#L106)_
74 |
75 | **Parameters:**
76 |
77 | | Name | Type |
78 | | ------ | --------- |
79 | | `args` | PluginArg |
80 | | `item` | Item |
81 |
82 | **Returns:** _Item_
83 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_controller_index_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_controller_index_'
3 | title: 'Calendar/controller/index'
4 | sidebar_label: 'Calendar/controller/index'
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_controller_interface_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_controller_interface_'
3 | title: 'Calendar/controller/interface'
4 | sidebar_label: 'Calendar/controller/interface'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [Props](../interfaces/_calendar_controller_interface_.props.md)
12 | - [State](../interfaces/_calendar_controller_interface_.state.md)
13 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_index_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_index_'
3 | title: 'Calendar/index'
4 | sidebar_label: 'Calendar/index'
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_interface_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_interface_'
3 | title: 'Calendar/interface'
4 | sidebar_label: 'Calendar/interface'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [DefaultProps](../interfaces/_calendar_interface_.defaultprops.md)
12 | - [MutilSelectedProps](../interfaces/_calendar_interface_.mutilselectedprops.md)
13 | - [PropsBase](../interfaces/_calendar_interface_.propsbase.md)
14 | - [SingleSelectedProps](../interfaces/_calendar_interface_.singleselectedprops.md)
15 | - [State](../interfaces/_calendar_interface_.state.md)
16 |
17 | ### Type aliases
18 |
19 | - [Props](_calendar_interface_.md#props)
20 | - [PropsWithDefaults](_calendar_interface_.md#propswithdefaults)
21 |
22 | ## Type aliases
23 |
24 | ### Props
25 |
26 | Ƭ **Props**: _[SingleSelectedProps](../interfaces/\_calendar_interface_.singleselectedprops.md) | [MutilSelectedProps](../interfaces/_calendar_interface_.mutilselectedprops.md)\_
27 |
28 | _Defined in [src/Calendar/interface.ts:49](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L49)_
29 |
30 | ---
31 |
32 | ### PropsWithDefaults
33 |
34 | Ƭ **PropsWithDefaults**: _[Props](\_calendar_interface_.md#props) & [DefaultProps](../interfaces/_calendar_interface_.defaultprops.md)\_
35 |
36 | _Defined in [src/Calendar/interface.ts:79](https://github.com/tarojsx/ui/blob/v0.11.0/src/Calendar/interface.ts#L79)_
37 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_ui_date_list_index_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_ui_date_list_index_'
3 | title: 'Calendar/ui/date-list/index'
4 | sidebar_label: 'Calendar/ui/date-list/index'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [Props](../interfaces/_calendar_ui_date_list_index_.props.md)
12 |
--------------------------------------------------------------------------------
/docs/modules/_calendar_ui_day_list_index_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_calendar_ui_day_list_index_'
3 | title: 'Calendar/ui/day-list/index'
4 | sidebar_label: 'Calendar/ui/day-list/index'
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/modules/_customtabbar_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_customtabbar_'
3 | title: 'CustomTabBar'
4 | sidebar_label: 'CustomTabBar'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [CustomTabBarProps](../interfaces/_customtabbar_.customtabbarprops.md)
12 |
13 | ### Functions
14 |
15 | - [CustomTabBar](_customtabbar_.md#const-customtabbar)
16 |
17 | ## Functions
18 |
19 | ### `Const` CustomTabBar
20 |
21 | ▸ **CustomTabBar**(`props`: [CustomTabBarProps](../interfaces/_customtabbar_.customtabbarprops.md) & object): _ReactElement‹any, string | function | object›_
22 |
23 | _Defined in [src/CustomTabBar.tsx:75](https://github.com/tarojsx/ui/blob/v0.11.0/src/CustomTabBar.tsx#L75)_
24 |
25 | 自定义 TabBar Render Props 组件, 提供用于渲染自定义 TabBar 所需的属性.
26 |
27 | 支持 API:
28 |
29 | - `Taro.hideTabBar()`
30 | - `Taro.showTabBar()`
31 |
32 | **`since`** 2.5.0 微信开发者工具调试基础库 >= 2.5.2
33 |
34 | **Parameters:**
35 |
36 | | Name | Type |
37 | | ------- | ------------------------------------------------------------------------------- |
38 | | `props` | [CustomTabBarProps](../interfaces/_customtabbar_.customtabbarprops.md) & object |
39 |
40 | **Returns:** _ReactElement‹any, string | function | object›_
41 |
--------------------------------------------------------------------------------
/docs/modules/_floatlayout_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_floatlayout_'
3 | title: 'FloatLayout'
4 | sidebar_label: 'FloatLayout'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [FloatLayoutProps](../interfaces/_floatlayout_.floatlayoutprops.md)
12 |
13 | ### Functions
14 |
15 | - [FloatLayout](_floatlayout_.md#const-floatlayout)
16 |
17 | ## Functions
18 |
19 | ### `Const` FloatLayout
20 |
21 | ▸ **FloatLayout**(`props`: [FloatLayoutProps](../interfaces/_floatlayout_.floatlayoutprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/FloatLayout.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/FloatLayout.tsx#L14)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------------------------ |
29 | | `props` | [FloatLayoutProps](../interfaces/_floatlayout_.floatlayoutprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_form_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_form_'
3 | title: 'Form'
4 | sidebar_label: 'Form'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [FormProps](../interfaces/_form_.formprops.md)
12 |
13 | ### Functions
14 |
15 | - [Form](_form_.md#const-form)
16 |
17 | ## Functions
18 |
19 | ### `Const` Form
20 |
21 | ▸ **Form**(`props`: [FormProps](../interfaces/_form_.formprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/Form.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Form.tsx#L12)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | --------------------------------------------------------- |
29 | | `props` | [FormProps](../interfaces/_form_.formprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_grid_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_grid_'
3 | title: 'Grid'
4 | sidebar_label: 'Grid'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [GridItem](../interfaces/_grid_.griditem.md)
12 | - [GridProps](../interfaces/_grid_.gridprops.md)
13 |
14 | ### Functions
15 |
16 | - [Grid](_grid_.md#const-grid)
17 |
18 | ## Functions
19 |
20 | ### `Const` Grid
21 |
22 | ▸ **Grid**(`props`: [GridProps](../interfaces/_grid_.gridprops.md)‹› & object): _Element‹›_
23 |
24 | _Defined in [src/Grid.tsx:19](https://github.com/tarojsx/ui/blob/v0.11.0/src/Grid.tsx#L19)_
25 |
26 | **Parameters:**
27 |
28 | | Name | Type |
29 | | ------- | --------------------------------------------------------- |
30 | | `props` | [GridProps](../interfaces/_grid_.gridprops.md)‹› & object |
31 |
32 | **Returns:** _Element‹›_
33 |
--------------------------------------------------------------------------------
/docs/modules/_icon_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_icon_'
3 | title: 'Icon'
4 | sidebar_label: 'Icon'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [IconProps](../interfaces/_icon_.iconprops.md)
12 |
13 | ### Functions
14 |
15 | - [Icon](_icon_.md#const-icon)
16 |
17 | ## Functions
18 |
19 | ### `Const` Icon
20 |
21 | ▸ **Icon**(`props`: [IconProps](../interfaces/_icon_.iconprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/Icon.tsx:15](https://github.com/tarojsx/ui/blob/v0.11.0/src/Icon.tsx#L15)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | --------------------------------------------------------- |
29 | | `props` | [IconProps](../interfaces/_icon_.iconprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_imagepicker_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_imagepicker_'
3 | title: 'ImagePicker'
4 | sidebar_label: 'ImagePicker'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ImagePickerProps](../interfaces/_imagepicker_.imagepickerprops.md)
12 |
13 | ### Functions
14 |
15 | - [ImagePicker](_imagepicker_.md#const-imagepicker)
16 |
17 | ## Functions
18 |
19 | ### `Const` ImagePicker
20 |
21 | ▸ **ImagePicker**(`props`: [ImagePickerProps](../interfaces/_imagepicker_.imagepickerprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/ImagePicker.tsx:49](https://github.com/tarojsx/ui/blob/v0.11.0/src/ImagePicker.tsx#L49)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ---------------------------------------------------------------------------- |
29 | | `props` | [ImagePickerProps](../interfaces/_imagepicker_.imagepickerprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_input_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_input_'
3 | title: 'Input'
4 | sidebar_label: 'Input'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [InputProps](../interfaces/_input_.inputprops.md)
12 |
13 | ### Functions
14 |
15 | - [Input](_input_.md#const-input)
16 |
17 | ## Functions
18 |
19 | ### `Const` Input
20 |
21 | ▸ **Input**(`props`: [InputProps](../interfaces/_input_.inputprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/Input.tsx:49](https://github.com/tarojsx/ui/blob/v0.11.0/src/Input.tsx#L49)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------ |
29 | | `props` | [InputProps](../interfaces/_input_.inputprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_inputnumber_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_inputnumber_'
3 | title: 'InputNumber'
4 | sidebar_label: 'InputNumber'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [InputNumberProps](../interfaces/_inputnumber_.inputnumberprops.md)
12 |
13 | ### Functions
14 |
15 | - [InputNumber](_inputnumber_.md#const-inputnumber)
16 |
17 | ## Functions
18 |
19 | ### `Const` InputNumber
20 |
21 | ▸ **InputNumber**(`props`: [InputNumberProps](../interfaces/_inputnumber_.inputnumberprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/InputNumber.tsx:45](https://github.com/tarojsx/ui/blob/v0.11.0/src/InputNumber.tsx#L45)_
24 |
25 | 数字输入框
26 |
27 | - 按 "+" 和 "-" 按 step 加减数字.
28 | - 手动输入数字时调起数字(number)或小数(digit)键盘, 默认距离键盘 50px.
29 | - 失去光标时强制格式化数字.
30 |
31 | **Parameters:**
32 |
33 | | Name | Type |
34 | | ------- | ------------------------------------------------------------------------------ |
35 | | `props` | [InputNumberProps](../interfaces/_inputnumber_.inputnumberprops.md)‹› & object |
36 |
37 | **Returns:** _Element‹›_
38 |
--------------------------------------------------------------------------------
/docs/modules/_list_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_list_'
3 | title: 'List'
4 | sidebar_label: 'List'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ListProps](../interfaces/_list_.listprops.md)
12 |
13 | ### Functions
14 |
15 | - [List](_list_.md#const-list)
16 |
17 | ## Functions
18 |
19 | ### `Const` List
20 |
21 | ▸ **List**(`props`: [ListProps](../interfaces/_list_.listprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/List.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/List.tsx#L12)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------- |
29 | | `props` | [ListProps](../interfaces/_list_.listprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_listheader_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_listheader_'
3 | title: 'ListHeader'
4 | sidebar_label: 'ListHeader'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ListHeaderProps](../interfaces/_listheader_.listheaderprops.md)
12 |
13 | ### Functions
14 |
15 | - [ListHeader](_listheader_.md#const-listheader)
16 |
17 | ## Functions
18 |
19 | ### `Const` ListHeader
20 |
21 | ▸ **ListHeader**(`props`: [ListHeaderProps](../interfaces/_listheader_.listheaderprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/ListHeader.tsx:23](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListHeader.tsx#L23)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------------------- |
29 | | `props` | [ListHeaderProps](../interfaces/_listheader_.listheaderprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_listitem_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_listitem_'
3 | title: 'ListItem'
4 | sidebar_label: 'ListItem'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ListItemProps](../interfaces/_listitem_.listitemprops.md)
12 |
13 | ### Functions
14 |
15 | - [ListItem](_listitem_.md#const-listitem)
16 |
17 | ## Functions
18 |
19 | ### `Const` ListItem
20 |
21 | ▸ **ListItem**(`props`: [ListItemProps](../interfaces/_listitem_.listitemprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/ListItem.tsx:24](https://github.com/tarojsx/ui/blob/v0.11.0/src/ListItem.tsx#L24)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | --------------------------------------------------------------------- |
29 | | `props` | [ListItemProps](../interfaces/_listitem_.listitemprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_loading_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_loading_'
3 | title: 'Loading'
4 | sidebar_label: 'Loading'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [LoadingProps](../interfaces/_loading_.loadingprops.md)
12 |
13 | ### Functions
14 |
15 | - [Loading](_loading_.md#const-loading)
16 |
17 | ## Functions
18 |
19 | ### `Const` Loading
20 |
21 | ▸ **Loading**(`props`: [LoadingProps](../interfaces/_loading_.loadingprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/Loading.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/Loading.tsx#L12)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ---------------------------------------------------------------- |
29 | | `props` | [LoadingProps](../interfaces/_loading_.loadingprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_message_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_message_'
3 | title: 'Message'
4 | sidebar_label: 'Message'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [MessageProps](../interfaces/_message_.messageprops.md)
12 |
13 | ### Functions
14 |
15 | - [Message](_message_.md#const-message)
16 |
17 | ## Functions
18 |
19 | ### `Const` Message
20 |
21 | ▸ **Message**(`props`: [MessageProps](../interfaces/_message_.messageprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/Message.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/Message.tsx#L16)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ---------------------------------------------------------------- |
29 | | `props` | [MessageProps](../interfaces/_message_.messageprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_modal_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_modal_'
3 | title: 'Modal'
4 | sidebar_label: 'Modal'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ModalProps](../interfaces/_modal_.modalprops.md)
12 |
13 | ### Functions
14 |
15 | - [Modal](_modal_.md#const-modal)
16 |
17 | ## Functions
18 |
19 | ### `Const` Modal
20 |
21 | ▸ **Modal**(`props`: [ModalProps](../interfaces/_modal_.modalprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/Modal.tsx:14](https://github.com/tarojsx/ui/blob/v0.11.0/src/Modal.tsx#L14)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------ |
29 | | `props` | [ModalProps](../interfaces/_modal_.modalprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_progress_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_progress_'
3 | title: 'Progress'
4 | sidebar_label: 'Progress'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [ProgressProps](../interfaces/_progress_.progressprops.md)
12 |
13 | ### Functions
14 |
15 | - [Progress](_progress_.md#const-progress)
16 |
17 | ## Functions
18 |
19 | ### `Const` Progress
20 |
21 | ▸ **Progress**(`props`: [ProgressProps](../interfaces/_progress_.progressprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/Progress.tsx:24](https://github.com/tarojsx/ui/blob/v0.11.0/src/Progress.tsx#L24)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------------- |
29 | | `props` | [ProgressProps](../interfaces/_progress_.progressprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_searchbar_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_searchbar_'
3 | title: 'SearchBar'
4 | sidebar_label: 'SearchBar'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [SearchBarProps](../interfaces/_searchbar_.searchbarprops.md)
12 |
13 | ### Functions
14 |
15 | - [SearchBar](_searchbar_.md#const-searchbar)
16 |
17 | ## Functions
18 |
19 | ### `Const` SearchBar
20 |
21 | ▸ **SearchBar**(`props`: [SearchBarProps](../interfaces/_searchbar_.searchbarprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/SearchBar.tsx:30](https://github.com/tarojsx/ui/blob/v0.11.0/src/SearchBar.tsx#L30)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------------------ |
29 | | `props` | [SearchBarProps](../interfaces/_searchbar_.searchbarprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_statistic_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_statistic_'
3 | title: 'Statistic'
4 | sidebar_label: 'Statistic'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [StatisticProps](../interfaces/_statistic_.statisticprops.md)
12 |
13 | ### Functions
14 |
15 | - [Statistic](_statistic_.md#const-statistic)
16 |
17 | ## Functions
18 |
19 | ### `Const` Statistic
20 |
21 | ▸ **Statistic**(`props`: [StatisticProps](../interfaces/_statistic_.statisticprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/Statistic.tsx:16](https://github.com/tarojsx/ui/blob/v0.11.0/src/Statistic.tsx#L16)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ---------------------------------------------------------------------- |
29 | | `props` | [StatisticProps](../interfaces/_statistic_.statisticprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_steps_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_steps_'
3 | title: 'Steps'
4 | sidebar_label: 'Steps'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [StepsProps](../interfaces/_steps_.stepsprops.md)
12 |
13 | ### Functions
14 |
15 | - [Steps](_steps_.md#const-steps)
16 |
17 | ## Functions
18 |
19 | ### `Const` Steps
20 |
21 | ▸ **Steps**(`props`: [StepsProps](../interfaces/_steps_.stepsprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/Steps.tsx:18](https://github.com/tarojsx/ui/blob/v0.11.0/src/Steps.tsx#L18)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------ |
29 | | `props` | [StepsProps](../interfaces/_steps_.stepsprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_tabbar_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_tabbar_'
3 | title: 'TabBar'
4 | sidebar_label: 'TabBar'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [TabBarProps](../interfaces/_tabbar_.tabbarprops.md)
12 |
13 | ### Type aliases
14 |
15 | - [TabBarListItem](_tabbar_.md#tabbarlistitem)
16 |
17 | ### Functions
18 |
19 | - [TabBar](_tabbar_.md#const-tabbar)
20 |
21 | ## Type aliases
22 |
23 | ### TabBarListItem
24 |
25 | Ƭ **TabBarListItem**: _object_
26 |
27 | _Defined in [src/TabBar.tsx:8](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L8)_
28 |
29 | #### Type declaration:
30 |
31 | - **dot**? : _boolean_
32 |
33 | - **iconPrefixClass**? : _string_
34 |
35 | - **iconType**? : _string_
36 |
37 | - **image**? : _string_
38 |
39 | - **key**? : _string_
40 |
41 | - **max**? : _number_
42 |
43 | - **selectedIconType**? : _string_
44 |
45 | - **selectedImage**? : _string_
46 |
47 | - **text**? : _string_
48 |
49 | - **title**: _string_
50 |
51 | ## Functions
52 |
53 | ### `Const` TabBar
54 |
55 | ▸ **TabBar**(`props`: [TabBarProps](../interfaces/_tabbar_.tabbarprops.md) & object): _Element‹›_
56 |
57 | _Defined in [src/TabBar.tsx:45](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabBar.tsx#L45)_
58 |
59 | **Parameters:**
60 |
61 | | Name | Type |
62 | | ------- | ------------------------------------------------------------- |
63 | | `props` | [TabBarProps](../interfaces/_tabbar_.tabbarprops.md) & object |
64 |
65 | **Returns:** _Element‹›_
66 |
--------------------------------------------------------------------------------
/docs/modules/_tabs_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_tabs_'
3 | title: 'Tabs'
4 | sidebar_label: 'Tabs'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [TabsProps](../interfaces/_tabs_.tabsprops.md)
12 |
13 | ### Functions
14 |
15 | - [Tabs](_tabs_.md#const-tabs)
16 |
17 | ## Functions
18 |
19 | ### `Const` Tabs
20 |
21 | ▸ **Tabs**(`props`: [TabsProps](../interfaces/_tabs_.tabsprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/Tabs.tsx:19](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tabs.tsx#L19)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------- |
29 | | `props` | [TabsProps](../interfaces/_tabs_.tabsprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_tabspane_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_tabspane_'
3 | title: 'TabsPane'
4 | sidebar_label: 'TabsPane'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [TabsPaneProps](../interfaces/_tabspane_.tabspaneprops.md)
12 |
13 | ### Functions
14 |
15 | - [TabsPane](_tabspane_.md#const-tabspane)
16 |
17 | ## Functions
18 |
19 | ### `Const` TabsPane
20 |
21 | ▸ **TabsPane**(`props`: [TabsPaneProps](../interfaces/_tabspane_.tabspaneprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/TabsPane.tsx:12](https://github.com/tarojsx/ui/blob/v0.11.0/src/TabsPane.tsx#L12)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ------------------------------------------------------------------- |
29 | | `props` | [TabsPaneProps](../interfaces/_tabspane_.tabspaneprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_tag_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_tag_'
3 | title: 'Tag'
4 | sidebar_label: 'Tag'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [TagProps](../interfaces/_tag_.tagprops.md)
12 |
13 | ### Functions
14 |
15 | - [Tag](_tag_.md#const-tag)
16 |
17 | ## Functions
18 |
19 | ### `Const` Tag
20 |
21 | ▸ **Tag**(`props`: [TagProps](../interfaces/_tag_.tagprops.md) & object): _Element‹›_
22 |
23 | _Defined in [src/Tag.tsx:19](https://github.com/tarojsx/ui/blob/v0.11.0/src/Tag.tsx#L19)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | ---------------------------------------------------- |
29 | | `props` | [TagProps](../interfaces/_tag_.tagprops.md) & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/docs/modules/_textarea_.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: '_textarea_'
3 | title: 'Textarea'
4 | sidebar_label: 'Textarea'
5 | ---
6 |
7 | ## Index
8 |
9 | ### Interfaces
10 |
11 | - [TextareaProps](../interfaces/_textarea_.textareaprops.md)
12 |
13 | ### Functions
14 |
15 | - [Textarea](_textarea_.md#const-textarea)
16 |
17 | ## Functions
18 |
19 | ### `Const` Textarea
20 |
21 | ▸ **Textarea**(`props`: [TextareaProps](../interfaces/_textarea_.textareaprops.md)‹› & object): _Element‹›_
22 |
23 | _Defined in [src/Textarea.tsx:25](https://github.com/tarojsx/ui/blob/v0.11.0/src/Textarea.tsx#L25)_
24 |
25 | **Parameters:**
26 |
27 | | Name | Type |
28 | | ------- | --------------------------------------------------------------------- |
29 | | `props` | [TextareaProps](../interfaces/_textarea_.textareaprops.md)‹› & object |
30 |
31 | **Returns:** _Element‹›_
32 |
--------------------------------------------------------------------------------
/global.d.ts:
--------------------------------------------------------------------------------
1 | // @ts-ignore
2 | declare const process: {
3 | env: {
4 | TARO_ENV: 'weapp' | 'swan' | 'alipay' | 'h5' | 'rn' | 'tt' | 'quickapp' | 'qq';
5 | [key: string]: any;
6 | };
7 | };
8 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tarojsx/ui",
3 | "version": "0.31.1",
4 | "description": "We reinvents the UI for Taro3+",
5 | "keywords": [
6 | "taro",
7 | "taro3",
8 | "ui",
9 | "components",
10 | "react",
11 | "reactjs",
12 | "wx",
13 | "weixin",
14 | "wechat",
15 | "weapp",
16 | "wechat-mini-program",
17 | "javascript",
18 | "typescript"
19 | ],
20 | "homepage": "https://github.com/tarojsx/ui",
21 | "bugs": {
22 | "url": "https://github.com/tarojsx/ui/issues"
23 | },
24 | "repository": {
25 | "type": "git",
26 | "url": "git+https://github.com/tarojsx/ui.git"
27 | },
28 | "license": "MIT",
29 | "author": "colder",
30 | "main": "dist/index.js",
31 | "source": "src/index.ts",
32 | "types": "dist/index.d.ts",
33 | "files": [
34 | "dist",
35 | "docs",
36 | "style",
37 | "babel.js"
38 | ],
39 | "scripts": {
40 | "start": "tsc -w --preserveWatchOutput",
41 | "prebuild": "del dist/* tsconfig.tsbuildinfo",
42 | "build": "tsc",
43 | "docs": "typedoc",
44 | "prepublishOnly": "npm run build",
45 | "release": "np"
46 | },
47 | "husky": {
48 | "hooks": {
49 | "pre-commit": "lint-staged",
50 | "commit-msg": "commitlint -x @commitlint/config-conventional -E HUSKY_GIT_PARAMS"
51 | }
52 | },
53 | "lint-staged": {
54 | "*.{js,json,jsx,ts,tsx,md,html,css,scss}": "prettier --write"
55 | },
56 | "browserslist": {
57 | "production": [
58 | "last 3 versions",
59 | "Android >= 4.1",
60 | "ios >= 8"
61 | ],
62 | "development": [
63 | "last 1 chrome version",
64 | "last 1 firefox version",
65 | "last 1 safari version"
66 | ]
67 | },
68 | "prettier": {
69 | "printWidth": 120,
70 | "singleQuote": true
71 | },
72 | "dependencies": {
73 | "@tarojsx/history": "^0.32.0",
74 | "@tarojsx/hooks": "^0.15.0",
75 | "tslib": "^2.2.0"
76 | },
77 | "devDependencies": {
78 | "@commitlint/cli": "^12.1.4",
79 | "@commitlint/config-conventional": "^12.1.4",
80 | "@tarojs/components": "^3.2.9",
81 | "@tarojs/taro": "^3.2.9",
82 | "@types/classnames": "^2.3.1",
83 | "@types/lodash": "^4.14.170",
84 | "@types/node": "^14.17.0",
85 | "@types/react": "^16.14.6",
86 | "@types/react-is": "^16.7.2",
87 | "del-cli": "^3.0.1",
88 | "husky": "^4.3.8",
89 | "lint-staged": "^11.0.0",
90 | "np": "^7.5.0",
91 | "prettier": "^2.3.0",
92 | "prettier-plugin-jsdoc": "^0.3.22",
93 | "prettier-plugin-packagejson": "^2.2.11",
94 | "taro-ui": "^3.0.0-alpha.10",
95 | "typedoc": "^0.20.36",
96 | "typedoc-plugin-markdown": "^3.8.1",
97 | "typescript": "^4.2.4"
98 | },
99 | "peerDependencies": {
100 | "taro-ui": "*"
101 | },
102 | "publishConfig": {
103 | "access": "public",
104 | "registry": "https://registry.npmjs.org"
105 | },
106 | "np": {}
107 | }
108 |
--------------------------------------------------------------------------------
/src/ActionSheet.tsx:
--------------------------------------------------------------------------------
1 | import React, { useCallback } from 'react';
2 | import classNames from 'classnames';
3 | import { View } from '@tarojs/components';
4 | import { AtActionSheetProps } from 'taro-ui/types/action-sheet';
5 |
6 | import '../style/ActionSheet.scss';
7 |
8 | export interface ActionSheetProps extends Pick {
9 | className?: string;
10 | style?: React.CSSProperties;
11 | isOpened?: boolean;
12 | title?: React.ReactNode;
13 | cancelText?: React.ReactNode;
14 | }
15 |
16 | export const ActionSheet: React.FC = (props) => {
17 | const { className, style = {}, isOpened, title, cancelText = '取消', children } = props;
18 |
19 | const onClose = useCallback(
20 | (e) => {
21 | if (props.onClose) {
22 | props.onClose(e);
23 | }
24 | },
25 | [props.onClose]
26 | );
27 |
28 | const onCancel = useCallback(
29 | (e) => {
30 | if (props.onCancel) {
31 | props.onCancel(e);
32 | }
33 | onClose(e);
34 | },
35 | [onClose, props.onCancel]
36 | );
37 |
38 | const onTouchMove = useCallback((e) => {
39 | e.stopPropagation();
40 | e.preventDefault();
41 | }, []);
42 |
43 | return (
44 |
49 |
50 |
51 | {title && {title}}
52 |
53 | {children}
54 | {cancelText && (
55 |
56 | {cancelText}
57 |
58 | )}
59 |
60 |
61 |
62 | );
63 | };
64 |
--------------------------------------------------------------------------------
/src/ActivityIndicator.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { Text, View } from '@tarojs/components';
4 | import { AtActivityIndicatorProps } from 'taro-ui/types/activity-indicator';
5 |
6 | import { Loading } from './Loading';
7 | import '../style/ActivityIndicator.scss';
8 |
9 | export interface ActivityIndicatorProps extends AtActivityIndicatorProps {
10 | isOpened?: boolean;
11 | style?: React.CSSProperties;
12 | }
13 |
14 | export const ActivityIndicator: React.FC = (props) => {
15 | const { className, style, color, size, mode, content, isOpened = true, children } = props;
16 |
17 | const rootClass = classNames(
18 | 'at-activity-indicator',
19 | {
20 | 'at-activity-indicator--center': mode === 'center',
21 | 'at-activity-indicator--isopened': isOpened,
22 | },
23 | className
24 | );
25 |
26 | return (
27 |
28 |
29 |
30 |
31 | {content && {content}}
32 | {children}
33 |
34 | );
35 | };
36 |
--------------------------------------------------------------------------------
/src/Avatar.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { View, Image, Text, OpenData } from '@tarojs/components';
4 | import { OpenDataProps } from '@tarojs/components/types/OpenData';
5 |
6 | import '../style/Avatar.scss';
7 |
8 | export interface AvatarProps {
9 | className?: string;
10 | style?: React.CSSProperties;
11 | size?: 'tiny' | 'mini' | 'small' | 'large';
12 | circle?: boolean;
13 | text?: string;
14 | image?: string;
15 | openData?: { type: 'userAvatarUrl'; lang?: OpenDataProps['lang'] };
16 | }
17 |
18 | export const Avatar: React.FC = (props) => {
19 | const { className, style = {}, size, circle, image, text, openData } = props;
20 |
21 | return (
22 |
33 | {openData?.type === 'userAvatarUrl' && process.env.TARO_ENV === 'weapp' ? (
34 |
35 | ) : image ? (
36 |
37 | ) : (
38 | {text ? text[0] : ''}
39 | )}
40 |
41 | );
42 | };
43 |
--------------------------------------------------------------------------------
/src/Badge.tsx:
--------------------------------------------------------------------------------
1 | import React, { useMemo } from 'react';
2 | import classNames from 'classnames';
3 | import { View } from '@tarojs/components';
4 |
5 | import '../style/Badge.scss';
6 |
7 | export interface BadgeProps {
8 | className?: string;
9 | style?: React.CSSProperties;
10 | dot?: boolean;
11 | value?: number | string;
12 | maxValue?: number;
13 | }
14 |
15 | export const Badge: React.FC = (props) => {
16 | const { className, style, children, dot, value, maxValue = 99 } = props;
17 |
18 | const text = useMemo(() => {
19 | if (value === '' || value === null || typeof value === 'undefined') return '';
20 | const numValue = +value;
21 | if (Number.isNaN(numValue)) {
22 | return value;
23 | }
24 | return numValue > maxValue ? `${maxValue}+` : numValue;
25 | }, [value, maxValue]);
26 |
27 | return (
28 |
29 | {children}
30 | {dot ? : text !== '' && {text}}
31 |
32 | );
33 | };
34 |
--------------------------------------------------------------------------------
/src/Button.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { Button as _Button, View } from '@tarojs/components';
4 | import { ButtonProps as _ButtonProps } from '@tarojs/components/types/Button';
5 | import { AtButtonProps } from 'taro-ui/types/button';
6 | import { useThrottleCallback } from '@tarojsx/hooks/dist/useThrottleCallback';
7 |
8 | import { Loading } from './Loading';
9 | import { Icon, IconProps } from './Icon';
10 | import '../style/Button.scss';
11 |
12 | export interface ButtonProps extends Omit<_ButtonProps, 'size' | 'type'>, Pick {
13 | className?: string;
14 | style?: React.CSSProperties;
15 | type?: _ButtonProps['type'] | AtButtonProps['type'] | 'error';
16 | size?: _ButtonProps['size'] | AtButtonProps['size'];
17 | /** OnClick 事件节流时间间隔, 单位: ms, 默认 500ms. */
18 | clickThrottle?: boolean | number;
19 | /** 透明按钮 */
20 | transparent?: boolean;
21 | iconInfo?: IconProps;
22 | fab?: boolean;
23 | }
24 |
25 | export const Button: React.FC = (props) => {
26 | const { className, style, type, size, circle, full, transparent, fab, children, clickThrottle, onClick, ...rest } =
27 | props;
28 | const hoverProps = Object.keys(props).reduce(
29 | (res, key) => (key.startsWith('hover') && props[key] ? { ...res, [key]: props[key] } : res),
30 | {}
31 | );
32 | const handleClick = useThrottleCallback(onClick, clickThrottle);
33 |
34 | if (transparent) {
35 | return (
36 |
37 | {children}
38 | {!props.disabled && !props.loading && <_Button onClick={handleClick} {...rest} />}
39 |
40 | );
41 | }
42 |
43 | if (fab) {
44 | return (
45 |
56 | {children}
57 |
58 | );
59 | }
60 |
61 | if (size === 'mini') {
62 | return (
63 |
64 |
71 |
72 | {props.loading ? : !!props.iconInfo ? : null}
73 |
74 | {children}
75 |
76 | {!props.disabled && !props.loading && <_Button onClick={handleClick} {...rest} />}
77 |
78 | );
79 | }
80 |
81 | return (
82 |
98 | {!!props.loading && (
99 |
100 |
101 |
102 | )}
103 | {children}
104 | {!props.disabled && !props.loading && <_Button className="at-button__wxbutton" onClick={handleClick} {...rest} />}
105 |
106 | );
107 | };
108 |
--------------------------------------------------------------------------------
/src/Calendar/common/constant.ts:
--------------------------------------------------------------------------------
1 | export const TYPE_PRE_MONTH = -1;
2 |
3 | export const TYPE_NOW_MONTH = 0;
4 |
5 | export const TYPE_NEXT_MONTH = 1;
6 |
--------------------------------------------------------------------------------
/src/Calendar/common/helper.ts:
--------------------------------------------------------------------------------
1 | import dayjs, { Dayjs } from 'dayjs';
2 | import _flow from 'lodash/flow';
3 | import { Calendar } from 'taro-ui/types/calendar';
4 |
5 | import plugins from './plugins';
6 | import * as constant from './constant';
7 |
8 | const TOTAL = 7 * 6;
9 |
10 | function getFullItem(
11 | item: Partial,
12 | options: Calendar.GroupOptions,
13 | selectedDate: Calendar.SelectedDate,
14 | isShowStatus?: boolean
15 | ) {
16 | if (!isShowStatus) return item;
17 |
18 | const bindedPlugins = plugins.map((fn) =>
19 | fn.bind(null, {
20 | options,
21 | selectedDate,
22 | })
23 | );
24 | return _flow(bindedPlugins)(item);
25 | }
26 |
27 | export default function generateCalendarGroup(
28 | options: Calendar.GroupOptions
29 | ): (
30 | generateDate: number,
31 | selectedDate: Calendar.SelectedDate,
32 | isShowStatus?: boolean
33 | ) => Calendar.ListInfo {
34 | return function (
35 | generateDate: number,
36 | selectedDate: Calendar.SelectedDate,
37 | isShowStatus?: boolean
38 | ): Calendar.ListInfo {
39 | const date = dayjs(generateDate);
40 |
41 | const { format } = options;
42 |
43 | // 获取生成日期的第一天 和 最后一天
44 | const firstDate = date.startOf('month');
45 | const lastDate = date.endOf('month');
46 |
47 | const preMonthDate = date.subtract(1, 'month');
48 |
49 | const list: Calendar.List = [];
50 |
51 | const nowMonthDays: number = date.daysInMonth(); // 获取这个月有多少天
52 | const preMonthLastDay = preMonthDate.endOf('month').day(); // 获取上个月最后一天是周几
53 |
54 | // 生成上个月的日期
55 | for (let i = 1; i <= preMonthLastDay + 1; i++) {
56 | const thisDate = firstDate.subtract(i, 'day').startOf('day');
57 |
58 | let item = {
59 | marks: [],
60 | _value: thisDate,
61 | text: thisDate.date(),
62 | type: constant.TYPE_PRE_MONTH,
63 | value: thisDate.format(format),
64 | };
65 |
66 | item = getFullItem(item, options, selectedDate, isShowStatus);
67 |
68 | list.push(item);
69 | }
70 | list.reverse();
71 |
72 | // 生成这个月的日期
73 | for (let i = 0; i < nowMonthDays; i++) {
74 | const thisDate = firstDate.add(i, 'day').startOf('day');
75 | let item = {
76 | marks: [],
77 | _value: thisDate,
78 | text: thisDate.date(),
79 | type: constant.TYPE_NOW_MONTH,
80 | value: thisDate.format(format),
81 | };
82 |
83 | item = getFullItem(item, options, selectedDate, isShowStatus);
84 |
85 | list.push(item);
86 | }
87 |
88 | // 生成下个月的日期
89 | let i = 1;
90 | while (list.length < TOTAL) {
91 | const thisDate = lastDate.add(i++, 'day').startOf('day');
92 | let item = {
93 | marks: [],
94 | _value: thisDate,
95 | text: thisDate.date(),
96 | type: constant.TYPE_NEXT_MONTH,
97 | value: thisDate.format(format),
98 | };
99 |
100 | item = getFullItem(item, options, selectedDate, isShowStatus);
101 |
102 | list.push(item);
103 | }
104 |
105 | return {
106 | list,
107 | value: generateDate,
108 | };
109 | };
110 | }
111 |
112 | export function getGenerateDate(date: Calendar.DateArg | undefined): Dayjs {
113 | return dayjs(date).startOf('month');
114 | }
115 |
--------------------------------------------------------------------------------
/src/Calendar/common/plugins.ts:
--------------------------------------------------------------------------------
1 | import dayjs from 'dayjs';
2 | import _isEmpty from 'lodash/isEmpty';
3 |
4 | import { Calendar } from 'taro-ui/types/calendar';
5 |
6 | interface PluginArg {
7 | options: Calendar.GroupOptions;
8 |
9 | selectedDate: Calendar.SelectedDate;
10 | }
11 |
12 | export function handleActive(args: PluginArg, item: Calendar.Item): Calendar.Item {
13 | const { selectedDate } = args;
14 | const { _value } = item;
15 |
16 | const { start, end } = selectedDate;
17 |
18 | const dayjsEnd = dayjs(end);
19 | const dayjsStart = start ? dayjs(start) : dayjsEnd;
20 |
21 | item.isSelected =
22 | _value.isSame(dayjsEnd) || _value.isSame(dayjsStart) || (_value.isAfter(dayjsStart) && _value.isBefore(dayjsEnd));
23 |
24 | item.isSelectedHead = _value.isSame(dayjsStart);
25 | item.isSelectedTail = _value.isSame(dayjsEnd);
26 |
27 | item.isToday = _value.diff(dayjs(Date.now()).startOf('day'), 'day') === 0;
28 |
29 | return item;
30 | }
31 |
32 | export function handleMarks(args: PluginArg, item: Calendar.Item): Calendar.Item {
33 | const { options } = args;
34 | const { _value } = item;
35 | const { marks } = options;
36 |
37 | const markList = marks.filter((mark) => dayjs(mark.value).startOf('day').isSame(_value));
38 |
39 | item.marks = markList.slice(0, 1);
40 |
41 | return item;
42 | }
43 |
44 | // export function handleSelectedDates (args: PluginArg): Calendar.Item {
45 | // const { item, options } = args
46 | // const { _value } = item
47 | // const { selectedDates } = options
48 |
49 | // if (selectedDates.length === 0) return args
50 |
51 | // _forEach(selectedDates, date => {
52 | // const { isSelected, isHead, isTail } = item
53 |
54 | // // 如果当前 Item 已经具备了 三种状态下 无需继续判断 跳出循环
55 | // if (isSelected) {
56 | // return false
57 | // }
58 |
59 | // const { start, end } = date
60 |
61 | // const dayjsEnd = dayjs(end).startOf('day')
62 | // const dayjsStart = dayjs(start).startOf('day')
63 |
64 | // item.isSelected =
65 | // item.isSelected ||
66 | // (_value.isAfter(dayjsStart) && _value.isBefore(dayjsEnd))
67 |
68 | // item.isHead = item.isHead || _value.isSame(dayjsStart)
69 |
70 | // item.isTail = item.isTail || _value.isSame(dayjsEnd)
71 | // })
72 |
73 | // return item
74 | // }
75 |
76 | export function handleDisabled(args: PluginArg, item: Calendar.Item): Calendar.Item {
77 | const { options } = args;
78 | const { _value } = item;
79 | const { minDate, maxDate } = options;
80 |
81 | const dayjsMinDate = dayjs(minDate);
82 | const dayjsMaxDate = dayjs(maxDate);
83 |
84 | item.isDisabled = !!(minDate && _value.isBefore(dayjsMinDate)) || !!(maxDate && _value.isAfter(dayjsMaxDate));
85 |
86 | return item;
87 | }
88 |
89 | export function handleValid(args: PluginArg, item: Calendar.Item): Calendar.Item {
90 | const { options } = args;
91 | const { _value } = item;
92 | const { validDates } = options;
93 |
94 | if (!_isEmpty(validDates)) {
95 | const isInclude = validDates.some((date) => {
96 | return dayjs(date.value).startOf('day').isSame(_value);
97 | });
98 |
99 | item.isDisabled = !isInclude;
100 | }
101 |
102 | delete item._value;
103 |
104 | return item;
105 | }
106 |
107 | export default [handleActive, handleMarks, handleDisabled, handleValid];
108 |
--------------------------------------------------------------------------------
/src/Calendar/controller/index.tsx:
--------------------------------------------------------------------------------
1 | import dayjs, { Dayjs } from 'dayjs';
2 | import classnames from 'classnames';
3 | import React from 'react';
4 | import { Text, View, Picker } from '@tarojs/components';
5 | import { AtCalendarControllerProps, AtCalendarControllerState } from 'taro-ui/types/calendar';
6 |
7 | /** @ignore */
8 | export default class AtCalendarController extends React.Component<
9 | AtCalendarControllerProps,
10 | AtCalendarControllerState
11 | > {
12 | public render(): JSX.Element {
13 | const { generateDate, minDate, maxDate, monthFormat, hideArrow } = this.props;
14 |
15 | const dayjsDate: Dayjs = dayjs(generateDate);
16 | const dayjsMinDate: Dayjs | boolean = !!minDate && dayjs(minDate);
17 | const dayjsMaxDate: Dayjs | boolean = !!maxDate && dayjs(maxDate);
18 |
19 | const isMinMonth: boolean = dayjsMinDate && dayjsMinDate.startOf('month').isSame(dayjsDate);
20 |
21 | const isMaxMonth: boolean = dayjsMaxDate && dayjsMaxDate.startOf('month').isSame(dayjsDate);
22 |
23 | const minDateValue: string = dayjsMinDate ? dayjsMinDate.format('YYYY-MM') : '';
24 | const maxDateValue: string = dayjsMaxDate ? dayjsMaxDate.format('YYYY-MM') : '';
25 |
26 | return (
27 |
28 | {hideArrow ? null : (
29 |
35 | )}
36 |
44 | {dayjsDate.format(monthFormat)}
45 |
46 | {hideArrow ? null : (
47 |
53 | )}
54 |
55 | );
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/Calendar/ui/date-list/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classnames from 'classnames';
3 | import { Text, View } from '@tarojs/components';
4 | import { Calendar } from 'taro-ui/types/calendar';
5 | import * as constant from '../../common/constant';
6 |
7 | const MAP: { [key: number]: string } = {
8 | [constant.TYPE_PRE_MONTH]: 'pre',
9 | [constant.TYPE_NOW_MONTH]: 'now',
10 | [constant.TYPE_NEXT_MONTH]: 'next',
11 | };
12 |
13 | export interface Props {
14 | list: Calendar.List;
15 |
16 | onClick?: (item: Calendar.Item) => void;
17 |
18 | onLongClick?: (item: Calendar.Item) => void;
19 | }
20 |
21 | /** @ignore */
22 | export default class AtCalendarList extends React.Component {
23 | private handleClick = (item: Calendar.Item): void => {
24 | if (typeof this.props.onClick === 'function') {
25 | this.props.onClick(item);
26 | }
27 | };
28 |
29 | private handleLongClick = (item: Calendar.Item): void => {
30 | if (typeof this.props.onLongClick === 'function') {
31 | this.props.onLongClick(item);
32 | }
33 | };
34 |
35 | public render(): JSX.Element | null {
36 | const { list } = this.props;
37 | if (!list || list.length === 0) return null;
38 |
39 | return (
40 |
41 | {list.map((item: Calendar.Item) => (
42 |
56 |
57 | {item.text}
58 |
59 |
60 | {item.marks && item.marks.length > 0 ? (
61 |
62 | {item.marks.map((mark, key) => (
63 |
64 | {mark}
65 |
66 | ))}
67 |
68 | ) : null}
69 |
70 |
71 | ))}
72 |
73 | );
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/Calendar/ui/day-list/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { View } from '@tarojs/components';
3 |
4 | /** @ignore */
5 | export default class AtCalendarHeader extends React.Component {
6 | render() {
7 | return (
8 |
9 |
10 | 日
11 | 一
12 | 二
13 | 三
14 | 四
15 | 五
16 | 六
17 |
18 |
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/FloatLayout.tsx:
--------------------------------------------------------------------------------
1 | import React, { useCallback } from 'react';
2 | import classNames from 'classnames';
3 | import { View, Text, ScrollView } from '@tarojs/components';
4 | import { ScrollViewProps } from '@tarojs/components/types/ScrollView';
5 | import { AtFloatLayoutProps } from 'taro-ui/types/float-layout';
6 |
7 | import '../style/FloatLayout.scss';
8 |
9 | export interface FloatLayoutProps extends Pick, ScrollViewProps {
10 | style?: React.CSSProperties;
11 | title?: React.ReactNode;
12 | }
13 |
14 | export const FloatLayout: React.FC = (props) => {
15 | const { className, style = {}, children, title, isOpened, scrollY = true, onClose = () => {}, ...rest } = props;
16 |
17 | const handleClose = useCallback(
18 | (e) => {
19 | onClose(e);
20 | },
21 | [onClose]
22 | );
23 |
24 | const rootClass = classNames('at-float-layout', { 'at-float-layout--active': isOpened }, className);
25 |
26 | return (
27 | e.stopPropagation()}>
28 |
29 |
30 | {title ? (
31 |
32 | {title}
33 |
34 |
35 | ) : null}
36 |
37 |
38 | {children}
39 |
40 |
41 |
42 |
43 | );
44 | };
45 |
--------------------------------------------------------------------------------
/src/Form.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Form as _Form } from '@tarojs/components';
3 | import { FormProps as _FormProps } from '@tarojs/components/types/Form';
4 | import { useThrottleCallback } from '@tarojsx/hooks/dist/useThrottleCallback';
5 |
6 | export interface FormProps extends Omit<_FormProps, 'onSubmit'> {
7 | /** OnSubmit 事件节流时间间隔, 单位: ms, 默认 500ms. */
8 | submitThrottle?: boolean | number;
9 | onSubmit?(e: React.BaseSyntheticEvent): void;
10 | }
11 |
12 | export const Form: React.FC = (props) => {
13 | const { submitThrottle, onSubmit, ...rest } = props;
14 |
15 | const handleSubmit = useThrottleCallback<_FormProps['onSubmit']>((e) => {
16 | if (!onSubmit) return;
17 |
18 | const event = e as unknown as React.BaseSyntheticEvent;
19 | if (!event.persist) event.persist = () => {};
20 |
21 | onSubmit(event);
22 | }, submitThrottle);
23 |
24 | return <_Form {...rest} onSubmit={handleSubmit} />;
25 | };
26 |
--------------------------------------------------------------------------------
/src/Grid.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import _chunk from 'lodash/chunk';
4 | import { Image, Text, View } from '@tarojs/components';
5 | import { CommonEventFunction } from '@tarojs/components/types/common';
6 | import { AtGridItem, AtGridProps } from 'taro-ui/types/grid';
7 |
8 | import { IconProps } from './Icon';
9 | import '../style/Grid.scss';
10 |
11 | export interface GridItem extends Omit {
12 | iconInfo?: IconProps;
13 | }
14 | export interface GridProps extends Omit {
15 | data: GridItem[];
16 | onClick?: CommonEventFunction<{ value: GridItem; index: number }>;
17 | }
18 |
19 | export const Grid: React.FC = (props) => {
20 | const { className, data = [], mode = 'square', columnNum = 3, hasBorder = true, onClick } = props;
21 |
22 | if (!Array.isArray(data) || data.length === 0) {
23 | return null;
24 | }
25 |
26 | const gridGroup = _chunk(data, columnNum);
27 |
28 | return (
29 |
30 | {gridGroup.map((item, i) => (
31 |
32 | {item.map((childItem, index) => (
33 | {
40 | if (!onClick) return;
41 | e.detail = {
42 | value: childItem,
43 | index,
44 | };
45 | onClick(e);
46 | }}
47 | style={{ flex: `0 0 ${100 / columnNum}%` }}
48 | >
49 |
50 |
51 |
52 | {childItem.image && (
53 |
54 | )}
55 | {childItem.iconInfo && !childItem.image && (
56 |
71 | )}
72 |
73 | {childItem.value}
74 |
75 |
76 |
77 | ))}
78 |
79 | ))}
80 |
81 | );
82 | };
83 |
--------------------------------------------------------------------------------
/src/Icon.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Taro from '@tarojs/taro';
3 | import classNames from 'classnames';
4 | import { Text, CommonEventFunction } from '@tarojs/components';
5 | import { AtIconBaseProps } from 'taro-ui/types/base';
6 |
7 | import '../style/Icon.scss';
8 |
9 | export interface IconProps extends Omit {
10 | style?: React.CSSProperties;
11 | size?: number | string;
12 | onClick?: CommonEventFunction;
13 | }
14 |
15 | export const Icon: React.FC = (props) => {
16 | const { className, style = {}, prefixClass = 'at-icon', value, color, size, ...rest } = props;
17 |
18 | const iconName = value && `${prefixClass}-${value}`;
19 | const iconStyle: React.CSSProperties = {
20 | color,
21 | ...style,
22 | };
23 | if (size) iconStyle.fontSize = Taro.pxTransform(Number(size) * 2);
24 |
25 | return ;
26 | };
27 |
--------------------------------------------------------------------------------
/src/List.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { View } from '@tarojs/components';
4 | import { AtListProps } from 'taro-ui/types/list';
5 |
6 | import '../style/List.scss';
7 |
8 | export interface ListProps extends AtListProps {
9 | className?: string;
10 | }
11 |
12 | export const List: React.FC = (props) => {
13 | const { className, hasBorder, children } = props;
14 |
15 | return {children};
16 | };
17 |
--------------------------------------------------------------------------------
/src/ListHeader.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { View } from '@tarojs/components';
4 |
5 | import { Icon, IconProps } from './Icon';
6 | import '../style/ListHeader.scss';
7 |
8 | export interface ListHeaderProps {
9 | className?: string;
10 | style?: React.CSSProperties;
11 | title: React.ReactNode;
12 | transparent?: boolean;
13 | thumb?: string;
14 | iconInfo?: IconProps;
15 | iconType?: string;
16 | iconPrefixClass?: string;
17 | iconColor?: string;
18 | iconSize?: number;
19 | sticky?: boolean;
20 | top?: number | string;
21 | }
22 |
23 | export const ListHeader: React.FC = (props) => {
24 | const { className, style = {}, children, title, transparent = false, thumb, iconInfo, sticky = false, top } = props;
25 |
26 | return (
27 |
40 |
41 | {iconInfo && }
42 | {title}
43 |
44 | {children}
45 |
46 | );
47 | };
48 |
--------------------------------------------------------------------------------
/src/ListItem.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { isElement } from 'react-is';
3 | import classNames from 'classnames';
4 | import { View, Image } from '@tarojs/components';
5 | import { AtListItemProps } from 'taro-ui/types/list';
6 |
7 | import { Icon, IconProps } from './Icon';
8 | import '../style/ListItem.scss';
9 |
10 | export interface ListItemProps extends Omit {
11 | className?: string;
12 | children?: React.ReactNode;
13 | title?: React.ReactNode;
14 | iconInfo?: IconProps;
15 | thumb?: React.ReactNode;
16 | thumbCircle?: boolean;
17 | extra?: React.ReactNode;
18 | arrow?: AtListItemProps['arrow'] | 'clear';
19 | footer?: React.ReactNode;
20 | ghost?: boolean;
21 | onClear?(): any;
22 | }
23 |
24 | export const ListItem: React.FC = (props) => {
25 | const {
26 | className,
27 | children,
28 | title,
29 | thumb,
30 | thumbCircle,
31 | iconInfo = { value: '' },
32 | extra,
33 | extraText,
34 | extraThumb,
35 | arrow,
36 | note,
37 | footer,
38 | disabled,
39 | hasBorder = true,
40 | ghost,
41 | onClick,
42 | onClear,
43 | } = props;
44 |
45 | const rootClass = classNames(
46 | 'at-list__item',
47 | 'at-list__item--multiple',
48 | {
49 | 'at-list__item--thumb': thumb,
50 | 'at-list__item--thumb-circle': thumbCircle,
51 | 'at-list__item--disabled': disabled,
52 | 'at-list__item--ghost': ghost,
53 | 'at-list__item--no-border': !hasBorder,
54 | },
55 | className
56 | );
57 |
58 | return (
59 |
60 |
61 | {thumb && (
62 |
63 | {isElement(thumb) ? thumb : }
64 |
65 | )}
66 | {iconInfo.value && (
67 |
68 |
69 |
70 | )}
71 |
72 |
73 | {title}
74 | {note}
75 |
76 |
77 |
78 | {typeof extra === 'string' ? {extra} : extra}
79 | {extraThumb && !extraText && (
80 |
81 |
82 |
83 | )}
84 | {!!arrow && (
85 |
86 | {
94 | if (arrow === 'clear') {
95 | e.preventDefault();
96 | e.stopPropagation();
97 | onClear && onClear();
98 | }
99 | }}
100 | />
101 |
102 | )}
103 |
104 |
105 | {!!children && {children}}
106 |
107 | );
108 | };
109 |
--------------------------------------------------------------------------------
/src/Loading.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Taro from '@tarojs/taro';
3 | import { View } from '@tarojs/components';
4 |
5 | import '../style/Loading.scss';
6 |
7 | export interface LoadingProps {
8 | size?: string | number;
9 | color?: string | number;
10 | }
11 |
12 | export const Loading: React.FC = (props) => {
13 | const { color, size = '' } = props;
14 |
15 | const loadingSize = typeof size === 'string' ? size : String(size);
16 | const sizeStyle = {
17 | width: size ? `${Taro.pxTransform(parseInt(loadingSize))}` : '',
18 | height: size ? `${Taro.pxTransform(parseInt(loadingSize))}` : '',
19 | };
20 | const colorStyle = {
21 | border: color ? `1px solid ${color}` : '',
22 | borderColor: color ? `${color} transparent transparent transparent` : '',
23 | };
24 | const ringStyle = { ...colorStyle, ...sizeStyle };
25 |
26 | return (
27 |
28 |
29 |
30 |
31 |
32 | );
33 | };
34 |
--------------------------------------------------------------------------------
/src/Message.tsx:
--------------------------------------------------------------------------------
1 | import React, { useRef, useState, useEffect } from 'react';
2 | import Taro from '@tarojs/taro';
3 | import classNames from 'classnames';
4 | import { View } from '@tarojs/components';
5 |
6 | import '../style/Message.scss';
7 |
8 | export interface MessageProps {
9 | className?: string;
10 | style?: React.CSSProperties;
11 | }
12 |
13 | // 绑定函数
14 | Taro.atMessage = Taro.eventCenter.trigger.bind(Taro.eventCenter, 'atMessage');
15 |
16 | export const Message: React.FC = (props) => {
17 | const { className, style } = props;
18 |
19 | const timerRef = useRef();
20 | const [{ isOpened, type, message }, setState] = useState({
21 | isOpened: false,
22 | message: '',
23 | type: 'info',
24 | duration: 3000,
25 | });
26 |
27 | const atMessageHandler = (options = {} as Taro.AtMessageOptions) => {
28 | clearTimeout(timerRef.current);
29 |
30 | const { message, type, duration = 3000 } = options;
31 | setState((prev) => ({ ...prev, isOpened: true, message, type, duration }));
32 |
33 | timerRef.current = setTimeout(() => setState((prev) => ({ ...prev, isOpened: false })), duration);
34 | };
35 |
36 | useEffect(() => {
37 | Taro.eventCenter.on('atMessage', atMessageHandler);
38 |
39 | return () => {
40 | Taro.eventCenter.off('atMessage', atMessageHandler);
41 | };
42 | }, []);
43 |
44 | // TODO taro 3.0.0-beta.3 不允许子包中出现 @tarojs/runtime, link 后 runtime 中提供的 hooks 全部失效.
45 | // useDidShow(() => {
46 | // Taro.eventCenter.on('atMessage', atMessageHandler)
47 | // })
48 | // useDidHide(() => {
49 | // Taro.eventCenter.off('atMessage', atMessageHandler)
50 | // })
51 |
52 | return (
53 |
62 | {message}
63 |
64 | );
65 | };
66 |
--------------------------------------------------------------------------------
/src/Modal.tsx:
--------------------------------------------------------------------------------
1 | import React, { useCallback } from 'react';
2 | import classNames from 'classnames';
3 | import { View, ScrollView, Button } from '@tarojs/components';
4 | import { AtModalProps } from 'taro-ui/types/modal';
5 |
6 | import '../style/Modal.scss';
7 |
8 | export interface ModalProps extends Omit {
9 | style?: React.CSSProperties;
10 | title?: React.ReactNode;
11 | content?: React.ReactNode;
12 | }
13 |
14 | export const Modal: React.FC = (props) => {
15 | const {
16 | className,
17 | style = {},
18 | children,
19 | isOpened,
20 | title,
21 | content,
22 | cancelText,
23 | confirmText,
24 | closeOnClickOverlay = true,
25 | } = props;
26 |
27 | const onClose = useCallback(
28 | (e) => {
29 | props.onClose?.(e);
30 | },
31 | [props.onClose]
32 | );
33 |
34 | const onCancel = useCallback(
35 | (e) => {
36 | props.onCancel?.(e);
37 | onClose(e);
38 | },
39 | [props.onCancel, onClose]
40 | );
41 |
42 | const onConfirm = useCallback(
43 | (e) => {
44 | props.onConfirm?.(e);
45 | },
46 | [props.onConfirm]
47 | );
48 |
49 | const onClickOverlay = useCallback(
50 | (e) => {
51 | if (closeOnClickOverlay) {
52 | onClose(e);
53 | }
54 | },
55 | [closeOnClickOverlay, onClose]
56 | );
57 |
58 | const rootClass = classNames('at-modal', { 'at-modal--active': isOpened }, className);
59 |
60 | if (title || content) {
61 | return (
62 |
63 |
64 |
65 | {title && {title}}
66 | {content && (
67 |
68 | {content}
69 |
70 | )}
71 | {(cancelText || confirmText) && (
72 |
73 |
74 | {cancelText && }
75 | {confirmText && }
76 |
77 |
78 | )}
79 |
80 |
81 | );
82 | }
83 |
84 | return (
85 | e.stopPropagation()}>
86 |
87 | {children}
88 |
89 | );
90 | };
91 |
--------------------------------------------------------------------------------
/src/Progress.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { View, Text } from '@tarojs/components';
4 |
5 | import '../style/Progress.scss';
6 |
7 | export interface ProgressProps {
8 | className?: string;
9 | style?: React.CSSProperties;
10 | /** 进度 */
11 | percent?: number;
12 | /** 状态 */
13 | status?: 'progress' | 'success' | 'error';
14 | /** 颜色 */
15 | color?: string;
16 | /** 宽度 */
17 | strokeWidth?: number;
18 | /** 是否隐藏文字 */
19 | isHidePercent?: boolean;
20 | /** 过渡动画所需的时间. 默认: 0.3, 单位: 秒, 禁用可提高性能. */
21 | transitionDuration?: number;
22 | }
23 |
24 | export const Progress: React.FC = (props) => {
25 | const {
26 | className,
27 | style = {},
28 | percent: initialPercent = 0,
29 | status,
30 | color,
31 | strokeWidth,
32 | isHidePercent,
33 | transitionDuration = 0.3,
34 | } = props;
35 | const percent = Math.min(100, Math.max(0, initialPercent));
36 |
37 | const rootClass = classNames('at-progress', { [`at-progress--${status}`]: status }, className);
38 | const iconClass = classNames('at-icon', {
39 | 'at-icon-close-circle': status === 'error',
40 | 'at-icon-check-circle': status === 'success',
41 | });
42 |
43 | const progressStyle: React.CSSProperties = {
44 | width: percent && `${+percent}%`,
45 | height: strokeWidth && `${+strokeWidth}px`,
46 | backgroundColor: color,
47 | };
48 | progressStyle.transitionDuration = `${transitionDuration ?? 0}s`;
49 |
50 | return (
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | {!isHidePercent && (
59 |
60 | {!status || status === 'progress' ? `${percent}%` : }
61 |
62 | )}
63 |
64 | );
65 | };
66 |
--------------------------------------------------------------------------------
/src/Statistic.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { View, Text } from '@tarojs/components';
4 |
5 | import '../style/Statistic.scss';
6 |
7 | export interface StatisticProps {
8 | className?: string;
9 | title: React.ReactNode;
10 | value: string | number;
11 | valueStyle?: React.CSSProperties;
12 | prefix?: React.ReactNode;
13 | suffix?: React.ReactNode;
14 | }
15 |
16 | export const Statistic: React.FC = (props) => {
17 | const { className, title, value, valueStyle = {}, prefix, suffix } = props;
18 |
19 | return (
20 |
21 | {title}
22 |
23 | {!!prefix && {prefix}}
24 |
25 | {value}
26 |
27 | {!!suffix && {suffix}}
28 |
29 |
30 | );
31 | };
32 |
--------------------------------------------------------------------------------
/src/Steps.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { View, Text } from '@tarojs/components';
4 | import { AtStepsProps } from 'taro-ui/types/steps';
5 |
6 | import '../style/Steps.scss';
7 |
8 | export interface StepsProps extends Omit {
9 | style?: React.CSSProperties;
10 | items?: {
11 | title: React.ReactNode;
12 | status?: 'success' | 'error' | string;
13 | icon?: { value: string };
14 | desc?: React.ReactNode;
15 | }[];
16 | }
17 |
18 | export const Steps: React.FC = (props) => {
19 | const { className, style = {}, items, current = 0, onChange } = props;
20 |
21 | return (
22 |
23 | {items?.map((item, i) => (
24 | onChange?.(i, e as any)}
32 | >
33 |
34 | {i !== 0 && }
35 | {item.status ? (
36 |
44 | ) : (
45 |
46 | {item.icon ? (
47 |
52 | ) : (
53 | {i + 1}
54 | )}
55 |
56 | )}
57 | {i !== items.length - 1 && }
58 |
59 | {item.title}
60 | {item.desc}
61 |
62 | ))}
63 |
64 | );
65 | };
66 |
--------------------------------------------------------------------------------
/src/TabsPane.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { View } from '@tarojs/components';
4 | import { AtTabsPaneProps } from 'taro-ui/types/tabs-pane';
5 |
6 | import '../style/TabsPane.scss';
7 |
8 | export interface TabsPaneProps extends AtTabsPaneProps {
9 | style?: React.CSSProperties;
10 | }
11 |
12 | export const TabsPane: React.FC = (props) => {
13 | const { className, style = {}, children, tabDirection = 'horizontal', index = 0, current = 0 } = props;
14 |
15 | return (
16 |
28 | {children}
29 |
30 | );
31 | };
32 |
--------------------------------------------------------------------------------
/src/Tag.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { View, CommonEventFunction } from '@tarojs/components';
4 |
5 | import '../style/Tag.scss';
6 |
7 | export interface TagProps {
8 | className?: string;
9 | style?: React.CSSProperties;
10 | type?: 'primary';
11 | size?: 'small';
12 | name?: string;
13 | circle?: boolean;
14 | active?: boolean;
15 | disabled?: boolean;
16 | onClick?: CommonEventFunction;
17 | }
18 |
19 | export const Tag: React.FC = (props) => {
20 | const { className, style, children, type, size = 'normal', circle, disabled, active, onClick } = props;
21 |
22 | return (
23 |
38 | {children}
39 |
40 | );
41 | };
42 |
--------------------------------------------------------------------------------
/src/Textarea.tsx:
--------------------------------------------------------------------------------
1 | import React, { useMemo } from 'react';
2 | import Taro from '@tarojs/taro';
3 | import classNames from 'classnames';
4 | import { View, CommonEventFunction } from '@tarojs/components';
5 | import { AtTextareaProps } from 'taro-ui/types/textarea';
6 |
7 | import { TextareaEnhance, TextareaEnhanceProps } from './TextareaEnhance';
8 | import '../style/Textarea.scss';
9 |
10 | export interface TextareaProps
11 | extends Omit,
12 | Pick {
13 | className?: string;
14 | style?: React.CSSProperties;
15 | textareaRef?: React.LegacyRef;
16 | value?: string;
17 | /** 最大输入长度,设置为 -1 的时候不限制最大长度 */
18 | maxLength?: number;
19 | onChange?: CommonEventFunction;
20 | }
21 |
22 | const ENV = Taro.getEnv();
23 |
24 | export const Textarea: React.FC = (props) => {
25 | const {
26 | className,
27 | style = {},
28 | textareaRef,
29 | value = '',
30 | cursorSpacing = 100,
31 | placeholderClass,
32 | count = true,
33 | autoFocus,
34 | textOverflowForbidden = true,
35 | height,
36 | onChange,
37 | ...rest
38 | } = props;
39 | const maxlength = props.maxlength ?? props.maxLength ?? 200;
40 |
41 | const actualMaxLength = useMemo(
42 | () => (textOverflowForbidden ? maxlength : maxlength + 500),
43 | [maxlength, textOverflowForbidden]
44 | );
45 | const textareaStyle = height ? { height: Taro.pxTransform(Number(height)) } : {};
46 | const rootCls = classNames(
47 | 'at-textarea',
48 | `at-textarea--${ENV}`,
49 | {
50 | 'at-textarea--error': maxlength < value.length,
51 | },
52 | className
53 | );
54 | const placeholderCls = classNames('placeholder', placeholderClass);
55 |
56 | return (
57 |
58 |
71 | {count && (
72 |
73 | {value.length}/{maxlength}
74 |
75 | )}
76 |
77 | );
78 | };
79 |
--------------------------------------------------------------------------------
/src/TextareaEnhance.tsx:
--------------------------------------------------------------------------------
1 | import React, { useRef, useCallback } from 'react';
2 | import { Textarea } from '@tarojs/components';
3 | import { TextareaProps } from '@tarojs/components/types/Textarea';
4 |
5 | export interface TextareaEnhanceProps extends TextareaProps {
6 | /**
7 | * OnBlur/onConfirm 事件也会触发 onChange. 如果 value 与最后一次 onChange 事件相同则跳过.
8 | *
9 | * @default true
10 | */
11 | mergeChangeEvent?: boolean;
12 | }
13 |
14 | /**
15 | * Textarea 升级版.
16 | *
17 | * - MergeChangeEvent onBlur/onConfirm 事件也会触发 onChange.
18 | *
19 | * 某些输入法(不只是中文), 输入中的文字并没有真正进入 Textarea 中, 只是浮动在上面的输入法自带 UI 控件. 另一些中文输入法会在词语联想过程中提前把拼音输入进输入框内. 这两种情况都会造成 onInput
20 | * 事件不触发或传递错误的值. Textarea 组件的 onBlur/onConfirm 事件中汇报的值永远是正确的最终值.
21 | */
22 | export const TextareaEnhance: React.FC = (props) => {
23 | const { mergeChangeEvent = true, onInput, onBlur, onConfirm, ...rest } = props;
24 |
25 | /** 上一个输入值 */
26 | const previousInputValue = useRef(props.value);
27 |
28 | const handleInput = useCallback(
29 | (e) => {
30 | // 记录新值
31 | previousInputValue.current = e.detail.value;
32 | onInput && onInput(e);
33 | },
34 | [onInput]
35 | );
36 |
37 | const handleBlur = useCallback(
38 | (e) => {
39 | // 如果丢失焦点时的值与上一个值不同, 先触发 onInput
40 | if (onInput && mergeChangeEvent && e.detail.value !== previousInputValue.current) {
41 | onInput({ ...e, detail: { ...e.detail, keyCode: 0 } });
42 | }
43 | onBlur && onBlur(e);
44 | },
45 | [onInput, onBlur, mergeChangeEvent]
46 | );
47 |
48 | const handleConfirm = useCallback(
49 | (e) => {
50 | // 如果点击"完成"绿按钮时的值与上一个值不同, 先触发 onInput
51 | if (onInput && mergeChangeEvent && e.detail.value !== previousInputValue.current) {
52 | onInput({ ...e, detail: { ...e.detail, keyCode: 0, cursor: 0 } });
53 | }
54 | onConfirm && onConfirm(e);
55 | },
56 | [onInput, onConfirm, mergeChangeEvent]
57 | );
58 |
59 | return ;
60 | };
61 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 主入口
3 | *
4 | * @packageDocumentation
5 | */
6 |
7 | export * from './ActionSheet';
8 | export * from './ActivityIndicator';
9 | export * from './Avatar';
10 | export * from './Badge';
11 | export * from './Button';
12 | export * from './Calendar';
13 | export * from './CustomTabBar';
14 | export * from './FloatLayout';
15 | export * from './Form';
16 | export * from './Grid';
17 | export * from './Icon';
18 | export * from './ImagePicker';
19 | export * from './Input';
20 | export * from './InputNumber';
21 | export * from './List';
22 | export * from './ListHeader';
23 | export * from './ListItem';
24 | export * from './Message';
25 | export * from './Modal';
26 | export * from './Progress';
27 | export * from './SearchBar';
28 | export * from './Statistic';
29 | export * from './Steps';
30 | export * from './TabBar';
31 | export * from './Tabs';
32 | export * from './TabsPane';
33 | export * from './Tag';
34 | export * from './Textarea';
35 |
--------------------------------------------------------------------------------
/src/taro-ui.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Taro-ui 兼容入口, 带 `At` 前缀.
3 | *
4 | * @packageDocumentation
5 | */
6 |
7 | export {
8 | ActionSheet as AtActionSheet,
9 | ActionSheetProps as AtActionSheetProps,
10 | ActivityIndicator as AtActivityIndicator,
11 | ActivityIndicatorProps as AtActivityIndicatorProps,
12 | Avatar as AtAvatar,
13 | AvatarProps as AtAvatarProps,
14 | Badge as AtBadge,
15 | BadgeProps as AtBadgeProps,
16 | Button as AtButton,
17 | ButtonProps as AtButtonProps,
18 | Calendar as AtCalendar,
19 | CustomTabBar as AtCustomTabBar,
20 | FloatLayout as AtFloatLayout,
21 | FloatLayoutProps as AtFloatLayoutProps,
22 | Form as AtForm,
23 | FormProps as AtFormProps,
24 | Grid as AtGrid,
25 | GridProps as AtGridProps,
26 | GridItem as AtGridItem,
27 | Icon as AtIcon,
28 | IconProps as AtIconProps,
29 | ImagePicker as AtImagePicker,
30 | ImagePickerProps as AtImagePickerProps,
31 | Input as AtInput,
32 | InputProps as AtInputProps,
33 | InputNumber as AtInputNumber,
34 | InputNumberProps as AtInputNumberProps,
35 | List as AtList,
36 | ListProps as AtListProps,
37 | ListHeader as AtListHeader,
38 | ListHeaderProps as AtListHeaderProps,
39 | ListItem as AtListItem,
40 | ListItemProps as AtListItemProps,
41 | Message as AtMessage,
42 | MessageProps as AtMessageProps,
43 | Modal as AtModal,
44 | ModalProps as AtModalProps,
45 | Progress as AtProgress,
46 | ProgressProps as AtProgressProps,
47 | SearchBar as AtSearchBar,
48 | SearchBarProps as AtSearchBarProps,
49 | Statistic as AtStatistic,
50 | StatisticProps as AtStatisticProps,
51 | Steps as AtSteps,
52 | StepsProps as AtStepsProps,
53 | TabBar as AtTabBar,
54 | TabBarProps as AtTabBarProps,
55 | Tabs as AtTabs,
56 | TabsProps as AtTabsProps,
57 | TabsPane as AtTabsPane,
58 | TabsPaneProps as AtTabsPaneProps,
59 | Tag as AtTag,
60 | TagProps as AtTagProps,
61 | Textarea as AtTextarea,
62 | TextareaProps as AtTextareaProps,
63 | } from './index';
64 |
--------------------------------------------------------------------------------
/style/ActionSheet.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/action-sheet.scss';
2 |
--------------------------------------------------------------------------------
/style/ActivityIndicator.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/activity-indicator.scss';
2 | @import '~taro-ui/dist/style/components/loading.scss';
3 |
--------------------------------------------------------------------------------
/style/Avatar.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/avatar.scss';
2 |
3 | $at-avatar-size-xxs: 48px !default;
4 | $at-avatar-size-xs: 56px !default;
5 |
6 | .at-avatar {
7 | &--tiny {
8 | width: $at-avatar-size-xxs;
9 | height: $at-avatar-size-xxs;
10 | font-size: $at-avatar-size-xxs / 2.5;
11 | line-height: $at-avatar-size-xxs;
12 | }
13 | &--mini {
14 | width: $at-avatar-size-xs;
15 | height: $at-avatar-size-xs;
16 | font-size: $at-avatar-size-xs / 2.5;
17 | line-height: $at-avatar-size-xs;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/style/Badge.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/badge.scss';
2 |
--------------------------------------------------------------------------------
/style/Button.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/variables/default.scss';
2 | @import '~taro-ui/dist/style/components/button.scss';
3 | @import '~taro-ui/dist/style/components/fab.scss';
4 |
5 | .at-button {
6 | &__transparent {
7 | position: relative;
8 |
9 | button {
10 | position: absolute;
11 | top: 0;
12 | left: 0;
13 | width: 100%;
14 | height: 100%;
15 | opacity: 0;
16 | }
17 | }
18 |
19 | &__mini {
20 | display: flex;
21 | align-items: center;
22 |
23 | &__icon {
24 | padding-right: 12px;
25 | }
26 |
27 | &_primary {
28 | color: $color-brand;
29 | }
30 |
31 | &_secondary {
32 | color: $color-brand;
33 | }
34 |
35 | &_success {
36 | color: $color-success;
37 | }
38 |
39 | &_warn {
40 | color: $color-warning;
41 | }
42 |
43 | &_error {
44 | color: $color-error;
45 | }
46 | }
47 |
48 | // &_primary {
49 | // color: $color-white;
50 | // background-color: $color-brand;
51 | // }
52 |
53 | // &_secondary {
54 | // color: $color-brand;
55 | // }
56 |
57 | &_success {
58 | color: $color-white;
59 | background-color: $color-success;
60 | }
61 |
62 | &_warn {
63 | color: $color-white;
64 | background-color: $color-warning;
65 | }
66 |
67 | &_error {
68 | color: $color-white;
69 | background-color: $color-error;
70 | }
71 |
72 | &_disabled {
73 | opacity: $opacity-disabled;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/style/Calendar.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/calendar.scss';
2 |
--------------------------------------------------------------------------------
/style/FloatLayout.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/float-layout.scss';
2 |
--------------------------------------------------------------------------------
/style/Grid.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/grid.scss';
2 |
--------------------------------------------------------------------------------
/style/Icon.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/variables/default.scss';
2 | @import '~taro-ui/dist/style/components/icon.scss';
3 |
4 | .at-icon {
5 | font-size: 24px * $hd;
6 | }
7 |
--------------------------------------------------------------------------------
/style/ImagePicker.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/image-picker.scss';
2 | // @import '~taro-ui/dist/style/components/icon.scss';
3 |
--------------------------------------------------------------------------------
/style/Input.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/input.scss';
2 | @import '~taro-ui/dist/style/components/icon.scss';
3 |
4 | .at-input {
5 | // padding: 24px 0;
6 | margin-left: 24px;
7 |
8 | &__input {
9 | text-align: right;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/style/InputNumber.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/input-number.scss';
2 | @import '~taro-ui/dist/style/components/icon.scss';
3 |
--------------------------------------------------------------------------------
/style/List.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/list.scss';
2 |
--------------------------------------------------------------------------------
/style/ListHeader.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/variables/default.scss';
2 |
3 | .at-list-header {
4 | display: flex;
5 | justify-content: space-between;
6 | align-items: center;
7 | height: 100px;
8 | padding: 0 30px;
9 | // background: #f8f8f8;
10 |
11 | &__text {
12 | display: inline-block;
13 | // margin-top: 32px;
14 | color: #6a6a6a;
15 | line-height: 36px;
16 | padding-left: 24px;
17 | border-left: 4px solid $color-brand;
18 | font-size: 28px;
19 | }
20 |
21 | &__right {
22 | // float: right;
23 | color: #999;
24 | font-size: 26px;
25 | white-space: nowrap;
26 | line-height: 36px;
27 | }
28 |
29 | &.list-header--icon {
30 | .at-list-header__text {
31 | border: none;
32 | padding-left: 0;
33 | }
34 | }
35 |
36 | &.list-header--text {
37 | .at-list-header__text {
38 | border: none;
39 | padding-left: 0;
40 | }
41 | }
42 |
43 | &.list-header--transparent {
44 | background: transparent;
45 |
46 | .at-list-header__text {
47 | border: none;
48 | padding-left: 0;
49 | }
50 | }
51 |
52 | &.list-header--thumb {
53 | .at-list-header__text {
54 | border: none;
55 | padding-left: 0;
56 | }
57 | }
58 |
59 | &.list-header--filter {
60 | .at-list-header__text {
61 | border: none;
62 | padding-left: 0;
63 | margin-top: 20px;
64 | }
65 | }
66 | }
67 |
68 | .at-list-header--one {
69 | .at-list-header__right {
70 | margin-top: 34px;
71 | }
72 | }
73 |
74 | .at-list-header--two {
75 | .at-list-header__right {
76 | margin-top: 14px;
77 | }
78 | }
79 |
80 | .at-list-header--sticky {
81 | position: sticky;
82 | position: -webkit-sticky;
83 | top: 0;
84 | left: 0;
85 | z-index: $zindex-divider;
86 | }
87 |
88 | .at-list-header--top-0 {
89 | top: 0;
90 | }
91 |
92 | .at-list-header--top-180 {
93 | top: 180px;
94 | }
95 |
96 | .at-list-header--top-80 {
97 | top: 80px;
98 | }
99 |
--------------------------------------------------------------------------------
/style/ListItem.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/variables/default.scss';
2 | @import '~taro-ui/dist/style/components/list.scss';
3 | @import './utils.scss';
4 |
5 | .at-list {
6 | &__item {
7 | // width: 100vw;
8 | // overflow: hidden;
9 |
10 | &--ghost {
11 | .at-list__item-thumb,
12 | .at-list__item-icon,
13 | .at-list__item-content {
14 | opacity: $opacity-disabled;
15 | }
16 | }
17 |
18 | &--thumb-circle {
19 | .item-thumb__info {
20 | border-radius: 50%;
21 | }
22 | }
23 |
24 | .item-extra {
25 | &__icon {
26 | .at-icon-close {
27 | @include hit-slop(300%, 260%);
28 |
29 | transform: scale(0.7);
30 | font-weight: bold;
31 | }
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/style/Loading.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/loading.scss';
2 |
--------------------------------------------------------------------------------
/style/Message.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/message.scss';
2 |
--------------------------------------------------------------------------------
/style/Modal.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/modal.scss';
2 |
--------------------------------------------------------------------------------
/style/Progress.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/progress.scss';
2 | @import '~taro-ui/dist/style/components/icon.scss';
3 |
--------------------------------------------------------------------------------
/style/SearchBar.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/search-bar.scss';
2 | @import '~taro-ui/dist/style/components/button.scss';
3 | @import '~taro-ui/dist/style/components/icon.scss';
4 |
--------------------------------------------------------------------------------
/style/Statistic.scss:
--------------------------------------------------------------------------------
1 | .at-statistic {
2 | line-height: 1.5;
3 |
4 | &__title {
5 | margin-bottom: 8px;
6 | color: rgba(0, 0, 0, 0.45);
7 | font-size: 24px;
8 | }
9 |
10 | &__content {
11 | color: rgba(0, 0, 0, 0.85);
12 | font-size: 48px;
13 |
14 | // &__value {
15 | // }
16 |
17 | &__prefix {
18 | display: inline-block;
19 | margin-right: 8px;
20 | }
21 |
22 | &__suffix {
23 | display: inline-block;
24 | margin-left: 8px;
25 | font-size: 32px;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/style/Steps.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/steps.scss';
2 | @import '~taro-ui/dist/style/components/icon.scss';
3 |
--------------------------------------------------------------------------------
/style/TabBar.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/tab-bar.scss';
2 | @import '~taro-ui/dist/style/components/badge.scss';
3 | @import '~taro-ui/dist/style/components/icon.scss';
4 |
--------------------------------------------------------------------------------
/style/Tabs.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/tabs.scss';
2 |
3 | .at-tabs {
4 | &__header {
5 | z-index: $zindex-tab;
6 |
7 | &_fixed {
8 | position: fixed !important;
9 | }
10 | }
11 |
12 | &__body {
13 | &_fixed {
14 | padding-top: 90px;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/style/TabsPane.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/tabs.scss';
2 |
--------------------------------------------------------------------------------
/style/Tag.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/tag.scss';
2 |
--------------------------------------------------------------------------------
/style/Textarea.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/components/textarea.scss';
2 |
--------------------------------------------------------------------------------
/style/index.scss:
--------------------------------------------------------------------------------
1 | @import './ActionSheet.scss';
2 | @import './ActivityIndicator.scss';
3 | @import './Avatar.scss';
4 | @import './Badge.scss';
5 | @import './Button.scss';
6 | @import './Calendar.scss';
7 | @import './FloatLayout.scss';
8 | @import './Grid.scss';
9 | @import './Icon.scss';
10 | @import './ImagePicker.scss';
11 | @import './Input.scss';
12 | @import './InputNumber.scss';
13 | @import './List.scss';
14 | @import './ListHeader.scss';
15 | @import './ListItem.scss';
16 | @import './Loading.scss';
17 | @import './Message.scss';
18 | @import './Modal.scss';
19 | @import './Progress.scss';
20 | @import './SearchBar.scss';
21 | @import './Statistic.scss';
22 | @import './Steps.scss';
23 | @import './TabBar.scss';
24 | @import './Tabs.scss';
25 | @import './TabsPane.scss';
26 | @import './Tag.scss';
27 | @import './Textarea.scss';
28 |
--------------------------------------------------------------------------------
/style/mixins.scss:
--------------------------------------------------------------------------------
1 | @import '~taro-ui/dist/style/mixins';
2 |
3 | @mixin line($num: 1) {
4 | overflow: hidden;
5 | text-overflow: ellipsis;
6 |
7 | @if ($num == 1) {
8 | white-space: nowrap;
9 | } @else {
10 | display: -webkit-box;
11 | -webkit-line-clamp: $num;
12 |
13 | // 以叹号开头的注释才能逃过 postcss-loader. https://juejin.im/post/5ce4abb0518825332550c105
14 | /*! autoprefixer: ignore next */
15 | -webkit-box-orient: vertical;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/style/utils.scss:
--------------------------------------------------------------------------------
1 | // 增大点击热区
2 | @mixin hit-slop($width: 150%, $height: 150%, $preview: false) {
3 | position: relative;
4 |
5 | &:after {
6 | content: '';
7 | position: absolute;
8 | display: block;
9 | width: $width;
10 | height: $height;
11 | top: 50%;
12 | left: 50%;
13 | transform: translate(-50%, -50%);
14 |
15 | @if $preview {
16 | background-color: rgba(0, 255, 0, 0.3);
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "allowSyntheticDefaultImports": true,
7 | "esModuleInterop": true,
8 | "importsNotUsedAsValues": "remove",
9 | "resolveJsonModule": true,
10 | "lib": ["ESNext", "DOM"],
11 | "skipLibCheck": true,
12 | "importHelpers": true,
13 | "sourceMap": true,
14 | "declaration": true,
15 | "jsx": "react",
16 | "incremental": true,
17 | "rootDir": "./src",
18 | "outDir": "./dist"
19 | },
20 | "include": ["src"],
21 | "typedocOptions": {
22 | "out": "docs",
23 | "theme": "docusaurus2",
24 | "gitRevision": "v0.11.0",
25 | "disableOutputCheck": true,
26 | "excludeExternals": true,
27 | "excludeNotExported": true,
28 | "excludePrivate": true,
29 | "excludeProtected": true,
30 | "hideBreadcrumbs": true,
31 | "listInvalidSymbolLinks": true,
32 | "skipSidebar": true
33 | }
34 | }
35 |
--------------------------------------------------------------------------------