diff --git a/sites/d8xz.com/.editorconfig b/sites/d8xz.com/.editorconfig new file mode 100644 index 000000000..cb530eac4 --- /dev/null +++ b/sites/d8xz.com/.editorconfig @@ -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 diff --git a/sites/d8xz.com/.eslintignore b/sites/d8xz.com/.eslintignore new file mode 100644 index 000000000..db4c6d9b6 --- /dev/null +++ b/sites/d8xz.com/.eslintignore @@ -0,0 +1,2 @@ +dist +node_modules \ No newline at end of file diff --git a/sites/d8xz.com/.eslintrc b/sites/d8xz.com/.eslintrc new file mode 100644 index 000000000..84a3a2e9c --- /dev/null +++ b/sites/d8xz.com/.eslintrc @@ -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 + } +} diff --git a/sites/d8xz.com/.gitignore b/sites/d8xz.com/.gitignore new file mode 100644 index 000000000..1207415d5 --- /dev/null +++ b/sites/d8xz.com/.gitignore @@ -0,0 +1,8 @@ +node_modules/ +dist/ +.idea/ +*.log +Thumbs.db +.DS_Store +*.swp +*.gz diff --git a/sites/d8xz.com/common/.gitkeep b/sites/d8xz.com/common/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/sites/d8xz.com/components/mip-d8xz-fitpx/README.md b/sites/d8xz.com/components/mip-d8xz-fitpx/README.md new file mode 100644 index 000000000..4f56290cf --- /dev/null +++ b/sites/d8xz.com/components/mip-d8xz-fitpx/README.md @@ -0,0 +1,32 @@ +# mip-d8xz-fitpx + +标题|内容 +----|---- +类型| +支持布局| +所需脚本| [https://c.mipcdn.com/extensions/platform/v2/d8xz.com/mip-d8xz-fitpx/mip-d8xz-fitpx.js](https://c.mipcdn.com/extensions/platform/v2/d8xz.com/mip-d8xz-fitpx/mip-d8xz-fitpx.js) + +## 说明 + +组件功能说明 +用于项目mip页面rem布局屏幕适配,非常简单的一个组件. +## 示例 + +示例说明 + +``` +// 代码示例 + +``` + +## 属性 + +### 属性1 + +**说明**: + +**必选项**: + +**单位**: + +**默认值**: \ No newline at end of file diff --git a/sites/d8xz.com/components/mip-d8xz-fitpx/example/index.html b/sites/d8xz.com/components/mip-d8xz-fitpx/example/index.html new file mode 100644 index 000000000..2a5aa59cb --- /dev/null +++ b/sites/d8xz.com/components/mip-d8xz-fitpx/example/index.html @@ -0,0 +1,20 @@ + + + + + + MIP page + + + + + +
+ +
+ + + + diff --git a/sites/d8xz.com/components/mip-d8xz-fitpx/index.less b/sites/d8xz.com/components/mip-d8xz-fitpx/index.less new file mode 100644 index 000000000..2d56f5c25 --- /dev/null +++ b/sites/d8xz.com/components/mip-d8xz-fitpx/index.less @@ -0,0 +1,6 @@ +mip-d8xz-fitpx { + .wrapper { + margin: 0 auto; + text-align: center; + } +} diff --git a/sites/d8xz.com/components/mip-d8xz-fitpx/mip-d8xz-fitpx.js b/sites/d8xz.com/components/mip-d8xz-fitpx/mip-d8xz-fitpx.js new file mode 100644 index 000000000..c5e9196cd --- /dev/null +++ b/sites/d8xz.com/components/mip-d8xz-fitpx/mip-d8xz-fitpx.js @@ -0,0 +1,34 @@ +import './index.less' + +export default class MIPD8xzFitpx extends MIP.CustomElement { + build () { + "use strict"; + const pageStartTime = +new Date; + ~ function(e) { + function t() { + const t = screen.width > 0 && (e.innerWidth >= screen.width || 0 == e.innerWidth) ? screen.width : e.innerWidth; + a && (t = screen.width); + const i = t > u ? w : t / (u / 100); + i = i > h ? i : h, document.documentElement.style.fontSize = i + "px" + } + const n = e.navigator.userAgent, + a = n.match(/iphone/i), + o = n.match(/yixin/i), + c = n.match(/Mb2345/i), + r = n.match(/mso_app/i), + s = n.match(/sogoumobilebrowser/gi), + m = n.match(/liebaofast/i), + d = n.match(/GNBR/i), + u = document.documentElement.dataset.dw || 750, + h = 42, + w = 100; + e.addEventListener("resize", function() { + clearTimeout(i), i = setTimeout(t, 300) + }, !1), e.addEventListener("pageshow", function(e) { + e.persisted && (clearTimeout(i), i = setTimeout(t, 300)) + }, !1), o || c || r || s || m || d ? setTimeout(function() { + t() + }, 500) : t() + }(window); + } +} diff --git a/sites/d8xz.com/example/index.html b/sites/d8xz.com/example/index.html new file mode 100644 index 000000000..a0ad2dec7 --- /dev/null +++ b/sites/d8xz.com/example/index.html @@ -0,0 +1,26 @@ + + + + + + MIP page + + + + + +
+

First MIP page

+

Add MIP components here

+ +
+ + + + diff --git a/sites/d8xz.com/mip.config.js b/sites/d8xz.com/mip.config.js new file mode 100644 index 000000000..d5457bef4 --- /dev/null +++ b/sites/d8xz.com/mip.config.js @@ -0,0 +1,31 @@ +/** + * @file mip页面项目配置项 + * @author + */ + +module.exports = { + dev: { + /** + * 启动mip server调试的端口号 + * + * @type {number} + */ + port: 8111, + + /** + * 启用调试页面自动刷新 + * + * @type {boolean} + */ + livereload: true, + + /** + * server 启动自动打开页面,false 为关闭 + * 如: + * autoopen: '/example/index.html' + * + * @type {string|boolean} + */ + autoopen: false + } +} diff --git a/sites/d8xz.com/package.json b/sites/d8xz.com/package.json new file mode 100644 index 000000000..5dcd2f69c --- /dev/null +++ b/sites/d8xz.com/package.json @@ -0,0 +1,25 @@ +{ + "name": "d8xz.com", + "version": "0.0.1", + "description": "d8xz.com组件", + "scripts": { + "dev": "mip2 dev", + "build": "mip2 build", + "lint": "npm run lint:js", + "lint:js": "eslint --ext .vue,.js .", + "fix": "npm run fix:js", + "fix:js": "eslint --ext .vue,.js . --fix" + }, + "author": "bingchuan", + "dependencies": {}, + "devDependencies": { + "eslint": "^4.19.1", + "eslint-config-standard": "^11.0.0", + "eslint-plugin-import": "^2.12.0", + "eslint-plugin-jsdoc": "^3.7.1", + "eslint-plugin-node": "^6.0.1", + "eslint-plugin-promise": "^3.8.0", + "eslint-plugin-standard": "^3.1.0", + "eslint-plugin-vue": "^4.5.0" + } +} diff --git a/sites/d8xz.com/static/.gitkeep b/sites/d8xz.com/static/.gitkeep new file mode 100644 index 000000000..e69de29bb