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.12 #2181

Merged
merged 153 commits into from
Jul 12, 2023
Merged

1.1.12 #2181

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
cdc817f
fix(loading): resolve style error (#1873)
Cyrus97 Apr 10, 2023
c460d4a
feat: empty的文案添加换行 (#1870)
favouredddd Apr 10, 2023
aafa112
fix(button): 修复[button] type="submit"时,disabled未生效 (#1878)
bitjian Apr 10, 2023
432ea8b
style(row): row垂直居中样式 (#1866)
tomcat-hz Apr 10, 2023
9288e4c
fix(progress): 安卓机朗读异常 & 动态朗读 (#1354)
yaogengzhu Apr 10, 2023
8da37b5
feature/swiper aria v2 (#1598)
zhangpaopao0609 Apr 10, 2023
dedcb82
docs: update custom theme
LeeJim Apr 11, 2023
765e185
fix(radio): resolve style (#1889)
LeeJim Apr 11, 2023
ff19036
feat: 支持分割线组件的线条使用变量控制属性 (#1890)
favouredddd Apr 12, 2023
962fe6e
fix(action-sheet): resolve ts error of show method (#1907)
LeeJim Apr 17, 2023
2e8d6c3
fix(grid): 修复column>=4个时,--td-grid-item-image-width和--td-grid-item-te…
lolhezihehe Apr 17, 2023
d4cecc3
chore: update _common (#1902)
anlyyao Apr 17, 2023
4ac3280
feat: 支持radio的内容字体大小使用变量。 (#1895)
favouredddd Apr 17, 2023
b8bed5b
Bitjian fix/radio icon size (#1909)
LeeJim Apr 17, 2023
12bbeae
chore: publish v1.1.2 (#1910)
LeeJim Apr 17, 2023
680725e
fix(rate): 评分组件支持无障碍滑动 (#1574)
byq1213 Apr 18, 2023
6fc6f06
build: remove preview workflow tentatively
LeeJim Apr 18, 2023
f1e78af
fix(upload): resolve max (#1914)
LeeJim Apr 19, 2023
769fef3
fix(navbar): resolve capsule zindex (#1920)
LeeJim Apr 23, 2023
8f1c734
chore: update site
LeeJim Apr 25, 2023
9b150bc
fix(button): 修复variant=outline等状态下loading不展示 (#1922)
lolhezihehe Apr 25, 2023
1737ab5
fix(navbar): resolve vertical align (#1926)
LeeJim Apr 25, 2023
f78e01f
fix(dropdown-menu): support multiple column radio (#1927)
LeeJim Apr 25, 2023
75c87bf
fix(Link): resolve disabled problem (#1928)
anlyyao Apr 25, 2023
066fe08
fix(calendar): resolve error (#1930)
LeeJim Apr 26, 2023
b15175d
fix(tabs): resolve content overflow (#1931)
LeeJim Apr 26, 2023
2971200
chore: update issue template
LeeJim Apr 26, 2023
e057915
fix(Input): resolve vertical layout style error (#1934)
anlyyao Apr 26, 2023
32617d7
feat(collapse): add header-left-icon property (#1933)
LeeJim Apr 26, 2023
5443109
feat(tabs): add middle slot (#1936)
LeeJim Apr 26, 2023
4f7c16b
chore: publish v1.1.3 (#1937)
LeeJim Apr 26, 2023
292fd25
Merge branch 'main' into develop
LeeJim Apr 27, 2023
c4c5c5f
fix(slider): enable dragstart and dragend event (#1940)
LeeJim Apr 27, 2023
348ba4c
fix(image-viewer): add using-custom-navation property (#1944)
LeeJim Apr 28, 2023
c977ec5
feat(Swiper): update api docs (#1945)
anlyyao Apr 28, 2023
049edc7
fix(picker): enable to using falsy value (#1948)
LeeJim Apr 29, 2023
20f4899
fix(toast): auto hide when page is hide (#1947)
LeeJim Apr 29, 2023
7f05e3b
feat(swiper): add image-load event (#1949)
LeeJim May 1, 2023
e1e7aa7
chore: publish v1.1.4 (#1950)
LeeJim May 1, 2023
d7d5b45
Merge branch 'main' into develop
LeeJim May 1, 2023
e3ba571
docs(picker): enrich api detail (#1956)
LeeJim May 4, 2023
2a83725
fix(tabs): resolve track position (#1958)
LeeJim May 4, 2023
6fe5ae9
feat(pulldown-refresh): add some properties from scroll-view (#1959)
LeeJim May 4, 2023
3577c0a
feat(loading): support indicator slot
LeeJim May 4, 2023
482264c
test: update snapshot
LeeJim May 4, 2023
c7c153d
fix(pulldown-refresh): resolve value (#1960)
LeeJim May 5, 2023
ab51f1b
feat(datetime-picker): support steps property (#1961)
LeeJim May 5, 2023
10fd22b
feat(steps): add sequence property (#1962)
LeeJim May 5, 2023
0cfca34
feat(dropdown-menu): add css variable for border width (#1967)
LeeJim May 6, 2023
2c2b6c5
feat(Stepper): allow input to be empty (#1971)
anlyyao May 6, 2023
0ffbd27
fix(calendar): enable scroll into view when use-popup is false (#1969)
LeeJim May 8, 2023
76d7669
chore(image-viewer): update demo (#1968)
LeeJim May 8, 2023
d512d01
chore: publish v1.1.5 (#1975)
LeeJim May 8, 2023
a521ef8
Merge branch 'main' into develop
LeeJim May 8, 2023
6457944
docs(badge): update api
LeeJim May 10, 2023
3c15af0
fix(navbar): Fix invalid fixed attribute of Navbar component (#1982)
betavs May 11, 2023
2d13cc6
feat(Icon): update icon from 0.1.2 to 0.1.4 (#1979)
anlyyao May 11, 2023
3639313
Feat/picker-zindex (#1985)
favouredddd May 11, 2023
8b3bc0f
fix(DropdownMenu): auto scroll to current (#1788) (#1981)
jarmywang May 11, 2023
87bd5e6
feat: 添加支持date-picker的蒙层属性透 (#1991)
favouredddd May 12, 2023
27016c4
feat(Slider): the step attribute supports decimals (#1990)
anlyyao May 12, 2023
112934b
chore: publish v1.1.5-beta
LeeJim May 12, 2023
68d51a0
fix(pulldown-refresh): resolve refresh event
LeeJim May 15, 2023
a3a89c5
fix: 修复variant动态修改无效
favouredddd May 15, 2023
eac3b78
feat(Grid): enrich demo (#1993)
anlyyao May 15, 2023
9fb1d70
feat(Input): resolve label content wraps (#1994)
anlyyao May 15, 2023
657a6b8
docs(Steps): remove invalid attributes (#1995)
anlyyao May 15, 2023
e15895e
fix(pulldown-refresh): resolve refresh event (#1998)
LeeJim May 15, 2023
12dc34e
Merge branch 'fix/button_variant' of github.com:favouredddd/tdesign-m…
LeeJim May 15, 2023
06cacd2
fix: fix [下拉菜单] 单选选项行高不一致 #1980 (#1992)
bitjian May 15, 2023
c963d3a
feat: action-sheet支持层级 (#2002)
favouredddd May 15, 2023
720478a
fix: 修复多余 row 的样式导致 col 不换行问题 (#1996)
wuping97 May 15, 2023
5b32707
fix(dialog): display of cancel and confirm button when calling a comm…
yuchumian May 15, 2023
6438cf7
fix(calendar): enable calendar type (#2003)
LeeJim May 15, 2023
a0e578b
chore: publish v1.1.6 (#2004)
LeeJim May 15, 2023
70c9d31
Merge branch 'main' into develop
LeeJim May 15, 2023
562673d
chore(ActionSheet): prohibit exporting components at index (#2008)
anlyyao May 16, 2023
5869e01
feat: action-sheet支持cancel的颜色变量 (#2007)
favouredddd May 17, 2023
bc1b1c5
fix(sticky): resolve width (#2012)
LeeJim May 17, 2023
d0a2a61
fix(side-bar-item): fix prefix and suffix style anomalies (#2011)
betavs May 17, 2023
66f7ad0
fix(tabbar): resolve width when virtual-host not available (#2013)
LeeJim May 17, 2023
2ed0bfb
chore: publish v1.1.6-beta
LeeJim May 17, 2023
1891f5c
build: update npm publish
LeeJim May 18, 2023
3cf740b
fix(action-sheet): resolve invalid syntax
LeeJim May 18, 2023
20dbd73
fix(Icon): rename some icons (#2020)
anlyyao May 23, 2023
cb9cb36
chore: publish v1.1.7 (#2031)
LeeJim May 23, 2023
0eb8f6a
Merge branch 'main' into develop
LeeJim May 24, 2023
8ca7590
feat(Textarea): support max/min height (#2035)
anlyyao May 30, 2023
cf355d1
fix: rename proposal to transform and display installation dependenci…
zhangpaopao0609 May 30, 2023
a828676
fix(DropdownMenu): resolved the basic library cannot be used under ve…
anlyyao May 30, 2023
588e4e3
fix(Sticky): resolved width problem (#2047)
anlyyao May 30, 2023
24f7b18
fix(navbar): polish bg support (#2049)
LeeJim May 30, 2023
43dbad6
fix(drawer): resolve word misspelling (#2039)
ElanYoung May 30, 2023
f570486
fix(image): enable dynamic dimension (#2050)
LeeJim May 30, 2023
8529327
chore: publish v1.1.8 (#2051)
LeeJim May 30, 2023
6520232
Merge branch 'main' into develop
LeeJim May 31, 2023
aac30fd
fix(indexes): 索引导航无法选中问题 (#2036)
lolhezihehe Jun 1, 2023
5c397a3
feat(switch): prevent click when the switch component props loading i…
betavs Jun 5, 2023
e276138
feat(checkbox): 自定义图标增加半选中态 (#2056)
lolhezihehe Jun 5, 2023
d6f34fc
feat(Search): support cursor-spacing attr (#2065)
anlyyao Jun 6, 2023
5794711
fix(Switch): resolved loading state style (#2074)
anlyyao Jun 8, 2023
7dcf574
fix(Icon): resolved icon naming error (#2076)
anlyyao Jun 9, 2023
20b4908
fix(tree-select): enable keys property (#2085)
LeeJim Jun 12, 2023
ab16f53
fix(radio-group): fix abnormal display of radio group selection statu…
betavs Jun 12, 2023
162b1c9
docs(slider): add faq part
LeeJim Jun 12, 2023
601d650
fix(CellGroup): resolved borderen invalid (#2089)
anlyyao Jun 13, 2023
7b7acc4
chore: publish v1.1.9 (#2091)
LeeJim Jun 13, 2023
5caf7f8
Merge branch 'main' into develop
LeeJim Jun 13, 2023
bf30f2a
feat(notice-bar): add interval property when direction='vertical'
betavs Jun 16, 2023
20e5461
test(notice-bar): add interval property when direction='vertical'
betavs Jun 16, 2023
6ae343f
fix(Grid): resolved align='laft' valid (#2110)
anlyyao Jun 20, 2023
97a9bfc
fix(Fab): resolved hover-class invalid (#2093)
anlyyao Jun 20, 2023
551f3f3
Merge pull request #2097 from betavs/feature/notice-bar
anlyyao Jun 20, 2023
cfb629f
fix(upload): fix abnormal image display (#2098)
betavs Jun 20, 2023
7677300
feat(tabs): add split property (#2113)
LeeJim Jun 20, 2023
3bcf5d7
fix(slider): fix abnormal calculation of slider mark (#2114)
betavs Jun 20, 2023
d8324c3
fix(Input): resolve value=0 is valid when type is number (#2108)
anlyyao Jun 20, 2023
6092abb
fix(slider): enable async render (#2115)
LeeJim Jun 20, 2023
f7fa258
fix: add type check before call pagescroll (#2116)
LeeJim Jun 20, 2023
f27a96f
build: remove issue assign logic
LeeJim Jun 20, 2023
7919521
fix(action-sheet): do not trigger close event when disabled (#2117)
LeeJim Jun 20, 2023
0687641
fix(stepper): trigger change when value changed (#2118)
LeeJim Jun 20, 2023
c4b3e32
chore: publish v1.1.10 (#2119)
LeeJim Jun 20, 2023
3767d36
Merge branch 'main' into develop
LeeJim Jun 21, 2023
410299a
fix(tabs): fix style anomalies caused by too many tabs items (#2123)
betavs Jun 21, 2023
52b1f8b
fix(picker): fix default value is invalid (#2126)
betavs Jun 26, 2023
b40609d
feat(checkbox-group): add borderless property (#2124)
betavs Jun 26, 2023
4aab257
fix(Stepper): resolved precision problem (#2130)
anlyyao Jun 28, 2023
615d3f8
fix(radio): fix vertical align (#2135)
betavs Jun 29, 2023
729ddc3
fix(checkbox): resolve align when icon size changed (#2136)
LeeJim Jun 29, 2023
63142ee
docs(checkbox): update (#2137)
LeeJim Jun 29, 2023
c0cefc4
fix(search): catch tap event when trigger clear (#2139)
LeeJim Jun 29, 2023
8494918
docs: update used page
LeeJim Jun 30, 2023
1346534
fix(divider): replace external class (#2140)
LeeJim Jun 30, 2023
f2f9f1a
feat(radio): enable allow-uncheck (#2141)
betavs Jul 2, 2023
909dba8
fix(toast): resolve repeated event triggering (#2146)
LeeJim Jul 3, 2023
e003f2a
feat(dropdown-item): add close event (#2147)
LeeJim Jul 3, 2023
231b70e
fix: resolve console warnings (#2149)
LeeJim Jul 4, 2023
0a71e11
Update README.md (#2150)
LeeJim Jul 4, 2023
3fc323a
fix(popup): update width when placement is bottom (#2152)
LeeJim Jul 4, 2023
1bdb0cd
chore: publish v1.1.11 (#2153)
LeeJim Jul 4, 2023
10a22fb
Merge branch 'main' into develop
LeeJim Jul 4, 2023
34250f5
test: remove snapshot for virtual-host (#2161)
LeeJim Jul 6, 2023
0adead3
fix(*): resolve console warn (#2164)
betavs Jul 10, 2023
246d5a7
fix: 修复rate组件选中没有生效 (#2158)
AntzyMo Jul 10, 2023
ff11c7d
fix(rate): uncatch event (#2168)
LeeJim Jul 10, 2023
20cd8d3
feat(pull-down-refresh): 增加show-scrollbar参数 (#2163)
lolhezihehe Jul 10, 2023
9446f5f
docs(pulldown-refresh): add show-scrollbar property
LeeJim Jul 10, 2023
3082456
fix(picker): observe value (#2169)
betavs Jul 10, 2023
b623bf3
fix(tabs): enable scroll smoothly (#2170)
LeeJim Jul 10, 2023
3767aeb
fix(tree-select): enable value with empty array (#2173)
LeeJim Jul 11, 2023
6ad792d
chore: publish v1.1.12 (#2175)
LeeJim Jul 11, 2023
13b8261
Merge branch 'main' into develop
LeeJim Jul 12, 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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ toc: false
docClass: timeline
---

## 🌈 1.1.12 `2023-07-11`
### 🚀 Features
- `PullDownRefresh`: 增加 show-scrollbar 属性 @lolhezihehe ([#2163](https://github.com/Tencent/tdesign-miniprogram/pull/2163))
### 🐞 Bug Fixes
- `Rate`: 修复无法点击的问题 @AntzyMo ([#2158](https://github.com/Tencent/tdesign-miniprogram/pull/2158))
- `Rate`: 使事件冒泡至上层元素 @LeeJim ([#2168](https://github.com/Tencent/tdesign-miniprogram/pull/2168))
- `DateTimePicker`: 修复无法选择的问题 @betavs ([#2169](https://github.com/Tencent/tdesign-miniprogram/pull/2169))
- `Tabs`: 修复超出时滚动不流畅的问题 @LeeJim ([#2170](https://github.com/Tencent/tdesign-miniprogram/pull/2170))
- `TreeSelect`: 修复多选时 value 使用空数组报错的问题 @LeeJim ([#2173](https://github.com/Tencent/tdesign-miniprogram/pull/2173))
### 🚧 Others
- 移除开启 virtual-host 场景的 snapshot 测试 @LeeJim ([#2161](https://github.com/Tencent/tdesign-miniprogram/pull/2161))
- 修复控制台告警 @betavs ([#2164](https://github.com/Tencent/tdesign-miniprogram/pull/2164))

## 🌈 1.1.11 `2023-07-04`
### 🚀 Features
- `CheckboxGroup`: 新增 borderless 属性 @betavs ([#2124](https://github.com/Tencent/tdesign-miniprogram/pull/2124))
Expand Down
37 changes: 0 additions & 37 deletions jest.virtualHost.config.js

This file was deleted.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-miniprogram",
"purename": "tdesign",
"version": "1.1.11",
"version": "1.1.12",
"description": "tdesign-miniprogram",
"title": "tdesign-ßminiprogram",
"main": "miniprogram_dist/index.js",
Expand Down Expand Up @@ -31,9 +31,8 @@
"site:intranet": "cd site && vite build --mode intranet",
"site:prerender": "node script/prerender.mjs",
"cover": "jest --coverage",
"test": "jest && jest -c jest.virtualHost.config.js && jest -c jest.e2e.config.js",
"test:virtualHost": "jest -c jest.virtualHost.config.js",
"test:snap-update": "npm run test:virtualHost -- -u && npm run test:unit -- -u",
"test": "jest && jest -c jest.e2e.config.js",
"test:snap-update": "npm run test:unit -- -u",
"test:demo": "node gen-demo-test.js",
"test:unit": "jest",
"test:e2e": "jest -c jest.e2e.config.js",
Expand Down Expand Up @@ -94,7 +93,7 @@
"lodash": "^4.17.21",
"miniprogram-api-typings": "^3.4.6",
"miniprogram-automator": "^0.10.0",
"miniprogram-simulate": "^1.5.7",
"miniprogram-simulate": "^1.6.0",
"npm-run-all": "^4.1.5",
"playwright": "^1.19.1",
"prettier": "^2.0.5",
Expand Down
25 changes: 24 additions & 1 deletion script/test/setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Path from 'path';
import simulate from 'miniprogram-simulate';
import similateApi from 'miniprogram-simulate/src/api';
import { canUseVirtualHost } from '../../src/common/version';

global.getApp = () => null;
Expand All @@ -13,5 +14,27 @@ global.load = (path, demoName) => {
},
});
};

global.wx = {
...similateApi,
getSystemInfoSync: () => {
return {
SDKVersion: '2.19.1',
batteryLevel: 100,
benchmarkLevel: 1,
brand: 'devtools',
fontSizeSetting: 16,
language: 'zh_CN',
model: 'iPhone 7 Plus',
pixelRatio: 3,
platform: 'devtools',
screenHeight: 736,
screenWidth: 414,
statusBarHeight: 20,
system: 'iOS 10.0.1',
version: '6.6.3',
windowHeight: 672,
windowWidth: 414,
};
},
};
global.VIRTUAL_HOST = canUseVirtualHost();
12 changes: 0 additions & 12 deletions script/test/snapshotResolver.js

This file was deleted.

43 changes: 0 additions & 43 deletions script/test/virtualHostSetup.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/common/template/button.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
size="{{size || 'medium'}}"
variant="{{variant || 'base'}}"
open-type="{{openType || ''}}"
hover-class="{{hoverClass}}"
hover-class="{{hoverClass || ''}}"
hover-stop-propagation="{{hoverStopPropagation || false}}"
hover-start-time="{{hoverStartTime || 20}}"
hover-stay-time="{{hoverStayTime || 70}}"
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface DialogActionOptionsType {
}

const defaultOptions = {
actions: false,
actions: [],
buttonLayout: props.buttonLayout.value,
cancelBtn: props.cancelBtn.value,
closeOnOverlayClick: props.closeOnOverlayClick.value,
Expand Down
5 changes: 0 additions & 5 deletions src/message/__test__/index.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import simulate from 'miniprogram-simulate';
import path from 'path';
import similateApi from 'miniprogram-simulate/src/api';
import Message from '../index';
import * as Util from '../../common/utils';

global.wx = {
...similateApi,
};

const mockGetRect = jest.spyOn(Util, 'getRect');
mockGetRect.mockImplementation(() => {
return new Promise((resolve) => resolve({ height: 46, width: 156 }));
Expand Down
8 changes: 4 additions & 4 deletions src/navbar/__test__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports[`navbar :base 2`] = `
<t-navbar>
<wx-view
class="t-navbar t-navbar--fixed t-navbar--hide-animation class t-class"
style=""
style="--td-navbar-padding-top:20px; --td-navbar-right:94px; --td-navbar-capsule-height: 32px; --td-navbar-capsule-width: 87px; --td-navbar-height: 94px;"
>
<wx-view
class="t-navbar__placeholder"
Expand Down Expand Up @@ -75,7 +75,7 @@ exports[`navbar :base 3`] = `
<t-navbar>
<wx-view
class="t-navbar t-navbar--fixed t-navbar--hide class t-class"
style=""
style="--td-navbar-padding-top:20px; --td-navbar-right:94px; --td-navbar-capsule-height: 32px; --td-navbar-capsule-width: 87px; --td-navbar-height: 94px;"
>
<wx-view
class="t-navbar__placeholder"
Expand Down Expand Up @@ -110,7 +110,7 @@ exports[`navbar :fixed 1`] = `
<t-navbar>
<wx-view
class="t-navbar t-navbar--fixed t-navbar--visible-animation class t-class"
style=""
style="--td-navbar-padding-top:20px; --td-navbar-right:94px; --td-navbar-capsule-height: 32px; --td-navbar-capsule-width: 87px; --td-navbar-height: 94px;"
>
<wx-view
class="t-navbar__placeholder"
Expand Down Expand Up @@ -145,7 +145,7 @@ exports[`navbar :menu button 1`] = `
<t-navbar>
<wx-view
class="t-navbar t-navbar--fixed class t-class"
style="--td-navbar-padding-top:20px; --td-navbar-right:414px; --td-navbar-capsule-height: 10px; --td-navbar-capsule-width: 40px; --td-navbar-height: -10px;"
style="--td-navbar-padding-top:20px; --td-navbar-right:428px; --td-navbar-capsule-height: 10px; --td-navbar-capsule-width: 40px; --td-navbar-height: -10px;"
>
<wx-view
class="t-navbar__placeholder"
Expand Down
2 changes: 1 addition & 1 deletion src/picker/picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class Picker extends SuperComponent {
};

observers = {
visible() {
'value, visible'() {
this.updateChildren();
},
keys(obj) {
Expand Down
1 change: 1 addition & 0 deletions src/pull-down-refresh/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ lower-threshold | String / Number | 50 | `1.1.5` | N
max-bar-height | String / Number | 80 | \- | N
refresh-timeout | Number | 3000 | \- | N
scroll-into-view | String | - | `1.1.5` | N
show-scrollbar | Boolean | true | \- | N
upper-threshold | String / Number | 50 | `1.1.5` | N
value | Boolean | false | \- | N
default-value | Boolean | undefined | uncontrolled property | N
Expand Down
1 change: 1 addition & 0 deletions src/pull-down-refresh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ lower-threshold | String / Number | 50 | `1.1.5`。距底部/右边多远时,
max-bar-height | String / Number | 80 | 最大下拉高度,如果值为数字则单位是:'px' | N
refresh-timeout | Number | 3000 | 刷新超时时间 | N
scroll-into-view | String | - | `1.1.5`。值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素 | N
show-scrollbar | Boolean | true | 滚动条显隐控制 (同时开启 enhanced 属性后生效) | N
upper-threshold | String / Number | 50 | `1.1.5`。距顶部/左边多远时,触发 scrolltoupper 事件 | N
value | Boolean | false | 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态 | N
default-value | Boolean | undefined | 组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态。非受控属性 | N
Expand Down
5 changes: 5 additions & 0 deletions src/pull-down-refresh/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ const props: TdPullDownRefreshProps = {
type: String,
value: '',
},
/** 滚动条显隐控制 (同时开启 enhanced 属性后生效) */
showScrollbar: {
type: Boolean,
value: true,
},
/** 距顶部/左边多远时,触发 scrolltoupper 事件 */
upperThreshold: {
type: null,
Expand Down
1 change: 1 addition & 0 deletions src/pull-down-refresh/pull-down-refresh.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
lower-threshold="{{lowerThreshold}}"
upper-threshold="{{upperThreshold}}"
scroll-into-view="{{scrollIntoView}}"
show-scrollbar="{{showScrollbar}}"
enhanced
scroll-with-animation
bounces="{{false}}"
Expand Down
8 changes: 8 additions & 0 deletions src/pull-down-refresh/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ export interface TdPullDownRefreshProps {
type: StringConstructor;
value?: string;
};
/**
* 滚动条显隐控制 (同时开启 enhanced 属性后生效)
* @default true
*/
showScrollbar?: {
type: BooleanConstructor;
value?: boolean;
};
/**
* 距顶部/左边多远时,触发 scrolltoupper 事件
* @default 50
Expand Down
4 changes: 2 additions & 2 deletions src/rate/rate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class Rate extends SuperComponent {
methods = {
onTouch(e: WechatMiniprogram.TouchEvent, eventType: 'tap' | 'move') {
const { count, allowHalf, gap, value: currentValue, size } = this.properties;
const [touch] = e.touches;
const [touch] = e.changedTouches;
const margin = unitConvert(gap);
getRect(this, `.${name}__wrapper`).then((rect) => {
const { width, left } = rect;
Expand Down Expand Up @@ -77,7 +77,7 @@ export default class Rate extends SuperComponent {
},
onTouchMove(e: WechatMiniprogram.TouchEvent) {
this.onTouch(e, 'move');
this.showAlertText()
this.showAlertText();
},
onTouchEnd() {
this.touchEnd = true;
Expand Down
10 changes: 5 additions & 5 deletions src/rate/rate.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<view
class="{{classPrefix}}__wrapper {{prefix}}-class"
style="font-size:{{ utils.regSize(size) }}"
catch:touchstart="onTouchStart"
catch:touchmove="{{ !disabled ? 'onTouchMove' : '' }}"
catch:tap="{{ !disabled ? 'onTap' : '' }}"
catch:touchend="{{ !disabled ? 'onTouchEnd' : ''}}"
catch:touchcancel="{{ !disabled ? 'onTouchEnd' : ''}}"
bind:touchstart="{{ !disabled ? 'onTouchStart' : '' }}"
bind:touchmove="{{ !disabled ? 'onTouchMove' : '' }}"
bind:tap="{{ !disabled ? 'onTap' : '' }}"
bind:touchend="{{ !disabled ? 'onTouchEnd' : ''}}"
bind:touchcancel="{{ !disabled ? 'onTouchEnd' : ''}}"
aria-role="slider"
aria-valuemax="{{count}}"
aria-valuemin="{{0}}"
Expand Down
5 changes: 3 additions & 2 deletions src/tabs/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default class Tabs extends SuperComponent {
currentIndex: -1,
trackStyle: '',
offset: 0,
scrollLeft: 0,
tabID: '',
placement: 'top',
};
Expand Down Expand Up @@ -96,7 +97,7 @@ export default class Tabs extends SuperComponent {
onScroll(e) {
const { scrollLeft } = e.detail;
this.setData({
offset: scrollLeft,
scrollLeft,
});
},
updateTabs(cb) {
Expand Down Expand Up @@ -190,7 +191,7 @@ export default class Tabs extends SuperComponent {
});

if (this.containerWidth) {
const offset = this.calcScrollOffset(this.containerWidth, rect.left, rect.width, this.data.offset);
const offset = this.calcScrollOffset(this.containerWidth, rect.left, rect.width, this.data.scrollLeft);
const maxOffset = totalSize - this.containerWidth;
this.setData({
offset: Math.min(Math.max(offset, 0), maxOffset),
Expand Down
2 changes: 2 additions & 0 deletions src/tabs/tabs.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
enable-flex
scroll-left="{{offset}}"
scroll-x="{{true}}"
scroll-anchoring
scroll-with-animation
enable-passive
show-scrollbar="{{false}}"
bind:scroll="onScroll"
>
Expand Down
2 changes: 1 addition & 1 deletion src/tree-select/tree-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class TreeSelect extends SuperComponent {

if (multiple) {
const finalValue = this.data.value || this.data.defaultValue;
if (!Array.isArray(finalValue[leafLevel])) {
if (finalValue[leafLevel] != null && !Array.isArray(finalValue[leafLevel])) {
throw TypeError('应传入数组类型的 value');
}
}
Expand Down