forked from duxapp/duxui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d795b1
commit 2b51a63
Showing
136 changed files
with
8,908 additions
and
8,084 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
# duxui | ||
|
||
兼容小程序、APP、H5的移动端ui组件库,提供了50+个组件,帮助你快速完成业务 | ||
|
||
## 安装 | ||
|
||
```bash | ||
yarn duxapp app add duxui | ||
``` | ||
|
||
此模块需要在 [duxapp 框架](https://app.docs.dux.plus) 中运行 | ||
|
||
## 示例 | ||
|
||
- 小程序 (小程序搜索 duxui) | ||
- APP https://app.share.dux.plus/com.duxapp.duxui | ||
- H5 https://example.duxui.cn | ||
|
||
## 示例代码 | ||
|
||
如需查看使用方法请安装`duxuiExample`模块查看 | ||
```bash | ||
yarn duxapp app add duxuiExample | ||
``` | ||
# duxui | ||
|
||
兼容小程序、APP、H5的移动端ui组件库,提供了50+个组件,帮助你快速完成业务 | ||
|
||
## 安装 | ||
|
||
```bash | ||
yarn duxapp app add duxui | ||
``` | ||
|
||
此模块需要在 [duxapp 框架](https://app.docs.dux.plus) 中运行 | ||
|
||
## 示例 | ||
|
||
- 小程序 (小程序搜索 duxui) | ||
- APP https://app.share.dux.plus/com.duxapp.duxui | ||
- H5 https://example.duxui.cn | ||
|
||
## 示例代码 | ||
|
||
如需查看使用方法请安装`duxuiExample`模块查看 | ||
```bash | ||
yarn duxapp app add duxuiExample | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { app } from './utils' | ||
|
||
app.register('duxui') | ||
|
||
export default {} | ||
import { app } from './utils' | ||
|
||
app.register('duxui') | ||
|
||
export default {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
{ | ||
"name": "duxui", | ||
"description": "DUXUI库", | ||
"version": "1.0.24", | ||
"version": "1.0.25", | ||
"dependencies": [ | ||
"duxapp" | ||
], | ||
"npm": { | ||
"dependencies": { | ||
"b-validate": "^1.5.2", | ||
"react-native-view-shot": "^3.8.0", | ||
"react-native-fast-shadow": "^0.1.0" | ||
"react-native-fast-shadow": "^0.1.0", | ||
"array-tree-filter": "^2.1.0" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
.Avatar { | ||
background-color: $duxuiAvatarBgColor; | ||
overflow: hidden; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
&--s { | ||
width: $duxuiAvatarSSize; | ||
height: $duxuiAvatarSSize; | ||
} | ||
&--m { | ||
width: $duxuiAvatarMSize; | ||
height: $duxuiAvatarMSize; | ||
} | ||
&--l { | ||
width: $duxuiAvatarLSize; | ||
height: $duxuiAvatarLSize; | ||
} | ||
|
||
&--round { | ||
border-radius: 120px; | ||
} | ||
|
||
&--round-min { | ||
border-radius: 6px; | ||
} | ||
|
||
&--text-color { | ||
color: $duxuiAvatarColor; | ||
} | ||
|
||
&__image { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
&__text { | ||
&--s { | ||
font-size: 24px; | ||
} | ||
&--m { | ||
font-size: 28px; | ||
} | ||
&--l { | ||
font-size: 36px; | ||
} | ||
} | ||
} | ||
.AvatarGroup { | ||
&--s { | ||
height: $duxuiAvatarSSize; | ||
} | ||
&--m { | ||
height: $duxuiAvatarMSize; | ||
} | ||
&--l { | ||
height: $duxuiAvatarLSize; | ||
} | ||
&__avatar { | ||
position: absolute; | ||
top: 0; | ||
border: 1px solid #fff; | ||
} | ||
} | ||
.Avatar { | ||
background-color: $duxuiAvatarBgColor; | ||
overflow: hidden; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
&--s { | ||
width: $duxuiAvatarSSize; | ||
height: $duxuiAvatarSSize; | ||
} | ||
&--m { | ||
width: $duxuiAvatarMSize; | ||
height: $duxuiAvatarMSize; | ||
} | ||
&--l { | ||
width: $duxuiAvatarLSize; | ||
height: $duxuiAvatarLSize; | ||
} | ||
|
||
&--round { | ||
border-radius: 120px; | ||
} | ||
|
||
&--round-min { | ||
border-radius: 6px; | ||
} | ||
|
||
&--text-color { | ||
color: $duxuiAvatarColor; | ||
} | ||
|
||
&__image { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
&__text { | ||
&--s { | ||
font-size: 24px; | ||
} | ||
&--m { | ||
font-size: 28px; | ||
} | ||
&--l { | ||
font-size: 36px; | ||
} | ||
} | ||
} | ||
.AvatarGroup { | ||
&--s { | ||
height: $duxuiAvatarSSize; | ||
} | ||
&--m { | ||
height: $duxuiAvatarMSize; | ||
} | ||
&--l { | ||
height: $duxuiAvatarLSize; | ||
} | ||
&__avatar { | ||
position: absolute; | ||
top: 0; | ||
border: 1px solid #fff; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
declare namespace date { | ||
/** 时间间隔 */ | ||
interface DateInterval { | ||
/** 年 */ | ||
y | ||
/** 月 */ | ||
m | ||
/** 日 */ | ||
d | ||
/** 星期 */ | ||
w | ||
/** 小时 */ | ||
h | ||
/** 分钟 */ | ||
n | ||
/** 秒 */ | ||
s | ||
} | ||
} | ||
|
||
/** | ||
* 日期对象转换为指定格式的字符串 | ||
* @param formatStr 日期格式,格式定义如下 yyyy-MM-dd HH:mm:ss | ||
* @param date Date日期对象或者时间戳或者带毫秒的时间戳, 如果缺省,则为当前时间 | ||
* YYYY/yyyy/YY/yy 表示年份 | ||
* MM/M 月份 | ||
* W/w 星期 | ||
* dd/DD/d/D 日期 | ||
* hh/HH/h/H 时间 | ||
* mm/m 分钟 | ||
* ss/SS/s/S 秒 | ||
* @return string 指定格式的时间字符串 | ||
*/ | ||
export function dateToStr(formatStr: string, date: Date | string | number): string | ||
|
||
/** | ||
* 日期计算 | ||
* @param strInterval 可选值 y 年 m月 d日 w星期 ww周 h时 n分 s秒 | ||
* @param num 对应数值 | ||
* @param date 日期对象 默认当前时间 | ||
* @return 返回计算后的日期对象 | ||
*/ | ||
export function dateAdd(strInterval: keyof date.DateInterval, num: number, date: Date): Date | ||
|
||
/** | ||
* 把指定格式的字符串转换为日期对象 | ||
* @param formatStr 待转换的时间的时间格式 yyyy-MM-dd HH:mm:ss | ||
* @param dateStr 待转换的时间字符串 | ||
* @return 转换后的日期对象 | ||
*/ | ||
export function strFormatToDate(formatStr: string, dateStr: string): Date | ||
|
||
/** | ||
* 返回月份的最大天数 | ||
* @param year 年 | ||
* @param month 月 | ||
* @return 当前月的最大天数 | ||
*/ | ||
export function getMaxDay(year: number, month: number): number | ||
|
||
declare namespace date { | ||
/** 时间间隔 */ | ||
interface DateInterval { | ||
/** 年 */ | ||
y | ||
/** 月 */ | ||
m | ||
/** 日 */ | ||
d | ||
/** 星期 */ | ||
w | ||
/** 小时 */ | ||
h | ||
/** 分钟 */ | ||
n | ||
/** 秒 */ | ||
s | ||
} | ||
} | ||
|
||
/** | ||
* 日期对象转换为指定格式的字符串 | ||
* @param formatStr 日期格式,格式定义如下 yyyy-MM-dd HH:mm:ss | ||
* @param date Date日期对象或者时间戳或者带毫秒的时间戳, 如果缺省,则为当前时间 | ||
* YYYY/yyyy/YY/yy 表示年份 | ||
* MM/M 月份 | ||
* W/w 星期 | ||
* dd/DD/d/D 日期 | ||
* hh/HH/h/H 时间 | ||
* mm/m 分钟 | ||
* ss/SS/s/S 秒 | ||
* @return string 指定格式的时间字符串 | ||
*/ | ||
export function dateToStr(formatStr: string, date: Date | string | number): string | ||
|
||
/** | ||
* 日期计算 | ||
* @param strInterval 可选值 y 年 m月 d日 w星期 ww周 h时 n分 s秒 | ||
* @param num 对应数值 | ||
* @param date 日期对象 默认当前时间 | ||
* @return 返回计算后的日期对象 | ||
*/ | ||
export function dateAdd(strInterval: keyof date.DateInterval, num: number, date: Date): Date | ||
|
||
/** | ||
* 把指定格式的字符串转换为日期对象 | ||
* @param formatStr 待转换的时间的时间格式 yyyy-MM-dd HH:mm:ss | ||
* @param dateStr 待转换的时间字符串 | ||
* @return 转换后的日期对象 | ||
*/ | ||
export function strFormatToDate(formatStr: string, dateStr: string): Date | ||
|
||
/** | ||
* 返回月份的最大天数 | ||
* @param year 年 | ||
* @param month 月 | ||
* @return 当前月的最大天数 | ||
*/ | ||
export function getMaxDay(year: number, month: number): number | ||
Oops, something went wrong.