mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-31 10:49:15 +08:00
parent
274dca17b7
commit
3305aee3e4
@ -6,7 +6,10 @@ Component({
|
|||||||
properties: {
|
properties: {
|
||||||
text: {
|
text: {
|
||||||
type: String,
|
type: String,
|
||||||
value: ''
|
value: '',
|
||||||
|
observer(newVal) {
|
||||||
|
this.setData({}, this._init);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mode: {
|
mode: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -71,10 +74,6 @@ Component({
|
|||||||
timer && clearTimeout(timer);
|
timer && clearTimeout(timer);
|
||||||
},
|
},
|
||||||
|
|
||||||
ready() {
|
|
||||||
this._init();
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
_checkMode(val) {
|
_checkMode(val) {
|
||||||
const isValidMode = ~VALID_MODE.indexOf(val);
|
const isValidMode = ~VALID_MODE.indexOf(val);
|
||||||
@ -90,7 +89,7 @@ Component({
|
|||||||
.select('.zan-noticebar__content')
|
.select('.zan-noticebar__content')
|
||||||
.boundingClientRect((rect) => {
|
.boundingClientRect((rect) => {
|
||||||
if (!rect || !rect.width) {
|
if (!rect || !rect.width) {
|
||||||
throw new Error('页面缺少 noticebar 元素');
|
return;
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
width: rect.width
|
width: rect.width
|
||||||
|
Loading…
x
Reference in New Issue
Block a user