🎩 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.1
to
0.3.2
+23
-14
component/mini-parser/index.js

@@ -11,20 +11,29 @@ Component({

containerWidth: 0,
renderVisible: false,
},
ready() {
const { adaptive = true } = this.data.config;
if (adaptive) {
// 获取外层容器宽度
wx.createSelectorQuery()
.in(this)
.select(".mini-parser")
.boundingClientRect((res) => {
if (res.width > 0) {
this.setData({
containerWidth: res.width,
});
}
})
.exec();
const { html, config } = this.data;
const { adaptive = true } = config;
if (html) {
if (adaptive) {
// 获取外层容器宽度
wx.createSelectorQuery()
.in(this)
.select(".mini-parser")
.boundingClientRect((res) => {
if (res && res.width > 0) {
this.setData({
containerWidth: res.width,
renderVisible: true,
});
}
})
.exec();
} else {
this.setData({
renderVisible: true,
});
}
}
},
});
{
"name": "mini-program-parser",
"version": "0.3.1",
"version": "0.3.2",
"scripts": {

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet