@tuya-miniapp/smart-ui 2.8.1-beta-2 → 2.8.1-beta-4
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SmartComponent } from '../common/component';
|
|
2
|
+
import ty from '../common/ty';
|
|
2
3
|
SmartComponent({
|
|
3
4
|
props: {
|
|
4
5
|
/**
|
|
@@ -120,6 +121,7 @@ SmartComponent({
|
|
|
120
121
|
currValue: newValue,
|
|
121
122
|
});
|
|
122
123
|
this.$emit('change', newValue);
|
|
124
|
+
ty.vibrateShort({ type: 'light' });
|
|
123
125
|
},
|
|
124
126
|
handlePassword() {
|
|
125
127
|
this.setData({ visible: true });
|
package/dist/index-bar/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { SmartComponent } from '../common/component';
|
|
|
3
3
|
import { useChildren } from '../common/relation';
|
|
4
4
|
import { getRect, isDef } from '../common/utils';
|
|
5
5
|
import { pageScrollMixin } from '../mixins/page-scroll';
|
|
6
|
+
import ty from '../common/ty';
|
|
6
7
|
const indexList = () => {
|
|
7
8
|
const indexList = [];
|
|
8
9
|
const charCodeOfA = 'A'.charCodeAt(0);
|
|
@@ -51,6 +52,13 @@ SmartComponent({
|
|
|
51
52
|
activeAnchorIndex: null,
|
|
52
53
|
showSidebar: false,
|
|
53
54
|
},
|
|
55
|
+
watch: {
|
|
56
|
+
activeAnchorIndex(newVal) {
|
|
57
|
+
if (newVal !== null && newVal !== -1) {
|
|
58
|
+
ty.vibrateShort({ type: 'light' });
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
},
|
|
54
62
|
created() {
|
|
55
63
|
this.scrollTop = 0;
|
|
56
64
|
},
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
var component_1 = require("../common/component");
|
|
7
|
+
var ty_1 = __importDefault(require("../common/ty"));
|
|
4
8
|
(0, component_1.SmartComponent)({
|
|
5
9
|
props: {
|
|
6
10
|
/**
|
|
@@ -122,6 +126,7 @@ var component_1 = require("../common/component");
|
|
|
122
126
|
currValue: newValue,
|
|
123
127
|
});
|
|
124
128
|
this.$emit('change', newValue);
|
|
129
|
+
ty_1.default.vibrateShort({ type: 'light' });
|
|
125
130
|
},
|
|
126
131
|
handlePassword: function () {
|
|
127
132
|
this.setData({ visible: true });
|
package/lib/index-bar/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
var color_1 = require("../common/color");
|
|
4
7
|
var component_1 = require("../common/component");
|
|
5
8
|
var relation_1 = require("../common/relation");
|
|
6
9
|
var utils_1 = require("../common/utils");
|
|
7
10
|
var page_scroll_1 = require("../mixins/page-scroll");
|
|
11
|
+
var ty_1 = __importDefault(require("../common/ty"));
|
|
8
12
|
var indexList = function () {
|
|
9
13
|
var indexList = [];
|
|
10
14
|
var charCodeOfA = 'A'.charCodeAt(0);
|
|
@@ -53,6 +57,13 @@ var indexList = function () {
|
|
|
53
57
|
activeAnchorIndex: null,
|
|
54
58
|
showSidebar: false,
|
|
55
59
|
},
|
|
60
|
+
watch: {
|
|
61
|
+
activeAnchorIndex: function (newVal) {
|
|
62
|
+
if (newVal !== null && newVal !== -1) {
|
|
63
|
+
ty_1.default.vibrateShort({ type: 'light' });
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
},
|
|
56
67
|
created: function () {
|
|
57
68
|
this.scrollTop = 0;
|
|
58
69
|
},
|