🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

mini-program-parser

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mini-program-parser - npm Package Compare versions

Comparing version
0.3.2
to
0.3.3
+19
-5
component/mini-parser/index.js

@@ -13,2 +13,4 @@ Component({

},
queryTimer: null,
queryCount: 0,
ready() {

@@ -19,2 +21,15 @@ const { html, config } = this.data;

if (adaptive) {
this.queryTimer = setInterval(() => {
this.getContainerWidth();
}, 100);
} else {
this.setData({
renderVisible: true,
});
}
}
},
methods: {
getContainerWidth() {
if (this.queryTimer || this.queryCount > 20) {
// 获取外层容器宽度

@@ -26,2 +41,3 @@ wx.createSelectorQuery()

if (res && res.width > 0) {
this.queryTimer = null;
this.setData({

@@ -31,12 +47,10 @@ containerWidth: res.width,

});
} else {
this.queryCount += 1;
}
})
.exec();
} else {
this.setData({
renderVisible: true,
});
}
}
},
},
});
{
"name": "mini-program-parser",
"version": "0.3.2",
"version": "0.3.3",
"scripts": {

@@ -5,0 +5,0 @@ "dev": "rollup -c ./rollup.dev.config.js --watch",

Sorry, the diff of this file is not supported yet