yks-element 1.0.4 → 1.0.5

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 (190) hide show
  1. package/README.md +7 -3
  2. package/lib/theme-chalk/common.css +1 -1
  3. package/lib/theme-chalk/index.css +1 -1
  4. package/lib/theme-chalk/paginations.css +1 -1
  5. package/lib/theme-chalk/selects.css +1 -1
  6. package/lib/yks.js +1 -1
  7. package/package.json +1 -3
  8. package/lib/theme-chalk/topic.css +0 -1
  9. package/packages/Dialog/index.js +0 -8
  10. package/packages/Dialog/src/index.vue +0 -89
  11. package/packages/Multimedia/index.js +0 -8
  12. package/packages/Multimedia/src/index.vue +0 -136
  13. package/packages/Pagination/index.js +0 -8
  14. package/packages/Pagination/src/index.vue +0 -111
  15. package/packages/Scrollbar/index.js +0 -8
  16. package/packages/Scrollbar/src/index.vue +0 -20
  17. package/packages/Select/index.js +0 -8
  18. package/packages/Select/src/index.vue +0 -350
  19. package/packages/Select/src/option.vue +0 -29
  20. package/packages/Table/index.js +0 -8
  21. package/packages/Table/src/index.vue +0 -141
  22. package/packages/Tinymce/index.js +0 -8
  23. package/packages/Tinymce/src/config.js +0 -25
  24. package/packages/Tinymce/src/index.vue +0 -450
  25. package/packages/Topic/index.js +0 -23
  26. package/packages/Topic/src/attachment.vue +0 -114
  27. package/packages/Topic/src/audioFrequency.vue +0 -114
  28. package/packages/Topic/src/clozeFillInBlanks.vue +0 -237
  29. package/packages/Topic/src/compound.vue +0 -191
  30. package/packages/Topic/src/config.js +0 -132
  31. package/packages/Topic/src/fillInBlanks.vue +0 -242
  32. package/packages/Topic/src/indefiniteChoice.vue +0 -0
  33. package/packages/Topic/src/judgment.vue +0 -110
  34. package/packages/Topic/src/matching.vue +0 -0
  35. package/packages/Topic/src/multiple.vue +0 -163
  36. package/packages/Topic/src/pictureAnswer.vue +0 -113
  37. package/packages/Topic/src/shortAnswer.vue +0 -124
  38. package/packages/Topic/src/single.vue +0 -163
  39. package/packages/UploadFile/index.js +0 -8
  40. package/packages/UploadFile/src/index.vue +0 -358
  41. package/packages/Video/index.js +0 -8
  42. package/packages/Video/src/index.vue +0 -204
  43. package/packages/assets/mixins/topic.js +0 -137
  44. package/packages/assets/utils/index.js +0 -83
  45. package/packages/assets/utils/topic.js +0 -132
  46. package/packages/icon/default/icons.js +0 -182
  47. package/packages/icon/default/icons.min.js +0 -1
  48. package/packages/icon/default/index.js +0 -7
  49. package/packages/icon/ks-pdf.png +0 -0
  50. package/packages/icon/ks-ppt.png +0 -0
  51. package/packages/icon/ks-word.png +0 -0
  52. package/packages/icon/ks-xslx.png +0 -0
  53. package/packages/icon/music-bg.png +0 -0
  54. package/packages/icon/video-bg.png +0 -0
  55. package/packages/index.js +0 -221
  56. package/packages/option/index.js +0 -6
  57. package/packages/styles/_mixin.scss +0 -93
  58. package/packages/styles/_variables.scss +0 -40
  59. package/packages/styles/alert.scss +0 -147
  60. package/packages/styles/aside.scss +0 -7
  61. package/packages/styles/autocomplete.scss +0 -80
  62. package/packages/styles/avatar.scss +0 -51
  63. package/packages/styles/backtop.scss +0 -22
  64. package/packages/styles/badge.scss +0 -57
  65. package/packages/styles/base.scss +0 -2
  66. package/packages/styles/breadcrumb-item.scss +0 -0
  67. package/packages/styles/breadcrumb.scss +0 -55
  68. package/packages/styles/button-group.scss +0 -0
  69. package/packages/styles/button.scss +0 -262
  70. package/packages/styles/buttons.scss +0 -59
  71. package/packages/styles/calendar.scss +0 -79
  72. package/packages/styles/card.scss +0 -32
  73. package/packages/styles/carousel-item.scss +0 -50
  74. package/packages/styles/carousel.scss +0 -161
  75. package/packages/styles/cascader-panel.scss +0 -120
  76. package/packages/styles/cascader.scss +0 -182
  77. package/packages/styles/checkbox-button.scss +0 -0
  78. package/packages/styles/checkbox-group.scss +0 -0
  79. package/packages/styles/checkbox.scss +0 -359
  80. package/packages/styles/col.scss +0 -156
  81. package/packages/styles/collapse-item.scss +0 -0
  82. package/packages/styles/collapse.scss +0 -63
  83. package/packages/styles/color-picker.scss +0 -384
  84. package/packages/styles/common/popup.scss +0 -42
  85. package/packages/styles/common/transition.scss +0 -99
  86. package/packages/styles/common/var.scss +0 -1028
  87. package/packages/styles/common.scss +0 -204
  88. package/packages/styles/container.scss +0 -14
  89. package/packages/styles/date-picker/date-picker.scss +0 -97
  90. package/packages/styles/date-picker/date-range-picker.scss +0 -101
  91. package/packages/styles/date-picker/date-table.scss +0 -151
  92. package/packages/styles/date-picker/month-table.scss +0 -82
  93. package/packages/styles/date-picker/picker-panel.scss +0 -117
  94. package/packages/styles/date-picker/picker.scss +0 -197
  95. package/packages/styles/date-picker/time-picker.scss +0 -85
  96. package/packages/styles/date-picker/time-range-picker.scss +0 -31
  97. package/packages/styles/date-picker/time-spinner.scss +0 -110
  98. package/packages/styles/date-picker/year-table.scss +0 -51
  99. package/packages/styles/date-picker.scss +0 -12
  100. package/packages/styles/descriptions-item.scss +0 -42
  101. package/packages/styles/descriptions.scss +0 -111
  102. package/packages/styles/dialog.scss +0 -123
  103. package/packages/styles/display.scss +0 -12
  104. package/packages/styles/divider.scss +0 -47
  105. package/packages/styles/drawer.scss +0 -219
  106. package/packages/styles/dropdown-item.scss +0 -0
  107. package/packages/styles/dropdown-menu.scss +0 -0
  108. package/packages/styles/dropdown.scss +0 -182
  109. package/packages/styles/element-ui.scss +0 -135
  110. package/packages/styles/element-variables.scss +0 -794
  111. package/packages/styles/element.scss +0 -86
  112. package/packages/styles/empty.scss +0 -45
  113. package/packages/styles/fonts/element-icons.ttf +0 -0
  114. package/packages/styles/fonts/element-icons.woff +0 -0
  115. package/packages/styles/fonts/iconfont.ttf +0 -0
  116. package/packages/styles/fonts/iconfont.woff +0 -0
  117. package/packages/styles/footer.scss +0 -8
  118. package/packages/styles/form-item.scss +0 -0
  119. package/packages/styles/form.scss +0 -167
  120. package/packages/styles/header.scss +0 -8
  121. package/packages/styles/icon.scss +0 -1167
  122. package/packages/styles/icons.scss +0 -69
  123. package/packages/styles/image.scss +0 -179
  124. package/packages/styles/index.scss +0 -18
  125. package/packages/styles/infinite-scroll.scss +0 -0
  126. package/packages/styles/infiniteScroll.scss +0 -0
  127. package/packages/styles/input-number.scss +0 -180
  128. package/packages/styles/input.scss +0 -360
  129. package/packages/styles/link.scss +0 -81
  130. package/packages/styles/loading.scss +0 -96
  131. package/packages/styles/main.scss +0 -12
  132. package/packages/styles/menu-item-group.scss +0 -0
  133. package/packages/styles/menu-item.scss +0 -0
  134. package/packages/styles/menu.scss +0 -289
  135. package/packages/styles/message-box.scss +0 -226
  136. package/packages/styles/message.scss +0 -120
  137. package/packages/styles/mixins/_button.scss +0 -81
  138. package/packages/styles/mixins/config.scss +0 -4
  139. package/packages/styles/mixins/function.scss +0 -44
  140. package/packages/styles/mixins/mixins.scss +0 -190
  141. package/packages/styles/mixins/utils.scss +0 -39
  142. package/packages/styles/multimedia.scss +0 -58
  143. package/packages/styles/notification.scss +0 -99
  144. package/packages/styles/option-group.scss +0 -42
  145. package/packages/styles/option.scss +0 -36
  146. package/packages/styles/page-header.scss +0 -41
  147. package/packages/styles/pagination.scss +0 -295
  148. package/packages/styles/paginations.scss +0 -33
  149. package/packages/styles/popconfirm.scss +0 -16
  150. package/packages/styles/popover.scss +0 -40
  151. package/packages/styles/popper.scss +0 -101
  152. package/packages/styles/progress.scss +0 -141
  153. package/packages/styles/radio-button.scss +0 -113
  154. package/packages/styles/radio-group.scss +0 -9
  155. package/packages/styles/radio.scss +0 -199
  156. package/packages/styles/rate.scss +0 -49
  157. package/packages/styles/reset.scss +0 -79
  158. package/packages/styles/result.scss +0 -61
  159. package/packages/styles/row.scss +0 -43
  160. package/packages/styles/scrollbar.scss +0 -72
  161. package/packages/styles/scrollbars.scss +0 -5
  162. package/packages/styles/select-dropdown.scss +0 -62
  163. package/packages/styles/select.scss +0 -152
  164. package/packages/styles/selects.scss +0 -98
  165. package/packages/styles/skeleton-item.scss +0 -84
  166. package/packages/styles/skeleton.scss +0 -40
  167. package/packages/styles/slider.scss +0 -250
  168. package/packages/styles/spinner.scss +0 -44
  169. package/packages/styles/step.scss +0 -317
  170. package/packages/styles/steps.scss +0 -20
  171. package/packages/styles/submenu.scss +0 -0
  172. package/packages/styles/switch.scss +0 -116
  173. package/packages/styles/tab-pane.scss +0 -0
  174. package/packages/styles/table-column.scss +0 -97
  175. package/packages/styles/table.scss +0 -564
  176. package/packages/styles/tables.scss +0 -45
  177. package/packages/styles/tabs.scss +0 -602
  178. package/packages/styles/tag.scss +0 -163
  179. package/packages/styles/time-picker.scss +0 -8
  180. package/packages/styles/time-select.scss +0 -37
  181. package/packages/styles/timeline-item.scss +0 -86
  182. package/packages/styles/timeline.scss +0 -14
  183. package/packages/styles/tinymce.scss +0 -43
  184. package/packages/styles/tooltip.scss +0 -141
  185. package/packages/styles/topic.scss +0 -57
  186. package/packages/styles/transfer.scss +0 -227
  187. package/packages/styles/tree.scss +0 -123
  188. package/packages/styles/upload.scss +0 -603
  189. package/packages/styles/uploadfile.scss +0 -34
  190. package/packages/styles/video.scss +0 -98
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yks-element",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "yks公共库",
5
5
  "private": false,
6
6
  "keywords": [
@@ -27,8 +27,6 @@
27
27
  "style": "lib/theme-chalk/index.css",
28
28
  "files": [
29
29
  "lib",
30
- "dist",
31
- "packages",
32
30
  "types"
33
31
  ],
34
32
  "typings": "types/index.d.ts",
@@ -1 +0,0 @@
1
- .required__label,.yks-topics{position:relative}.required__label::before{content:'*';color:#F5222D;margin-right:4px}.text__warning{color:#F5222D}.fill__other{font-size:12px;padding:10px;background:#e1f5fe;border:1px solid #bbdefb;border-radius:5px;margin-top:10px}.topic-stem__label{margin:30px 0;font-size:18px;font-weight:700}.yks-topics .cloze-single{margin:30px 0}.yks-topics .cloze-single .single-single__label{font-weight:700;font-size:18px;width:100px}.yks-topics .radio-tinymce{font-size:14px;margin-right:20px}.yks-topics .compound-button{margin:20px auto;width:60%}.yks-topics .el-radio-group{display:block}
@@ -1,8 +0,0 @@
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;
@@ -1,89 +0,0 @@
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>
@@ -1,8 +0,0 @@
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;
@@ -1,136 +0,0 @@
1
- <template>
2
- <div class="yks-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
- <div v-else-if="fileType === '2'">
19
- <yks-video :src="data.content"></yks-video>
20
- <i
21
- v-if="visibleDel"
22
- class="el-icon-error media-delfile"
23
- @click.stop="handleCloseFile"
24
- ></i>
25
- </div>
26
- <div v-else class="ks-stem__itemattrs" :title="fileName">
27
- <div class="yks-tc file-stem">
28
- <i class="el-icon-document-remove ks-stem__remove" @click="handleClick"></i>
29
- <i
30
- v-if="visibleDel"
31
- class="el-icon-error media-delfile"
32
- @click.stop="handleCloseFile"
33
- ></i>
34
- </div>
35
- </div>
36
- <div class="ks-stem__content yks-text-ellipsis">
37
- {{ fileName }}
38
- </div>
39
- </div>
40
- </template>
41
- <script>
42
- import xlsx from 'yks/icon/ks-xslx.png'
43
- import pdf from 'yks/icon/ks-pdf.png'
44
- import docx from 'yks/icon/ks-word.png'
45
- import pptx from 'yks/icon/ks-ppt.png'
46
-
47
- export default {
48
- name: 'YksMultimedia',
49
- props: {
50
- data: Object,
51
- visibleDel: { type: Boolean, default: false }
52
- },
53
- computed: {
54
- fileName() {
55
- const url = this.data.content || ''
56
- const name = url.substr(url.lastIndexOf('/') + 1).toLowerCase()
57
- return this.revertUTF8(name)
58
- },
59
- /* 获取文件后缀 */
60
- fileNameType() {
61
- const url = this.data.content || ''
62
- return url.substr(url.lastIndexOf('.') + 1).toLowerCase()
63
- },
64
- fileType() {
65
- if (['xlsx', 'pdf', 'docx', 'pptx'].includes(this.fileNameType)) {
66
- return '1'
67
- }
68
- if (['mp3', 'mp4'].includes(this.fileNameType)) {
69
- return '2'
70
- }
71
- return false
72
- }
73
- },
74
-
75
- methods: {
76
- handleClick() {
77
- window.open(this.data.content, '_blank')
78
- },
79
-
80
- handleCloseFile() {
81
- this.$emit('delete', this.data)
82
- },
83
-
84
- revertUTF8(szInput) {
85
- let x
86
- let wch
87
- let wch1
88
- let wch2
89
- let szRet = ''
90
- for (x = 0; x < szInput.length; x++) {
91
- // eslint-disable-next-line eqeqeq
92
- if (szInput.charAt(x) == '%') {
93
- wch = parseInt(szInput.charAt(++x) + szInput.charAt(++x), 16)
94
- if (!wch) {
95
- break
96
- }
97
- if (!(wch & 0x80)) {
98
- // eslint-disable-next-line no-self-assign
99
- wch = wch
100
- } else if (!(wch & 0x20)) {
101
- x++
102
- wch1 = parseInt(szInput.charAt(++x) + szInput.charAt(++x), 16)
103
- wch = (wch & 0x1f) << 6
104
- wch1 = wch1 & 0x3f
105
- wch = wch + wch1
106
- } else {
107
- x++
108
- wch1 = parseInt(szInput.charAt(++x) + szInput.charAt(++x), 16)
109
- x++
110
- wch2 = parseInt(szInput.charAt(++x) + szInput.charAt(++x), 16)
111
- wch = (wch & 0x0f) << 12
112
- wch1 = (wch1 & 0x3f) << 6
113
- wch2 = wch2 & 0x3f
114
- wch = wch + wch1 + wch2
115
- }
116
- szRet += String.fromCharCode(wch)
117
- } else {
118
- szRet += szInput.charAt(x)
119
- }
120
- }
121
- return szRet
122
- },
123
-
124
- iconUrl() {
125
- const params = {
126
- xlsx: xlsx,
127
- pdf: pdf,
128
- docx: docx,
129
- pptx: pptx
130
- }
131
- return params[this.fileNameType] || params.docx
132
- }
133
- }
134
- }
135
- </script>
136
-
@@ -1,8 +0,0 @@
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;
@@ -1,111 +0,0 @@
1
- <template>
2
- <div :class="{ hidden: hidden }" class="yks-pagination 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
-
@@ -1,8 +0,0 @@
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;
@@ -1,20 +0,0 @@
1
- <template>
2
- <el-scrollbar class="yks-scrollbar" :style="{ height }" wrap-class="default-scrollbar__wrap">
3
- <div class="yks-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
-
@@ -1,8 +0,0 @@
1
- import YksSelect from './src/index';
2
-
3
- /* istanbul ignore next */
4
- YksSelect.install = function(Vue) {
5
- Vue.component(YksSelect.name, YksSelect);
6
- };
7
-
8
- export default YksSelect;