Skip to content

Commit

Permalink
1.0.30
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaoGongBra committed Jun 25, 2024
1 parent 6c4d410 commit bfc2672
Show file tree
Hide file tree
Showing 127 changed files with 7,289 additions and 7,170 deletions.
48 changes: 24 additions & 24 deletions Readme.md
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
```
10 changes: 5 additions & 5 deletions app.js
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 {}
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "duxui",
"description": "DUXUI库",
"version": "1.0.29",
"version": "1.0.30",
"dependencies": [
"duxapp"
],
Expand Down
54 changes: 54 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
# 1.0.30
## TopView
add 方法新增分组属性,多次调用add时,指定了同一个分组的元素,将会以队列的形式展示,即同时只会展示一个,当移除当前展示的内容后,会立即展示下一个
```jsx
TopView.add(element, { group: '分组' })
```
对应的以下组件都新增了此属性
- PullView
- Absolute
- Modal
当这些组件指定了相同的属性时,将会加入展示队列
```jsx
<PullView group='group'>
<Text>内容</Text>
</PullView>
<Modal show group='group'>
<Text>内容</Text>
</Modal>
<Absolute group='group'>
<Text>内容</Text>
</Absolute>
```

## confirm
- 新增 `renderTop` `renderBottom` 属性,用于自定义渲染弹窗顶部和底部的内容
- 返回的task新增 `confirm` `cancel` `close` 方法,分别用于触发确定、取消、reject
```js
try {
const task = confirm({
title: '提示',
content: '这是一个任务',
renderBottom: <Text onClick={() => task.close()}>关闭</Text>
})
const status = await task
if(status) {
console.log('用户点击了确定')
} else {
console.log('用户点击了取消')
}
} catch (error) {
console.log('用户点击了关闭')
}

```

## Calendar
新增 `enabledDate` 属性,表示可用的日期 除了传入的日期或者范围,其他的日期将被禁用,当 enabledDate 的日期在 disabledDate 里面时 此日期将不可用

## TabBar
删除不必要的 dom 节点

## ModalForms
修复设置多个值时,设置不成功

# 1.0.29

## 在UI库新增duxuiHook的渲染钩子
Expand Down
128 changes: 64 additions & 64 deletions components/Avatar/index.scss
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;
}
}
120 changes: 60 additions & 60 deletions components/Calendar/date/index.d.ts
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

Loading

0 comments on commit bfc2672

Please sign in to comment.