From edfe5c7fa14887e80eb0f9290c50ab2f52f1b228 Mon Sep 17 00:00:00 2001 From: guozhuorong <250366847@qq.com> Date: Thu, 29 Aug 2019 16:10:34 +0800 Subject: [PATCH] add nodisplay layout and prerenderAllowed true (#694) --- components/mip-linksubmit/README.md | 4 ++-- components/mip-linksubmit/example/index.html | 8 +++++++- components/mip-linksubmit/mip-linksubmit.js | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/components/mip-linksubmit/README.md b/components/mip-linksubmit/README.md index dc79d0c2..2bfce26f 100644 --- a/components/mip-linksubmit/README.md +++ b/components/mip-linksubmit/README.md @@ -5,7 +5,7 @@ 标题|内容 ----|---- 类型|通用 -支持布局|N/S +支持布局|nodisplay 所需脚本| [https://c.mipcdn.com/static/v2/mip-linksubmit/mip-linksubmit.js](https://c.mipcdn.com/static/v2/mip-linksubmit/mip-linksubmit.js) ## 说明 @@ -15,7 +15,7 @@ ## 示例 ```html - + ``` ## 属性 diff --git a/components/mip-linksubmit/example/index.html b/components/mip-linksubmit/example/index.html index 50cb90a0..6bc909cd 100644 --- a/components/mip-linksubmit/example/index.html +++ b/components/mip-linksubmit/example/index.html @@ -8,11 +8,17 @@ +
- +
diff --git a/components/mip-linksubmit/mip-linksubmit.js b/components/mip-linksubmit/mip-linksubmit.js index 0d39adfa..b61cb77d 100644 --- a/components/mip-linksubmit/mip-linksubmit.js +++ b/components/mip-linksubmit/mip-linksubmit.js @@ -1,4 +1,8 @@ export default class MIPLinksubmit extends MIP.CustomElement { + prerenderAllowed () { + return true + } + build () { const type = this.element.getAttribute('type') || '' const bp = document.createElement('script')