Skip to content

Commit

Permalink
feat: add mip-shell rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo-Li committed May 29, 2018
1 parent bcb8608 commit 7e70abf
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 1 deletion.
143 changes: 143 additions & 0 deletions cases/291.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<!DOCTYPE html>
<html mip>
<head>
<meta charset="utf-8">
<title>MIP Index Page</title>
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://c.mipcdn.com/static/v2/mip.css">
<link rel="canonical" href="https://www.mipengine.org/test_xxx.html">
<style mip-custom>
p {
font-size: 1.5em;
margin: 0 30px;
}
.main-image {
text-align: center;
}
.link {
text-align: center;
margin-top: 20px;
display: block;
}
</style>
</head>
<body>
<div class="main-image">
<mip-img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3010417400,2137373730&fm=27&gp=0.jpg" width="300" height="300"></mip-img>
</div>
<br><br>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>

<a class="link" href="./tree.html" mip-link>Go to Tree</a>
<a class="link" href="./data.html" mip-link>Go to Data</a>
<a class="link" href="./not-mip.html">Go to Not MIP</a>
<a class="link" href="/not/exists" mip-link>Go to Not Exists</a>

<br><br>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>
<p>
Progressive Web Apps are user experiences that have the reach of the web, and are:
Reliable - Load instantly and never show the downasaur, even in uncertain network conditions.
Fast - Respond quickly to user interactions with silky smooth animations and no janky scrolling.
</p>

<mip-shell>
<script type="application/json">
{
"header": {
"title": "Mip Index",
"logo": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3010417400,2137373730&fm=27&gp=0.jpg",
"buttonGroup": [
{
"type": "button",
"name": "subscribe",
"text": "关注",
"link": "/examples/page/tree.html"
},
{
"type": "button",
"name": "chat",
"text": "发消息",
"outline": true
},
{
"type": "icon",
"name": "search",
"text": "search",
"link": "/examples/page/tree.html"
},
{
"type": "dropdown",
"items": [
{
"name": "subscribe",
"text": "关注",
"link": "/examples/page/tree.html"
},
{
"name": "chat",
"text": "发消息"
}
]
}
]
},
"view": {
"isIndex": true,
"transition": {
"mode": "slide"
}
},
"footer": {}
}
</script>
</mip-shell>
<mip-data>
<script type="application/json">
{
"#group": {
"info": {
"name": "sfe"
}
}
}
</script>
</mip-data>
<mip-shell>
<script type="application/json">
{
"header": {},
"view": {
"isIndex": true,
"transition": {
"mode": "slide"
}
},
"footer": {}
}
</script>
</mip-shell>
<span m-text="group.info.name"></span>
<script src="https://c.mipcdn.com/static/v2/mip.js"></script>
</body>
10 changes: 10 additions & 0 deletions cases/291.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"message": "标签 '<mip-shell>' 只能出现一次",
"code": "06200701",
"line": 127,
"col": 5,
"offset": 4999,
"input": " <mip-shell>"
}
]
3 changes: 2 additions & 1 deletion cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,5 @@
280|内部以分号分隔|通过
281|内部以其他分隔|不通过
289|src 不存在,type 为 application/mip-script | 通过
290|src 存在,type 为 application/mip-script | 不通过
290|src 存在,type 为 application/mip-script | 不通过
291|标签 mip-shell 只能出现一次 | 不通过
3 changes: 3 additions & 0 deletions rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,5 +363,8 @@
"value": "/^\\S+$/"
}
}
},
"mip-shell": {
"duplicate": true
}
}

0 comments on commit 7e70abf

Please sign in to comment.