yks-element 1.0.0 → 1.0.315

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 (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +49 -4
  3. package/{dist → lib}/fonts/element-icons.535877f5.woff +0 -0
  4. package/{dist → lib}/fonts/element-icons.732389de.ttf +0 -0
  5. package/lib/fonts/iconfont.19124b0d.ttf +0 -0
  6. package/lib/fonts/iconfont.3ae3dd4e.woff +0 -0
  7. package/lib/yks.css +1 -0
  8. package/package.json +74 -51
  9. package/packages/Button/index.js +8 -0
  10. package/packages/Button/src/index.vue +67 -0
  11. package/packages/Dialog/index.js +8 -0
  12. package/packages/Dialog/src/index.vue +103 -0
  13. package/packages/Multimedia/index.js +8 -0
  14. package/packages/Multimedia/src/index.vue +167 -0
  15. package/packages/Pagination/index.js +8 -0
  16. package/packages/Pagination/src/index.vue +149 -0
  17. package/packages/Scrollbar/index.js +8 -0
  18. package/packages/Scrollbar/src/index.vue +27 -0
  19. package/packages/Select/index.js +8 -0
  20. package/packages/Select/src/index.vue +350 -0
  21. package/packages/Select/src/option.vue +29 -0
  22. package/packages/Table/index.js +8 -0
  23. package/packages/Table/src/index.vue +141 -0
  24. package/packages/Tinymce/index.js +8 -0
  25. package/packages/Tinymce/src/config.js +25 -0
  26. package/packages/Tinymce/src/index.vue +500 -0
  27. package/packages/UploadFile/index.js +8 -0
  28. package/packages/UploadFile/src/index.vue +388 -0
  29. package/packages/Video/index.js +8 -0
  30. package/packages/Video/src/index.vue +352 -0
  31. package/packages/assets/utils/index.js +83 -0
  32. package/packages/icon/default/icons.js +182 -0
  33. package/packages/icon/default/icons.min.js +1 -0
  34. package/packages/icon/default/index.js +7 -0
  35. package/packages/icon/ks-pdf.png +0 -0
  36. package/packages/icon/ks-ppt.png +0 -0
  37. package/packages/icon/ks-word.png +0 -0
  38. package/packages/icon/ks-xslx.png +0 -0
  39. package/packages/icon/music-bg.png +0 -0
  40. package/packages/icon/video-bg.png +0 -0
  41. package/packages/index.js +221 -0
  42. package/packages/option/index.js +6 -0
  43. package/packages/styles/_mixin.scss +93 -0
  44. package/packages/styles/_variables.scss +40 -0
  45. package/packages/styles/common.scss +167 -0
  46. package/packages/styles/element-ui.scss +135 -0
  47. package/packages/styles/element-variables.scss +794 -0
  48. package/packages/styles/fonts/element-icons.ttf +0 -0
  49. package/packages/styles/fonts/element-icons.woff +0 -0
  50. package/packages/styles/fonts/iconfont.ttf +0 -0
  51. package/packages/styles/fonts/iconfont.woff +0 -0
  52. package/packages/styles/icon.scss +69 -0
  53. package/packages/styles/index.scss +10 -0
  54. package/packages/styles/select.scss +98 -0
  55. package/packages/styles/table.scss +45 -0
  56. package/types/index.d.ts +4 -0
  57. package/dist/demo.html +0 -10
  58. package/dist/yks.common.js +0 -64801
  59. package/dist/yks.css +0 -1
  60. package/dist/yks.umd.js +0 -64811
  61. package/dist/yks.umd.min.js +0 -15
  62. package/packages/button/index.vue +0 -16
  63. package/packages/index.ts +0 -12
package/package.json CHANGED
@@ -1,51 +1,74 @@
1
- {
2
- "name": "yks-element",
3
- "version": "1.0.0",
4
- "description": "yks公共库",
5
- "private": false,
6
- "author": "1098385361@qq.com",
7
- "scripts": {
8
- "serve": "vue-cli-service serve",
9
- "build": "vue-cli-service build",
10
- "lint": "vue-cli-service lint",
11
- "lib": "vue-cli-service build --target lib --name yks examples/main.ts"
12
- },
13
- "dependencies": {
14
- "@tinymce/tinymce-vue": "^3.2.1",
15
- "axios": "^0.19.2",
16
- "core-js": "^3.6.5",
17
- "element-ui": "^2.15.9",
18
- "lodash": "^4.17.15",
19
- "qs": "^6.9.4",
20
- "tinymce": "^5.2.2",
21
- "vue": "^2.6.11"
22
- },
23
- "devDependencies": {
24
- "@types/tinymce": "^4.5.24",
25
- "@typescript-eslint/eslint-plugin": "^2.30.0",
26
- "@typescript-eslint/parser": "^2.30.0",
27
- "@vue/cli-plugin-babel": "~4.5.15",
28
- "@vue/cli-plugin-eslint": "^4.3.1",
29
- "@vue/cli-plugin-typescript": "^4.3.1",
30
- "@vue/cli-service": "~4.5.15",
31
- "@vue/eslint-config-standard": "^5.1.2",
32
- "@vue/eslint-config-typescript": "^5.0.2",
33
- "babel-eslint": "^10.1.0",
34
- "eslint": "^6.8.0",
35
- "eslint-plugin-import": "^2.20.2",
36
- "eslint-plugin-node": "^11.1.0",
37
- "eslint-plugin-promise": "^4.2.1",
38
- "eslint-plugin-standard": "^4.0.1",
39
- "eslint-plugin-vue": "^6.2.2",
40
- "node-sass": "^6.0.1",
41
- "sass-loader": "10.2.0",
42
- "typescript": "^4.7.3",
43
- "uglifyjs-webpack-plugin": "v2.2.0",
44
- "vue-template-compiler": "^2.6.11"
45
- },
46
- "browserslist": [
47
- "> 1%",
48
- "last 2 versions",
49
- "not dead"
50
- ]
51
- }
1
+ {
2
+ "name": "yks-element",
3
+ "version": "1.0.315",
4
+ "description": "yks公共库",
5
+ "private": false,
6
+ "keywords": ["yks-element", "element-ui", "tinymce", "vue"],
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "http://10.5.1.5/it-ogt-client/it-ogt-npm.git"
10
+ },
11
+ "author": "1098385361@qq.com",
12
+ "scripts": {
13
+ "serve": "vue-cli-service serve --mode development",
14
+ "build": "vue-cli-service build",
15
+ "lint": "vue-cli-service lint",
16
+ "lib": "vue-cli-service build --target lib --name yks examples/main.js",
17
+ "lint-fix": "eslint --fix --ext .vue --ext --ext .js packages/"
18
+ },
19
+ "main": "packages/index.js",
20
+ "style": "lib/yks.css",
21
+ "files": [
22
+ "lib",
23
+ "dist",
24
+ "packages",
25
+ "types"
26
+ ],
27
+ "typings": "types/index.d.ts",
28
+ "dependencies": {
29
+ "@tinymce/tinymce-vue": "^3.2.1",
30
+ "element-ui": "^2.15.9",
31
+ "lodash": "^4.17.15",
32
+ "tinymce": "^5.2.2"
33
+ },
34
+ "peerDependencies": {
35
+ "vue": "^2.6.11"
36
+ },
37
+ "devDependencies": {
38
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
39
+ "core-js": "^3.6.5",
40
+ "@vue/cli-plugin-babel": "4.4.6",
41
+ "@vue/cli-plugin-unit-jest": "4.4.6",
42
+ "@vue/cli-service": "4.4.6",
43
+ "@vue/test-utils": "1.0.3",
44
+ "babel-eslint": "^10.1.0",
45
+ "babel-jest": "23.6.0",
46
+ "babel-plugin-component": "^1.1.1",
47
+ "babel-plugin-dynamic-import-node": "^2.3.3",
48
+ "babel-plugin-import": "^1.13.1",
49
+ "eslint": "^7.4.0",
50
+ "eslint-config-alloy": "^3.7.3",
51
+ "eslint-plugin-vue": "^6.2.2",
52
+ "node-sass": "^4.14.1",
53
+ "prettier": "^2.0.5",
54
+ "qs": "^6.9.4",
55
+ "sass-loader": "^9.0.2",
56
+ "uglifyjs-webpack-plugin": "^2.2.0",
57
+ "vue": "^2.6.11",
58
+ "vue-eslint-parser": "^7.1.0",
59
+ "vue-template-compiler": "^2.6.11"
60
+ },
61
+ "browserslist": [
62
+ "> 1%",
63
+ "last 2 versions",
64
+ "not dead"
65
+ ],
66
+ "env": {
67
+ "node": true
68
+ },
69
+ "engines": {
70
+ "node": ">=8.9",
71
+ "npm": ">= 3.0.0"
72
+ },
73
+ "license": "MIT"
74
+ }
@@ -0,0 +1,8 @@
1
+ import YksButton from './src/index';
2
+
3
+ /* istanbul ignore next */
4
+ YksButton.install = function(Vue) {
5
+ Vue.component(YksButton.name, YksButton);
6
+ };
7
+
8
+ export default YksButton;
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <Button v-bind="$attrs" v-on="$listeners">
3
+ <slot></slot>
4
+ </Button>
5
+ </template>
6
+
7
+ <script>
8
+ import { Button } from 'element-ui'
9
+
10
+ export default {
11
+ name: 'YksButton',
12
+ components: {
13
+ Button
14
+ }
15
+ }
16
+ </script>
17
+
18
+ <style lang="scss">
19
+ .el-button {
20
+ padding: 8px 24px;
21
+ }
22
+
23
+ .el-button--primary.is-plain,
24
+ .el-button--primary.is-plain.is-disabled {
25
+ background: #fff;
26
+ }
27
+
28
+ .el-button--primary.is-plain:hover,
29
+ .el-button--primary.is-plain:focus {
30
+ background: #fff;
31
+ border-color: #3b7cec;
32
+ color: #3b7cec;
33
+ }
34
+
35
+ .el-button--primary.is-plain.is-disabled,
36
+ .el-button--primary.is-plain.is-disabled:hover,
37
+ .el-button--primary.is-plain.is-disabled:focus,
38
+ .el-button--primary.is-plain.is-disabled:active {
39
+ background: #fff;
40
+ border-color: #d4e5ff;
41
+ color: #d4e5ff;
42
+ }
43
+
44
+ .el-button--primary:hover,
45
+ .el-button--primary:focus {
46
+ background: #3b7cec;
47
+ border-color: #3b7cec;
48
+ }
49
+
50
+ .el-button--primary.is-disabled,
51
+ .el-button--primary.is-disabled:hover,
52
+ .el-button--primary.is-disabled:focus,
53
+ .el-button--primary.is-disabled:active {
54
+ color: #ffffff;
55
+ background-color: #d4e5ff;
56
+ border-color: #d4e5ff;
57
+ }
58
+
59
+ .el-button--danger.is-disabled,
60
+ .el-button--danger.is-disabled:hover,
61
+ .el-button--danger.is-disabled:focus,
62
+ .el-button--danger.is-disabled:active {
63
+ color: #ffffff;
64
+ background-color: #f9dbdd;
65
+ border-color: #f9dbdd;
66
+ }
67
+ </style>
@@ -0,0 +1,8 @@
1
+ import YksDialog from './src/index';
2
+
3
+ /* istanbul ignore next */
4
+ YksDialog.install = function(Vue) {
5
+ Vue.component(YksDialog.name, YksDialog);
6
+ };
7
+
8
+ export default YksDialog;
@@ -0,0 +1,103 @@
1
+ <template>
2
+ <Dialog v-bind="dialogOptions" :visible.sync="visible" v-on="$listeners">
3
+ <slot slot="title" name="title"> </slot>
4
+ <yks-scrollbar :height="height">
5
+ <slot></slot>
6
+ </yks-scrollbar>
7
+ <template v-if="footer" #footer>
8
+ <slot name="footer">
9
+ <el-button type="primary" :disabled="loading" :loading="loading" @click="onSure">
10
+ 确 定
11
+ </el-button>
12
+ <el-button @click="onClose"> 取消 </el-button>
13
+ </slot>
14
+ </template>
15
+ </Dialog>
16
+ </template>
17
+
18
+ <script>
19
+ import ElDialog from 'element-ui/lib/dialog'
20
+ import { Dialog } from 'element-ui'
21
+ /**
22
+ * Dialog 表格组件
23
+ * @module yks-dialog
24
+ */
25
+
26
+ export default {
27
+ name: 'YksDialog',
28
+ components: {
29
+ Dialog
30
+ },
31
+ props: {
32
+ /**
33
+ * 扩展属性参数
34
+ * @property {Array} [height = 390] scrollbar的高
35
+ * @property {Object} [show = false] 是否显示 Dialog
36
+ */
37
+ ...ElDialog.props,
38
+ height: {
39
+ type: String,
40
+ default: '390px'
41
+ },
42
+ show: {
43
+ type: Boolean,
44
+ default: false
45
+ },
46
+ loading: {
47
+ type: Boolean,
48
+ default: false
49
+ },
50
+ disabledSure: {
51
+ type: Boolean,
52
+ default: false
53
+ },
54
+ footer: {
55
+ type: Boolean,
56
+ default: true
57
+ }
58
+ },
59
+ data() {
60
+ return {
61
+ visible: false
62
+ }
63
+ },
64
+ computed: {
65
+ dialogOptions() {
66
+ const options = { ...this.$props }
67
+ delete options.height
68
+ delete options.visible
69
+ delete options.loading
70
+ delete options.disabledSure
71
+ delete options.footer
72
+ return options
73
+ }
74
+ },
75
+ watch: {
76
+ show(val) {
77
+ this.visible = val
78
+ }
79
+ },
80
+ methods: {
81
+ onClose() {
82
+ this.$emit('close', false)
83
+ },
84
+ onSure() {
85
+ this.$emit('sure', true)
86
+ }
87
+ }
88
+ }
89
+ </script>
90
+
91
+ <style lang="scss" scoped>
92
+ .ks-scrollbar {
93
+ padding: 20px 0;
94
+ .ks-contents {
95
+ padding: 0 20px;
96
+ }
97
+ }
98
+ ::v-deep {
99
+ .el-dialog__title {
100
+ font-weight: bold;
101
+ }
102
+ }
103
+ </style>
@@ -0,0 +1,8 @@
1
+ import YksMultimedia from './src/index';
2
+
3
+ /* istanbul ignore next */
4
+ YksMultimedia.install = function(Vue) {
5
+ Vue.component(YksMultimedia.name, YksMultimedia);
6
+ };
7
+
8
+ export default YksMultimedia;
@@ -0,0 +1,167 @@
1
+ <template>
2
+ <div class="multimedia">
3
+ <div v-if="fileType === '1'" class="ks-stem__itemattrs" :title="fileName">
4
+ <div class="yks-tc file-stem">
5
+ <el-image
6
+ class="ks-stem__icon"
7
+ :src="iconUrl(data.content)"
8
+ fit="cover"
9
+ @click="handleClick"
10
+ ></el-image>
11
+ <i
12
+ v-if="visibleDel"
13
+ class="el-icon-error media-delfile"
14
+ @click.stop="handleCloseFile"
15
+ ></i>
16
+ </div>
17
+ </div>
18
+ <yks-video v-else-if="fileType === '2'" :src="data.content"></yks-video>
19
+ <div v-else class="ks-stem__itemattrs" :title="fileName">
20
+ <div class="yks-tc file-stem">
21
+ <i class="el-icon-document-remove ks-stem__remove" @click="handleClick"></i>
22
+ <i
23
+ v-if="visibleDel"
24
+ class="el-icon-error media-delfile"
25
+ @click.stop="handleCloseFile"
26
+ ></i>
27
+ </div>
28
+ </div>
29
+ <div class="ks-stem__content yks-text-ellipsis">
30
+ {{ fileName }}
31
+ </div>
32
+ </div>
33
+ </template>
34
+ <script>
35
+ import xlsx from '../../icon/ks-xslx.png'
36
+ import pdf from '../../icon/ks-pdf.png'
37
+ import docx from '../../icon/ks-word.png'
38
+ import pptx from '../../icon/ks-ppt.png'
39
+ import YksVideo from '../../Video/index'
40
+
41
+ export default {
42
+ name: 'YksMultimedia',
43
+ components: {
44
+ YksVideo
45
+ },
46
+ props: {
47
+ data: Object,
48
+ visibleDel: { type: Boolean, default: false }
49
+ },
50
+ computed: {
51
+ fileName() {
52
+ const url = this.data.content || ''
53
+ const name = url.substr(url.lastIndexOf('/') + 1).toLowerCase()
54
+ return this.revertUTF8(name)
55
+ },
56
+ /* 获取文件后缀 */
57
+ fileNameType() {
58
+ const url = this.data.content || ''
59
+ return url.substr(url.lastIndexOf('.') + 1).toLowerCase()
60
+ },
61
+ fileType() {
62
+ if (['xlsx', 'pdf', 'docx', 'pptx'].includes(this.fileNameType)) {
63
+ return '1'
64
+ }
65
+ if (['mp3', 'mp4'].includes(this.fileNameType)) {
66
+ return '2'
67
+ }
68
+ return false
69
+ }
70
+ },
71
+
72
+ methods: {
73
+ handleClick() {
74
+ window.open(this.data.content, '_blank')
75
+ },
76
+
77
+ handleCloseFile() {
78
+ this.$emit('delete', this.data)
79
+ },
80
+
81
+ revertUTF8(szInput) {
82
+ let x
83
+ let wch
84
+ let wch1
85
+ let wch2
86
+ let szRet = ''
87
+ for (x = 0; x < szInput.length; x++) {
88
+ // eslint-disable-next-line eqeqeq
89
+ if (szInput.charAt(x) == '%') {
90
+ wch = parseInt(szInput.charAt(++x) + szInput.charAt(++x), 16)
91
+ if (!wch) {
92
+ break
93
+ }
94
+ if (!(wch & 0x80)) {
95
+ // eslint-disable-next-line no-self-assign
96
+ wch = wch
97
+ } else if (!(wch & 0x20)) {
98
+ x++
99
+ wch1 = parseInt(szInput.charAt(++x) + szInput.charAt(++x), 16)
100
+ wch = (wch & 0x1f) << 6
101
+ wch1 = wch1 & 0x3f
102
+ wch = wch + wch1
103
+ } else {
104
+ x++
105
+ wch1 = parseInt(szInput.charAt(++x) + szInput.charAt(++x), 16)
106
+ x++
107
+ wch2 = parseInt(szInput.charAt(++x) + szInput.charAt(++x), 16)
108
+ wch = (wch & 0x0f) << 12
109
+ wch1 = (wch1 & 0x3f) << 6
110
+ wch2 = wch2 & 0x3f
111
+ wch = wch + wch1 + wch2
112
+ }
113
+ szRet += String.fromCharCode(wch)
114
+ } else {
115
+ szRet += szInput.charAt(x)
116
+ }
117
+ }
118
+ return szRet
119
+ },
120
+
121
+ iconUrl() {
122
+ const params = {
123
+ xlsx: xlsx,
124
+ pdf: pdf,
125
+ docx: docx,
126
+ pptx: pptx
127
+ }
128
+ return params[this.fileNameType] || params.docx
129
+ }
130
+ }
131
+ }
132
+ </script>
133
+ <style lang="scss" scoped>
134
+ .multimedia {
135
+ position: relative;
136
+ margin-right: 10px;
137
+ width: 160px;
138
+
139
+ .file-stem {
140
+ position: relative;
141
+ width: 80px;
142
+ margin: 0 auto;
143
+ }
144
+
145
+ .ks-stem__itemattrs {
146
+ border-radius: 4px;
147
+ position: relative;
148
+ .ks-stem__remove{
149
+ font-size: 50px;
150
+ cursor: pointer;
151
+ }
152
+ .ks-stem__icon {
153
+ width: 77px;
154
+ height: 77px;
155
+ margin-bottom: 9px;
156
+ cursor: pointer;
157
+ }
158
+ }
159
+ .ks-stem__content {
160
+ width: 160px;
161
+ font-size: 12px;
162
+ text-align: center;
163
+ padding-top: 5px;
164
+ color: #000;
165
+ }
166
+ }
167
+ </style>
@@ -0,0 +1,8 @@
1
+ import YksPagination from './src/index';
2
+
3
+ /* istanbul ignore next */
4
+ YksPagination.install = function(Vue) {
5
+ Vue.component(YksPagination.name, YksPagination);
6
+ };
7
+
8
+ export default YksPagination;
@@ -0,0 +1,149 @@
1
+ <template>
2
+ <div :class="{ hidden: hidden }" class="pagination-container yks-flex">
3
+ <div v-if="sizesValue" class="flex-1 yks-flex h-start ks-sizes">
4
+ 每页显示
5
+ <yks-select
6
+ v-model="sizeValues"
7
+ :data="sizesPageSizes"
8
+ class="ks-select-sizes"
9
+ @change="changeSizeValues"
10
+ ></yks-select>
11
+ </div>
12
+ <el-pagination
13
+ :background="background"
14
+ :current-page.sync="pageOption.page"
15
+ :page-size.sync="pageOption.pageSize"
16
+ :layout="layoutValue"
17
+ :page-sizes="pageSizes"
18
+ :total="pageOption.total"
19
+ v-bind="$attrs"
20
+ @size-change="handleSizeChange"
21
+ @current-change="handleCurrentChange"
22
+ >
23
+ </el-pagination>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ export default {
29
+ name: 'YksPagination',
30
+ props: {
31
+ pageOption: {
32
+ required: true,
33
+ type: Object,
34
+ default: () => {
35
+ return {
36
+ total: 0, // 总条数
37
+ page: 1, // 当前页数
38
+ pageSize: 10 // 页面大小
39
+ }
40
+ }
41
+ },
42
+ pageSizes: {
43
+ default: () => [10, 20, 50, 100]
44
+ },
45
+ layout: { default: 'sizes, total, prev, pager, next, jumper' },
46
+ background: { default: false },
47
+ autoScroll: { default: true },
48
+ hidden: { default: false }
49
+ },
50
+ data() {
51
+ return {
52
+ sizeValues: ''
53
+ }
54
+ },
55
+ computed: {
56
+ layoutValue() {
57
+ const value = this.layout.split(',')
58
+ const layout = value.filter((v) => v.trim() !== 'sizes').join(',')
59
+ return layout
60
+ },
61
+ sizesValue() {
62
+ const value = this.layout.split(',')
63
+ const sizes = value.some((v) => v.trim() === 'sizes')
64
+ return sizes
65
+ },
66
+ sizesPageSizes() {
67
+ return this.pageSizes.map((v) => {
68
+ return {
69
+ value: v,
70
+ label: v
71
+ }
72
+ })
73
+ }
74
+ },
75
+ created() {
76
+ this.sizeValues = this.pageOption.pageSize
77
+ },
78
+ methods: {
79
+ changeSizeValues(value) {
80
+ this.$emit(
81
+ 'pagination',
82
+ Object.assign(this.pageOption, {
83
+ pageSize: value,
84
+ page: 1
85
+ })
86
+ )
87
+ },
88
+
89
+ handleSizeChange(value) {
90
+ this.$emit(
91
+ 'pagination',
92
+ Object.assign(this.pageOption, {
93
+ pageSize: value,
94
+ page: 1
95
+ })
96
+ )
97
+ },
98
+
99
+ handleCurrentChange(value) {
100
+ this.$emit(
101
+ 'pagination',
102
+ Object.assign(this.pageOption, {
103
+ page: value
104
+ })
105
+ )
106
+ }
107
+ }
108
+ }
109
+ </script>
110
+
111
+ <style lang="scss" scoped>
112
+ .pagination-container {
113
+ text-align: center;
114
+ background: #fff;
115
+ padding: 20px 38px;
116
+ width: 100%;
117
+
118
+ .ks-sizes {
119
+ font-size: 14px;
120
+ color: #9ea0a5;
121
+ .ks-select-sizes {
122
+ margin-left: 8px;
123
+
124
+ ::v-deep {
125
+ .el-input__inner {
126
+ border: unset;
127
+ padding: 0 30px 0 0;
128
+ width: 60px;
129
+ }
130
+ }
131
+ }
132
+ }
133
+
134
+ ::v-deep {
135
+ .active {
136
+ min-width: 30px !important;
137
+ min-height: 30px !important;
138
+ background: #096dd9;
139
+ border-radius: 50%;
140
+ padding: 0;
141
+ color: #fff;
142
+ }
143
+ }
144
+ }
145
+
146
+ .pagination-container.hidden {
147
+ display: none;
148
+ }
149
+ </style>
@@ -0,0 +1,8 @@
1
+ import YksScrollbar from './src/index';
2
+
3
+ /* istanbul ignore next */
4
+ YksScrollbar.install = function(Vue) {
5
+ Vue.component(YksScrollbar.name, YksScrollbar);
6
+ };
7
+
8
+ export default YksScrollbar;
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <el-scrollbar class="ks-scrollbar" :style="{ height }" wrap-class="default-scrollbar__wrap">
3
+ <div class="ks-contents">
4
+ <slot></slot>
5
+ </div>
6
+ </el-scrollbar>
7
+ </template>
8
+
9
+ <script>
10
+ export default {
11
+ name: 'YksScrollbar',
12
+ props: {
13
+ height: {
14
+ type: String,
15
+ default: 'auto'
16
+ }
17
+ }
18
+ }
19
+ </script>
20
+
21
+ <style lang="scss" scoped>
22
+ .ks-scrollbar {
23
+ .ks-contents {
24
+ padding: 0 20px;
25
+ }
26
+ }
27
+ </style>