Skip to content

wxbpd组件 #748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions sites/wxbpd/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
UTF-8
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{js,styl,html,json,vue}]
indent_size = 2
indent_style = space
[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions sites/wxbpd/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
39 changes: 39 additions & 0 deletions sites/wxbpd/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parser": "vue-eslint-parser",
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module",
"allowImportExportEverywhere": false
},
"extends": [
"standard",
"plugin:vue/recommended"
],
"plugins": [
"jsdoc"
],
"globals": {
"MIP": true
},
"env": {
"browser": true
},
"rules": {
"jsdoc/check-param-names": 1,
"jsdoc/check-tag-names": 1,
"jsdoc/check-types": 1,
"jsdoc/newline-after-description": 1,
"jsdoc/no-undefined-types": 1,
"jsdoc/require-description-complete-sentence": 0,
"jsdoc/require-example": 0,
"jsdoc/require-hyphen-before-param-description": 0,
"jsdoc/require-param": 1,
"jsdoc/require-param-description": 1,
"jsdoc/require-param-name": 1,
"jsdoc/require-param-type": 1,
"jsdoc/require-returns-description": 1,
"jsdoc/require-returns-type": 1,
"jsdoc/valid-types": 1,
"no-var": 2
}
}
8 changes: 8 additions & 0 deletions sites/wxbpd/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
dist/
.idea/
*.log
Thumbs.db
.DS_Store
*.swp
*.gz
Empty file added sites/wxbpd/common/.gitkeep
Empty file.
22 changes: 22 additions & 0 deletions sites/wxbpd/components/mip-article-info/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# `mip-article-info`

标题|内容
----|----
类型|
支持布局|
所需脚本| [https://c.mipcdn.com/extensions/platform/v2/wxbpd/mip-article-info/mip-article-info.js](https://c.mipcdn.com/extensions/platform/v2/wxbpd/mip-article-info/mip-article-info.js)

## 说明

mip-article-info 用于与服务端进行数据交互并动态展示页面信息
由于官方的获取异步数据的组件对于数据格式有明确要求,并且无法满足项目需要,因此未使用官方组件

## 示例

<mip-article-info serverurl="" pageurl="" articleid=""></mip-article-info>

## 属性

serverurl 获取服务端数据的地址
pageurl 页面地址,用于页面跳转
articleid 获取数据所需参数
73 changes: 73 additions & 0 deletions sites/wxbpd/components/mip-article-info/example/mip-example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html mip>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>MIP page</title>
<link rel="canonical" href="对应的原页面地址">
<link rel="stylesheet" href="https://c.mipcdn.com/static/v2/mip.css">
<style mip-custom>
/* 自定义样式 */
body,
div,
span,
header,
footer,
nav,
section,
aside,
article,
ul,
dl,
dt,
dd,
li,
a,
p,
h1,
h2,
h3,
h4,
h5,
h6,
i,
b,
textarea,
button,
input,
select,
figure,
figcaption {
padding: 0;
margin: 0;
list-style: none;
font-style: normal;
text-decoration: none;
border: 0;
font-weight: normal;
font-family: 'SourceHanSansCN-Regular';
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
-webkit-font-smoothing: antialiased;
outline: none;
font-size: 14px;
}

html {
height: 100%;
font-size: 14px;
}
span {
cursor: pointer;
display: inline-block;
}
</style>
</head>
<body>
<div>
<mip-article-info serverurl="http://118.31.34.38:9999" pageurl="http://192.168.0.27:8000" articleid="50"></mip-article-info>
</div>
<script src="https://c.mipcdn.com/static/v2/mip.js"></script>
<script src="/mip-article-info/mip-article-info.js"></script>
</body>
</html>
Loading