neo-cmp-cli 1.3.10 → 1.5.0-beta.10

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.
Files changed (68) hide show
  1. package/README.md +52 -15
  2. package/package.json +4 -1
  3. package/src/cmpUtils/createCmpByTemplate.js +50 -0
  4. package/src/cmpUtils/createCommonModulesCode.js +15 -15
  5. package/src/cmpUtils/{getCmpModelRegister.js → getCmpModelRegisterCode.js} +2 -2
  6. package/src/cmpUtils/{getCmpPreview.js → getCmpPreviewCode.js} +2 -2
  7. package/src/cmpUtils/{getCmpRegister.js → getCmpRegisterCode.js} +2 -2
  8. package/src/cmpUtils/getCmpTypeByDir.js +41 -0
  9. package/src/cmpUtils/hasCmpTypeByDir.js +11 -0
  10. package/src/{module → cmpUtils}/previewCmp.js +2 -2
  11. package/src/cmpUtils/pushCmp.js +232 -0
  12. package/src/config/default.config.js +14 -2
  13. package/src/module/index.js +174 -11
  14. package/src/module/main.js +96 -3
  15. package/src/module/neoInit.js +3 -0
  16. package/src/module/neoInitByCopy.js +3 -0
  17. package/src/neo/NeoUMDContent.js +29 -0
  18. package/src/neo/neoRequire.js +7 -7
  19. package/src/neo/neoService.js +525 -0
  20. package/src/neo/wrapperContent.js +2 -1
  21. package/src/oss/publish2oss.js +96 -96
  22. package/src/plugins/AddNeoRequirePlugin.js +5 -2
  23. package/src/projectUtils/createCmpProjectByTemplate.js +49 -0
  24. package/src/{cmpUtils → projectUtils}/getEntriesWithAutoRegister.js +4 -4
  25. package/src/template/antd-custom-cmp-template/README.md +2 -2
  26. package/src/template/antd-custom-cmp-template/neo.config.js +22 -14
  27. package/src/template/antd-custom-cmp-template/package.json +2 -2
  28. package/src/template/develop/neo-custom-cmp-template/neo.config.js +1 -1
  29. package/src/template/echarts-custom-cmp-template/README.md +2 -2
  30. package/src/template/echarts-custom-cmp-template/neo.config.js +19 -13
  31. package/src/template/echarts-custom-cmp-template/package.json +2 -2
  32. package/src/template/empty-cmp/index.tsx +51 -0
  33. package/src/template/empty-cmp/model.ts +77 -0
  34. package/src/template/empty-cmp/style.scss +72 -0
  35. package/src/template/empty-custom-cmp-template/.prettierrc.js +12 -0
  36. package/src/template/empty-custom-cmp-template/README.md +45 -0
  37. package/src/template/empty-custom-cmp-template/commitlint.config.js +59 -0
  38. package/src/template/empty-custom-cmp-template/neo.config.js +126 -0
  39. package/src/template/empty-custom-cmp-template/package.json +57 -0
  40. package/src/template/empty-custom-cmp-template/public/css/base.css +283 -0
  41. package/src/template/empty-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
  42. package/src/template/empty-custom-cmp-template/public/template.html +13 -0
  43. package/src/template/empty-custom-cmp-template/src/assets/css/common.scss +127 -0
  44. package/src/template/empty-custom-cmp-template/src/assets/css/mixin.scss +47 -0
  45. package/src/template/empty-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  46. package/src/template/empty-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  47. package/src/template/empty-custom-cmp-template/src/assets/img/favicon.png +0 -0
  48. package/src/template/empty-custom-cmp-template/src/assets/img/map.svg +1 -0
  49. package/src/template/empty-custom-cmp-template/src/components/README.md +3 -0
  50. package/src/template/empty-custom-cmp-template/tsconfig.json +68 -0
  51. package/src/template/neo-custom-cmp-template/README.md +5 -5
  52. package/src/template/neo-custom-cmp-template/neo.config.js +18 -29
  53. package/src/template/neo-custom-cmp-template/package.json +3 -4
  54. package/src/template/react-custom-cmp-template/.prettierrc.js +1 -1
  55. package/src/template/react-custom-cmp-template/README.md +2 -2
  56. package/src/template/react-custom-cmp-template/neo.config.js +20 -15
  57. package/src/template/react-custom-cmp-template/package.json +2 -2
  58. package/src/template/react-ts-custom-cmp-template/README.md +2 -2
  59. package/src/template/react-ts-custom-cmp-template/neo.config.js +19 -14
  60. package/src/template/react-ts-custom-cmp-template/package.json +2 -2
  61. package/src/template/vue2-custom-cmp-template/README.md +2 -2
  62. package/src/template/vue2-custom-cmp-template/neo.config.js +20 -15
  63. package/src/template/vue2-custom-cmp-template/package.json +2 -2
  64. package/src/utils/autoEntryRootDir.js +42 -0
  65. package/src/utils/replaceInFilesByMap.js +54 -0
  66. package/test/demo.js +2 -2
  67. /package/src/{cmpUtils → projectUtils}/getEntries.js +0 -0
  68. /package/src/{cmpUtils → projectUtils}/updatePublishLog.js +0 -0
@@ -0,0 +1,72 @@
1
+ :root {
2
+ --padding-bottom: 12px;
3
+ }
4
+
5
+ .custom-cmp-container {
6
+ position: relative;
7
+ box-sizing: border-box;
8
+
9
+ /* border-bottom: 1px solid #ececec; */
10
+ margin: 6px 12px;
11
+ padding: 6px var(--padding-bottom);
12
+ background-color: #fff;
13
+
14
+ .news-title {
15
+ padding: 6px 0;
16
+ font-family: PingFangSC-Regular;
17
+ font-size: 16px;
18
+ line-height: 22px;
19
+ color: #5f5e5e;
20
+ }
21
+
22
+ .item-imgbox {
23
+ position: relative;
24
+ height: 395px;
25
+ background: #f0f0f0;
26
+ cursor: pointer;
27
+ box-sizing: border-box;
28
+ text-align: center;
29
+ overflow: hidden;
30
+
31
+ .news-img {
32
+ width: 100%;
33
+ height: 100%;
34
+ box-sizing: border-box;
35
+ background-size: contain;
36
+ }
37
+
38
+ .img-count {
39
+ position: absolute;
40
+ top: 0;
41
+ right: 0;
42
+ padding: 6px 8px;
43
+ color: #fff;
44
+ min-width: 60px;
45
+ text-align: center;
46
+ line-height: 1.2;
47
+ background: rgb(0 0 0 / 40%);
48
+ font-size: 25px;
49
+ box-sizing: border-box;
50
+ overflow: hidden;
51
+ }
52
+ }
53
+
54
+ .news-info {
55
+ font-family: PingFangSC-Light;
56
+ height: 28px;
57
+ box-sizing: border-box;
58
+ display: flex;
59
+ justify-content: space-between;
60
+ align-items: center;
61
+ }
62
+
63
+ .media-mark,
64
+ .cmt-num {
65
+ display: inline-block;
66
+ height: 28px;
67
+ line-height: 28px;
68
+ font-family: PingFangSC-Light;
69
+ font-size: 18px;
70
+ color: #828282;
71
+ }
72
+ }
@@ -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,45 @@
1
+ ### 目录说明
2
+ - src: 自定义组件源码;
3
+ - src/assets: 存放组件静态资源,比如 css、img等;
4
+ - src/components: 存放自定义组件代码,每个自定义组件以自身名称(cmpType 数值)作为目录进行存放;
5
+ - neo.config.js: neo-cmp-cli 配置文件。
6
+
7
+ ### 组件开发规范
8
+ - 存放在 src/components 目录下的自定义组件,默认 index 为自定义组件源码入口文件,register.[tj]s 为注册 自定义组件的脚本文件,model.[tj]s 为自定义组件的模型文件(对接页面设计器需要);
9
+ - 当 neo.config.js 中的 entry 为空或者不存在时,cli 将根据 src/components 目录下的自定义组件结构生成对应的 entry 配置(可在命令控制台查看生成的 entry 配置);
10
+ - 自定义组件中可用的配置项类型 请见 [当前可用表单项](https://github.com/wibetter/neo-register/blob/master/docs/FormItemType.md);
11
+ - 自定义组件最外层请设置一个唯一的 ClassName(比如 xx-cmpType-container),所有内容样式请放在该 ClassName 中,避免自定义组件样式相互干扰;
12
+ - 默认开启代码规范检测(含样式内容),如需关闭,请调整 neo.config.js 相关配置;
13
+ - 请使用 react 16版本。
14
+
15
+ ### 自定义组件注册器使用说明
16
+ - [neo-register 使用说明](https://www.npmjs.com/package/neo-register?activeTab=readme)
17
+ 备注:预览、调试(linkDebug)和构建发布时 cli 会自动创建对应的注册文件(含 neo-register 的使用),用户无需关注 neo-register。
18
+
19
+ ### 开发说明
20
+
21
+ 1. **安装依赖**
22
+ ```bash
23
+ $ npm i 或者 yarn
24
+ ```
25
+
26
+ 2. **preview: 组件预览模式(带热更新)**
27
+ > preview模式:用于预览自定义组件内容。
28
+ ```bash
29
+ $ npm run preview
30
+ ```
31
+
32
+ 3. **linkDebug: 外链调试(在线上页面设计器端预览自定义组件)**
33
+ > linkDebug模式:用于在线上页面设计器中预览和调试自定义组件。
34
+ ```bash
35
+ $ npm run linkDebug
36
+ ```
37
+
38
+ 4. **发布到 NeoCRM 中**
39
+ > 需要确保 package.json 中的 name 值唯一,version 值不重复。
40
+ ```bash
41
+ $ npm run pushCmp
42
+ ```
43
+
44
+ ### 配置项说明(neo-cmp-cli)
45
+ [请查看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,126 @@
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: true, // 调试模式是否开启ESLint,默认开启ESLint检测代码格式
13
+ enableESLintFix: true, // 是否自动修正代码格式,默认不自动修正
14
+ enableStyleLint: false, // 是否开启StyleLint,默认开启ESLint检测代码格式
15
+ enableStyleLintFix: false, // 是否需要StyleLint自动修正代码格式
16
+ },
17
+ webpack: {
18
+ target: ['web', 'es5'], // 指定目标环境为 web 和 es5,确保兼容性
19
+ resolve: {
20
+ // webpack的resolve配置
21
+ extensions: ['.js', '.jsx', '.ts', '.tsx', '.umd.js', '.min.js', '.json'], // 用于配置webpack在尝试过程中用到的后缀列表
22
+ alias: {
23
+ '@': resolve('src'),
24
+ $assets: resolve('src/assets'),
25
+ $public: resolve('public'),
26
+ },
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: [],
39
+ // babelPlugins: [],
40
+ },
41
+ // 用于添加 Neo 共享依赖模块的配置信息
42
+ /*
43
+ neoCommonModule: {
44
+ // neoExports: ['xxModule'], // 自定义组件 共享出来的模块,支持数组和对象形式
45
+ neoExports: { // 对象写法
46
+ 'xx-module': path.resolve('./src/components/xx-module'), // 导出 xx组件 或 xx模块
47
+ },
48
+ // remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 neoExternals 配合使用
49
+ // neoExternals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
50
+ },
51
+ */
52
+ preview: {
53
+ // 用于开启本地预览模式的相关配置信息
54
+ /*
55
+ 【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
56
+ entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
57
+ // 本地预览自定义组件内容
58
+ index: './src/preview.jsx',
59
+ },
60
+ NODE_ENV: 'development',
61
+ port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
62
+ assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
63
+ assetsSubDirectory: '',
64
+ hostname: 'localhost',
65
+ proxyTable: {
66
+ '/apiTest': {
67
+ target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
68
+ ws: true,
69
+ changeOrigin: true,
70
+ },
71
+ },
72
+ */
73
+ },
74
+ linkDebug: {
75
+ // 用于开启本地调试模式的相关配置信息
76
+ /*
77
+ 【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
78
+ entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
79
+ // 外链调试(在线上页面设计器端预览自定义组件)
80
+ index: [
81
+ './src/components/list-widget/register.ts',
82
+ './src/components/list-widget/model.ts',
83
+ ],
84
+ },
85
+ NODE_ENV: 'development',
86
+ port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
87
+ closeHotReload: true, // 是否关闭热更新
88
+ assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
89
+ assetsSubDirectory: '',
90
+ hostname: 'localhost',
91
+ proxyTable: {
92
+ '/apiTest': {
93
+ target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
94
+ ws: true,
95
+ changeOrigin: true,
96
+ },
97
+ }
98
+ */
99
+ },
100
+ pushCmp: {
101
+ // 用于构建并发布至 NeoCRM 的相关配置
102
+ neoBaseURL: 'https://crm-cd.xiaoshouyi.com', // 平台根地址(默认:https://crm.xiaoshouyi.com)
103
+ tokenAPI: 'https://login-cd.xiaoshouyi.com/auc/oauth2/token', // Token 获取接口地址(默认:https://login.xiaoshouyi.com/auc/oauth2/token)
104
+ // NeoCRM 授权配置
105
+ authConfig: {
106
+ client_id: 'xx', // 客户端 ID,从创建连接器的客户端信息中获取(Client_Id)
107
+ client_secret: 'xxx', // 客户端秘钥,从创建连接器的客户端信息中获取(Client_Secret)
108
+ username: 'xx', // 用户在销售易系统中的用户名
109
+ /**
110
+ * password 为 用户在销售易系统中的账号密码加上 8 位安全令牌。
111
+ * 例如,用户密码为 123456,安全令牌为 ABCDEFGH,则 password 的值应为 123456ABCDEFGH。
112
+ */
113
+ password: 'xx xx' // 用户账户密码 + 8 位安全令牌
114
+ },
115
+ /*
116
+ 【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
117
+ NODE_ENV: 'production',
118
+ entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
119
+ InfoCardModel: './src/components/entity-form/model.ts',
120
+ infoCard: './src/components/entity-form/register.ts'
121
+ },
122
+ cssExtract: false, // 不额外提取css文件
123
+ assetsRoot: resolve('dist') // 上传指定目录下的脚本文件
124
+ */
125
+ },
126
+ };
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "empty-custom-cmp-template",
3
+ "version": "1.0.0",
4
+ "description": "neo 自定义组件",
5
+ "keywords": [
6
+ "react&ts 技术栈",
7
+ "neo 自定义组件"
8
+ ],
9
+ "author": "wibetter",
10
+ "license": "MIT",
11
+ "scripts": {
12
+ "preview": "neo preview",
13
+ "linkDebug": "neo linkDebug",
14
+ "pushCmp": "neo pushCmp",
15
+ "format": "prettier --write \"src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}\""
16
+ },
17
+ "files": [
18
+ "dist/*"
19
+ ],
20
+ "husky": {
21
+ "hooks": {
22
+ "pre-commit": "lint-staged",
23
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
24
+ }
25
+ },
26
+ "lint-staged": {
27
+ "src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}": [
28
+ "prettier --write"
29
+ ]
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://git@github.com:wibetter/empty-custom-cmp-template.git"
34
+ },
35
+ "bugs": {
36
+ "url": "https://github.com/wibetter/empty-custom-cmp-template/issues"
37
+ },
38
+ "dependencies": {
39
+ "neo-register": "^1.0.5",
40
+ "react": "^16.9.0",
41
+ "react-dom": "^16.9.0"
42
+ },
43
+ "devDependencies": {
44
+ "@commitlint/cli": "^8.3.5",
45
+ "@commitlint/config-conventional": "^9.1.1",
46
+ "@types/react": "^16.9.11",
47
+ "@types/react-dom": "^16.9.15",
48
+ "neo-cmp-cli": "^1.3.8",
49
+ "husky": "^4.2.5",
50
+ "lint-staged": "^10.2.9",
51
+ "prettier": "^2.0.5"
52
+ },
53
+ "engines": {
54
+ "node": ">= 10.13.0",
55
+ "npm": ">= 6.4.1"
56
+ }
57
+ }
@@ -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
+ /* 业务级公用代码 */