Skip to content

Commit

Permalink
修改一些从MIP1抄过来的代码的规范
Browse files Browse the repository at this point in the history
  • Loading branch information
easonyq authored and craigchencc committed Dec 20, 2018
1 parent 7b3ba69 commit 27f731e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/mip/src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,19 @@ let viewer = {
* @return {Object} messageData
*/
_getMessageData () {
let messageKey = 'loadiframe';
let messageData = {};
messageData.url = this.href;
let messageKey = 'loadiframe'
let messageData = {}
messageData.url = this.href
if (this.hasAttribute('no-head')) {
messageData.nohead = true;
messageData.nohead = true
}
if (this.hasAttribute('mip-link')) {
let parent = this.parentNode;
messageData.title = parent.getAttribute('title') || parent.innerText.trim().split('\n')[0];
messageData.click = parent.getAttribute('data-click');
let parent = this.parentNode
messageData.title = parent.getAttribute('title') || parent.innerText.trim().split('\n')[0]
messageData.click = parent.getAttribute('data-click')
} else {
messageData.title = this.getAttribute('data-title') || this.innerText.trim().split('\n')[0];
messageData.click = this.getAttribute('data-click');
messageData.title = this.getAttribute('data-title') || this.innerText.trim().split('\n')[0]
messageData.click = this.getAttribute('data-click')
}
return {messageKey, messageData}
},
Expand Down

0 comments on commit 27f731e

Please sign in to comment.