neo-cmp-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +236 -0
- package/bin/neo.js +2 -0
- package/package.json +74 -0
- package/src/config/default.config.js +136 -0
- package/src/config/index.js +9 -0
- package/src/initData/defaultTemplate.html +13 -0
- package/src/initData/neo.config.js +99 -0
- package/src/module/index.js +244 -0
- package/src/module/inspect.js +40 -0
- package/src/module/main.js +109 -0
- package/src/module/neoInit.js +44 -0
- package/src/module/neoInitByCopy.js +37 -0
- package/src/oss/publish2oss.js +218 -0
- package/src/plugins/README.md +2 -0
- package/src/template/react-custom-widget-template/.editorconfig +10 -0
- package/src/template/react-custom-widget-template/.prettierrc.js +12 -0
- package/src/template/react-custom-widget-template/README.md +51 -0
- package/src/template/react-custom-widget-template/commitlint.config.js +59 -0
- package/src/template/react-custom-widget-template/neo.config.js +112 -0
- package/src/template/react-custom-widget-template/package.json +56 -0
- package/src/template/react-custom-widget-template/public/css/base.css +283 -0
- package/src/template/react-custom-widget-template/public/scripts/app/bluebird.js +6679 -0
- package/src/template/react-custom-widget-template/public/template.html +13 -0
- package/src/template/react-custom-widget-template/src/assets/css/common.scss +127 -0
- package/src/template/react-custom-widget-template/src/assets/css/mixin.scss +47 -0
- package/src/template/react-custom-widget-template/src/components/info-card/index.jsx +45 -0
- package/src/template/react-custom-widget-template/src/components/info-card/model.js +81 -0
- package/src/template/react-custom-widget-template/src/components/info-card/register.js +4 -0
- package/src/template/react-custom-widget-template/src/components/info-card/style.scss +67 -0
- package/src/template/react-custom-widget-template/src/preview.js +5 -0
- package/src/template/react-ts-custom-widget-template/.editorconfig +10 -0
- package/src/template/react-ts-custom-widget-template/.prettierrc.js +12 -0
- package/src/template/react-ts-custom-widget-template/README.md +53 -0
- package/src/template/react-ts-custom-widget-template/commitlint.config.js +59 -0
- package/src/template/react-ts-custom-widget-template/neo.config.js +106 -0
- package/src/template/react-ts-custom-widget-template/package.json +59 -0
- package/src/template/react-ts-custom-widget-template/public/css/base.css +283 -0
- package/src/template/react-ts-custom-widget-template/public/scripts/app/bluebird.js +6679 -0
- package/src/template/react-ts-custom-widget-template/public/template.html +13 -0
- package/src/template/react-ts-custom-widget-template/src/assets/css/common.scss +127 -0
- package/src/template/react-ts-custom-widget-template/src/assets/css/mixin.scss +47 -0
- package/src/template/react-ts-custom-widget-template/src/components/info-card/index.tsx +70 -0
- package/src/template/react-ts-custom-widget-template/src/components/info-card/plugin.ts +80 -0
- package/src/template/react-ts-custom-widget-template/src/components/info-card/register.ts +5 -0
- package/src/template/react-ts-custom-widget-template/src/components/info-card/style.scss +105 -0
- package/src/template/react-ts-custom-widget-template/src/components/list-widget/README.md +2 -0
- package/src/template/react-ts-custom-widget-template/src/components/list-widget/index.tsx +208 -0
- package/src/template/react-ts-custom-widget-template/src/components/list-widget/model.ts +92 -0
- package/src/template/react-ts-custom-widget-template/src/components/list-widget/register.ts +5 -0
- package/src/template/react-ts-custom-widget-template/src/components/list-widget/style.scss +350 -0
- package/src/template/react-ts-custom-widget-template/src/preview.tsx +37 -0
- package/src/template/react-ts-custom-widget-template/tsconfig.json +68 -0
- package/src/template/vue2-neo-custom-widget/.editorconfig +10 -0
- package/src/template/vue2-neo-custom-widget/.prettierrc.js +12 -0
- package/src/template/vue2-neo-custom-widget/README.md +52 -0
- package/src/template/vue2-neo-custom-widget/commitlint.config.js +59 -0
- package/src/template/vue2-neo-custom-widget/neo.config.js +122 -0
- package/src/template/vue2-neo-custom-widget/package.json +59 -0
- package/src/template/vue2-neo-custom-widget/public/css/base.css +283 -0
- package/src/template/vue2-neo-custom-widget/public/scripts/app/bluebird.js +6679 -0
- package/src/template/vue2-neo-custom-widget/public/template.html +13 -0
- package/src/template/vue2-neo-custom-widget/src/assets/css/common.scss +126 -0
- package/src/template/vue2-neo-custom-widget/src/assets/css/mixin.scss +47 -0
- package/src/template/vue2-neo-custom-widget/src/preview.js +9 -0
- package/src/template/vue2-neo-custom-widget/src/widgets/info-card/index.vue +131 -0
- package/src/template/vue2-neo-custom-widget/src/widgets/info-card/plugin.js +81 -0
- package/src/template/vue2-neo-custom-widget/src/widgets/info-card/register.js +8 -0
- package/src/utils/getConfigObj.js +18 -0
- package/src/utils/getEntries.js +54 -0
- package/src/utils/neoConfigInit.js +13 -0
- package/src/utils/neoParams.js +12 -0
- package/src/utils/pathUtils.js +23 -0
- package/src/utils/projectNameValidator.js +76 -0
- package/src/utils/replaceInFiles.js +47 -0
- package/src/utils/replaceInPackage.js +134 -0
- package/test/demo.js +3 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
prettier 配置文件
|
|
3
|
+
更多配置信息:https://prettier.io/docs/en/options.html
|
|
4
|
+
*/
|
|
5
|
+
module.exports = {
|
|
6
|
+
semi: true, // Semicolons 分号,默认需要分号
|
|
7
|
+
tabWidth: 2, // 空格,默认 2,
|
|
8
|
+
useTabs: false,
|
|
9
|
+
singleQuote: true, // 单引号还是双引号,默认为false 双引号
|
|
10
|
+
trailingComma: 'all', // 逗号
|
|
11
|
+
jsxBracketSameLine: false, // 默认为false,Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements).
|
|
12
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
### 目录说明
|
|
2
|
+
- src: 自定义组件源码;
|
|
3
|
+
- src/assets: 存放组件静态资源,比如 css、img等;
|
|
4
|
+
- src/components: 存放自定义组件代码,每个自定义组件以自身名称作为目录进行存放;
|
|
5
|
+
- src/components/info-card/index.jsx: 信息卡片自定义组件代码;
|
|
6
|
+
- src/components/info-card/register.js: 用于注册一个 neo 自定义组件,注册成功后编辑器画布区中才会正常展示自定义组件内容;
|
|
7
|
+
- src/components/info-card/model.js: 用于注册一个 neo-editor 自定义插件,注册成功后编辑器左侧组件面板中会展示;
|
|
8
|
+
- src/preview.js: 用于本地预览自定义组件内容;
|
|
9
|
+
- neo.config.js: neo-cmp-cli 配置文件。
|
|
10
|
+
|
|
11
|
+
### 组件开发规范
|
|
12
|
+
- 存放在 src/components 目录下的自定义组件,默认 index 为自定义组件源码入口文件,register.[tj]s 为注册 Neo 组件的脚本文件,model.[tj]s 为自定义组件的描述文件(和页面设计器对接需要);
|
|
13
|
+
- 当 neo.config.js 中的 entry 为空或者不存在时,cli 将根据 src/components 目录下的自定义组件结构生成对应的 entry 配置(可在命令控制台查看生成的 entry 配置);
|
|
14
|
+
- 自定义组件中可用的配置项类型 请见 [当前可用表单项](https://github.com/wibetter/neo-register/blob/master/docs/FormItemType.md);
|
|
15
|
+
- 自定义组件最外层请设置一个唯一的 ClassName(比如 xx-cmpType-container),所有内容样式请放在该 ClassName 中;
|
|
16
|
+
|
|
17
|
+
### 自定义组件注册器使用说明
|
|
18
|
+
- [neo-register 使用说明](https://www.npmjs.com/package/neo-register?activeTab=readme)
|
|
19
|
+
|
|
20
|
+
### 开发说明
|
|
21
|
+
|
|
22
|
+
1. **安装依赖**
|
|
23
|
+
```bash
|
|
24
|
+
$ npm i 或者 yarn
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
2. **preview: 组件预览模式(带热更新)**
|
|
28
|
+
> preview模式:用于预览自定义组件内容。
|
|
29
|
+
```bash
|
|
30
|
+
$ npm run preview
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
3. **linkDebug: 外链调试(在线上页面设计器端预览自定义组件)**
|
|
34
|
+
> linkDebug模式:用于在线上页面设计器中预览和调试自定义组件。
|
|
35
|
+
```bash
|
|
36
|
+
$ npm run linkDebug
|
|
37
|
+
```
|
|
38
|
+
4. **build2lib: 构建自定义组件输出产物**
|
|
39
|
+
> build2lib模式:用于构建发布到 oss 中的文件,默认存放到 当前 dist 目录中。
|
|
40
|
+
```bash
|
|
41
|
+
$ npm run build2lib
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
5. **发布到对象存储服务中**
|
|
45
|
+
> 需要确保 package.json 中的 name 值唯一,version 值不重复。
|
|
46
|
+
```bash
|
|
47
|
+
$ npm run publish2oss
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 配置项说明(neo-cmp-cli)
|
|
51
|
+
[请查看neo-cmp-cli](https://github.com/wibetter/neo-cmp-cli)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://www.npmjs.com/package/@commitlint/config-conventional\
|
|
3
|
+
*
|
|
4
|
+
* Git提交规范-配置文件
|
|
5
|
+
* Commit message 由Header、Body 和 Footer三个部分组成,其格式如下:
|
|
6
|
+
* <type>(<scope>): <subject>
|
|
7
|
+
* <BLANK LINE>
|
|
8
|
+
* <body>
|
|
9
|
+
* <BLANK LINE>
|
|
10
|
+
* <footer>
|
|
11
|
+
*
|
|
12
|
+
*【备注】
|
|
13
|
+
* type 用于说明 commit 的类别,常用下面 7 个标识:
|
|
14
|
+
* scope 用于说明当前功能点作用于哪个页面或者哪个功能模块;
|
|
15
|
+
* subject 用于简短的描述当前commit,不超过50个字符;
|
|
16
|
+
* body 用于填写对本次 commit 的详细描述,可以分成多行;
|
|
17
|
+
* footer 不兼容变动声明,或者关闭 Issue。
|
|
18
|
+
*
|
|
19
|
+
* 【type类型取值类型】
|
|
20
|
+
* feat:新功能(feature)
|
|
21
|
+
* fix:功能优化
|
|
22
|
+
* bug:修补bug
|
|
23
|
+
* docs:文档(documentation)
|
|
24
|
+
* style:格式(不影响代码运行的变动)
|
|
25
|
+
* refactor:重构(即不是新增功能,也不是修改bug的代码变动)
|
|
26
|
+
* test:增加测试
|
|
27
|
+
* chore:构建过程或辅助工具的变动
|
|
28
|
+
* build:影响构建系统或外部依赖项的更改(示例范围:gulp,broccoli,npm)
|
|
29
|
+
* ci:对 CI 配置文件和脚本的更改(示例范围:Travis,Circle,BrowserStack,SauceLabs)
|
|
30
|
+
* perf:改进性能的代码更改
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
module.exports = {
|
|
35
|
+
extends: ['@commitlint/config-conventional'],
|
|
36
|
+
rules: {
|
|
37
|
+
'type-enum': [
|
|
38
|
+
2,
|
|
39
|
+
'always',
|
|
40
|
+
[
|
|
41
|
+
'feat',
|
|
42
|
+
'fix',
|
|
43
|
+
'bug',
|
|
44
|
+
'docs',
|
|
45
|
+
'style',
|
|
46
|
+
'refactor',
|
|
47
|
+
'test',
|
|
48
|
+
'chore',
|
|
49
|
+
'perf',
|
|
50
|
+
'build',
|
|
51
|
+
'ci',
|
|
52
|
+
],
|
|
53
|
+
],
|
|
54
|
+
'type-empty': [2, 'never'],
|
|
55
|
+
'scope-empty': [1, 'never'],
|
|
56
|
+
'subject-full-stop': [0, 'never'],
|
|
57
|
+
'subject-case': [0, 'never'],
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// 统一路径解析
|
|
5
|
+
function resolve(dir) {
|
|
6
|
+
return path.resolve(__dirname, dir);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// 包括生产和开发的环境配置信息
|
|
10
|
+
module.exports = {
|
|
11
|
+
settings: {
|
|
12
|
+
enableESLint: false, // 调试模式是否开启ESLint,默认开启ESLint检测代码格式
|
|
13
|
+
enableESLintFix: false, // 是否自动修正代码格式,默认不自动修正
|
|
14
|
+
enableStyleLint: false, // 是否开启StyleLint,默认开启ESLint检测代码格式
|
|
15
|
+
enableStyleLintFix: false, // 是否需要StyleLint自动修正代码格式
|
|
16
|
+
},
|
|
17
|
+
webpack: {
|
|
18
|
+
resolve: {
|
|
19
|
+
// webpack的resolve配置
|
|
20
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx', '.umd.js', '.min.js', '.json'], // 用于配置webpack在尝试过程中用到的后缀列表
|
|
21
|
+
alias: {
|
|
22
|
+
'@': resolve('src'),
|
|
23
|
+
$assets: resolve('src/assets'),
|
|
24
|
+
$public: resolve('public'),
|
|
25
|
+
},
|
|
26
|
+
// conditionNames: ['require']
|
|
27
|
+
},
|
|
28
|
+
// sassResources中的sass文件会自动注入每一个sass文件中
|
|
29
|
+
sassResources: [
|
|
30
|
+
resolve('./src/assets/css/common.scss'),
|
|
31
|
+
resolve('./src/assets/css/mixin.scss'),
|
|
32
|
+
],
|
|
33
|
+
// createDeclaration: true, // 打包时是否创建ts声明文件
|
|
34
|
+
ignoreNodeModules: false, // 打包时是否忽略 node_modules
|
|
35
|
+
allowList: [], // ignoreNodeModules 为 true 时生效
|
|
36
|
+
projectDir: ['src'],
|
|
37
|
+
// template: resolve('./public/template.html'), // 自定义html模板
|
|
38
|
+
// plugins: [], // 用于添加自定义 plugins
|
|
39
|
+
// cssLoaderUrlDir: 'antd',
|
|
40
|
+
cssLoaderOption: {
|
|
41
|
+
// modules: true
|
|
42
|
+
},
|
|
43
|
+
moduleRules: [],
|
|
44
|
+
},
|
|
45
|
+
preview: {
|
|
46
|
+
// 用于开启本地预览模式的相关配置信息
|
|
47
|
+
entry: {
|
|
48
|
+
// 本地预览自定义组件内容
|
|
49
|
+
index: './src/preview.js',
|
|
50
|
+
},
|
|
51
|
+
/*
|
|
52
|
+
【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
|
|
53
|
+
NODE_ENV: 'development',
|
|
54
|
+
port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
|
|
55
|
+
assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
|
|
56
|
+
assetsSubDirectory: '',
|
|
57
|
+
hostname: 'localhost',
|
|
58
|
+
proxyTable: {
|
|
59
|
+
'/apiTest': {
|
|
60
|
+
target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
|
|
61
|
+
ws: true,
|
|
62
|
+
changeOrigin: true,
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
*/
|
|
66
|
+
},
|
|
67
|
+
linkDebug: {
|
|
68
|
+
// 用于开启本地调试模式的相关配置信息
|
|
69
|
+
/*
|
|
70
|
+
【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
|
|
71
|
+
entry: { // entry 会根据 src/components 目录下的文件自动生成
|
|
72
|
+
// 外链调试(在线上页面设计器端预览自定义组件)
|
|
73
|
+
index: [
|
|
74
|
+
'./src/components/info-card/register.js',
|
|
75
|
+
'./src/components/info-card/model.js',
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
NODE_ENV: 'development',
|
|
79
|
+
port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
|
|
80
|
+
assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
|
|
81
|
+
assetsSubDirectory: '',
|
|
82
|
+
hostname: 'localhost',
|
|
83
|
+
proxyTable: {
|
|
84
|
+
'/apiTest': {
|
|
85
|
+
target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
|
|
86
|
+
ws: true,
|
|
87
|
+
changeOrigin: true,
|
|
88
|
+
},
|
|
89
|
+
}
|
|
90
|
+
*/
|
|
91
|
+
},
|
|
92
|
+
publish2oss: {
|
|
93
|
+
// 用于构建并发布至 OSS 的相关配置
|
|
94
|
+
/*
|
|
95
|
+
【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
|
|
96
|
+
NODE_ENV: 'production',
|
|
97
|
+
entry: { // entry 未配置时,cli 会根据 src/components 目录下的文件自动生成对应的 entry
|
|
98
|
+
InfoCardModel: './src/components/info-card/model.ts',
|
|
99
|
+
infoCard: './src/components/info-card/register.ts'
|
|
100
|
+
},
|
|
101
|
+
cssExtract: false, // 不额外提取css文件
|
|
102
|
+
ossType: 'ali', // oss类型:ali、baidu
|
|
103
|
+
ossConfig: {
|
|
104
|
+
endpoint: 'https://oss-cn-beijing.aliyuncs.com',
|
|
105
|
+
AccessKeyId: 'xxx',
|
|
106
|
+
AccessKeySecret: 'xx',
|
|
107
|
+
bucket: 'neo-widgets' // 存储桶名称
|
|
108
|
+
},
|
|
109
|
+
assetsRoot: resolve('dist') // 上传指定目录下的脚本文件
|
|
110
|
+
*/
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-custom-widget-template",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "neo自定义组件模板(react技术栈)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"自定义组件模板",
|
|
7
|
+
"react技术栈",
|
|
8
|
+
"neo自定义组件"
|
|
9
|
+
],
|
|
10
|
+
"author": "wibetter",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"preview": "neo preview",
|
|
14
|
+
"linkDebug": "neo linkDebug",
|
|
15
|
+
"publish2oss": "neo publish2oss",
|
|
16
|
+
"format": "prettier --write \"src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}\""
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/*"
|
|
20
|
+
],
|
|
21
|
+
"husky": {
|
|
22
|
+
"hooks": {
|
|
23
|
+
"pre-commit": "lint-staged",
|
|
24
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"lint-staged": {
|
|
28
|
+
"src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}": [
|
|
29
|
+
"prettier --write"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://git@github.com:wibetter/react-custom-widget-template.git"
|
|
35
|
+
},
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/wibetter/react-custom-widget-template/issues"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"neo-register": "^1.0.0",
|
|
41
|
+
"react": "^16.9.0",
|
|
42
|
+
"react-dom": "^16.9.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@commitlint/cli": "^8.3.5",
|
|
46
|
+
"@commitlint/config-conventional": "^9.1.1",
|
|
47
|
+
"neo-cmp-cli": "^1.0.0",
|
|
48
|
+
"husky": "^4.2.5",
|
|
49
|
+
"lint-staged": "^10.2.9",
|
|
50
|
+
"prettier": "^2.0.5"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">= 10.13.0",
|
|
54
|
+
"npm": ">= 6.4.1"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
@charset "utf-8";
|
|
2
|
+
|
|
3
|
+
body {
|
|
4
|
+
margin: 0;
|
|
5
|
+
border-width: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
font-family: PingFangSC-Regular;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
div,
|
|
11
|
+
dl,
|
|
12
|
+
dt,
|
|
13
|
+
dd,
|
|
14
|
+
ul,
|
|
15
|
+
ol,
|
|
16
|
+
li,
|
|
17
|
+
h1,
|
|
18
|
+
h2,
|
|
19
|
+
h3,
|
|
20
|
+
h4,
|
|
21
|
+
h5,
|
|
22
|
+
h6,
|
|
23
|
+
pre,
|
|
24
|
+
code,
|
|
25
|
+
form,
|
|
26
|
+
fieldset,
|
|
27
|
+
legend,
|
|
28
|
+
input,
|
|
29
|
+
textarea,
|
|
30
|
+
p,
|
|
31
|
+
blockquote,
|
|
32
|
+
th,
|
|
33
|
+
td,
|
|
34
|
+
hr,
|
|
35
|
+
i,
|
|
36
|
+
button,
|
|
37
|
+
article,
|
|
38
|
+
aside,
|
|
39
|
+
details,
|
|
40
|
+
figcaption,
|
|
41
|
+
figure,
|
|
42
|
+
footer,
|
|
43
|
+
header,
|
|
44
|
+
hgroup,
|
|
45
|
+
menu,
|
|
46
|
+
nav,
|
|
47
|
+
section {
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
border-width: 0;
|
|
51
|
+
font-family: PingFangSC-Regular;
|
|
52
|
+
box-sizing: padding-box;
|
|
53
|
+
-webkit-box-sizing: padding-box;
|
|
54
|
+
-moz-box-sizing: padding-box;
|
|
55
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
body,
|
|
59
|
+
button,
|
|
60
|
+
input,
|
|
61
|
+
select,
|
|
62
|
+
textarea {
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
line-height: 1.125;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[v-cloak] {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
li,
|
|
72
|
+
ul,
|
|
73
|
+
ol {
|
|
74
|
+
list-style: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
a {
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
a:active {
|
|
82
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
sub,
|
|
86
|
+
sup {
|
|
87
|
+
line-height: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
table {
|
|
91
|
+
border-collapse: collapse;
|
|
92
|
+
border-spacing: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
li {
|
|
96
|
+
list-style: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
fieldset,
|
|
100
|
+
img {
|
|
101
|
+
border: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
input,
|
|
105
|
+
textarea {
|
|
106
|
+
outline-style: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
input[type='text'],
|
|
110
|
+
input[type='search'],
|
|
111
|
+
input[type='password'] {
|
|
112
|
+
-webkit-border-radius: 0;
|
|
113
|
+
-moz-border-radius: 0;
|
|
114
|
+
-o-border-radius: 0;
|
|
115
|
+
border-radius: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
textarea {
|
|
119
|
+
resize: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
address,
|
|
123
|
+
caption,
|
|
124
|
+
cite,
|
|
125
|
+
code,
|
|
126
|
+
dfn,
|
|
127
|
+
em,
|
|
128
|
+
i,
|
|
129
|
+
th,
|
|
130
|
+
var {
|
|
131
|
+
font-style: normal;
|
|
132
|
+
font-weight: normal;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
legend {
|
|
136
|
+
color: #000;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
abbr,
|
|
140
|
+
acronym {
|
|
141
|
+
border: 0;
|
|
142
|
+
font-variant: normal;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
a {
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
outline: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
a:hover {
|
|
151
|
+
text-decoration: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.clearit {
|
|
155
|
+
clear: both;
|
|
156
|
+
height: 0;
|
|
157
|
+
font-size: 0;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* surface下viewport不生效的解决办法 */
|
|
162
|
+
@media screen and (min-width: 767px) and (device-aspect-ratio: 16/9) {
|
|
163
|
+
@-ms-viewport {
|
|
164
|
+
zoom: 1;
|
|
165
|
+
max-zoom: 1;
|
|
166
|
+
min-zoom: 1;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* surface下IE10 点击链接,背景变色 */
|
|
171
|
+
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
172
|
+
a {
|
|
173
|
+
background-color: transparent;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
img {
|
|
178
|
+
-ms-interpolation-mode: bicubic;
|
|
179
|
+
image-rendering: optimizeQuality;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* portrait:指定输出设备中的页面可见区域高度大于或等于宽度, landscape:横屏*/
|
|
183
|
+
@media not screen and (orientation: landscape),
|
|
184
|
+
not screen and (orientation: portrait) {
|
|
185
|
+
body,
|
|
186
|
+
button,
|
|
187
|
+
input,
|
|
188
|
+
select,
|
|
189
|
+
textarea {
|
|
190
|
+
font-family: 'Microsoft Yahei', 'Simsun';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
::-moz-placeholder {
|
|
195
|
+
color: #767676;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
::-webkit-input-placeholder {
|
|
199
|
+
color: #767676;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:-ms-input-placeholder {
|
|
203
|
+
color: #767676;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.cont-selected {
|
|
207
|
+
display: block !important;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.hidden {
|
|
211
|
+
visibility: hidden;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.ellipsis {
|
|
215
|
+
overflow: hidden;
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
text-overflow: ellipsis;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.clearfix:after {
|
|
221
|
+
content: '.';
|
|
222
|
+
display: block;
|
|
223
|
+
height: 0;
|
|
224
|
+
visibility: hidden;
|
|
225
|
+
clear: both;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.left {
|
|
229
|
+
float: left;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.right {
|
|
233
|
+
float: right;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.center {
|
|
237
|
+
margin: 0 auto;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.text-center {
|
|
241
|
+
text-align: center;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.text-right {
|
|
245
|
+
text-align: right;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.text-left {
|
|
249
|
+
text-align: left;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.no-border {
|
|
253
|
+
border: none !important;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.click-event {
|
|
257
|
+
cursor: pointer;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* 增加iphoneX适配 */
|
|
261
|
+
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
|
|
262
|
+
.ipx-fixed-bottom {
|
|
263
|
+
bottom: 34px !important;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.ipx-fixed-top {
|
|
267
|
+
top: 20px !important;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.ipx-margin-top {
|
|
271
|
+
margin-top: 20px !important;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.ipx-margin-bottom {
|
|
275
|
+
margin-bottom: 20px !important;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.ipx-height {
|
|
279
|
+
height: 34px !important;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* 业务级公用代码 */
|