Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.1 #1868

Merged
merged 25 commits into from
Apr 4, 2023
Merged

1.1.1 #1868

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7275ed2
docs: update custom theme
LeeJim Mar 22, 2023
9b0c82a
新增layout布局 (#1821)
wuping97 Mar 22, 2023
b637569
build: update issue label workflow
LeeJim Mar 22, 2023
100d6d7
Docs/layout (#1822)
LeeJim Mar 22, 2023
9410d26
fix: cls函数支持传入数值类型 (#1827)
wuping97 Mar 23, 2023
c2b67ed
修复 button 组件 disableb 对控制 tap 无效问题 (#1833)
wuping97 Mar 24, 2023
5d460a6
feat(search): add type prop to input component (#1828)
haochenli Mar 24, 2023
96df1ba
fix(NoticeBar): resolve scroll (#1835)
anlyyao Mar 24, 2023
4794ac0
fix(checkbox): placement name in demo is wrong (#1836)
jarmywang Mar 26, 2023
42989b3
feat(pulldownrefresh): add default value to loading-texts (#1837)
haochenli Mar 27, 2023
d6899cc
fix(pulldown-refresh): resolve external class (#1839)
LeeJim Mar 27, 2023
5d14d6d
chore: add layout on overview page
LeeJim Mar 27, 2023
7388ba0
fix(grid): resolve image class (#1842)
LeeJim Mar 27, 2023
ac541ed
fix(notice-bar): fix loop prop (#1826)
haochenli Mar 27, 2023
9bef0b2
fix(cascader): resolve options when value changed (#1841)
LeeJim Mar 27, 2023
9e97c39
fix(tabs): resolve animation and uncaught error (#1843)
LeeJim Mar 27, 2023
a932306
fix(tabs): remove scroll bar (#1844)
LeeJim Mar 27, 2023
189b00c
chore: publish v1.1.0 (#1845)
LeeJim Mar 27, 2023
c8ce114
feat(Button): add hover-class attr (#1847)
anlyyao Mar 28, 2023
e93c1e8
fix(tabs): resolve content overlay (#1853)
LeeJim Mar 29, 2023
6c98944
fix(Message): resolve marquee (#1856)
anlyyao Apr 3, 2023
65bac2c
fix(avatar): resolve "bordered" is overwritten warning (#1849) (#1858)
jarmywang Apr 3, 2023
9ae39a8
fix(drawer): resolve destroyOnClose error (#1864)
jarmywang Apr 3, 2023
a899fea
chore: publish v1.1.1 (#1867)
LeeJim Apr 3, 2023
a6870b7
Merge branch 'main' into develop
LeeJim Apr 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ toc: false
docClass: timeline
---

## 🌈 1.1.1 `2023-04-03`
### 🚀 Features
- `Button`: 新增 hover-class 属性 @anlyyao ([#1847](https://github.com/Tencent/tdesign-miniprogram/pull/1847))
### 🐞 Bug Fixes
- `Tabs`: 解决内容重叠的问题 @LeeJim ([#1853](https://github.com/Tencent/tdesign-miniprogram/pull/1853))
- `Message`: 处理 `loop` 产生的控制台告警 @anlyyao ([#1856](https://github.com/Tencent/tdesign-miniprogram/pull/1856))
- `Message`: 修复 `marquee = true` 时,滚动动画错误 @anlyyao ([#1856](https://github.com/Tencent/tdesign-miniprogram/pull/1856))
- `Avatar`: 修复控制台报错 @jarmywang ([#1858](https://github.com/Tencent/tdesign-miniprogram/pull/1858))
- `Drawer`: 修复 destroyOnClose 属性不生效 @jarmywang ([#1864](https://github.com/Tencent/tdesign-miniprogram/pull/1864))

## 🌈 1.1.0 `2023-03-27`
### 🚀 Features
- `Layout`: 新增布局组件,包含 row 和 col 组件 @wuping97 ([#1821](https://github.com/Tencent/tdesign-miniprogram/pull/1821))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-miniprogram",
"purename": "tdesign",
"version": "1.1.0",
"version": "1.1.1",
"description": "tdesign-miniprogram",
"title": "tdesign-ßminiprogram",
"main": "miniprogram_dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/avatar/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class Avatar extends SuperComponent {
classPrefix: name,
isShow: true,
zIndex: 0,
bordered: false,
borderedWithGroup: false,
};

relations: RelationsOptions = {
Expand All @@ -39,7 +39,7 @@ export default class Avatar extends SuperComponent {

this.setData({
size: this.data.size ?? parent.data.size,
bordered: true,
borderedWithGroup: true,
});
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/avatar/avatar.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
t-class-count="{{badgeProps.tClassCount}}"
>
<view
class="{{this.getClass(classPrefix, size, shape, bordered)}} {{prefix}}-class-image"
class="{{this.getClass(classPrefix, size, shape, bordered || borderedWithGroup)}} {{prefix}}-class-image"
style="{{this.getSize(size)}}"
aria-label="{{ ariaLabel || alt ||'头像'}}"
aria-role="{{ ariaRole || 'img'}}"
Expand Down
1 change: 1 addition & 0 deletions src/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ theme | String | default | 组件风格,依次为品牌色、危险色。可
type | String | - | 同小程序的 formType。可选项:submit/reset | N
variant | String | base | 按钮形式,基础、线框、文字。可选项:base/outline/dashed/text | N
open-type | String | - | 微信开放能力。<br />具体释义:<br />`contact` 打开客服会话,如果用户在会话中点击消息卡片后返回小程序,可以从 bindcontact 回调中获得具体信息,<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/customer-message.html">具体说明</a> (*小程序插件中不能使用*);<br />`share` 触发用户转发,使用前建议先阅读<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#使用指引">使用指引</a>;<br />`getPhoneNumber` 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息,<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html">具体说明</a> (*小程序插件中不能使用*);<br />`getUserInfo` 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 (*小程序插件中不能使用*);<br />`launchApp` 打开APP,可以通过 app-parameter 属性设定向 APP 传的参数<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/launchApp.html">具体说明</a>;<br />`openSetting` 打开授权设置页;<br />`feedback` 打开“意见反馈”页面,用户可提交反馈内容并上传<a href="https://developers.weixin.qq.com/miniprogram/dev/api/base/debug/wx.getLogManager.html">日志</a>,开发者可以登录<a href="https://mp.weixin.qq.com/">小程序管理后台</a>后进入左侧菜单“客服反馈”页面获取到反馈内容;<br />`chooseAvatar` 获取用户头像,可以从 bindchooseavatar 回调中获取到头像信息。<br />[小程序官方文档](https://developers.weixin.qq.com/miniprogram/dev/component/button.html)。可选项:contact/share/getPhoneNumber/getUserInfo/launchApp/openSetting/feedback/chooseAvatar | N
hover-class | String | '' | 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果 | N
hover-stop-propagation | Boolean | false | 指定是否阻止本节点的祖先节点出现点击态 | N
hover-start-time | Number | 20 | 按住后多久出现点击态,单位毫秒 | N
hover-stay-time | Number | 70 | 手指松开后点击态保留时间,单位毫秒 | N
Expand Down
2 changes: 1 addition & 1 deletion src/button/button.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
hover-stay-time="{{hoverStayTime}}"
lang="{{lang}}"
session-from="{{sessionFrom}}"
hover-class="{{disabled || loading ? '' : classPrefix + '--hover'}}"
hover-class="{{disabled || loading ? '' : (hoverClass || classPrefix + '--hover')}}"
send-message-title="{{sendMessageTitle}}"
send-message-path="{{sendMessagePath}}"
send-message-img="{{sendMessageImg}}"
Expand Down
5 changes: 5 additions & 0 deletions src/button/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ const props: TdButtonProps = {
openType: {
type: String,
},
/** 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果 */
hoverClass: {
type: String,
value: '',
},
/** 指定是否阻止本节点的祖先节点出现点击态 */
hoverStopPropagation: {
type: Boolean,
Expand Down
8 changes: 8 additions & 0 deletions src/button/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ export interface TdButtonProps {
| 'feedback'
| 'chooseAvatar';
};
/**
* 指定按钮按下去的样式类,按钮不为加载或禁用状态时有效。当 `hover-class="none"` 时,没有点击态效果
* @default ''
*/
hoverClass?: {
type: StringConstructor;
value?: string;
};
/**
* 指定是否阻止本节点的祖先节点出现点击态
* @default false
Expand Down
2 changes: 1 addition & 1 deletion src/drawer/drawer.wxml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<wxs src="../common/utils.wxs" module="_" />

<t-popup
wx:if="{{!destroyOnClose || visible}}"
style="{{_._style([style, customStyle])}}"
class="class"
bind:visible-change="visibleChange"
visible="{{visible}}"
zIndex="{{zIndex}}"
placement="{{placement == 'right' ? 'right' : 'left'}}"
showOverlay="{{showOverlay}}"
destroyOnClose="{{destroyOnClose}}"
closeOnOverlayClick="{{closeOnOverlayClick}}"
>
<view class="{{classPrefix}}">
Expand Down
11 changes: 6 additions & 5 deletions src/message/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ export default class Message extends SuperComponent {

observers = {
marquee(val) {
if (JSON.stringify(val) === '{}') {
if (JSON.stringify(val) === '{}' || JSON.stringify(val) === 'true') {
this.setData({
marquee: {
speed: 50,
loop: -1,
delay: 5000,
delay: 0,
},
});
}
Expand Down Expand Up @@ -110,11 +110,12 @@ export default class Message extends SuperComponent {

/** 检查是否需要开启一个新的动画循环 */
checkAnimation() {
if (!this.properties.marquee) {
const { marquee } = this.properties;
if (!marquee || marquee.loop === 0) {
return;
}

const speeding = this.properties.marquee.speed;
const speeding = marquee.speed;

if (this.data.loop > 0) {
this.data.loop -= 1;
Expand Down Expand Up @@ -166,7 +167,7 @@ export default class Message extends SuperComponent {

show() {
const { duration, marquee, offset } = this.properties;
this.setData({ visible: true, loop: marquee.loop });
this.setData({ visible: true, loop: marquee.loop || this.data.loop });
this.reset();
this.checkAnimation();
if (duration && duration > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/tab-panel/tab-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class TabPanel extends SuperComponent {
render(active: Boolean, parent: any) {
this.setData({
active,
hide: !parent.animated && !active,
hide: !parent.data.animation && !active,
});
}
}