cy-element-ui 1.1.26 → 1.1.28

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/package.json CHANGED
@@ -1,135 +1,123 @@
1
1
  {
2
- "name": "cy-element-ui",
3
- "version": "1.1.26",
4
- "description": "A Component Library for Vue.js.",
5
- "main": "lib/index.js",
6
- "files": [
7
- "lib",
8
- "src",
9
- "packages",
10
- "types",
11
- "web-types.json"
12
- ],
13
- "typings": "types/index.d.ts",
14
- "scripts": {
15
- "bootstrap": "npm i",
16
- "build:file": "node build/bin/iconInit.js & node build/bin/build-entry.js & node build/bin/i18n.js & node build/bin/version.js & node build/bin/gen-cy-types.js",
17
- "build:theme": "node build/bin/gen-cssfile && gulp build --gulpfile packages/theme-chalk/gulpfile.js && cp-cli packages/theme-chalk/lib lib/theme-chalk",
18
- "build:utils": "cross-env BABEL_ENV=utils babel src --out-dir lib --ignore src/index.js",
19
- "build:umd": "node build/bin/build-locale.js",
20
- "clean": "rimraf lib && rimraf packages/*/lib",
21
- "deploy:build": "npm run build:file && cross-env NODE_ENV=production webpack --config build/webpack.demo.js && echo element.eleme.io>>examples/element-ui/CNAME",
22
- "deploy:extension": "cross-env NODE_ENV=production webpack --config build/webpack.extension.js",
23
- "dev:extension": "rimraf examples/extension/dist && cross-env NODE_ENV=development webpack --watch --config build/webpack.extension.js",
24
- "dev": "npm run build:file && npx cross-env NODE_ENV=development webpack-dev-server --config build/webpack.demo.js",
25
- "dev:play": "npm run build:file && cross-env NODE_ENV=development webpack-dev-server --config build/webpack.demo.js",
26
- "dist": "node build/dist.js",
27
- "i18n": "node build/bin/i18n.js",
28
- "lint": "eslint src/**/* packages/**/* build/**/* examples/pages/**/* examples/app.vue examples/route.config.js --quiet",
29
- "pub": "npm run bootstrap && sh build/git-release.sh && sh build/release.sh && node build/bin/gen-indices.js"
30
- },
31
- "faas": [
32
- {
33
- "domain": "element",
34
- "public": "temp_web/element"
35
- },
36
- {
37
- "domain": "element-theme",
38
- "public": "examples/element-ui",
39
- "build": [
40
- "yarn",
41
- "npm run deploy:build"
42
- ]
43
- }
44
- ],
45
- "repository": {
46
- "type": "git",
47
- "url": "git@github.com:ElemeFE/element.git"
48
- },
49
- "homepage": "http://element.eleme.io",
50
- "keywords": [
51
- "eleme",
52
- "vue",
53
- "components"
54
- ],
55
- "license": "MIT",
56
- "bugs": {
57
- "url": "https://github.com/ElemeFE/element/issues"
58
- },
59
- "unpkg": "lib/index.js",
60
- "style": "lib/theme-chalk/index.css",
61
- "web-types": "./web-types.json",
62
- "dependencies": {
63
- "async-validator": "~1.8.1",
64
- "babel-helper-vue-jsx-merge-props": "^2.0.0",
65
- "deepmerge": "^1.2.0",
66
- "normalize-wheel": "^1.0.1",
67
- "resize-observer-polyfill": "^1.5.0",
68
- "sass": "~1.32.13",
69
- "throttle-debounce": "^1.0.1"
70
- },
71
- "peerDependencies": {
72
- "vue": "^2.5.17"
73
- },
74
- "devDependencies": {
75
- "@vue/component-compiler-utils": "^2.6.0",
76
- "algoliasearch": "^3.24.5",
77
- "babel-cli": "^6.26.0",
78
- "babel-core": "^6.26.3",
79
- "babel-loader": "^7.1.5",
80
- "babel-plugin-add-module-exports": "^0.2.1",
81
- "babel-plugin-module-resolver": "^2.2.0",
82
- "babel-plugin-syntax-jsx": "^6.18.0",
83
- "babel-plugin-transform-vue-jsx": "^3.7.0",
84
- "babel-preset-env": "^1.7.0",
85
- "babel-preset-stage-2": "^6.24.1",
86
- "chokidar": "^3.5.3",
87
- "copy-webpack-plugin": "^5.0.0",
88
- "cp-cli": "^1.0.2",
89
- "cross-env": "^3.2.4",
90
- "css-loader": "^2.1.0",
91
- "es6-promise": "^4.0.5",
92
- "eslint": "^6.8.0",
93
- "eslint-loader": "^2.0.0",
94
- "eslint-plugin-json": "^2.1.1",
95
- "eslint-plugin-vue": "^6.2.2",
96
- "file-loader": "^1.1.11",
97
- "file-save": "^0.2.0",
98
- "gulp": "^4.0.0",
99
- "gulp-autoprefixer": "^6.0.0",
100
- "gulp-cssmin": "^0.2.0",
101
- "gulp-sass": "^5.1.0",
102
- "highlight.js": "^9.3.0",
103
- "html-webpack-plugin": "^3.2.0",
104
- "json-loader": "^0.5.7",
105
- "json-templater": "^1.0.4",
106
- "launch-editor-middleware": "^2.3.0",
107
- "markdown-it": "^8.4.1",
108
- "markdown-it-anchor": "^5.0.2",
109
- "markdown-it-chain": "^1.3.0",
110
- "markdown-it-container": "^2.0.0",
111
- "mini-css-extract-plugin": "^0.4.1",
112
- "optimize-css-assets-webpack-plugin": "^5.0.1",
113
- "postcss": "^8.4.31",
114
- "postcss-scss": "^4.0.9",
115
- "progress-bar-webpack-plugin": "^1.1.0",
116
- "rimraf": "^2.5.4",
117
- "sass-loader": "^10.5.2",
118
- "style-loader": "^0.23.1",
119
- "stylelint": "^13.13.1",
120
- "transliteration": "^1.1.11",
121
- "uglifyjs-webpack-plugin": "^2.1.1",
122
- "uppercamelcase": "^1.1.0",
123
- "url-loader": "^1.0.1",
124
- "vue": "2.5.21",
125
- "vue-eslint-parser": "^7.0.0",
126
- "vue-loader": "^15.7.0",
127
- "vue-router": "^3.0.1",
128
- "vue-template-compiler": "2.5.21",
129
- "vue-template-es2015-compiler": "^1.6.0",
130
- "webpack": "^4.14.0",
131
- "webpack-cli": "^3.0.8",
132
- "webpack-dev-server": "^3.1.11",
133
- "webpack-node-externals": "^1.7.2"
134
- }
2
+ "name": "cy-element-ui",
3
+ "version": "1.1.28",
4
+ "description": "基于 Element UI Vue 2 组件库,包含产研自定义组件",
5
+ "main": "lib/index.js",
6
+ "files": [
7
+ "lib",
8
+ "src",
9
+ "packages",
10
+ "types",
11
+ "web-types.json"
12
+ ],
13
+ "typings": "types/index.d.ts",
14
+ "scripts": {
15
+ "bootstrap": "npm i",
16
+ "build:file": "node build/bin/iconInit.js & node build/bin/build-entry.js & node build/bin/i18n.js & node build/bin/version.js & node build/bin/gen-cy-types.js",
17
+ "build:theme": "node build/bin/gen-cssfile && gulp build --gulpfile packages/theme-chalk/gulpfile.js && cp-cli packages/theme-chalk/lib lib/theme-chalk",
18
+ "build:utils": "cross-env BABEL_ENV=utils babel src --out-dir lib --ignore src/index.js",
19
+ "build:umd": "node build/bin/build-locale.js",
20
+ "clean": "rimraf lib && rimraf packages/*/lib",
21
+ "deploy:build": "npm run build:file && cross-env NODE_ENV=production webpack --config build/webpack.demo.js && echo element.eleme.io>>examples/element-ui/CNAME",
22
+ "deploy:extension": "cross-env NODE_ENV=production webpack --config build/webpack.extension.js",
23
+ "dev:extension": "rimraf examples/extension/dist && cross-env NODE_ENV=development webpack --watch --config build/webpack.extension.js",
24
+ "dev": "npm run build:file && npx cross-env NODE_ENV=development webpack-dev-server --config build/webpack.demo.js",
25
+ "dev:play": "npm run build:file && cross-env NODE_ENV=development webpack-dev-server --config build/webpack.demo.js",
26
+ "dist": "node build/dist.js",
27
+ "i18n": "node build/bin/i18n.js",
28
+ "lint": "eslint src/**/* packages/**/* build/**/* examples/pages/**/* examples/app.vue examples/route.config.js --quiet",
29
+ "pub": "npm run bootstrap && sh build/git-release.sh && sh build/release.sh && node build/bin/gen-indices.js",
30
+ "release": "npm run dist && npm version patch --no-git-tag-version && npm publish",
31
+ "release:beta": "npm run dist && npm version prerelease --preid beta --no-git-tag-version && npm publish --tag beta"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": ""
36
+ },
37
+ "homepage": "",
38
+ "keywords": [
39
+ "vue",
40
+ "components",
41
+ "element-ui"
42
+ ],
43
+ "license": "MIT",
44
+ "engines": {
45
+ "node": ">=14.0.0"
46
+ },
47
+ "unpkg": "lib/index.js",
48
+ "style": "lib/theme-chalk/index.css",
49
+ "web-types": "./web-types.json",
50
+ "dependencies": {
51
+ "async-validator": "~1.8.1",
52
+ "babel-helper-vue-jsx-merge-props": "^2.0.0",
53
+ "deepmerge": "^1.2.0",
54
+ "normalize-wheel": "^1.0.1",
55
+ "resize-observer-polyfill": "^1.5.0",
56
+ "sass": "~1.32.13",
57
+ "throttle-debounce": "^1.0.1"
58
+ },
59
+ "peerDependencies": {
60
+ "vue": "^2.5.17"
61
+ },
62
+ "devDependencies": {
63
+ "@vue/component-compiler-utils": "^2.6.0",
64
+ "algoliasearch": "^3.24.5",
65
+ "babel-cli": "^6.26.0",
66
+ "babel-core": "^6.26.3",
67
+ "babel-loader": "^7.1.5",
68
+ "babel-plugin-add-module-exports": "^0.2.1",
69
+ "babel-plugin-module-resolver": "^2.2.0",
70
+ "babel-plugin-syntax-jsx": "^6.18.0",
71
+ "babel-plugin-transform-vue-jsx": "^3.7.0",
72
+ "babel-preset-env": "^1.7.0",
73
+ "babel-preset-stage-2": "^6.24.1",
74
+ "chokidar": "^3.5.3",
75
+ "copy-webpack-plugin": "^5.0.0",
76
+ "cp-cli": "^1.0.2",
77
+ "cross-env": "^3.2.4",
78
+ "css-loader": "^2.1.0",
79
+ "es6-promise": "^4.0.5",
80
+ "eslint": "^6.8.0",
81
+ "eslint-loader": "^2.0.0",
82
+ "eslint-plugin-json": "^2.1.1",
83
+ "eslint-plugin-vue": "^6.2.2",
84
+ "file-loader": "^1.1.11",
85
+ "file-save": "^0.2.0",
86
+ "gulp": "^4.0.0",
87
+ "gulp-autoprefixer": "^6.0.0",
88
+ "gulp-cssmin": "^0.2.0",
89
+ "gulp-sass": "^5.1.0",
90
+ "highlight.js": "^9.3.0",
91
+ "html-webpack-plugin": "^3.2.0",
92
+ "json-loader": "^0.5.7",
93
+ "json-templater": "^1.0.4",
94
+ "launch-editor-middleware": "^2.3.0",
95
+ "markdown-it": "^8.4.1",
96
+ "markdown-it-anchor": "^5.0.2",
97
+ "markdown-it-chain": "^1.3.0",
98
+ "markdown-it-container": "^2.0.0",
99
+ "mini-css-extract-plugin": "^0.4.1",
100
+ "optimize-css-assets-webpack-plugin": "^5.0.1",
101
+ "postcss": "^8.4.31",
102
+ "postcss-scss": "^4.0.9",
103
+ "progress-bar-webpack-plugin": "^1.1.0",
104
+ "rimraf": "^2.5.4",
105
+ "sass-loader": "^10.5.2",
106
+ "style-loader": "^0.23.1",
107
+ "stylelint": "^13.13.1",
108
+ "transliteration": "^1.1.11",
109
+ "uglifyjs-webpack-plugin": "^2.1.1",
110
+ "uppercamelcase": "^1.1.0",
111
+ "url-loader": "^1.0.1",
112
+ "vue": "2.5.21",
113
+ "vue-eslint-parser": "^7.0.0",
114
+ "vue-loader": "^15.7.0",
115
+ "vue-router": "^3.0.1",
116
+ "vue-template-compiler": "2.5.21",
117
+ "vue-template-es2015-compiler": "^1.6.0",
118
+ "webpack": "^4.14.0",
119
+ "webpack-cli": "^3.0.8",
120
+ "webpack-dev-server": "^3.1.11",
121
+ "webpack-node-externals": "^1.7.2"
122
+ }
135
123
  }
@@ -1,75 +1,87 @@
1
- <template>
2
- <div class="cy-select-display-input">
3
- <div class="select_display_input_box" :class="{ text_active: cursor, cursor: cursor && value }" @click="handleInfo">
4
- <div class="text"><span>{{ value }}</span></div>
5
- <span v-if="!value" class="placeholder">{{ placeholder }}</span>
6
- <i v-if="showDelete" class="el-icon-circle-close delete" @click.stop="handleDelete"></i>
7
- </div>
8
- <el-button v-if="showBtn" type="primary" @click="handleClick">{{ btnText }}</el-button>
9
- </div>
10
- </template>
11
-
12
- <script>
13
- export default {
14
- name: 'CySelectDisplayInput',
15
- props: {
16
- // 文本框 需要显示的内容
17
- value: {
18
- type: [Number, String],
19
- default: ''
20
- },
21
-
22
- // 文本框 的提示文本
23
- placeholder: {
24
- type: String,
25
- default: ''
26
- },
27
-
28
- // 选择按钮 的文字
29
- btnText: {
30
- type: String,
31
- default: '选择'
32
- },
33
-
34
- // 选择按钮 的显示条件
35
- showBtn: {
36
- type: Boolean,
37
- default: true
38
- },
39
-
40
- // 是否显示 删除按钮
41
- showDelete: {
42
- type: Boolean,
43
- default: false
44
- }
45
- },
46
- data() {
47
- return {};
48
- },
49
- computed: {
50
- // 文本框 是否需要点击,如果为true,输入框中的字体会变蓝并将鼠标变为小手
51
- cursor() {
52
- // 判断父组件是否坚挺了info事件
53
- return this.$listeners.info;
54
- }
55
- },
56
- created() {
57
-
58
- },
59
- methods: {
60
- handleInfo() {
61
- if (this.value) {
62
- this.$emit('info');
63
- }
64
- },
65
-
66
- handleClick() {
67
- this.$emit('click');
68
- },
69
-
70
- handleDelete() {
71
- this.$emit('delete');
72
- }
73
- }
74
- };
75
- </script>
1
+ <template>
2
+ <!-- 组件根容器 -->
3
+ <div class="cy-select-display-input">
4
+ <!-- 显示区:已赋值时展示文本(可点击触发 info 事件),未赋值时展示占位提示 -->
5
+ <div class="select_display_input_box" :class="{ text_active: cursor, cursor: cursor && value }" @click="handleInfo">
6
+ <div class="text"><span>{{ value }}</span></div>
7
+ <span v-if="!value" class="placeholder">{{ placeholder }}</span>
8
+ <i v-if="showDelete" class="el-icon-circle-close delete" @click.stop="handleDelete"></i>
9
+ </div>
10
+ <!-- 选择按钮:showBtn 为 true 时显示,点击触发 click 事件 -->
11
+ <el-button v-if="showBtn" type="primary" @click="handleClick">{{ btnText }}</el-button>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'CySelectDisplayInput',
18
+ props: {
19
+ // 文本框需要显示的内容(Number 或 String)
20
+ value: {
21
+ type: [Number, String],
22
+ default: ''
23
+ },
24
+ // 文本框未选择时的占位提示文本
25
+ placeholder: {
26
+ type: String,
27
+ default: ''
28
+ },
29
+ // 选择按钮上的文字
30
+ btnText: {
31
+ type: String,
32
+ default: '选择'
33
+ },
34
+ // 选择按钮的显示条件
35
+ showBtn: {
36
+ type: Boolean,
37
+ default: true
38
+ },
39
+ // 是否显示删除按钮
40
+ showDelete: {
41
+ type: Boolean,
42
+ default: false
43
+ }
44
+ },
45
+ data() {
46
+ return {};
47
+ },
48
+ computed: {
49
+ // 文本框是否需要点击,如果为 true,输入框中的字体会变蓝并将鼠标变为小手
50
+ cursor() {
51
+ return this.$listeners.info;
52
+ }
53
+ },
54
+ created() {
55
+
56
+ },
57
+ methods: {
58
+ /**
59
+ * 点击显示区:仅当已赋值时触发 info 事件
60
+ * @returns {void}
61
+ */
62
+ handleInfo() {
63
+ if (this.value) {
64
+ this.$emit('info');
65
+ }
66
+ },
67
+
68
+ /**
69
+ * 点击选择按钮:触发 click 事件
70
+ * @fires {Event} click
71
+ * @returns {void}
72
+ */
73
+ handleClick() {
74
+ this.$emit('click');
75
+ },
76
+
77
+ /**
78
+ * 点击删除按钮:触发 delete 事件
79
+ * @fires {Event} delete
80
+ * @returns {void}
81
+ */
82
+ handleDelete() {
83
+ this.$emit('delete');
84
+ }
85
+ }
86
+ };
87
+ </script>
@@ -1,36 +1,45 @@
1
- <template>
2
- <div class="cy-sub-title" :style="lineStyle">
3
- <div class="left">
4
- <slot>{{ title }}</slot>
5
- </div>
6
- <div class="right">
7
- <slot name="right"></slot>
8
- </div>
9
- </div>
10
- </template>
11
-
12
- <script>
13
- export default {
14
- name: 'CySubTitle',
15
- props: {
16
- title: {
17
- type: String,
18
- default: ''
19
- },
20
- lineColor: {
21
- type: String,
22
- default: ''
23
- }
24
- },
25
- computed: {
26
- lineStyle() {
27
- if (this.lineColor) {
28
- return {
29
- borderLeftColor: this.lineColor
30
- };
31
- }
32
- return {};
33
- }
34
- }
35
- };
36
- </script>
1
+ <template>
2
+ <!-- 副标题根容器,左侧带装饰边框线,lineStyle 控制边框颜色 -->
3
+ <div class="cy-sub-title" :style="lineStyle">
4
+ <!-- 左侧主标题区:默认插槽展示 title 文本 -->
5
+ <div class="left">
6
+ <slot>{{ title }}</slot>
7
+ </div>
8
+ <!-- 右侧操作区:用于放置按钮等自定义内容 -->
9
+ <div class="right">
10
+ <slot name="right"></slot>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ name: 'CySubTitle',
18
+ props: {
19
+ // 标题文本
20
+ title: {
21
+ type: String,
22
+ default: ''
23
+ },
24
+ // 左侧装饰边框线的颜色(传入后通过 lineStyle 应用到边框)
25
+ lineColor: {
26
+ type: String,
27
+ default: ''
28
+ }
29
+ },
30
+ computed: {
31
+ /**
32
+ * 根据 lineColor 生成左边框颜色样式;未传入时返回空对象
33
+ * @returns {Object} 包含 borderLeftColor 的样式对象或空对象
34
+ */
35
+ lineStyle() {
36
+ if (this.lineColor) {
37
+ return {
38
+ borderLeftColor: this.lineColor
39
+ };
40
+ }
41
+ return {};
42
+ }
43
+ }
44
+ };
45
+ </script>