@tarojs/components 3.6.22-nightly.7 → 3.6.22-nightly.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/dist/cjs/index-f6805218.js +73 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +2 -6
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +2 -6
- package/dist/cjs/taro-icon-core.cjs.entry.js +2 -6
- package/dist/cjs/taro-image-core.cjs.entry.js +3 -7
- package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -3
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +3 -7
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +4 -8
- package/dist/cjs/taro-pull-to-refresh-core.cjs.entry.js +3 -4
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -6
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +6 -5
- package/dist/cjs/taro-switch-core.cjs.entry.js +11 -10
- package/dist/cjs/taro-tabbar.cjs.entry.js +23 -24
- package/dist/cjs/taro-textarea-core.cjs.entry.js +10 -1
- package/dist/cjs/taro-video-control_3.cjs.entry.js +5 -9
- package/dist/cjs/taro-view-core.cjs.entry.js +2 -6
- package/dist/collection/components/swiper/swiper.js +4 -2
- package/dist/collection/components/switch/switch.js +12 -12
- package/dist/collection/components/textarea/textarea.js +11 -0
- package/dist/components/index2.js +68 -31
- package/dist/components/index3.js +34 -0
- package/dist/components/taro-button-core.js +2 -2
- package/dist/components/taro-cover-view-core.js +2 -2
- package/dist/components/taro-icon-core.js +2 -2
- package/dist/components/taro-image-core.js +3 -3
- package/dist/components/taro-navigator-core.js +2 -2
- package/dist/components/taro-picker-core.js +3 -3
- package/dist/components/taro-picker-view-column-core.js +1 -1
- package/dist/components/taro-picker-view-core.js +4 -4
- package/dist/components/taro-pull-to-refresh-core.js +3 -3
- package/dist/components/taro-scroll-view-core.js +3 -3
- package/dist/components/taro-swiper-core.js +7 -5
- package/dist/components/taro-switch-core.js +12 -12
- package/dist/components/taro-tabbar.js +5 -5
- package/dist/components/taro-textarea-core.js +10 -1
- package/dist/components/taro-video-core.js +6 -6
- package/dist/components/taro-view-core.js +2 -2
- package/dist/esm/index-c3e4004b.js +71 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-button-core.entry.js +2 -2
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-cover-view-core.entry.js +2 -2
- package/dist/esm/taro-icon-core.entry.js +2 -2
- package/dist/esm/taro-image-core.entry.js +3 -3
- package/dist/esm/taro-navigator-core.entry.js +2 -2
- package/dist/esm/taro-picker-core_2.entry.js +3 -3
- package/dist/esm/taro-picker-view-column-core_2.entry.js +4 -4
- package/dist/esm/taro-pull-to-refresh-core.entry.js +3 -3
- package/dist/esm/taro-scroll-view-core.entry.js +2 -2
- package/dist/esm/taro-swiper-core_2.entry.js +6 -4
- package/dist/esm/taro-switch-core.entry.js +11 -10
- package/dist/esm/taro-tabbar.entry.js +4 -4
- package/dist/esm/taro-textarea-core.entry.js +10 -1
- package/dist/esm/taro-video-control_3.entry.js +5 -5
- package/dist/esm/taro-view-core.entry.js +2 -2
- package/dist/esm-es5/index-c3e4004b.js +7 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-icon-core.entry.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh-core.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-switch-core.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/taro-components/p-06cf6b18.system.entry.js +1 -0
- package/dist/taro-components/p-16954dd6.entry.js +1 -0
- package/dist/taro-components/p-2bbdbe9c.system.entry.js +1 -0
- package/dist/taro-components/p-2dea35fd.entry.js +1 -0
- package/dist/taro-components/p-2ec68968.system.js +7 -0
- package/dist/taro-components/p-35cca0f9.entry.js +1 -0
- package/dist/taro-components/p-445810cb.entry.js +1 -0
- package/dist/taro-components/p-4e4ac1fe.system.entry.js +1 -0
- package/dist/taro-components/p-600d9210.entry.js +1 -0
- package/dist/taro-components/p-61cb688a.entry.js +1 -0
- package/dist/taro-components/p-67ff5a50.system.entry.js +1 -0
- package/dist/taro-components/p-74129eac.entry.js +1 -0
- package/dist/taro-components/{p-fbd33d55.system.entry.js → p-92daad3f.system.entry.js} +1 -1
- package/dist/taro-components/p-95058ee1.entry.js +1 -0
- package/dist/taro-components/p-9623f19c.system.entry.js +1 -0
- package/dist/taro-components/p-96d3e67b.system.entry.js +1 -0
- package/dist/taro-components/p-a197cbae.system.entry.js +1 -0
- package/dist/taro-components/p-a2a70581.system.entry.js +1 -0
- package/dist/taro-components/p-a972aa1d.system.js +1 -1
- package/dist/taro-components/p-b259b4ba.system.entry.js +1 -0
- package/dist/taro-components/p-b3b57aab.entry.js +1 -0
- package/dist/taro-components/p-b6694eb3.system.entry.js +1 -0
- package/dist/taro-components/p-b9f19e77.entry.js +1 -0
- package/dist/taro-components/p-bb87373d.entry.js +1 -0
- package/dist/taro-components/p-bdd7b5a9.entry.js +1 -0
- package/dist/taro-components/p-bf0d2c21.system.entry.js +1 -0
- package/dist/taro-components/p-c11fcb25.system.entry.js +1 -0
- package/dist/taro-components/p-d36f8c4f.entry.js +1 -0
- package/dist/taro-components/p-d60b66c2.entry.js +1 -0
- package/dist/taro-components/p-dc6db06e.system.entry.js +1 -0
- package/dist/taro-components/p-dca5e9ee.entry.js +1 -0
- package/dist/taro-components/p-de951a46.js +7 -0
- package/dist/taro-components/p-e09e8b51.system.entry.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/switch/switch.d.ts +3 -3
- package/dist/types/components/textarea/textarea.d.ts +1 -0
- package/lib/react/react-component-lib/createComponent.js +2 -1
- package/lib/react/react-component-lib/createComponent.js.map +1 -1
- package/lib/react/react-component-lib/utils/attachProps.d.ts +16 -7
- package/lib/react/react-component-lib/utils/attachProps.js +85 -9
- package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/lib/react/react-component-lib/utils/index.js +1 -1
- package/package.json +4 -5
- package/types/Checkbox.d.ts +0 -4
- package/types/Picker.d.ts +13 -1
- package/types/Radio.d.ts +0 -4
- package/dist/taro-components/p-0589fade.system.entry.js +0 -1
- package/dist/taro-components/p-0d538950.system.entry.js +0 -1
- package/dist/taro-components/p-232d907e.entry.js +0 -1
- package/dist/taro-components/p-4a3acea0.system.entry.js +0 -1
- package/dist/taro-components/p-4d435e0e.entry.js +0 -1
- package/dist/taro-components/p-4dd5f401.system.entry.js +0 -1
- package/dist/taro-components/p-59187d48.entry.js +0 -1
- package/dist/taro-components/p-5920356c.system.entry.js +0 -1
- package/dist/taro-components/p-74e7dda9.entry.js +0 -1
- package/dist/taro-components/p-76f3547f.system.entry.js +0 -1
- package/dist/taro-components/p-77ba4f09.system.entry.js +0 -1
- package/dist/taro-components/p-7b463b27.entry.js +0 -1
- package/dist/taro-components/p-7f2096b0.entry.js +0 -1
- package/dist/taro-components/p-8fa55dc6.entry.js +0 -1
- package/dist/taro-components/p-9253a23b.entry.js +0 -1
- package/dist/taro-components/p-9477bad9.entry.js +0 -1
- package/dist/taro-components/p-9fb50df3.entry.js +0 -1
- package/dist/taro-components/p-b85cc3e9.entry.js +0 -1
- package/dist/taro-components/p-b8c7e5cd.system.entry.js +0 -1
- package/dist/taro-components/p-b96f3432.system.entry.js +0 -1
- package/dist/taro-components/p-bf3a666f.entry.js +0 -1
- package/dist/taro-components/p-c86f1bc0.entry.js +0 -1
- package/dist/taro-components/p-d8b1db26.system.entry.js +0 -1
- package/dist/taro-components/p-df6e6333.system.entry.js +0 -1
- package/dist/taro-components/p-e254406f.system.entry.js +0 -1
- package/dist/taro-components/p-e56e52a1.entry.js +0 -1
- package/dist/taro-components/p-e849f74a.system.entry.js +0 -1
- package/dist/taro-components/p-eb7709ea.system.entry.js +0 -1
- package/dist/taro-components/p-ec82a895.entry.js +0 -1
|
@@ -13,7 +13,7 @@ const Switch = class {
|
|
|
13
13
|
this.switchChange = e => {
|
|
14
14
|
e.stopPropagation();
|
|
15
15
|
const value = e.target.checked;
|
|
16
|
-
this.
|
|
16
|
+
this.checked = value;
|
|
17
17
|
this.onChange.emit({
|
|
18
18
|
value
|
|
19
19
|
});
|
|
@@ -24,34 +24,35 @@ const Switch = class {
|
|
|
24
24
|
this.name = undefined;
|
|
25
25
|
this.disabled = false;
|
|
26
26
|
this.nativeProps = {};
|
|
27
|
-
this.isChecked = undefined;
|
|
28
27
|
this.isWillLoadCalled = false;
|
|
29
28
|
}
|
|
30
|
-
function(
|
|
29
|
+
function(newValue) {
|
|
31
30
|
if (!this.isWillLoadCalled)
|
|
32
31
|
return;
|
|
33
|
-
if (
|
|
34
|
-
this.
|
|
32
|
+
if (this.inputRef.checked !== newValue) {
|
|
33
|
+
this.inputRef.checked = newValue;
|
|
34
|
+
}
|
|
35
35
|
}
|
|
36
36
|
componentWillLoad() {
|
|
37
37
|
this.isWillLoadCalled = true;
|
|
38
|
-
this.isChecked = this.checked;
|
|
39
38
|
}
|
|
40
39
|
componentDidLoad() {
|
|
41
40
|
Object.defineProperty(this.el, 'value', {
|
|
42
|
-
get: () => this.
|
|
41
|
+
get: () => this.checked,
|
|
43
42
|
configurable: true
|
|
44
43
|
});
|
|
45
44
|
}
|
|
46
45
|
render() {
|
|
47
|
-
const { type, color,
|
|
48
|
-
const style =
|
|
46
|
+
const { type, color, checked, name, disabled, nativeProps } = this;
|
|
47
|
+
const style = checked
|
|
49
48
|
? {
|
|
50
49
|
borderColor: color || '04BE02',
|
|
51
50
|
backgroundColor: color || '04BE02'
|
|
52
51
|
}
|
|
53
52
|
: {};
|
|
54
|
-
return (index.h("input", Object.assign({
|
|
53
|
+
return (index.h("input", Object.assign({ ref: input => {
|
|
54
|
+
this.inputRef = input;
|
|
55
|
+
}, type: 'checkbox', class: `weui-${type}`, style: style, checked: checked, name: name, disabled: disabled, onChange: this.switchChange }, nativeProps)));
|
|
55
56
|
}
|
|
56
57
|
get el() { return index.getElement(this); }
|
|
57
58
|
static get watchers() { return {
|
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-dbbe9dde.js');
|
|
5
|
+
const index$1 = require('./index-dbbe9dde.js');
|
|
6
6
|
const runtime = require('@tarojs/runtime');
|
|
7
7
|
const Taro = require('@tarojs/taro');
|
|
8
|
-
const
|
|
8
|
+
const index = require('./index-f6805218.js');
|
|
9
9
|
const resolvePathname = require('resolve-pathname');
|
|
10
|
-
const index$
|
|
10
|
+
const index$2 = require('./index-dfd8638f.js');
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
|
14
14
|
const Taro__default = /*#__PURE__*/_interopDefaultLegacy(Taro);
|
|
15
|
-
const classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
16
15
|
const resolvePathname__default = /*#__PURE__*/_interopDefaultLegacy(resolvePathname);
|
|
17
16
|
|
|
18
17
|
const splitUrl = _url => {
|
|
@@ -37,8 +36,8 @@ const splitUrl = _url => {
|
|
|
37
36
|
return res;
|
|
38
37
|
};
|
|
39
38
|
|
|
40
|
-
const TabbarItem = ({ index: index$
|
|
41
|
-
const className =
|
|
39
|
+
const TabbarItem = ({ index: index$3, isSelected = false, textColor, iconPath, badgeText, showRedDot = false, pagePath, text, onSelect }) => {
|
|
40
|
+
const className = index.classnames('weui-tabbar__item', {
|
|
42
41
|
'weui-bar__item_on': isSelected
|
|
43
42
|
});
|
|
44
43
|
const badgeStyle = {
|
|
@@ -53,17 +52,17 @@ const TabbarItem = ({ index: index$2, isSelected = false, textColor, iconPath, b
|
|
|
53
52
|
};
|
|
54
53
|
function onClick() {
|
|
55
54
|
const page = Taro__default['default'].getCurrentPages().shift();
|
|
56
|
-
if (typeof (page === null || page === void 0 ? void 0 : page.onTabItemTap) === 'function' && index$
|
|
57
|
-
page.onTabItemTap({ index: index$
|
|
55
|
+
if (typeof (page === null || page === void 0 ? void 0 : page.onTabItemTap) === 'function' && index$2.isVisible(this)) {
|
|
56
|
+
page.onTabItemTap({ index: index$3, pagePath, text });
|
|
58
57
|
}
|
|
59
|
-
onSelect(index$
|
|
58
|
+
onSelect(index$3);
|
|
60
59
|
}
|
|
61
|
-
return (index.h("a", { key: index$
|
|
62
|
-
index.h("span", { style: { display: 'inline-block', position: 'relative' } },
|
|
63
|
-
index.h("img", { src: iconPath, alt: '', class: 'weui-tabbar__icon' }),
|
|
64
|
-
!!badgeText && (index.h("span", { class: 'weui-badge taro-tabbar-badge', style: badgeStyle }, badgeText)),
|
|
65
|
-
showRedDot && (index.h("span", { class: 'weui-badge weui-badge_dot', style: dotStyle }))),
|
|
66
|
-
index.h("p", { class: 'weui-tabbar__label', style: { color: textColor } }, text)));
|
|
60
|
+
return (index$1.h("a", { key: index$3, href: 'javascript:;', class: className, onClick: onClick },
|
|
61
|
+
index$1.h("span", { style: { display: 'inline-block', position: 'relative' } },
|
|
62
|
+
index$1.h("img", { src: iconPath, alt: '', class: 'weui-tabbar__icon' }),
|
|
63
|
+
!!badgeText && (index$1.h("span", { class: 'weui-badge taro-tabbar-badge', style: badgeStyle }, badgeText)),
|
|
64
|
+
showRedDot && (index$1.h("span", { class: 'weui-badge weui-badge_dot', style: dotStyle }))),
|
|
65
|
+
index$1.h("p", { class: 'weui-tabbar__label', style: { color: textColor } }, text)));
|
|
67
66
|
};
|
|
68
67
|
|
|
69
68
|
const indexCss = ".weui-tabbar{z-index:500;background-color:#f7f7fa;width:100%;display:-ms-flexbox;display:flex;position:absolute;bottom:0}.weui-tabbar:before{content:\" \";color:#c0bfc4;-webkit-transform-origin:0 0;transform-origin:0 0;border-top:1px solid #c0bfc4;height:1px;position:absolute;top:0;left:0;right:0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-tabbar__item{padding:5px 0;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom);color:#999;text-align:center;-webkit-tap-highlight-color:transparent;-ms-flex:1;flex:1;font-size:0;display:block}.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon,.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon>i,.weui-tabbar__item.weui-bar__item_on .weui-tabbar__label{color:#09bb07}.weui-tabbar__icon{width:27px;height:27px;display:inline-block}.weui-tabbar__icon img{width:100%;height:100%}i.weui-tabbar__icon,.weui-tabbar__icon>i{color:#999;font-size:24px}.weui-tabbar__label{text-align:center;color:#999;font-size:10px;line-height:1.8}.weui-badge{color:#fff;text-align:center;vertical-align:middle;background-color:#f43530;border-radius:18px;min-width:8px;padding:.15em .4em;font-size:12px;line-height:1.2;display:inline-block}.weui-badge_dot{min-width:0;padding:.4em}html,body{height:100%}:root{--taro-tabbar-height:$weuiTabBarHeight}#app{height:100%}.taro-tabbar__border-white:before{border-top-color:#fff!important}.taro-tabbar__container{-ms-flex-direction:column;flex-direction:column;height:100%;display:-ms-flexbox;display:flex;overflow:hidden}.taro-tabbar__panel{-webkit-overflow-scrolling:auto;-ms-flex:1;flex:1;position:relative;overflow:auto}.taro-tabbar__tabbar{height:var(--taro-tabbar-height);width:100%;-webkit-transition:bottom .2s,top .2s;transition:bottom .2s,top .2s;position:relative}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{margin-bottom:constant(safe-area-inset-bottom);margin-bottom:env(safe-area-inset-bottom);bottom:0}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{-ms-flex:0 0;flex:0 0;top:-52px}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";
|
|
@@ -76,8 +75,8 @@ const hideTabBarClassName = 'taro-tabbar__tabbar-hide';
|
|
|
76
75
|
const hideTabBarWithAnimationClassName = 'taro-tabbar__tabbar-slideout';
|
|
77
76
|
const Tabbar = class {
|
|
78
77
|
constructor(hostRef) {
|
|
79
|
-
index.registerInstance(this, hostRef);
|
|
80
|
-
this.onLongPress = index.createEvent(this, "longpress", 7);
|
|
78
|
+
index$1.registerInstance(this, hostRef);
|
|
79
|
+
this.onLongPress = index$1.createEvent(this, "longpress", 7);
|
|
81
80
|
this.homePage = '';
|
|
82
81
|
this.customRoutes = [];
|
|
83
82
|
this.tabbarPos = 'bottom';
|
|
@@ -322,19 +321,19 @@ const Tabbar = class {
|
|
|
322
321
|
render() {
|
|
323
322
|
const { tabbarPos = 'bottom' } = this;
|
|
324
323
|
const status = this.status;
|
|
325
|
-
const containerCls =
|
|
324
|
+
const containerCls = index.classnames('weui-tabbar', {
|
|
326
325
|
[`taro-tabbar__border-${this.borderStyle || 'black'}`]: true
|
|
327
326
|
});
|
|
328
327
|
const shouldHideTabBar = this.selectedIndex === -1 || status === STATUS_HIDE;
|
|
329
328
|
const shouldSlideout = status === STATUS_SLIDEOUT;
|
|
330
|
-
return (index.h(index.Host, { class:
|
|
329
|
+
return (index$1.h(index$1.Host, { class: index.classnames(basicTabBarClassName, `${basicTabBarClassName}-${tabbarPos}`, {
|
|
331
330
|
[hideTabBarClassName]: shouldHideTabBar,
|
|
332
331
|
[hideTabBarWithAnimationClassName]: shouldSlideout
|
|
333
|
-
}) }, index.h("div", { class: containerCls, style: {
|
|
332
|
+
}) }, index$1.h("div", { class: containerCls, style: {
|
|
334
333
|
backgroundColor: this.backgroundColor || '',
|
|
335
334
|
height: 'inherit'
|
|
336
|
-
} }, this.list.map((item, index
|
|
337
|
-
const isSelected = this.selectedIndex === index
|
|
335
|
+
} }, this.list.map((item, index) => {
|
|
336
|
+
const isSelected = this.selectedIndex === index;
|
|
338
337
|
let textColor;
|
|
339
338
|
let iconPath;
|
|
340
339
|
if (isSelected) {
|
|
@@ -345,10 +344,10 @@ const Tabbar = class {
|
|
|
345
344
|
textColor = this.color || '';
|
|
346
345
|
iconPath = item.iconPath;
|
|
347
346
|
}
|
|
348
|
-
return (index.h(TabbarItem, { index: index
|
|
347
|
+
return (index$1.h(TabbarItem, { index: index, onSelect: this.switchTab.bind(this), isSelected: isSelected, textColor: textColor, iconPath: iconPath, pagePath: item.pagePath, text: item.text, badgeText: item.badgeText, showRedDot: item.showRedDot }));
|
|
349
348
|
}))));
|
|
350
349
|
}
|
|
351
|
-
get tabbar() { return index.getElement(this); }
|
|
350
|
+
get tabbar() { return index$1.getElement(this); }
|
|
352
351
|
};
|
|
353
352
|
Tabbar.style = indexCss;
|
|
354
353
|
|
|
@@ -23,6 +23,7 @@ const Textarea = class {
|
|
|
23
23
|
e.stopPropagation();
|
|
24
24
|
this.handleLineChange();
|
|
25
25
|
const value = e.target.value || '';
|
|
26
|
+
this.value = value;
|
|
26
27
|
this.onInput.emit({
|
|
27
28
|
value,
|
|
28
29
|
cursor: value.length
|
|
@@ -127,6 +128,13 @@ const Textarea = class {
|
|
|
127
128
|
(_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
128
129
|
}
|
|
129
130
|
}
|
|
131
|
+
watchValue(newValue) {
|
|
132
|
+
// hack: 在事件回调中,props.value 变化不知为何不会触发 Stencil 更新,因此这里手动更新一下
|
|
133
|
+
const value = fixControlledValue(newValue);
|
|
134
|
+
if (this.textareaRef.value !== value) {
|
|
135
|
+
this.textareaRef.value = value;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
130
138
|
async focus() {
|
|
131
139
|
this.textareaRef.focus();
|
|
132
140
|
}
|
|
@@ -146,7 +154,8 @@ const Textarea = class {
|
|
|
146
154
|
}
|
|
147
155
|
get el() { return index.getElement(this); }
|
|
148
156
|
static get watchers() { return {
|
|
149
|
-
"autoFocus": ["watchAutoFocus"]
|
|
157
|
+
"autoFocus": ["watchAutoFocus"],
|
|
158
|
+
"value": ["watchValue"]
|
|
150
159
|
}; }
|
|
151
160
|
};
|
|
152
161
|
Textarea.style = indexCss;
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-dbbe9dde.js');
|
|
6
|
-
const
|
|
6
|
+
const index$2 = require('./index-f6805218.js');
|
|
7
7
|
const index$1 = require('./index-dfd8638f.js');
|
|
8
8
|
|
|
9
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
-
|
|
11
9
|
function _interopNamespace(e) {
|
|
12
10
|
if (e && e.__esModule) return e;
|
|
13
11
|
var n = Object.create(null);
|
|
@@ -28,8 +26,6 @@ function _interopNamespace(e) {
|
|
|
28
26
|
return Object.freeze(n);
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
const classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
32
|
-
|
|
33
29
|
const formatTime = (time) => {
|
|
34
30
|
if (!time)
|
|
35
31
|
return '';
|
|
@@ -605,7 +601,7 @@ const Video = class {
|
|
|
605
601
|
const { controls, autoplay, loop, muted, poster, objectFit, isFirst, isMute, isFullScreen, showCenterPlayBtn, isPlaying, _enableDanmu, showMuteBtn, danmuBtn, showFullscreenBtn, nativeProps } = this;
|
|
606
602
|
const duration = this.duration || this._duration;
|
|
607
603
|
const durationTime = formatTime(duration);
|
|
608
|
-
return (index.h(index.Host, { class:
|
|
604
|
+
return (index.h(index.Host, { class: index$2.classnames('taro-video-container', {
|
|
609
605
|
'taro-video-type-fullscreen': isFullScreen
|
|
610
606
|
}), onTouchStart: this.onTouchStartContainer, onClick: this.onClickContainer }, index.h("video", Object.assign({ class: 'taro-video-video', style: {
|
|
611
607
|
'object-fit': objectFit
|
|
@@ -621,11 +617,11 @@ const Video = class {
|
|
|
621
617
|
if (dom) {
|
|
622
618
|
this.controlsRef = dom;
|
|
623
619
|
}
|
|
624
|
-
}, controls: controls, currentTime: this.currentTime, duration: duration, isPlaying: this.isPlaying, pauseFunc: this._pause, playFunc: this._play, seekFunc: this._seek, showPlayBtn: this.showPlayBtn, showProgress: this.showProgress }, showMuteBtn && (index.h("div", { class:
|
|
620
|
+
}, controls: controls, currentTime: this.currentTime, duration: duration, isPlaying: this.isPlaying, pauseFunc: this._pause, playFunc: this._play, seekFunc: this._seek, showPlayBtn: this.showPlayBtn, showProgress: this.showProgress }, showMuteBtn && (index.h("div", { class: index$2.classnames('taro-video-mute', {
|
|
625
621
|
'taro-video-type-mute': isMute
|
|
626
|
-
}), onClick: this.toggleMute })), danmuBtn && (index.h("div", { class:
|
|
622
|
+
}), onClick: this.toggleMute })), danmuBtn && (index.h("div", { class: index$2.classnames('taro-video-danmu-button', {
|
|
627
623
|
'taro-video-danmu-button-active': _enableDanmu
|
|
628
|
-
}), onClick: this.toggleDanmu }, "\u5F39\u5E55")), showFullscreenBtn && (index.h("div", { class:
|
|
624
|
+
}), onClick: this.toggleDanmu }, "\u5F39\u5E55")), showFullscreenBtn && (index.h("div", { class: index$2.classnames('taro-video-fullscreen', {
|
|
629
625
|
'taro-video-type-fullscreen': isFullScreen
|
|
630
626
|
}), onClick: this.onClickFullScreenBtn }))), index.h("div", { class: 'taro-video-toast taro-video-toast-volume', ref: dom => {
|
|
631
627
|
if (dom) {
|
|
@@ -3,14 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-dbbe9dde.js');
|
|
6
|
-
const
|
|
6
|
+
const index$1 = require('./index-f6805218.js');
|
|
7
7
|
const helper = require('./helper-ad6306f6.js');
|
|
8
8
|
require('@tarojs/taro');
|
|
9
9
|
|
|
10
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
-
|
|
12
|
-
const classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
13
|
-
|
|
14
10
|
const indexCss = "body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}taro-view-core{display:block}";
|
|
15
11
|
|
|
16
12
|
const View = class {
|
|
@@ -60,7 +56,7 @@ const View = class {
|
|
|
60
56
|
helper.handleStencilNodes(this.el);
|
|
61
57
|
}
|
|
62
58
|
render() {
|
|
63
|
-
const cls =
|
|
59
|
+
const cls = index$1.classnames({
|
|
64
60
|
[`${this.hoverClass}`]: this.hover
|
|
65
61
|
});
|
|
66
62
|
let attr = {};
|
|
@@ -60,7 +60,7 @@ export class Swiper {
|
|
|
60
60
|
};
|
|
61
61
|
this.handleSwiperLoopDebounce = debounce(this.handleSwiperLoop, 50);
|
|
62
62
|
this.handleSwiperSizeDebounce = debounce(() => {
|
|
63
|
-
if (this.swiper && !this.circular) {
|
|
63
|
+
if (this.swiper && this.swiper.$wrapperEl && !this.circular) {
|
|
64
64
|
this.swiper.updateSlides();
|
|
65
65
|
}
|
|
66
66
|
}, 50);
|
|
@@ -187,7 +187,9 @@ export class Swiper {
|
|
|
187
187
|
if (this.autoplay && !((_a = this.swiper.autoplay) === null || _a === void 0 ? void 0 : _a.running)) {
|
|
188
188
|
(_b = this.swiper.autoplay) === null || _b === void 0 ? void 0 : _b.start();
|
|
189
189
|
}
|
|
190
|
-
this.swiper
|
|
190
|
+
if (this.swiper.$el) {
|
|
191
|
+
this.swiper.update(); // 更新子元素
|
|
192
|
+
}
|
|
191
193
|
}
|
|
192
194
|
componentDidRender() {
|
|
193
195
|
this.handleSwiperLoop();
|
|
@@ -4,7 +4,7 @@ export class Switch {
|
|
|
4
4
|
this.switchChange = e => {
|
|
5
5
|
e.stopPropagation();
|
|
6
6
|
const value = e.target.checked;
|
|
7
|
-
this.
|
|
7
|
+
this.checked = value;
|
|
8
8
|
this.onChange.emit({
|
|
9
9
|
value
|
|
10
10
|
});
|
|
@@ -15,34 +15,35 @@ export class Switch {
|
|
|
15
15
|
this.name = undefined;
|
|
16
16
|
this.disabled = false;
|
|
17
17
|
this.nativeProps = {};
|
|
18
|
-
this.isChecked = undefined;
|
|
19
18
|
this.isWillLoadCalled = false;
|
|
20
19
|
}
|
|
21
|
-
function(
|
|
20
|
+
function(newValue) {
|
|
22
21
|
if (!this.isWillLoadCalled)
|
|
23
22
|
return;
|
|
24
|
-
if (
|
|
25
|
-
this.
|
|
23
|
+
if (this.inputRef.checked !== newValue) {
|
|
24
|
+
this.inputRef.checked = newValue;
|
|
25
|
+
}
|
|
26
26
|
}
|
|
27
27
|
componentWillLoad() {
|
|
28
28
|
this.isWillLoadCalled = true;
|
|
29
|
-
this.isChecked = this.checked;
|
|
30
29
|
}
|
|
31
30
|
componentDidLoad() {
|
|
32
31
|
Object.defineProperty(this.el, 'value', {
|
|
33
|
-
get: () => this.
|
|
32
|
+
get: () => this.checked,
|
|
34
33
|
configurable: true
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
36
|
render() {
|
|
38
|
-
const { type, color,
|
|
39
|
-
const style =
|
|
37
|
+
const { type, color, checked, name, disabled, nativeProps } = this;
|
|
38
|
+
const style = checked
|
|
40
39
|
? {
|
|
41
40
|
borderColor: color || '04BE02',
|
|
42
41
|
backgroundColor: color || '04BE02'
|
|
43
42
|
}
|
|
44
43
|
: {};
|
|
45
|
-
return (h("input", Object.assign({
|
|
44
|
+
return (h("input", Object.assign({ ref: input => {
|
|
45
|
+
this.inputRef = input;
|
|
46
|
+
}, type: 'checkbox', class: `weui-${type}`, style: style, checked: checked, name: name, disabled: disabled, onChange: this.switchChange }, nativeProps)));
|
|
46
47
|
}
|
|
47
48
|
static get is() { return "taro-switch-core"; }
|
|
48
49
|
static get originalStyleUrls() {
|
|
@@ -77,7 +78,7 @@ export class Switch {
|
|
|
77
78
|
},
|
|
78
79
|
"checked": {
|
|
79
80
|
"type": "boolean",
|
|
80
|
-
"mutable":
|
|
81
|
+
"mutable": true,
|
|
81
82
|
"complexType": {
|
|
82
83
|
"original": "boolean",
|
|
83
84
|
"resolved": "boolean",
|
|
@@ -166,7 +167,6 @@ export class Switch {
|
|
|
166
167
|
}
|
|
167
168
|
static get states() {
|
|
168
169
|
return {
|
|
169
|
-
"isChecked": {},
|
|
170
170
|
"isWillLoadCalled": {}
|
|
171
171
|
};
|
|
172
172
|
}
|
|
@@ -8,6 +8,7 @@ export class Textarea {
|
|
|
8
8
|
e.stopPropagation();
|
|
9
9
|
this.handleLineChange();
|
|
10
10
|
const value = e.target.value || '';
|
|
11
|
+
this.value = value;
|
|
11
12
|
this.onInput.emit({
|
|
12
13
|
value,
|
|
13
14
|
cursor: value.length
|
|
@@ -112,6 +113,13 @@ export class Textarea {
|
|
|
112
113
|
(_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
113
114
|
}
|
|
114
115
|
}
|
|
116
|
+
watchValue(newValue) {
|
|
117
|
+
// hack: 在事件回调中,props.value 变化不知为何不会触发 Stencil 更新,因此这里手动更新一下
|
|
118
|
+
const value = fixControlledValue(newValue);
|
|
119
|
+
if (this.textareaRef.value !== value) {
|
|
120
|
+
this.textareaRef.value = value;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
115
123
|
async focus() {
|
|
116
124
|
this.textareaRef.focus();
|
|
117
125
|
}
|
|
@@ -422,6 +430,9 @@ export class Textarea {
|
|
|
422
430
|
return [{
|
|
423
431
|
"propName": "autoFocus",
|
|
424
432
|
"methodName": "watchAutoFocus"
|
|
433
|
+
}, {
|
|
434
|
+
"propName": "value",
|
|
435
|
+
"methodName": "watchValue"
|
|
425
436
|
}];
|
|
426
437
|
}
|
|
427
438
|
}
|
|
@@ -1,34 +1,71 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
lastTime = now;
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
clearTimeout(deferTimer);
|
|
13
|
-
deferTimer = setTimeout(() => {
|
|
14
|
-
lastTime = now;
|
|
15
|
-
fn.apply(context, args);
|
|
16
|
-
}, threshold);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
1
|
+
function createCommonjsModule(fn, basedir, module) {
|
|
2
|
+
return module = {
|
|
3
|
+
path: basedir,
|
|
4
|
+
exports: {},
|
|
5
|
+
require: function (path, base) {
|
|
6
|
+
return commonjsRequire();
|
|
7
|
+
}
|
|
8
|
+
}, fn(module, module.exports), module.exports;
|
|
19
9
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const context = scope || this;
|
|
24
|
-
clearTimeout(timer);
|
|
25
|
-
timer = setTimeout(function () {
|
|
26
|
-
fn.apply(context, args);
|
|
27
|
-
}, ms);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function isVisible(e) {
|
|
31
|
-
return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
|
|
10
|
+
|
|
11
|
+
function commonjsRequire () {
|
|
12
|
+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
32
13
|
}
|
|
33
14
|
|
|
34
|
-
|
|
15
|
+
var classnames = createCommonjsModule(function (module) {
|
|
16
|
+
/*!
|
|
17
|
+
Copyright (c) 2018 Jed Watson.
|
|
18
|
+
Licensed under the MIT License (MIT), see
|
|
19
|
+
http://jedwatson.github.io/classnames
|
|
20
|
+
*/
|
|
21
|
+
/* global define */
|
|
22
|
+
|
|
23
|
+
(function () {
|
|
24
|
+
|
|
25
|
+
var hasOwn = {}.hasOwnProperty;
|
|
26
|
+
|
|
27
|
+
function classNames() {
|
|
28
|
+
var classes = [];
|
|
29
|
+
|
|
30
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
31
|
+
var arg = arguments[i];
|
|
32
|
+
if (!arg) continue;
|
|
33
|
+
|
|
34
|
+
var argType = typeof arg;
|
|
35
|
+
|
|
36
|
+
if (argType === 'string' || argType === 'number') {
|
|
37
|
+
classes.push(arg);
|
|
38
|
+
} else if (Array.isArray(arg)) {
|
|
39
|
+
if (arg.length) {
|
|
40
|
+
var inner = classNames.apply(null, arg);
|
|
41
|
+
if (inner) {
|
|
42
|
+
classes.push(inner);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
} else if (argType === 'object') {
|
|
46
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
47
|
+
classes.push(arg.toString());
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
for (var key in arg) {
|
|
52
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
53
|
+
classes.push(key);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return classes.join(' ');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (module.exports) {
|
|
63
|
+
classNames.default = classNames;
|
|
64
|
+
module.exports = classNames;
|
|
65
|
+
} else {
|
|
66
|
+
window.classNames = classNames;
|
|
67
|
+
}
|
|
68
|
+
}());
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export { classnames as c };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function throttle(fn, threshold = 250, scope) {
|
|
2
|
+
let lastTime = 0;
|
|
3
|
+
let deferTimer;
|
|
4
|
+
return function (...args) {
|
|
5
|
+
const context = scope || this;
|
|
6
|
+
const now = Date.now();
|
|
7
|
+
if (now - lastTime > threshold) {
|
|
8
|
+
fn.apply(this, args);
|
|
9
|
+
lastTime = now;
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
clearTimeout(deferTimer);
|
|
13
|
+
deferTimer = setTimeout(() => {
|
|
14
|
+
lastTime = now;
|
|
15
|
+
fn.apply(context, args);
|
|
16
|
+
}, threshold);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function debounce(fn, ms = 250, scope) {
|
|
21
|
+
let timer;
|
|
22
|
+
return function (...args) {
|
|
23
|
+
const context = scope || this;
|
|
24
|
+
clearTimeout(timer);
|
|
25
|
+
timer = setTimeout(function () {
|
|
26
|
+
fn.apply(context, args);
|
|
27
|
+
}, ms);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function isVisible(e) {
|
|
31
|
+
return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { debounce as d, isVisible as i, throttle as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import
|
|
2
|
+
import { c as classnames } from './index2.js';
|
|
3
3
|
|
|
4
4
|
const indexCss = ".weui-loading{vertical-align:middle;background:url(\"data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E\") 0 0/100% no-repeat;width:20px;height:20px;-webkit-animation:1s steps(12,end) infinite weuiLoading;animation:1s steps(12,end) infinite weuiLoading;display:inline-block}@-webkit-keyframes weuiLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes weuiLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.weui-btn_loading .weui-loading{margin:-.2em .34em 0 0}.weui-btn_loading.weui-btn_primary,.weui-btn_loading.weui-btn_warn{color:rgba(255,255,255,.6)}.weui-btn_loading.weui-btn_primary{background-color:#179b16}.weui-btn_loading.weui-btn_warn{background-color:#ce3c39}taro-button-core{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;color:#000;-webkit-tap-highlight-color:transparent;background-color:#f8f8f8;border-width:0;border-radius:5px;outline:0;width:100%;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;font-size:18px;line-height:2.55556;text-decoration:none;display:block;position:relative;overflow:hidden}taro-button-core:focus{outline:0}taro-button-core:not([disabled]):active{color:rgba(0,0,0,.6);background-color:#dedede}taro-button-core:after{-webkit-box-sizing:border-box;box-sizing:border-box;content:\" \";-webkit-transform-origin:0 0;transform-origin:0 0;border:1px solid rgba(0,0,0,.2);border-radius:10px;width:200%;height:200%;position:absolute;top:0;left:0;-webkit-transform:scale(.5);transform:scale(.5)}taro-button-core+taro-button-core{margin-top:15px}taro-button-core[type=default]{color:#000;background-color:#f8f8f8}taro-button-core[type=default]:not([disabled]):visited{color:#000}taro-button-core[type=default]:not([disabled]):active{color:rgba(0,0,0,.6);background-color:#dedede}taro-button-core[size=mini]{width:auto;padding:0 1.32em;font-size:13px;line-height:2.3;display:inline-block}taro-button-core[plain],taro-button-core[plain][type=default],taro-button-core[plain][type=primary]{background-color:transparent;border-width:1px}taro-button-core[disabled]{color:rgba(255,255,255,.6)}taro-button-core[disabled][type=default]{color:rgba(0,0,0,.3);background-color:#f7f7f7}taro-button-core[disabled][type=primary]{background-color:#9ed99d}taro-button-core[disabled][type=warn]{background-color:#ec8b89}taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}taro-button-core[loading][type=primary],taro-button-core[loading][type=warn]{color:rgba(255,255,255,.6)}taro-button-core[loading][type=primary]{background-color:#179b16}taro-button-core[loading][type=warn]{background-color:#ce3c39}taro-button-core[plain][type=primary]{color:#1aad19;border:1px solid #1aad19}taro-button-core[plain][type=primary]:not([disabled]):active{color:rgba(26,173,25,.6);background-color:transparent;border-color:rgba(26,173,25,.6)}taro-button-core[plain][type=primary]:after{border-width:0}taro-button-core[plain][type=warn]{color:#e64340;border:1px solid #e64340}taro-button-core[plain][type=warn]:not([disabled]):active{color:rgba(230,67,64,.6);background-color:transparent;border-color:rgba(230,67,64,.6)}taro-button-core[plain][type=warn]:after{border-width:0}taro-button-core[plain],taro-button-core[plain][type=default]{color:#353535;border:1px solid #353535}taro-button-core[plain]:not([disabled]):active,taro-button-core[plain][type=default]:not([disabled]):active{color:rgba(53,53,53,.6);background-color:transparent;border-color:rgba(53,53,53,.6)}taro-button-core[plain]:after,taro-button-core[plain][type=default]:after{border-width:0}taro-button-core[type=primary]{color:#fff;background-color:#1aad19}taro-button-core[type=primary]:not([disabled]):visited{color:#fff}taro-button-core[type=primary]:not([disabled]):active{color:rgba(255,255,255,.6);background-color:#179b16}taro-button-core[type=warn]{color:#fff;background-color:#e64340}taro-button-core[type=warn]:not([disabled]):visited{color:#fff}taro-button-core[type=warn]:not([disabled]):active{color:rgba(255,255,255,.6);background-color:#ce3c39}taro-button-core[plain][disabled],taro-button-core[plain][disabled][type=primary]{color:rgba(0,0,0,.3);background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2)}";
|
|
5
5
|
|
|
@@ -60,7 +60,7 @@ const Button = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
62
|
const { disabled, hoverClass, type, size, plain, loading, hover } = this;
|
|
63
|
-
const cls =
|
|
63
|
+
const cls = classnames({
|
|
64
64
|
[`${hoverClass}`]: hover && !disabled
|
|
65
65
|
});
|
|
66
66
|
return (h(Host, { class: cls, type: type, plain: plain, loading: loading, size: size, disabled: disabled }, loading && h("i", { class: 'weui-loading' }), h("slot", null)));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import
|
|
2
|
+
import { c as classnames } from './index2.js';
|
|
3
3
|
|
|
4
4
|
const coverViewCss = "taro-cover-view-core{display:block}";
|
|
5
5
|
|
|
@@ -48,7 +48,7 @@ const CoverView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
const cls =
|
|
51
|
+
const cls = classnames({
|
|
52
52
|
[`${this.hoverClass}`]: this.hover
|
|
53
53
|
});
|
|
54
54
|
let attr = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import
|
|
2
|
+
import { c as classnames } from './index2.js';
|
|
3
3
|
|
|
4
4
|
const indexCss = ".weui-icon-circle:before{content:\"\"}.weui-icon-download:before{content:\"\"}.weui-icon-info:before{content:\"\"}.weui-icon-safe-success:before{content:\"\"}.weui-icon-safe-warn:before{content:\"\"}.weui-icon-success:before{content:\"\"}.weui-icon-success-circle:before{content:\"\"}.weui-icon-success-no-circle:before{content:\"\"}.weui-icon-waiting:before{content:\"\"}.weui-icon-waiting-circle:before{content:\"\"}.weui-icon-warn:before{content:\"\"}.weui-icon-info-circle:before{content:\"\"}.weui-icon-cancel:before{content:\"\"}.weui-icon-search:before{content:\"\"}.weui-icon-clear:before{content:\"\"}.weui-icon-back:before{content:\"\"}.weui-icon-delete:before{content:\"\"}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-search,.weui-icon-clear{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}";
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14
14
|
render() {
|
|
15
15
|
const { type, size, color } = this;
|
|
16
16
|
const iconType = type === null || type === void 0 ? void 0 : type.replace(/_/g, '-');
|
|
17
|
-
const cls =
|
|
17
|
+
const cls = classnames({
|
|
18
18
|
[`weui-icon-${iconType}`]: true
|
|
19
19
|
});
|
|
20
20
|
const style = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import
|
|
2
|
+
import { c as classnames } from './index2.js';
|
|
3
3
|
|
|
4
4
|
const indexCss = "img[src=\"\"]{opacity:0}taro-image-core{width:auto;height:auto;font-size:0;display:inline-block;position:relative;overflow:hidden}.taro-img.taro-img__widthfix{height:100%}.taro-img__mode-scaletofill{width:100%;height:100%}.taro-img__mode-aspectfit{max-width:100%;max-height:100%}.taro-img__mode-aspectfill{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.taro-img__mode-aspectfill--width{min-width:100%;height:100%}.taro-img__mode-aspectfill--height{width:100%;min-height:100%}.taro-img__mode-widthfix{width:100%}.taro-img__mode-heightfix{height:100%}.taro-img__mode-top{width:100%}.taro-img__mode-bottom{width:100%;position:absolute;bottom:0}.taro-img__mode-left{height:100%}.taro-img__mode-right{height:100%;position:absolute;right:0}.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{position:absolute;bottom:0}.taro-img__mode-bottomright{position:absolute;bottom:0;right:0}";
|
|
5
5
|
|
|
@@ -45,10 +45,10 @@ const Image = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
45
45
|
const { src, lazyLoad = false, aspectFillMode = 'width', imageOnLoad, imageOnError, nativeProps, didLoad } = this;
|
|
46
46
|
// mode="" 按默认值处理
|
|
47
47
|
const mode = this.mode || 'scaleToFill';
|
|
48
|
-
const cls =
|
|
48
|
+
const cls = classnames({
|
|
49
49
|
'taro-img__widthfix': mode === 'widthFix'
|
|
50
50
|
});
|
|
51
|
-
const imgCls =
|
|
51
|
+
const imgCls = classnames(`taro-img__mode-${mode.toLowerCase().replace(/\s/g, '')}`, {
|
|
52
52
|
[`taro-img__mode-aspectfill--${aspectFillMode}`]: mode === 'aspectFill'
|
|
53
53
|
});
|
|
54
54
|
return (h(Host, { class: cls }, src ? (h("img", Object.assign({ ref: (img) => (this.imgRef = img), class: imgCls, src: lazyLoad && !didLoad ? undefined : src, onLoad: imageOnLoad.bind(this), onError: imageOnError.bind(this) }, nativeProps))) : ''));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import Taro from '@tarojs/taro';
|
|
3
|
-
import
|
|
3
|
+
import { c as classnames } from './index2.js';
|
|
4
4
|
|
|
5
5
|
const indexCss = ".navigator-hover{background:#efefef}";
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@ const Navigator = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
const { isHover, hoverClass } = this;
|
|
65
|
-
return (h(Host, { class:
|
|
65
|
+
return (h(Host, { class: classnames({
|
|
66
66
|
[hoverClass]: isHover
|
|
67
67
|
}) }));
|
|
68
68
|
}
|