@tuya-miniapp/smart-ui 2.6.4-beta-8 → 2.6.4-beta-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/dist/common/utils.d.ts +0 -1
- package/dist/common/utils.js +0 -7
- package/dist/datetime-picker/index.js +2 -2
- package/dist/image/index.js +1 -1
- package/dist/picker/index.css +1 -1
- package/dist/picker/index.js +11 -4
- package/dist/picker/index.wxml +4 -3
- package/dist/picker/index.wxs +1 -1
- package/dist/picker/index.wxss +1 -1
- package/dist/picker/shared.d.ts +11 -0
- package/dist/picker/shared.js +11 -0
- package/dist/picker-column/index.css +1 -1
- package/dist/picker-column/index.js +192 -77
- package/dist/picker-column/index.wxml +15 -36
- package/dist/picker-column/index.wxs +510 -399
- package/dist/picker-column/index.wxss +1 -1
- package/dist/wxs/utils.wxs +42 -1
- package/lib/common/utils.d.ts +0 -1
- package/lib/common/utils.js +1 -9
- package/lib/datetime-picker/index.js +3 -3
- package/lib/image/index.js +1 -1
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.js +13 -4
- package/lib/picker/index.wxml +4 -3
- package/lib/picker/index.wxs +1 -1
- package/lib/picker/index.wxss +1 -1
- package/lib/picker/shared.d.ts +11 -0
- package/lib/picker/shared.js +11 -0
- package/lib/picker-column/index.css +1 -1
- package/lib/picker-column/index.js +192 -83
- package/lib/picker-column/index.wxml +15 -36
- package/lib/picker-column/index.wxs +510 -399
- package/lib/picker-column/index.wxss +1 -1
- package/lib/wxs/utils.wxs +42 -1
- package/package.json +1 -1
- package/dist/wxs/strToStyleObject.wxs +0 -10
- package/lib/wxs/strToStyleObject.wxs +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-
|
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{backface-visibility:hidden;-webkit-backface-visibility:hidden;color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);perspective:900px;position:relative;text-align:center;transform:translateZ(0);width:100%;will-change:transform}.smart-picker-column__offset{cursor:-webkit-grab;cursor:grab;height:100%;overflow:visible;position:relative;touch-action:none;transform:rotateX(-108deg);transform-origin:center center;transform-style:preserve-3d;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{align-items:center;backface-visibility:hidden;-webkit-backface-visibility:hidden;display:flex;justify-content:center;left:50%;position:absolute;top:50%;transform-origin:center center;width:100%}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3);pointer-events:none}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;text-align:left;top:50%;transform:translateY(-50%);white-space:nowrap}.smart-picker-column__max-text{color:transparent;font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3);pointer-events:none}.smart-picker-column__item_0:after{content:var(--picker-item-content_0,"")}.smart-picker-column__item_1:after{content:var(--picker-item-content_1,"")}.smart-picker-column__item_2:after{content:var(--picker-item-content_2,"")}.smart-picker-column__item_3:after{content:var(--picker-item-content_3,"")}.smart-picker-column__item_4:after{content:var(--picker-item-content_4,"")}.smart-picker-column__item_5:after{content:var(--picker-item-content_5,"")}.smart-picker-column__item_6:after{content:var(--picker-item-content_6,"")}.smart-picker-column__item_7:after{content:var(--picker-item-content_7,"")}.smart-picker-column__item_8:after{content:var(--picker-item-content_8,"")}.smart-picker-column__item_9:after{content:var(--picker-item-content_9,"")}.smart-picker-column__item_10:after{content:var(--picker-item-content_10,"")}.smart-picker-column__item_11:after{content:var(--picker-item-content_11,"")}.smart-picker-column__item_12:after{content:var(--picker-item-content_12,"")}.smart-picker-column__item_13:after{content:var(--picker-item-content_13,"")}.smart-picker-column__item_14:after{content:var(--picker-item-content_14,"")}.smart-picker-column__item_15:after{content:var(--picker-item-content_15,"")}.smart-picker-column__item_16:after{content:var(--picker-item-content_16,"")}.smart-picker-column__item_17:after{content:var(--picker-item-content_17,"")}.smart-picker-column__item_18:after{content:var(--picker-item-content_18,"")}.smart-picker-column__item_19:after{content:var(--picker-item-content_19,"")}.smart-picker-column__item_20:after{content:var(--picker-item-content_20,"")}.smart-picker-column__item_21:after{content:var(--picker-item-content_21,"")}.smart-picker-column__item_22:after{content:var(--picker-item-content_22,"")}.smart-picker-column__item_23:after{content:var(--picker-item-content_23,"")}.smart-picker-column__item_24:after{content:var(--picker-item-content_24,"")}.smart-picker-column__item_25:after{content:var(--picker-item-content_25,"")}.smart-picker-column__item_26:after{content:var(--picker-item-content_26,"")}.smart-picker-column__item_27:after{content:var(--picker-item-content_27,"")}.smart-picker-column__item_28:after{content:var(--picker-item-content_28,"")}.smart-picker-column__item_29:after{content:var(--picker-item-content_29,"")}.smart-picker-column__item_30:after{content:var(--picker-item-content_30,"")}.smart-picker-column__item_31:after{content:var(--picker-item-content_31,"")}.smart-picker-column__item_32:after{content:var(--picker-item-content_32,"")}.smart-picker-column__item_33:after{content:var(--picker-item-content_33,"")}.smart-picker-column__item_34:after{content:var(--picker-item-content_34,"")}
|
package/lib/wxs/utils.wxs
CHANGED
|
@@ -3,8 +3,49 @@ var bem = require('./bem.wxs');
|
|
|
3
3
|
var memoize = require('./memoize.wxs');
|
|
4
4
|
var addUnit = require('./add-unit.wxs');
|
|
5
5
|
|
|
6
|
+
function queryComponent (ownerInstance, selector) {
|
|
7
|
+
var instance = ownerInstance && ownerInstance.selectComponent(selector);
|
|
8
|
+
return instance;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
function isObj(x) {
|
|
12
|
+
var type = typeof x;
|
|
13
|
+
return x !== null && (type === 'object' || type === 'function');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function range(num, min, max) {
|
|
17
|
+
return Math.min(Math.max(num, min), max);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 创建指定长度并填充默认值的数组
|
|
21
|
+
function createArray(length, defaultValue) {
|
|
22
|
+
var arr = [];
|
|
23
|
+
for (var i = 0; i < length; i++) {
|
|
24
|
+
arr[i] = defaultValue;
|
|
25
|
+
}
|
|
26
|
+
return arr;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 填充数组的所有元素为指定值
|
|
30
|
+
function fillArray(arr, value) {
|
|
31
|
+
for (var i = 0; i < arr.length; i++) {
|
|
32
|
+
arr[i] = value;
|
|
33
|
+
}
|
|
34
|
+
return arr;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function isArray(array) {
|
|
38
|
+
return array && typeof array === 'object' && typeof array.length === 'number';
|
|
39
|
+
}
|
|
40
|
+
|
|
6
41
|
module.exports = {
|
|
7
42
|
bem: memoize(bem),
|
|
8
43
|
memoize: memoize,
|
|
9
|
-
addUnit: addUnit
|
|
44
|
+
addUnit: addUnit,
|
|
45
|
+
queryComponent: queryComponent,
|
|
46
|
+
isObj: isObj,
|
|
47
|
+
range: range,
|
|
48
|
+
createArray: createArray,
|
|
49
|
+
fillArray: fillArray,
|
|
50
|
+
isArray: isArray
|
|
10
51
|
};
|
package/package.json
CHANGED