yks-element 1.0.4 → 1.0.41

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 (187) hide show
  1. package/lib/theme-chalk/common.css +1 -1
  2. package/lib/theme-chalk/index.css +1 -1
  3. package/lib/yks.js +1 -1
  4. package/package.json +1 -3
  5. package/lib/theme-chalk/topic.css +0 -1
  6. package/packages/Dialog/index.js +0 -8
  7. package/packages/Dialog/src/index.vue +0 -89
  8. package/packages/Multimedia/index.js +0 -8
  9. package/packages/Multimedia/src/index.vue +0 -136
  10. package/packages/Pagination/index.js +0 -8
  11. package/packages/Pagination/src/index.vue +0 -111
  12. package/packages/Scrollbar/index.js +0 -8
  13. package/packages/Scrollbar/src/index.vue +0 -20
  14. package/packages/Select/index.js +0 -8
  15. package/packages/Select/src/index.vue +0 -350
  16. package/packages/Select/src/option.vue +0 -29
  17. package/packages/Table/index.js +0 -8
  18. package/packages/Table/src/index.vue +0 -141
  19. package/packages/Tinymce/index.js +0 -8
  20. package/packages/Tinymce/src/config.js +0 -25
  21. package/packages/Tinymce/src/index.vue +0 -450
  22. package/packages/Topic/index.js +0 -23
  23. package/packages/Topic/src/attachment.vue +0 -114
  24. package/packages/Topic/src/audioFrequency.vue +0 -114
  25. package/packages/Topic/src/clozeFillInBlanks.vue +0 -237
  26. package/packages/Topic/src/compound.vue +0 -191
  27. package/packages/Topic/src/config.js +0 -132
  28. package/packages/Topic/src/fillInBlanks.vue +0 -242
  29. package/packages/Topic/src/indefiniteChoice.vue +0 -0
  30. package/packages/Topic/src/judgment.vue +0 -110
  31. package/packages/Topic/src/matching.vue +0 -0
  32. package/packages/Topic/src/multiple.vue +0 -163
  33. package/packages/Topic/src/pictureAnswer.vue +0 -113
  34. package/packages/Topic/src/shortAnswer.vue +0 -124
  35. package/packages/Topic/src/single.vue +0 -163
  36. package/packages/UploadFile/index.js +0 -8
  37. package/packages/UploadFile/src/index.vue +0 -358
  38. package/packages/Video/index.js +0 -8
  39. package/packages/Video/src/index.vue +0 -204
  40. package/packages/assets/mixins/topic.js +0 -137
  41. package/packages/assets/utils/index.js +0 -83
  42. package/packages/assets/utils/topic.js +0 -132
  43. package/packages/icon/default/icons.js +0 -182
  44. package/packages/icon/default/icons.min.js +0 -1
  45. package/packages/icon/default/index.js +0 -7
  46. package/packages/icon/ks-pdf.png +0 -0
  47. package/packages/icon/ks-ppt.png +0 -0
  48. package/packages/icon/ks-word.png +0 -0
  49. package/packages/icon/ks-xslx.png +0 -0
  50. package/packages/icon/music-bg.png +0 -0
  51. package/packages/icon/video-bg.png +0 -0
  52. package/packages/index.js +0 -221
  53. package/packages/option/index.js +0 -6
  54. package/packages/styles/_mixin.scss +0 -93
  55. package/packages/styles/_variables.scss +0 -40
  56. package/packages/styles/alert.scss +0 -147
  57. package/packages/styles/aside.scss +0 -7
  58. package/packages/styles/autocomplete.scss +0 -80
  59. package/packages/styles/avatar.scss +0 -51
  60. package/packages/styles/backtop.scss +0 -22
  61. package/packages/styles/badge.scss +0 -57
  62. package/packages/styles/base.scss +0 -2
  63. package/packages/styles/breadcrumb-item.scss +0 -0
  64. package/packages/styles/breadcrumb.scss +0 -55
  65. package/packages/styles/button-group.scss +0 -0
  66. package/packages/styles/button.scss +0 -262
  67. package/packages/styles/buttons.scss +0 -59
  68. package/packages/styles/calendar.scss +0 -79
  69. package/packages/styles/card.scss +0 -32
  70. package/packages/styles/carousel-item.scss +0 -50
  71. package/packages/styles/carousel.scss +0 -161
  72. package/packages/styles/cascader-panel.scss +0 -120
  73. package/packages/styles/cascader.scss +0 -182
  74. package/packages/styles/checkbox-button.scss +0 -0
  75. package/packages/styles/checkbox-group.scss +0 -0
  76. package/packages/styles/checkbox.scss +0 -359
  77. package/packages/styles/col.scss +0 -156
  78. package/packages/styles/collapse-item.scss +0 -0
  79. package/packages/styles/collapse.scss +0 -63
  80. package/packages/styles/color-picker.scss +0 -384
  81. package/packages/styles/common/popup.scss +0 -42
  82. package/packages/styles/common/transition.scss +0 -99
  83. package/packages/styles/common/var.scss +0 -1028
  84. package/packages/styles/common.scss +0 -204
  85. package/packages/styles/container.scss +0 -14
  86. package/packages/styles/date-picker/date-picker.scss +0 -97
  87. package/packages/styles/date-picker/date-range-picker.scss +0 -101
  88. package/packages/styles/date-picker/date-table.scss +0 -151
  89. package/packages/styles/date-picker/month-table.scss +0 -82
  90. package/packages/styles/date-picker/picker-panel.scss +0 -117
  91. package/packages/styles/date-picker/picker.scss +0 -197
  92. package/packages/styles/date-picker/time-picker.scss +0 -85
  93. package/packages/styles/date-picker/time-range-picker.scss +0 -31
  94. package/packages/styles/date-picker/time-spinner.scss +0 -110
  95. package/packages/styles/date-picker/year-table.scss +0 -51
  96. package/packages/styles/date-picker.scss +0 -12
  97. package/packages/styles/descriptions-item.scss +0 -42
  98. package/packages/styles/descriptions.scss +0 -111
  99. package/packages/styles/dialog.scss +0 -123
  100. package/packages/styles/display.scss +0 -12
  101. package/packages/styles/divider.scss +0 -47
  102. package/packages/styles/drawer.scss +0 -219
  103. package/packages/styles/dropdown-item.scss +0 -0
  104. package/packages/styles/dropdown-menu.scss +0 -0
  105. package/packages/styles/dropdown.scss +0 -182
  106. package/packages/styles/element-ui.scss +0 -135
  107. package/packages/styles/element-variables.scss +0 -794
  108. package/packages/styles/element.scss +0 -86
  109. package/packages/styles/empty.scss +0 -45
  110. package/packages/styles/fonts/element-icons.ttf +0 -0
  111. package/packages/styles/fonts/element-icons.woff +0 -0
  112. package/packages/styles/fonts/iconfont.ttf +0 -0
  113. package/packages/styles/fonts/iconfont.woff +0 -0
  114. package/packages/styles/footer.scss +0 -8
  115. package/packages/styles/form-item.scss +0 -0
  116. package/packages/styles/form.scss +0 -167
  117. package/packages/styles/header.scss +0 -8
  118. package/packages/styles/icon.scss +0 -1167
  119. package/packages/styles/icons.scss +0 -69
  120. package/packages/styles/image.scss +0 -179
  121. package/packages/styles/index.scss +0 -18
  122. package/packages/styles/infinite-scroll.scss +0 -0
  123. package/packages/styles/infiniteScroll.scss +0 -0
  124. package/packages/styles/input-number.scss +0 -180
  125. package/packages/styles/input.scss +0 -360
  126. package/packages/styles/link.scss +0 -81
  127. package/packages/styles/loading.scss +0 -96
  128. package/packages/styles/main.scss +0 -12
  129. package/packages/styles/menu-item-group.scss +0 -0
  130. package/packages/styles/menu-item.scss +0 -0
  131. package/packages/styles/menu.scss +0 -289
  132. package/packages/styles/message-box.scss +0 -226
  133. package/packages/styles/message.scss +0 -120
  134. package/packages/styles/mixins/_button.scss +0 -81
  135. package/packages/styles/mixins/config.scss +0 -4
  136. package/packages/styles/mixins/function.scss +0 -44
  137. package/packages/styles/mixins/mixins.scss +0 -190
  138. package/packages/styles/mixins/utils.scss +0 -39
  139. package/packages/styles/multimedia.scss +0 -58
  140. package/packages/styles/notification.scss +0 -99
  141. package/packages/styles/option-group.scss +0 -42
  142. package/packages/styles/option.scss +0 -36
  143. package/packages/styles/page-header.scss +0 -41
  144. package/packages/styles/pagination.scss +0 -295
  145. package/packages/styles/paginations.scss +0 -33
  146. package/packages/styles/popconfirm.scss +0 -16
  147. package/packages/styles/popover.scss +0 -40
  148. package/packages/styles/popper.scss +0 -101
  149. package/packages/styles/progress.scss +0 -141
  150. package/packages/styles/radio-button.scss +0 -113
  151. package/packages/styles/radio-group.scss +0 -9
  152. package/packages/styles/radio.scss +0 -199
  153. package/packages/styles/rate.scss +0 -49
  154. package/packages/styles/reset.scss +0 -79
  155. package/packages/styles/result.scss +0 -61
  156. package/packages/styles/row.scss +0 -43
  157. package/packages/styles/scrollbar.scss +0 -72
  158. package/packages/styles/scrollbars.scss +0 -5
  159. package/packages/styles/select-dropdown.scss +0 -62
  160. package/packages/styles/select.scss +0 -152
  161. package/packages/styles/selects.scss +0 -98
  162. package/packages/styles/skeleton-item.scss +0 -84
  163. package/packages/styles/skeleton.scss +0 -40
  164. package/packages/styles/slider.scss +0 -250
  165. package/packages/styles/spinner.scss +0 -44
  166. package/packages/styles/step.scss +0 -317
  167. package/packages/styles/steps.scss +0 -20
  168. package/packages/styles/submenu.scss +0 -0
  169. package/packages/styles/switch.scss +0 -116
  170. package/packages/styles/tab-pane.scss +0 -0
  171. package/packages/styles/table-column.scss +0 -97
  172. package/packages/styles/table.scss +0 -564
  173. package/packages/styles/tables.scss +0 -45
  174. package/packages/styles/tabs.scss +0 -602
  175. package/packages/styles/tag.scss +0 -163
  176. package/packages/styles/time-picker.scss +0 -8
  177. package/packages/styles/time-select.scss +0 -37
  178. package/packages/styles/timeline-item.scss +0 -86
  179. package/packages/styles/timeline.scss +0 -14
  180. package/packages/styles/tinymce.scss +0 -43
  181. package/packages/styles/tooltip.scss +0 -141
  182. package/packages/styles/topic.scss +0 -57
  183. package/packages/styles/transfer.scss +0 -227
  184. package/packages/styles/tree.scss +0 -123
  185. package/packages/styles/upload.scss +0 -603
  186. package/packages/styles/uploadfile.scss +0 -34
  187. package/packages/styles/video.scss +0 -98
@@ -1,350 +0,0 @@
1
- <template>
2
- <el-select
3
- ref="infiniteSelect"
4
- v-model="query"
5
- class="yks-select"
6
- :class="{ 'yks-select--multiple': multiple }"
7
- v-bind="mapProps"
8
- :multiple="multiple"
9
- :disabled="disabled"
10
- :value-key="valueKey"
11
- :size="size"
12
- :clearable="clearable"
13
- :name="name"
14
- :filterable="mapFilterable"
15
- :filter-method="filterMethodHandler()"
16
- :remote="remote"
17
- :popper-class="mapPopperClass"
18
- @visible-change="(val) => visibleChangeHandler(val)"
19
- v-on="$listeners"
20
- >
21
- <template v-if="domLimit">
22
- <yks-option
23
- v-for="(item, idx) in renderList"
24
- :key="valueKey ? item[mapValue][valueKey] : item[mapValue]"
25
- :label="item[mapLabel] ? item[mapLabel] : item[mapValue]"
26
- :value="item[mapValue]"
27
- :disabled="item[mapDisabled] ? item[mapDisabled] : false"
28
- :data-items-index="currStartIndex + idx"
29
- :class="{ 'last-item': idx === renderList.length - 1, 'first-item': idx === 0 }"
30
- >
31
- <slot :item="item" name="options"></slot>
32
- </yks-option>
33
- </template>
34
- <slot v-if="!domLimit"></slot>
35
- <div v-if="allowBottom" class="yks-select-bottom">
36
- <slot name="footer"></slot>
37
- </div>
38
- <template slot="empty">
39
- <p class="el-select-dropdown__empty">无数据</p>
40
- <div v-if="allowBottom" class="yks-select-bottom">
41
- <slot name="footer"></slot>
42
- </div>
43
- </template>
44
- </el-select>
45
- </template>
46
- <script>
47
- import { debounce } from 'throttle-debounce'
48
- import { on, getStyle } from 'element-ui/lib/utils/dom'
49
-
50
- import ElSelect from 'element-ui/lib/select'
51
-
52
- const selectProps = { ...ElSelect.props }
53
- /**
54
- * YksSelect
55
- * @module yks-select
56
- * @example
57
- *
58
- */
59
-
60
- export default {
61
- name: 'YksSelect',
62
- components: {
63
- ElSelect
64
- },
65
- /**
66
- * 属性参数
67
- * @member
68
- * @property {Object} [data] 数据选项
69
- * @property {Boolean} [dom-limit] 是否渲染,默认值为true
70
- * @property {Number} [dom-num] 每页渲染的dom数目,最终渲染3页,dom节点数为domNum*3
71
- * @property {Object} [option-map] 自定义value,label,disabled名称
72
- * @property {Boolean} [disabled] 是否禁用
73
- * @property {String} [size] 输入框尺寸
74
- * @property {Boolean} [clearable] 单选时是否可以清空选项
75
- * @property {Number} [multiple-limit] 多选时用户最多可以选择的项目数,为 0 则不限制
76
- * @property {String} [placeholder] 占位符
77
- * @property {Boolean} [filterable] 是否可搜索
78
- * @property {Boolean} [filterableInline] 搜索框是否在下拉框里面
79
- * @property {Boolean} [allow-create] 是否允许用户创建新条目,需配合 filterable 使用
80
- * @property {Boolean} [collapse-tags] 多选时是否将选中值按文字的形式展示
81
- * @property {Function} [filter-method] 自定义搜索方法
82
- * @property {Boolean} [remote] 是否为远程搜索
83
- * @property {Function} [scrollBottom] 远程搜索时滚动到底部触发
84
- * @property {Function} [remote-method] 远程搜索方法
85
- * @property {Boolean} [loading] 是否正在从远程获取数据
86
- * @property {String} [loading-text] 远程加载时显示的文字
87
- * @property {String} [no-match-text] 搜索条件无匹配时显示的文字
88
- * @property {String} [no-data-text] 选项为空时显示的文字
89
- * @property {String} [popper-class] Select 下拉框的类名
90
- * @property {String} [allow-bottom] 是否出现底部吸底
91
- * @property {String} [reserve-keyword] 多选且可搜索时,是否在选中一个选项后保留当前的搜索关键词
92
- * @property {Boolean} [default-first-option] 在输入框按下回车,选择第一个匹配项。需配合 filterable 或 remote 使用
93
- * @property {Boolean} [popper-append-to-body] 是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false
94
- */
95
- props: {
96
- ...selectProps,
97
- domNum: {
98
- type: Number,
99
- default: 10
100
- },
101
- data: {
102
- type: Array,
103
- default: () => {
104
- return []
105
- }
106
- },
107
- valueKey: {
108
- type: String,
109
- default: ''
110
- },
111
- clearable: {
112
- type: Boolean,
113
- default: false
114
- },
115
- allowBottom: {
116
- type: Boolean,
117
- default: false
118
- },
119
- filterableInline: {
120
- type: Boolean,
121
- default: false
122
- },
123
- domLimit: {
124
- type: Boolean,
125
- default: true
126
- },
127
- optionMap: {
128
- type: Object,
129
- default() {
130
- return null
131
- }
132
- }
133
- },
134
- data() {
135
- return {
136
- selectLabel: '',
137
- defaultItemHeight: 34,
138
- query: '',
139
-
140
- cacheList: [],
141
- currStartIndex: 0,
142
- lastMaxItemIndex: 0,
143
- lastLoadedIndex: 0,
144
- scrollHeight: null,
145
- scrollTop: null,
146
- wrapPaddingTop: 0,
147
- itemHeight: null,
148
- isLoading: false,
149
- visible: false,
150
- scrollWrap: null,
151
- selectInput: null,
152
- selectInitHeight: null,
153
- scrollList: null,
154
- scrollLast: null,
155
- renderList: [],
156
- // emptyText: null,
157
- cachedQuery: '',
158
- changeValue: '',
159
- cachedPlaceHolder: ''
160
- }
161
- },
162
- computed: {
163
- mapFilterable() {
164
- return this.filterable || this.filterableInline
165
- },
166
- mapProps() {
167
- let params = { ...this.$props }
168
- delete params.data
169
- delete params.domLimit
170
- delete params.domNum
171
- delete params.filterableInline
172
- return params
173
- },
174
- mapPopperClass() {
175
- let popperClass = `yks-select-dropdown ${this.popperClass || ''}`
176
- if (this.filterableInline) {
177
- popperClass += 'yks-select_input--inline'
178
- }
179
- return popperClass
180
- },
181
- debounce() {
182
- return this.remote ? 300 : 0
183
- },
184
- mapValue() {
185
- return this.optionMap && this.optionMap.value ? this.optionMap.value : 'value'
186
- },
187
- mapLabel() {
188
- return this.optionMap && this.optionMap.label ? this.optionMap.label : 'label'
189
- },
190
- mapDisabled() {
191
- return this.optionMap && this.optionMap.disabled ? this.optionMap.disabled : 'disabled'
192
- }
193
- },
194
- watch: {
195
- query(val) {
196
- this.resetTagTitle()
197
-
198
- // this.cachedQuery = val
199
- // if (!this.multiple && this.remote) {
200
- // this.$nextTick(() => {
201
- // this.$refs.infiniteSelect.currentPlaceholder =
202
- // this.$refs.infiniteSelect.selectedLabel ||
203
- // this.$refs.infiniteSelect.cachedPlaceHolder
204
- // })
205
- // }
206
- this.$emit('input', val)
207
- },
208
- value(val) {
209
- // console.log(val, '响应的')
210
- // this.updateCacheOptions()
211
- this.query = val
212
- },
213
-
214
- data: {
215
- handler(val, oldVal) {
216
- // if (this.domLimit) {
217
- // this.cacheList = [...oldVal]
218
- this.resetRenderList()
219
- // this.updateCacheOptions()
220
- // }
221
- },
222
- deep: true
223
- }
224
- },
225
- mounted() {
226
- this.query =
227
- typeof this.value === Array ? JSON.parse(JSON.stringify(this.value)) : this.value
228
- this.resetRenderList()
229
- if (this.remote) {
230
- // this.cacheList = [...this.data]
231
- // this.updateCacheOptions()
232
- this.scrollHandler = this.scrollHandler.bind(this)
233
- this.scrollWrap = this.$refs.infiniteSelect.$el.querySelector(
234
- '.el-select-dropdown__wrap'
235
- )
236
- this.selectInput = this.$refs.infiniteSelect.$el
237
- this.selectInitHeight = this.$refs.infiniteSelect.$el.offsetHeight
238
- this.scrollList = this.scrollWrap.querySelector('.el-select-dropdown__list')
239
-
240
- this.wrapPaddingTop = getStyle(this.scrollList, 'paddingTop')
241
- this.wrapPaddingTop = parseFloat(this.wrapPaddingTop.split('px')[0] || 0)
242
- on(this.scrollWrap, 'scroll', this.scrollHandler)
243
- }
244
- this.scrollLast = debounce(this.debounce, () => {
245
- this.$emit('scrollBottom', true)
246
- this.isLoading = false
247
- })
248
- this.resetTagTitle()
249
- },
250
- created() {
251
- if (this.multiple && !Array.isArray(this.value)) {
252
- this.$emit('input', [])
253
- }
254
- if (!this.multiple && Array.isArray(this.value)) {
255
- this.$emit('input', '')
256
- }
257
- },
258
-
259
- methods: {
260
- resetTagTitle() {
261
- this.$nextTick(() => {
262
- if (this.multiple) {
263
- const tagList = this.$refs.infiniteSelect.$refs.tags.querySelectorAll(
264
- '.el-select__tags-text'
265
- )
266
- tagList.forEach((v) => {
267
- if (v.nextSibling) {
268
- v.title = v.innerHTML
269
- }
270
- })
271
- }
272
- })
273
- },
274
- filterMethodHandler() {
275
- return this.filterMethod
276
- },
277
- resetRenderList() {
278
- this.renderList = this.data
279
- },
280
- focus() {
281
- this.$refs.infiniteSelect.focus()
282
- },
283
- blur() {
284
- this.$refs.infiniteSelect.blur()
285
- },
286
- visibleChangeHandler(val) {
287
- // if (this.domLimit) {
288
- // if (val) {
289
- // this.cacheList = [...this.data]
290
- // this.resetRenderList()
291
- // }
292
- // }
293
-
294
- this.$emit('visible-change', val)
295
- },
296
- scrollHandler(e) {
297
- let lastItemTop
298
- if (!this.scrollHeight) {
299
- this.scrollHeight = this.scrollWrap.getBoundingClientRect().height
300
- this.scrollTop = this.scrollWrap.getBoundingClientRect().top
301
- this.itemHeight = this.scrollList
302
- .querySelector('.el-select-dropdown__item')
303
- .getBoundingClientRect().height
304
- }
305
- if (this.isLoading) {
306
- return
307
- } else {
308
- let length = this.scrollWrap.querySelectorAll('.el-select-dropdown__item').length
309
- lastItemTop = this.scrollWrap
310
- .querySelectorAll('.el-select-dropdown__item')
311
- [length - 1].getBoundingClientRect()
312
- let multiOffsetHeight = this.selectInput.offsetHeight - this.selectInitHeight
313
- lastItemTop = lastItemTop.top - this.scrollTop - multiOffsetHeight
314
- }
315
-
316
- if (lastItemTop <= this.scrollHeight) {
317
- this.isLoading = true
318
- if (this.remote) {
319
- this.scrollLast()
320
- // } else {
321
- // this.appendNewItems(
322
- // this.scrollList.getBoundingClientRect().height,
323
- // getScroll(this.scrollWrap, true)
324
- // )
325
- }
326
-
327
- return
328
- }
329
- },
330
-
331
- updateCacheOptions() {
332
- // this.$refs.infiniteSelect.setSelected()
333
- // console.log(this.$refs.infiniteSelect.selected)
334
- // let selected = this.$refs.infiniteSelect.selected
335
- // this.$refs.infiniteSelect.cachedOptions.push(...selected)
336
- // this.cacheList = this
337
- // console.log(this.$refs.infiniteSelect.setSelected())
338
- // console.log(this.$refs.infiniteSelect.cachedOptions)
339
- // this.$refs.infiniteSelect.cachedOptions = this.cacheList.map((r) => {
340
- // return {
341
- // label: r[this.mapLabel],
342
- // value: r[this.mapValue],
343
- // currentLabel: r[this.mapLabel],
344
- // currentValue: r[this.mapValue]
345
- // }
346
- // })
347
- }
348
- }
349
- }
350
- </script>
@@ -1,29 +0,0 @@
1
- <template>
2
- <el-option class="yks-option" v-bind="$props" :title="mapTitle" v-on="$listeners">
3
- <slot></slot>
4
- </el-option>
5
- </template>
6
-
7
- <script>
8
- /**
9
- * 新增属性参数 el-option 扩展参数
10
-
11
- */
12
- import ElOption from 'element-ui/lib/option'
13
- export default {
14
- name: 'YksOption',
15
- components: {
16
- ElOption
17
- },
18
- props: {
19
- ...ElOption.props
20
- },
21
- computed: {
22
- mapTitle() {
23
- return this.label || this.value
24
- }
25
- }
26
- }
27
- </script>
28
-
29
- <style></style>
@@ -1,8 +0,0 @@
1
- import YksTable from './src/index';
2
-
3
- /* istanbul ignore next */
4
- YksTable.install = function(Vue) {
5
- Vue.component(YksTable.name, YksTable);
6
- };
7
-
8
- export default YksTable;
@@ -1,141 +0,0 @@
1
- <template>
2
- <el-table
3
- ref="table"
4
- class="ks-table"
5
- :data="tableData"
6
- v-bind="tableOptions"
7
- v-on="$listeners"
8
- >
9
- <slot v-if="!dom"></slot>
10
- <template v-if="dom">
11
- <template v-for="(col, index) in tableColumns">
12
- <!-- 定义 index、selection 类型的列-->
13
- <el-table-column
14
- v-if="col.type === 'index' || col.type === 'selection'"
15
- :key="index"
16
- v-bind="col"
17
- class-name="xdh-table--not-drag"
18
- ></el-table-column>
19
-
20
- <!-- 定义 expand 类型的列-->
21
- <el-table-column v-else-if="col.type === 'expand'" :key="index" v-bind="col">
22
- <template v-slot="scope">
23
- <div class="expand-table">
24
- <slot
25
- name="expand"
26
- :row="scope.row"
27
- :scope="scope"
28
- :$index="scope.$index"
29
- :column="tableColumns[index]"
30
- :columnIndex="index"
31
- ></slot>
32
- </div>
33
- </template>
34
- </el-table-column>
35
-
36
- <!-- 定义通用类型的列-->
37
- <el-table-column v-else :key="index" v-bind="col">
38
- <!-- prettier-ignore-attribute (slot-scope) -->
39
- <template v-if="!col.type" v-slot="scope">
40
- <slot
41
- :name="col.prop || 'default'"
42
- :row="scope.row"
43
- :$index="scope.$index"
44
- :column="tableColumns[index]"
45
- :columnIndex="index"
46
- >
47
- {{ scope.row[col.prop] }}
48
- </slot>
49
- </template>
50
- <template v-slot:header="scope">
51
- <slot
52
- :name="'header' + (col.prop || '')"
53
- :column="scope.column"
54
- :$index="scope.$index"
55
- >
56
- {{ scope.column['label'] }}
57
- </slot>
58
- </template>
59
- </el-table-column>
60
- </template>
61
- </template>
62
-
63
- <!--暴露 el-table append 插槽-->
64
- <slot slot="append" name="append"></slot>
65
-
66
- <!--暴露 el-table empty 插槽-->
67
- <slot slot="empty" name="empty">
68
- <el-empty class="table-empty" :image-size="60" :description="' '"></el-empty>
69
- </slot>
70
- </el-table>
71
- </template>
72
-
73
- <script>
74
- import ElTable from 'element-ui/lib/table'
75
-
76
- /**
77
- * Table 表格组件
78
- * @module yks-table
79
- */
80
- export default {
81
- name: 'YksTable',
82
-
83
- /**
84
- * 属性参数,完全继承 el-table参数,并有以下扩展参数
85
- * @property {Array} [data = []] 表格行数据
86
- * @property {Array} [columns = []] 表格列定义,对象属性参数完全继承 el-table-column
87
- * @property {Boolean} [dom = true] 自定义列
88
- */
89
- props: {
90
- ...ElTable.props,
91
- columns: {
92
- type: Array,
93
- default() {
94
- return []
95
- }
96
- },
97
- dom: {
98
- type: Boolean,
99
- default: true
100
- },
101
- emptyMsg: {
102
- type: String,
103
- default: '暂无数据~'
104
- }
105
- },
106
-
107
- data() {
108
- return {
109
- // 表格列定义数组
110
- tableColumns: this.columns,
111
-
112
- // 表格行数据
113
- tableData: this.data
114
- }
115
- },
116
- computed: {
117
- // el-table 参数
118
- tableOptions() {
119
- const options = { ...this.$props }
120
- delete options.columns
121
- delete options.data
122
- delete Option.dom
123
- delete Option.showMessage
124
- return options
125
- }
126
- },
127
- watch: {
128
- data(val) {
129
- this.tableData = val
130
- },
131
- columns(val) {
132
- this.tableColumns = val
133
- const data = this.tableData
134
- this.tableData = []
135
- this.$nextTick(() => {
136
- this.tableData = data
137
- })
138
- }
139
- }
140
- }
141
- </script>
@@ -1,8 +0,0 @@
1
- import YksTinymce from './src/index';
2
-
3
- /* istanbul ignore next */
4
- YksTinymce.install = function(Vue) {
5
- Vue.component(YksTinymce.name, YksTinymce);
6
- };
7
-
8
- export default YksTinymce;
@@ -1,25 +0,0 @@
1
- // Import plugins that you want to use
2
- // Detail plugins list see: https://www.tinymce.com/docs/plugins/
3
- // Custom builds see: https://www.tinymce.com/download/custom-builds/
4
- export const plugins = [
5
- 'advlist anchor autolink autosave code codesample directionality emoticons fullscreen hr image imagetools insertdatetime link lists nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textpattern visualblocks visualchars wordcount'
6
- ]
7
-
8
- // Here is the list of toolbar control components
9
- // Details see: https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
10
- export const toolbar = [
11
- 'bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample',
12
- 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen paste'
13
- ]
14
-
15
- export const uploadAudio =
16
- '<svg t="1648778606755" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2398" width="20" height="18"><path d="M204.8 0h477.866667l273.066666 273.066667v614.4c0 75.093333-61.44 136.533333-136.533333 136.533333H204.8c-75.093333 0-136.533333-61.44-136.533333-136.533333V136.533333C68.266667 61.44 129.706667 0 204.8 0z m464.213333 375.466667l-232.106666 61.44c-27.306667 13.653333-47.786667 34.133333-47.786667 61.44v218.453333s-20.48-13.653333-54.613333-6.826667c-47.786667 6.826667-95.573333 47.786667-95.573334 88.746667 0 40.96 47.786667 61.44 95.573334 54.613333 54.613333-6.826667 95.573333-40.96 95.573333-81.92V559.786667c0-13.653333 27.306667-27.306667 27.306667-27.306667L655.36 477.866667s20.48-6.826667 20.48 13.653333v170.666667s-20.48-13.653333-54.613333-6.826667c-54.613333 6.826667-95.573333 40.96-95.573334 81.92s47.786667 68.266667 95.573334 61.44 95.573333-40.96 95.573333-81.92V409.6c0-27.306667-27.306667-40.96-47.786667-34.133333z" fill="#222f3e" p-id="2399"></path><path d="M682.666667 0l273.066666 273.066667h-204.8c-40.96 0-68.266667-27.306667-68.266666-68.266667V0z" fill="#222f3e" opacity=".619" p-id="2400"></path></svg>'
17
-
18
- export const uploadVideo =
19
- '<svg t="1648778822578" class="icon" viewBox="0 0 1087 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3355" width="20" height="20"><path d="M768 415.744q0 5.12-10.752 17.92t-23.04 30.208-23.04 37.888-10.752 41.984 10.752 41.472 23.04 36.352 23.04 27.136 10.752 13.824l0 107.52q0 17.408-12.8 39.424t-31.744 41.472-41.984 32.256-43.52 12.8l-508.928 0q-27.648 0-50.688-9.728t-40.448-27.136-27.136-40.96-9.728-51.2l0-441.344q0-20.48 9.216-42.496t26.112-40.448 39.936-30.72 50.688-12.288l508.928 0q27.648 0 51.712 9.728t41.984 26.624 28.16 40.448 10.24 50.176l0 89.088zM1086.464 319.488l0 467.968q0 22.528-11.776 39.936t-35.328 17.408q-8.192 0-20.992-6.144t-25.6-14.336-24.064-16.384-16.384-13.312q-13.312-11.264-40.448-38.912t-54.784-62.464-48.64-71.68-20.992-67.584 22.528-70.144 54.272-77.312 66.56-70.144 58.368-48.64q9.216-6.144 25.088-14.848t28.16-8.704q27.648 0 35.84 15.36t8.192 37.888l0 2.048z" p-id="3356" fill="#222f3e"></path></svg>'
20
-
21
- export const uploadFile =
22
- '<svg t="1648778907477" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4315" width="24" height="24"><path d="M736.005 696.494H174.18c-17.673 0-32-14.327-32-32V255.582c0-17.673 14.327-32 32-32h157.213c7.96 0 15.635 2.967 21.525 8.321l47.547 43.222h335.54c17.673 0 32 14.327 32 32v357.369c0 17.673-14.327 32-32 32z m-529.825-64h497.825V339.125H388.094a32.002 32.002 0 0 1-21.525-8.321l-47.547-43.222H206.18v344.912z" fill="#222f3e" p-id="4316"></path><path d="M853.18 821.092H317.509c-17.673 0-32-14.327-32-32s14.327-32 32-32H821.18V414.206c0-17.673 14.327-32 32-32s32 14.327 32 32v374.886c0 17.673-14.327 32-32 32z" fill="#222f3e" p-id="4317"></path></svg>'
23
-
24
- export const uploadRecording =
25
- '<svg t="1648782146375" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5288" width="20" height="20"><path d="M512 683.52c130.56 0 235.52-102.4 235.52-232.96V256c0-130.56-104.96-232.96-235.52-232.96s-235.52 102.4-235.52 232.96v194.56c0 130.56 102.4 232.96 235.52 232.96z m368.64-281.6c0-23.04-20.48-43.52-46.08-43.52s-43.52 20.48-43.52 43.52c0 5.12 0 10.24 2.56 12.8v33.28c0 151.04-125.44 276.48-281.6 276.48-153.6 0-281.6-125.44-281.6-276.48V409.6c0-2.56 2.56-5.12 2.56-10.24 0-23.04-20.48-43.52-43.52-43.52-25.6 0-43.52 20.48-43.52 43.52v64c0 186.88 140.8 335.36 320 360.96v87.04h-122.88c-25.6 0-46.08 20.48-46.08 46.08s20.48 43.52 46.08 43.52h332.8c28.16 0 43.52-17.92 43.52-43.52 0-23.04-17.92-46.08-43.52-46.08h-122.88v-87.04c184.32-20.48 327.68-174.08 327.68-360.96v-61.44z m0 0" fill="#222f3e" p-id="5289"></path></svg>'