@tarojs/components 3.6.6-alpha.2 → 3.6.6-alpha.3
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +3 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +6 -0
- package/dist/cjs/taro-text-core.cjs.entry.js +9 -6
- package/dist/collection/components/picker/picker.js +23 -1
- package/dist/collection/components/rich-text/rich-text.js +71 -0
- package/dist/collection/components/rich-text/style/index.css +16 -0
- package/dist/collection/components/text/style/index.css +20 -3
- package/dist/collection/components/text/text.js +66 -6
- package/dist/components/taro-picker-core.js +4 -1
- package/dist/components/taro-rich-text-core.js +10 -1
- package/dist/components/taro-text-core.js +13 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +3 -1
- package/dist/esm/taro-rich-text-core.entry.js +6 -0
- package/dist/esm/taro-text-core.entry.js +9 -6
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-text-core.entry.js +1 -1
- package/dist/taro-components/p-05052434.entry.js +1 -0
- package/dist/taro-components/p-0fa96970.entry.js +1 -0
- package/dist/taro-components/p-425c209a.entry.js +1 -0
- package/dist/taro-components/{p-8414da06.system.entry.js → p-5f519dd9.system.entry.js} +1 -1
- package/dist/taro-components/p-9edea30f.system.entry.js +1 -0
- package/dist/taro-components/p-e09451c5.system.entry.js +1 -0
- package/dist/taro-components/p-ed331c06.system.js +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/picker/picker.d.ts +5 -0
- package/dist/types/components/rich-text/rich-text.d.ts +4 -0
- package/dist/types/components/text/text.d.ts +4 -0
- package/dist/types/components.d.ts +16 -1
- package/lib/vue2/components.d.ts +7 -0
- package/lib/vue2/components.js +10 -3
- package/lib/vue2/components.js.map +1 -1
- package/lib/vue3/components.js +9 -2
- package/lib/vue3/components.js.map +1 -1
- package/package.json +8 -8
- package/types/Picker.d.ts +10 -0
- package/types/RichText.d.ts +6 -4
- package/types/Text.d.ts +4 -3
- package/types/Textarea.d.ts +4 -2
- package/dist/taro-components/p-5b67a98e.entry.js +0 -1
- package/dist/taro-components/p-af2cd702.entry.js +0 -1
- package/dist/taro-components/p-c43c5e89.system.entry.js +0 -1
- package/dist/taro-components/p-ed011ff9.entry.js +0 -1
- package/dist/taro-components/p-fa43177b.system.entry.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components",
|
|
3
|
-
"version": "3.6.6-alpha.
|
|
3
|
+
"version": "3.6.6-alpha.3",
|
|
4
4
|
"description": "Taro 组件库",
|
|
5
5
|
"browser": "dist/index.js",
|
|
6
6
|
"main:h5": "dist/index.js",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"resolve-pathname": "^3.0.0",
|
|
38
38
|
"swiper": "6.8.0",
|
|
39
39
|
"weui": "^1.1.2",
|
|
40
|
-
"@tarojs/
|
|
41
|
-
"@tarojs/
|
|
42
|
-
"@tarojs/taro": "3.6.6-alpha.
|
|
40
|
+
"@tarojs/components-advanced": "3.6.6-alpha.3",
|
|
41
|
+
"@tarojs/router": "3.6.6-alpha.3",
|
|
42
|
+
"@tarojs/taro": "3.6.6-alpha.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/generator": "^7.20.0",
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"dev:library-vue3": "cross-env NODE_ENV=development pnpm --filter @tarojs/components-library-vue3 run dev",
|
|
85
85
|
"generate:lib": "mkdir -p lib",
|
|
86
86
|
"generate:stencil-config": "esbuild ./scripts/stencil/stencil.config.ts --bundle --platform=node --outfile=stencil.config.js",
|
|
87
|
-
"stencil:test": "cross-env NODE_ENV=test stencil test --spec --e2e",
|
|
88
87
|
"sync:types": "ts-node scripts/json-schema-to-types.ts",
|
|
89
|
-
"test": "
|
|
90
|
-
"test:
|
|
91
|
-
"test:
|
|
88
|
+
"test": "cross-env NODE_ENV=test stencil test --spec --e2e",
|
|
89
|
+
"test:ci": "pnpm test -- --ci --no-build",
|
|
90
|
+
"test:coverage": "pnpm test -- --ci --screenshot --coverage",
|
|
91
|
+
"test:watch": "pnpm test -- --screenshot --watch"
|
|
92
92
|
}
|
|
93
93
|
}
|
package/types/Picker.d.ts
CHANGED
|
@@ -35,6 +35,11 @@ declare namespace PickerStandardProps {
|
|
|
35
35
|
/** 省市区选择器 */
|
|
36
36
|
region
|
|
37
37
|
}
|
|
38
|
+
|
|
39
|
+
interface PickerText {
|
|
40
|
+
okText?: string
|
|
41
|
+
cancelText?: string
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
/** 普通选择器:mode = selector */
|
|
40
45
|
interface PickerSelectorProps extends PickerStandardProps {
|
|
@@ -74,6 +79,11 @@ interface PickerSelectorProps extends PickerStandardProps {
|
|
|
74
79
|
* @supported weapp, h5, rn
|
|
75
80
|
*/
|
|
76
81
|
onChange: CommonEventFunction<PickerSelectorProps.ChangeEventDetail>
|
|
82
|
+
/**
|
|
83
|
+
* 用于替换组件内部文本
|
|
84
|
+
* @supported h5
|
|
85
|
+
*/
|
|
86
|
+
textProps?: PickerStandardProps.PickerText
|
|
77
87
|
}
|
|
78
88
|
declare namespace PickerSelectorProps {
|
|
79
89
|
interface ChangeEventDetail {
|
package/types/RichText.d.ts
CHANGED
|
@@ -3,18 +3,20 @@ import { CommonEventFunction, StandardProps } from './common'
|
|
|
3
3
|
interface RichTextProps extends StandardProps {
|
|
4
4
|
/** 文本是否可选,该属性会使节点显示为 block
|
|
5
5
|
* @default false
|
|
6
|
-
* @supported weapp
|
|
6
|
+
* @supported weapp, h5
|
|
7
7
|
*/
|
|
8
8
|
userSelect?: boolean
|
|
9
|
-
/** 节点列表/ HTML String
|
|
9
|
+
/** 节点列表/ HTML String
|
|
10
|
+
* @supported weapp, swan, alipay, tt, h5, rn, harmony
|
|
11
|
+
*/
|
|
10
12
|
nodes?: Nodes
|
|
11
13
|
/** 显示连续空格
|
|
12
|
-
* @supported weapp, alipay, qq, rn
|
|
14
|
+
* @supported weapp, alipay, qq, h5, rn
|
|
13
15
|
*/
|
|
14
16
|
space?: keyof RichTextProps.TSpace
|
|
15
17
|
/** 富文本是否可以长按选中,可用于复制,粘贴,长按搜索等场景
|
|
16
18
|
* @default false(基础库 3.150.1 以前版本)true(基础库 3.150.1 及以后版本)
|
|
17
|
-
* @supported swan
|
|
19
|
+
* @supported swan, h5
|
|
18
20
|
*/
|
|
19
21
|
selectable?: string
|
|
20
22
|
/** 阻止长按图片时弹起默认菜单(将该属性设置为image-menu-prevent或image-menu-prevent="true"),只在初始化时有效,不能动态变更;若不想阻止弹起默认菜单,则不需要设置此属性
|
package/types/Text.d.ts
CHANGED
|
@@ -8,22 +8,23 @@ interface TextProps extends StandardProps {
|
|
|
8
8
|
selectable?: boolean
|
|
9
9
|
/** 文本是否可选,该属性会使文本节点显示为 inline-block
|
|
10
10
|
* @default false
|
|
11
|
-
* @supported weapp
|
|
11
|
+
* @supported weapp, h5
|
|
12
12
|
*/
|
|
13
13
|
userSelect?: boolean
|
|
14
14
|
/** 显示连续空格
|
|
15
|
-
* @supported weapp, alipay, swan, tt, qq, jd
|
|
15
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5
|
|
16
16
|
*/
|
|
17
17
|
space?: keyof TextProps.TSpace
|
|
18
18
|
/** 是否解码
|
|
19
19
|
* @default false
|
|
20
20
|
* @supported weapp, alipay, tt, qq, jd
|
|
21
|
+
* @h5 默认解码,不支持设置
|
|
21
22
|
*/
|
|
22
23
|
decode?: boolean
|
|
23
24
|
/** 多行省略,值须大于等于 1,表现同 css 的 -webkit-line-clamp 属性一致。
|
|
24
25
|
* @supported alipay
|
|
25
26
|
*/
|
|
26
|
-
numberOfLines?:
|
|
27
|
+
numberOfLines?: number
|
|
27
28
|
}
|
|
28
29
|
declare namespace TextProps {
|
|
29
30
|
/** space 的合法值 */
|
package/types/Textarea.d.ts
CHANGED
|
@@ -105,13 +105,15 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
105
105
|
*/
|
|
106
106
|
name?: string
|
|
107
107
|
/** 是否渲染字数统计功能(是否删除默认计数器/是否显示字数统计)。
|
|
108
|
+
* @default true
|
|
108
109
|
* @supported alipay
|
|
109
110
|
*/
|
|
110
|
-
showCount?:
|
|
111
|
+
showCount?: boolean
|
|
111
112
|
/** 是否为受控组件。为 true 时,value 内容会完全受 setData 控制。
|
|
113
|
+
* @default false
|
|
112
114
|
* @supported alipay
|
|
113
115
|
*/
|
|
114
|
-
controlled?:
|
|
116
|
+
controlled?: boolean
|
|
115
117
|
/** 无障碍访问,(属性)元素的额外描述
|
|
116
118
|
* @supported qq
|
|
117
119
|
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as r,H as n}from"./p-9137dcab.js";const e=class{constructor(n){t(this,n),this.renderNode=t=>{if("type"in t&&"text"===t.type)return(t.text||"").replace(/ /g," ");if("name"in t&&t.name){const{name:n,attrs:e,children:s}=t,o={};let i=[];if(e&&"object"==typeof e)for(const t in e){const r=e[t];if("style"!==t||"string"!=typeof r)o[t]=r;else{const t=r.split(";").map((t=>t.trim())).filter((t=>t)),n={};t.forEach((t=>{if(!t)return;const r=/(.+): *(.+)/g.exec(t);if(!r)return;const[,e,s]=r,o=e.replace(/-([a-z])/g,((...t)=>t[1].toUpperCase()));n[o]=s})),Object.keys(n).length&&(o.style=n)}}return s&&s.length&&(i=s.map((t=>this.renderNode(t)))),r(n,o,i)}return null},this.nodes=void 0}render(){const{nodes:t,renderNode:e}=this;return Array.isArray(t)?r(n,null,t.map((t=>e(t)))):r(n,{innerHTML:t})}};export{e as taro_rich_text_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as h}from"./p-9137dcab.js";import{c as n}from"./p-2fad2a65.js";function o(t,i){const s=[];for(let e=t;e<=i;e++)s.push(`${e<10?"0":""}${e}`);return s}const r=["20","21","22","23",...o(0,23),"00","01","02","03"],a=["56","57","58","59",...o(0,59),"00","01","02","03"];function c(t,i){return!isNaN(+t)&&t>=0&&t<i.length}function u(t){if(!/^\d{1,2}:\d{1,2}$/.test(t))return!1;const i=t.split(":").map((t=>+t));return!(i[0]<0||i[0]>23||i[1]<0||i[1]>59)}function d(t,i){const s=t.split(":").map((t=>+t)),e=i.split(":").map((t=>+t));return s[0]<e[0]||s[0]===e[0]&&s[1]<=e[1]}function l(t){if(!t)return!1;const i=new Date(t.replace(/-/g,"/"));return!isNaN(i.getMonth())&&i}function p(t){let i;return i=Array.isArray(t)?t.map((t=>String(t))):t,i}function m(t,i){const s=[];for(let e=t;e<=i;e++)s.push(e);return s}function g(t,i){return m(t,i)}function f(t,i,s){let e=1,h=12;return t.getFullYear()===s&&(e=t.getMonth()+1),i.getFullYear()===s&&(h=i.getMonth()+1),m(e,h)}function v(t,i,s,e){let h=1,n=function(t,i){return 4===i||6===i||9===i||11===i?30:2===i?t%4==0&&t%100!=0||t%400==0?29:28:31}(s,e);return t.getFullYear()===s&&t.getMonth()+1===e&&(h=t.getDate()),i.getFullYear()===s&&i.getMonth()+1===e&&(n=i.getDate()),m(h,n)}const _=102,k=34,w=class{constructor(e){t(this,e),this.onChange=i(this,"change",7),this.onColumnChange=i(this,"columnchange",7),this.onCancel=i(this,"cancel",7),this.index=[],this.showPicker=()=>{this.disabled||(this.height=this.getHeightByIndex(),this.hidden=!1)},this.getHeightByIndex=()=>this.index.map((t=>{let i=0;return"time"===this.mode&&(i=136),_-k*t-i})),this.hidePicker=()=>{this.fadeOut=!0,setTimeout((()=>{this.hidden=!0,this.fadeOut=!1}),350)},this.handleChange=()=>{this.hidePicker(),this.index=this.height.map((t=>(_-t)/k));let t=this.index.length&&"selector"!==this.mode?this.index:this.index[0];if("time"===this.mode){const i=[r.slice(),a.slice()],s=this.index.map(((t,s)=>i[s][t]));this.index=s.map((t=>parseInt(t))),t=s.join(":")}if("date"===this.mode){const{_start:i,_end:s,_updateValue:e}=this.pickerDate,h=e[0],n=e[1],o=g(i.getFullYear(),s.getFullYear()),r=f(i,s,h),a=v(i,s,h,n),c=o[this.index[0]],u=r[this.index[1]];t="year"===this.fields?[c]:"month"===this.fields?[c,u]:[c,u,a[this.index[2]]],t=t.map((t=>t<10?`0${t}`:t)).join("-")}this.value=t,this.pickerValue=this.value,this.onChange.emit({value:t})},this.handleCancel=()=>{this.hidePicker(),this.onCancel.emit()},this.updateHeight=(t,i,s=!1)=>{const e=[...this.height];if(e[i]=t,this.height=e,s){let{start:t,end:i}=this;if(u(t)||(t="00:00"),u(i)||(i="23:59"),!d(t,i))return;const s=[r.slice(),a.slice()],e=this.height.map((t=>(_-t)/k)),h=e.map(((t,i)=>s[i][t])).join(":");if(d(t,h)){if(!d(h,i)){const t=i.split(":").map((t=>_-k*(+t+4)));requestAnimationFrame((()=>this.height=t))}}else{const i=t.split(":").map((t=>_-k*(+t+4)));requestAnimationFrame((()=>this.height=i))}}},this.handleColumnChange=(t,i)=>{this.onColumnChange.emit({column:Number(i),value:(_-t)/k})},this.updateDay=(t,i)=>{const{_start:s,_end:e,_updateValue:h}=this.pickerDate;h[i]=t;const n=h[0],o=h[1],r=h[2];if(0===i){const t=f(s,e,n),i=t[t.length-1],r=t[0];o>i&&(h[1]=i),o<r&&(h[1]=r);const a=t.indexOf(h[1]),c=_-k*a;this.updateDay(h[1],1),this.updateHeight(c,"1")}else if(1===i){const t=v(s,e,n,o),i=t[t.length-1],a=t[0];r>i&&(h[2]=i),r<a&&(h[2]=a);const c=t.indexOf(h[2]),u=_-k*c;this.updateDay(h[2],2),this.updateHeight(u,"2")}},this.getSelector=()=>s("taro-picker-group",{range:this.range,rangeKey:this.rangeKey,height:this.height[0],updateHeight:this.updateHeight,columnId:"0"}),this.getMultiSelector=()=>this.range.map(((t,i)=>s("taro-picker-group",{range:t,rangeKey:this.rangeKey,height:this.height[i],updateHeight:this.updateHeight,onColumnChange:this.handleColumnChange,columnId:String(i)}))),this.getTimeSelector=()=>{const t=r.slice(),i=a.slice();return[s("taro-picker-group",{mode:"time",range:t,height:this.height[0],updateHeight:this.updateHeight,columnId:"0"}),s("taro-picker-group",{mode:"time",range:i,height:this.height[1],updateHeight:this.updateHeight,columnId:"1"})]},this.getDateSelector=()=>{const{fields:t,height:i}=this,{_start:e,_end:h,_updateValue:n}=this.pickerDate,o=n[0],r=n[1],a=g(e.getFullYear(),h.getFullYear()).map((t=>`${t}年`)),c=f(e,h,o).map((t=>`${t<10?`0${t}`:t}月`)),u=v(e,h,o,r).map((t=>`${t<10?`0${t}`:t}日`)),d=[s("taro-picker-group",{mode:"date",range:a,height:i[0],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"0"})];return"month"!==t&&"day"!==t||d.push(s("taro-picker-group",{mode:"date",range:c,height:i[1],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"1"})),"day"===t&&d.push(s("taro-picker-group",{mode:"date",range:u,height:i[2],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"2"})),d},this.mode="selector",this.disabled=!1,this.range=[],this.rangeKey=void 0,this.value=void 0,this.start="",this.end="",this.fields="day",this.name="",this.pickerValue=[],this.height=[],this.hidden=!0,this.fadeOut=!1,this.isWillLoadCalled=!1}componentWillLoad(){this.isWillLoadCalled=!0,this.handleProps()}componentDidLoad(){this.overlay&&document.body.appendChild(this.overlay)}disconnectedCallback(){var t;this.overlay&&(null===(t=this.overlay.parentNode)||void 0===t||t.removeChild(this.overlay))}onPropsChange(){this.isWillLoadCalled&&this.handleProps()}handleProps(){const{mode:t,start:i,end:s}=this;if("selector"===t){const t=this.value;this.index=[c(t,this.range)?Math.floor(t):0]}else if("multiSelector"===t){const t=this.value;this.index=[],this.range.forEach(((i,s)=>{const e=null==t?void 0:t[s],h=c(e,i)?Math.floor(e):0;this.index.push(h)}))}else if("time"===t){let t=this.value;u(t)||(console.warn("time picker value illegal"),t="0:0");const i=t.split(":").map((t=>+t));this.index=i}else if("date"===t){const t=l(this.value)||new Date((new Date).setHours(0,0,0,0)),e=l(i)||new Date("1970/01/01"),h=l(s)||new Date("2999/01/01");if(!(t>=e&&t<=h))throw new Error("Date Interval Error");{const i=t.getFullYear(),s=t.getMonth()+1,n=t.getDate(),o=g(e.getFullYear(),h.getFullYear()),r=f(e,h,i),a=v(e,h,i,s);this.index=[o.indexOf(i),r.indexOf(s),a.indexOf(n)],this.pickerDate&&this.pickerDate._value.getTime()===t.getTime()&&this.pickerDate._start.getTime()===e.getTime()&&this.pickerDate._end.getTime()===h.getTime()||(this.pickerDate={_value:t,_start:e,_end:h,_updateValue:[i,s,n]})}}if(this.height=this.getHeightByIndex(),this.pickerValue=this.value,"date"===t){const t=this.pickerValue;"month"===this.fields?this.pickerValue=t.split("-").slice(0,2).join("-"):"year"===this.fields&&(this.pickerValue=t.split("-")[0])}}render(){const{name:t,mode:i,fadeOut:h,hidden:o}=this;let r;switch(i){case"multiSelector":r=this.getMultiSelector();break;case"time":r=this.getTimeSelector();break;case"date":r=this.getDateSelector();break;default:r=this.getSelector()}const a=n("weui-mask","weui-animate-fade-in",{"weui-animate-fade-out":h}),c=n("weui-picker","weui-animate-slide-up",{"weui-animate-slide-down":h}),u=o?{display:"none"}:{};return s(e,null,s("div",{onClick:this.showPicker},s("slot",null),s("input",{type:"hidden",name:t,value:p(this.pickerValue)})),s("div",{class:"weui-picker__overlay",style:u,ref:t=>{this.overlay=t}},s("div",{class:a,onClick:this.handleCancel}),s("div",{class:c},s("div",{class:"weui-picker__hd"},s("div",{class:"weui-picker__action",onClick:this.handleCancel},"取消"),s("div",{class:"weui-picker__action",onClick:this.handleChange},"确定")),s("div",{class:"weui-picker__bd"},r),s("input",{type:"hidden",name:t,value:p(this.pickerValue)}))))}get el(){return h(this)}static get watchers(){return{mode:["onPropsChange"],value:["onPropsChange"],range:["onPropsChange"],start:["onPropsChange"],end:["onPropsChange"]}}};w.style=".weui-picker,.weui-picker__hd{font-size:12px}";const y=class{constructor(i){t(this,i),this.mode=void 0,this.range=[],this.rangeKey=void 0,this.height=void 0,this.columnId=void 0,this.updateHeight=void 0,this.onColumnChange=void 0,this.updateDay=void 0,this.startY=void 0,this.preY=void 0,this.hadMove=void 0,this.touchEnd=void 0,this.isMove=void 0}getPosition(){const t=`translate3d(0, ${this.height}px, 0)`,i=`transform ${this.touchEnd?.3:0}s`;return{transform:t,"-webkit-transform":t,transition:i,"-webkit-transition":i}}formulaUnlimitedScroll(t,i,s){const{height:e,updateHeight:h,columnId:n}=this,o="up"===s?1:-1;this.touchEnd=!1,h(-t*o*k+e,n),requestAnimationFrame((()=>{this.touchEnd=!0;const s=Math.round(i/-34)+t*o;h(_-k*s,n,!0)}))}async handleMoveStart(t){this.startY=t,this.preY=t,this.hadMove=!1}async handleMoving(t){const i=t,s=i-this.preY;this.preY=i,this.touchEnd=!1,Math.abs(i-this.startY)>10&&(this.hadMove=!0);let e=this.height+s;"time"===this.mode&&("0"===this.columnId?(e>0&&(e=-816+s),e<-850&&(e=-34+s)):"1"===this.columnId&&(e>0&&(e=-2040+s),e<-2074&&(e=-34+s))),this.updateHeight(e,this.columnId)}async handleMoveEnd(t){const{mode:i,range:s,height:e,updateHeight:h,onColumnChange:n,columnId:o}=this,r=-34*(s.length-1),a=t;let c;if(this.touchEnd=!0,this.hadMove)c=e-_;else{const t=window.innerHeight;if(c=e-_-(a-(t-119)),"time"===i)if("0"===o){if(c>-85)return this.formulaUnlimitedScroll(24,c,"up");if(c<-969)return this.formulaUnlimitedScroll(24,c,"down")}else if("1"===o){if(c>-85)return this.formulaUnlimitedScroll(60,c,"up");if(c<-2193)return this.formulaUnlimitedScroll(60,c,"down")}}c>0&&(c=0),c<r&&(c=r);const u=Math.round(c/-34),d=_-k*u;"date"===this.mode&&("0"===this.columnId&&this.updateDay(+this.range[u].replace(/[^0-9]/gi,""),0),"1"===this.columnId&&this.updateDay(+this.range[u].replace(/[^0-9]/gi,""),1),"2"===this.columnId&&this.updateDay(+this.range[u].replace(/[^0-9]/gi,""),2)),h(d,o,"time"===i),n&&n(d,o)}onMouseDown(t){this.isMove=!0,this.handleMoveStart(t.clientY)}onMouseMove(t){t.preventDefault(),this.isMove&&this.handleMoving(t.clientY)}onMouseMoveEnd(t){this.isMove&&(this.isMove=!1,this.handleMoveEnd(t.clientY))}onTouchStart(t){this.handleMoveStart(t.changedTouches[0].clientY)}onTouchMove(t){t.preventDefault(),this.handleMoving(t.changedTouches[0].clientY)}onTouchEnd(t){this.handleMoveEnd(t.changedTouches[0].clientY)}render(){const{range:t,rangeKey:i}=this,h=t.map((t=>s("div",{class:"weui-picker__item"},i?t[i]:t)));return s(e,{class:"weui-picker__group"},s("div",{class:"weui-picker__mask"}),s("div",{class:"weui-picker__indicator"}),s("div",{class:"weui-picker__content",style:this.getPosition()},h))}};export{w as taro_picker_core,y as taro_picker_group}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js"],(function(r){"use strict";var e,t,n;return{setters:[function(r){e=r.r;t=r.h;n=r.H}],execute:function(){var i=r("taro_rich_text_core",function(){function r(r){var n=this;e(this,r);this.renderNode=function(r){if("type"in r&&r.type==="text"){var e=(r.text||"").replace(/ /g," ");return e}else if("name"in r&&r.name){var i=r.name,u=r.attrs,a=r.children;var o={};var f=[];if(u&&typeof u==="object"){var c=function(r){var e=u[r];if(r==="style"&&typeof e==="string"){var t=e.split(";").map((function(r){return r.trim()})).filter((function(r){return r}));var n={};t.forEach((function(r){if(!r)return;var e=/(.+): *(.+)/g.exec(r);if(!e)return;var t=e[1],i=e[2];var u=t.replace(/-([a-z])/g,(function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}return r[1].toUpperCase()}));n[u]=i}));if(Object.keys(n).length){o.style=n}return"continue"}o[r]=e};for(var s in u){c(s)}}if(a&&a.length){f=a.map((function(r){return n.renderNode(r)}))}return t(i,o,f)}return null};this.nodes=undefined}r.prototype.render=function(){var r=this,e=r.nodes,i=r.renderNode;if(Array.isArray(e)){return t(n,null,e.map((function(r){return i(r)})))}else{return t(n,{innerHTML:e})}};return r}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as s}from"./p-9137dcab.js";import{c as r}from"./p-2fad2a65.js";const o=class{constructor(t){e(this,t),this.selectable=!1}render(){const e=r({"taro-text__selectable":this.selectable});return t(s,{class:e},t("slot",null))}};o.style="taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}";export{o as taro_text_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js","./p-387314fa.system.js"],(function(e){"use strict";var t,s,r,n;return{setters:[function(e){t=e.r;s=e.h;r=e.H},function(e){n=e.c}],execute:function(){var c="taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}";var l=e("taro_text_core",function(){function e(e){t(this,e);this.selectable=false}e.prototype.render=function(){var e=n({"taro-text__selectable":this.selectable});return s(r,{class:e},s("slot",null))};return e}());l.style=c}}}));
|