bkui-vue 1.0.3-beta.7 → 1.0.3-beta.70

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 (230) hide show
  1. package/dist/index.cjs.js +148 -150
  2. package/dist/index.esm.js +17965 -16537
  3. package/dist/index.umd.js +148 -150
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/affix/affix.variable.css +3 -0
  15. package/lib/alert/alert.variable.css +3 -0
  16. package/lib/backtop/backtop.variable.css +3 -0
  17. package/lib/badge/badge.variable.css +3 -0
  18. package/lib/breadcrumb/breadcrumb.variable.css +3 -0
  19. package/lib/button/button.variable.css +3 -0
  20. package/lib/card/card.variable.css +3 -0
  21. package/lib/cascader/cascader.variable.css +3 -0
  22. package/lib/checkbox/checkbox.variable.css +3 -0
  23. package/lib/checkbox/index.js +4 -4
  24. package/lib/code-diff/code-diff.variable.css +3 -0
  25. package/lib/collapse/collapse.variable.css +3 -0
  26. package/lib/collapse-transition/collapse-transition.variable.css +3 -0
  27. package/lib/color-picker/color-picker.variable.css +3 -0
  28. package/lib/components.d.ts +1 -0
  29. package/lib/components.js +2 -5
  30. package/lib/config-provider/config-provider.d.ts +3 -0
  31. package/lib/config-provider/config-provider.variable.css +3 -0
  32. package/lib/config-provider/index.d.ts +4 -0
  33. package/lib/config-provider/token.d.ts +1 -0
  34. package/lib/container/container.variable.css +3 -0
  35. package/lib/date-picker/base/month-table.d.ts +2 -2
  36. package/lib/date-picker/date-picker.d.ts +1 -0
  37. package/lib/date-picker/date-picker.variable.css +3 -0
  38. package/lib/date-picker/index.d.ts +3 -0
  39. package/lib/date-picker/index.js +70 -32
  40. package/lib/date-picker/interface.d.ts +1 -1
  41. package/lib/date-picker/time-picker.d.ts +1 -0
  42. package/lib/date-picker/utils.d.ts +4 -0
  43. package/lib/dialog/dialog.css +93 -122
  44. package/lib/dialog/dialog.d.ts +39 -14
  45. package/lib/dialog/dialog.less +92 -98
  46. package/lib/dialog/dialog.variable.css +96 -122
  47. package/lib/dialog/index.d.ts +81 -30
  48. package/lib/dialog/index.js +146 -124
  49. package/lib/dialog/props.d.ts +18 -6
  50. package/lib/directives/index.js +0 -1
  51. package/lib/dist.index.js +0 -1
  52. package/lib/divider/divider.variable.css +3 -0
  53. package/lib/dropdown/dropdown.css +3 -1
  54. package/lib/dropdown/dropdown.variable.css +6 -1
  55. package/lib/exception/exception.variable.css +3 -0
  56. package/lib/fixed-navbar/fixed-navbar.variable.css +3 -0
  57. package/lib/form/form.variable.css +3 -0
  58. package/lib/form/index.js +3 -1
  59. package/lib/hooks.js +1 -8
  60. package/lib/icon/image-fill.js +82 -167
  61. package/lib/icon/img-error.js +82 -167
  62. package/lib/icon/img-placehoulder.js +82 -167
  63. package/lib/icon/index.d.ts +1 -0
  64. package/lib/icon/index.js +87 -2427
  65. package/lib/icon/info-line.js +82 -167
  66. package/lib/icon/info.js +82 -167
  67. package/lib/icon/left-shape.js +82 -167
  68. package/lib/icon/left-turn-line.js +82 -167
  69. package/lib/icon/loading.js +82 -167
  70. package/lib/icon/narrow-line.js +82 -167
  71. package/lib/icon/original.js +82 -167
  72. package/lib/icon/pdf-fill.js +82 -167
  73. package/lib/icon/play-shape.js +82 -167
  74. package/lib/icon/plus.js +82 -167
  75. package/lib/icon/ppt-fill.js +82 -167
  76. package/lib/icon/qq.js +82 -167
  77. package/lib/icon/right-shape.js +82 -167
  78. package/lib/icon/right-turn-line.js +82 -167
  79. package/lib/icon/search.js +82 -167
  80. package/lib/icon/share.js +82 -167
  81. package/lib/icon/spinner.js +82 -167
  82. package/lib/icon/success.js +82 -167
  83. package/lib/icon/switcher-loading.js +82 -167
  84. package/lib/icon/text-all.d.ts +4 -0
  85. package/lib/icon/text-all.js +191 -0
  86. package/lib/icon/text-file.js +82 -167
  87. package/lib/icon/text-fill.js +82 -167
  88. package/lib/icon/transfer.js +82 -167
  89. package/lib/icon/tree-application-shape.js +82 -167
  90. package/lib/icon/unfull-screen.js +82 -167
  91. package/lib/icon/unvisible.js +82 -167
  92. package/lib/icon/up-shape.js +82 -167
  93. package/lib/icon/upload.js +82 -167
  94. package/lib/icon/video-fill.js +82 -167
  95. package/lib/icon/warn.js +82 -167
  96. package/lib/icon/weixin-pro.js +82 -167
  97. package/lib/icon/weixin.js +82 -167
  98. package/lib/image/image-viewer.variable.css +3 -0
  99. package/lib/image/image.variable.css +3 -0
  100. package/lib/image/index.js +5 -2
  101. package/lib/index.js +0 -1
  102. package/lib/info-box/index.js +41 -455
  103. package/lib/info-box/info-box.css +6 -32
  104. package/lib/info-box/info-box.d.ts +1 -1
  105. package/lib/info-box/info-box.less +16 -47
  106. package/lib/info-box/info-box.variable.css +9 -32
  107. package/lib/input/index.js +5 -0
  108. package/lib/input/input.variable.css +3 -0
  109. package/lib/link/link.variable.css +3 -0
  110. package/lib/loading/loading.variable.css +3 -0
  111. package/lib/locale/index.js +4 -2
  112. package/lib/locale/lang/en.d.ts +1 -0
  113. package/lib/menu/menu.variable.css +3 -0
  114. package/lib/menu/submenu.variable.css +3 -0
  115. package/lib/message/message.variable.css +3 -0
  116. package/lib/modal/hooks.d.ts +6 -0
  117. package/lib/modal/index.d.ts +100 -52
  118. package/lib/modal/index.js +173 -74
  119. package/lib/modal/modal.css +41 -65
  120. package/lib/modal/modal.d.ts +40 -17
  121. package/lib/modal/modal.less +50 -57
  122. package/lib/modal/modal.variable.css +44 -65
  123. package/lib/modal/props.mixin.d.ts +12 -0
  124. package/lib/navigation/navigation.variable.css +3 -0
  125. package/lib/notify/notify.variable.css +3 -0
  126. package/lib/pagination/index.js +2 -1
  127. package/lib/pagination/pagination.variable.css +3 -0
  128. package/lib/plugin-popover/index.d.ts +1 -1
  129. package/lib/plugin-popover/index.js +45 -26
  130. package/lib/pop-confirm/index.js +8 -5
  131. package/lib/pop-confirm/pop-confirm.variable.css +3 -0
  132. package/lib/popover/content.d.ts +1 -1
  133. package/lib/popover/index.js +45 -26
  134. package/lib/popover/plugin-popover.d.ts +4 -1
  135. package/lib/popover/popover.css +3 -1
  136. package/lib/popover/popover.less +4 -1
  137. package/lib/popover/popover.variable.css +6 -1
  138. package/lib/preset.d.ts +2 -0
  139. package/lib/preset.js +14 -20
  140. package/lib/process/process.variable.css +3 -0
  141. package/lib/progress/progress.variable.css +3 -0
  142. package/lib/radio/index.js +5 -5
  143. package/lib/radio/radio.variable.css +3 -0
  144. package/lib/rate/rate.variable.css +3 -0
  145. package/lib/rate/star.variable.css +3 -0
  146. package/lib/resize-layout/index.js +1 -1
  147. package/lib/resize-layout/resize-layout.variable.css +3 -0
  148. package/lib/search-select/index.d.ts +375 -16
  149. package/lib/search-select/index.js +701 -366
  150. package/lib/search-select/input.d.ts +14 -5
  151. package/lib/search-select/search-select.css +20 -6
  152. package/lib/search-select/search-select.d.ts +129 -7
  153. package/lib/search-select/search-select.less +16 -12
  154. package/lib/search-select/search-select.variable.css +23 -6
  155. package/lib/search-select/selected.d.ts +116 -6
  156. package/lib/search-select/utils.d.ts +19 -6
  157. package/lib/select/index.d.ts +143 -6
  158. package/lib/select/index.js +1355 -78
  159. package/lib/select/option.d.ts +3 -1
  160. package/lib/select/pinyin/core.d.ts +14 -0
  161. package/lib/select/pinyin/dict.d.ts +34 -0
  162. package/lib/select/pinyin/index.d.ts +2 -0
  163. package/lib/select/select.css +55 -12
  164. package/lib/select/select.d.ts +59 -2
  165. package/lib/select/select.less +69 -19
  166. package/lib/select/select.variable.css +58 -12
  167. package/lib/select/selectTagInput.d.ts +7 -0
  168. package/lib/select/type.d.ts +2 -3
  169. package/lib/shared/index.js +67 -3
  170. package/lib/shared/utils.d.ts +12 -0
  171. package/lib/shared/vue-types.d.ts +5 -0
  172. package/lib/sideslider/index.d.ts +55 -9
  173. package/lib/sideslider/index.js +26 -25
  174. package/lib/sideslider/sideslider.css +51 -46
  175. package/lib/sideslider/sideslider.d.ts +25 -3
  176. package/lib/sideslider/sideslider.less +108 -104
  177. package/lib/sideslider/sideslider.variable.css +54 -46
  178. package/lib/slider/slider.variable.css +3 -0
  179. package/lib/steps/steps.variable.css +3 -0
  180. package/lib/styles/mixins/animate.variable.css +3 -0
  181. package/lib/styles/mixins/popper.variable.css +3 -0
  182. package/lib/styles/mixins/scroll.variable.css +3 -0
  183. package/lib/styles/reset.css +1 -3
  184. package/lib/styles/reset.less +3 -6
  185. package/lib/styles/reset.variable.css +4 -3
  186. package/lib/styles/themes/themes.less +5 -0
  187. package/lib/swiper/swiper.variable.css +3 -0
  188. package/lib/switcher/switcher.variable.css +3 -0
  189. package/lib/tab/tab.variable.css +3 -0
  190. package/lib/table/cache.d.ts +11 -3
  191. package/lib/table/components/table-column.d.ts +111 -5
  192. package/lib/table/index.d.ts +51 -5
  193. package/lib/table/index.js +504 -261
  194. package/lib/table/plugins/head-filter.variable.css +3 -0
  195. package/lib/table/plugins/head-sort.variable.css +3 -0
  196. package/lib/table/plugins/settings.variable.css +3 -0
  197. package/lib/table/plugins/use-draggable.d.ts +2 -2
  198. package/lib/table/plugins/use-observer-resize.d.ts +5 -0
  199. package/lib/table/props.d.ts +6 -4
  200. package/lib/table/table.css +6 -12
  201. package/lib/table/table.less +12 -9
  202. package/lib/table/table.variable.css +9 -12
  203. package/lib/table/use-attributes.d.ts +4 -42
  204. package/lib/table/utils.d.ts +2 -2
  205. package/lib/table-column/index.d.ts +235 -119
  206. package/lib/table-column/index.js +217 -30
  207. package/lib/tag/tag.variable.css +3 -0
  208. package/lib/tag-input/index.d.ts +4 -4
  209. package/lib/tag-input/tag-input.d.ts +2 -2
  210. package/lib/tag-input/tag-input.variable.css +3 -0
  211. package/lib/tag-input/tag-props.d.ts +1 -1
  212. package/lib/tag-input/tag-render.d.ts +1 -1
  213. package/lib/time-picker/index.d.ts +38 -35
  214. package/lib/time-picker/time-picker.variable.css +3 -0
  215. package/lib/timeline/index.d.ts +80 -44
  216. package/lib/timeline/index.js +54 -65
  217. package/lib/timeline/timeline.d.ts +46 -29
  218. package/lib/timeline/timeline.variable.css +3 -0
  219. package/lib/transfer/transfer.variable.css +3 -0
  220. package/lib/tree/tree.variable.css +3 -0
  221. package/lib/upload/index.d.ts +12 -0
  222. package/lib/upload/index.js +21 -30
  223. package/lib/upload/props.d.ts +3 -0
  224. package/lib/upload/upload-trigger.d.ts +6 -0
  225. package/lib/upload/upload.d.ts +6 -0
  226. package/lib/upload/upload.variable.css +3 -0
  227. package/lib/virtual-render/index.d.ts +9 -9
  228. package/lib/virtual-render/virtual-render.d.ts +3 -3
  229. package/lib/virtual-render/virtual-render.variable.css +3 -0
  230. package/package.json +3 -2
@@ -1,4 +1,5 @@
1
1
  import "../styles/reset.css";
2
+ import "./timeline.less";
2
3
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
3
4
  import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
4
5
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
@@ -48,7 +49,7 @@ function _typeof(o) {
48
49
  ;// CONCATENATED MODULE: external "vue"
49
50
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
50
51
  var external_vue_y = x => () => x
51
- const external_vue_namespaceObject = external_vue_x({ ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
52
+ const external_vue_namespaceObject = external_vue_x({ ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
52
53
  ;// CONCATENATED MODULE: external "../config-provider"
53
54
  var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
54
55
  var config_provider_y = x => () => x
@@ -85,9 +86,18 @@ const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () =>
85
86
 
86
87
 
87
88
  var timelineProps = {
88
- list: shared_namespaceObject.PropTypes.array.def([]),
89
- titleAble: shared_namespaceObject.PropTypes.bool.def(false),
90
- extCls: shared_namespaceObject.PropTypes.string
89
+ list: shared_namespaceObject.PropTypes.arrayOf(shared_namespaceObject.PropTypes.shape({
90
+ tag: shared_namespaceObject.PropTypes.string,
91
+ content: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.object]),
92
+ type: shared_namespaceObject.PropTypes.string,
93
+ size: shared_namespaceObject.PropTypes.string,
94
+ color: shared_namespaceObject.PropTypes.string,
95
+ icon: shared_namespaceObject.PropTypes.func,
96
+ filled: shared_namespaceObject.PropTypes.bool,
97
+ border: shared_namespaceObject.PropTypes.bool,
98
+ nodeType: shared_namespaceObject.PropTypes.timelineNodeType()
99
+ }).isRequired),
100
+ titleAble: shared_namespaceObject.PropTypes.bool.def(false)
91
101
  };
92
102
  /* harmony default export */ const timeline = ((0,external_vue_namespaceObject.defineComponent)({
93
103
  name: 'Timeline',
@@ -95,61 +105,36 @@ var timelineProps = {
95
105
  emits: ['select'],
96
106
  setup: function setup(props, _ref) {
97
107
  var emit = _ref.emit;
98
- var defaultTimelines = (0,external_vue_namespaceObject.ref)([]);
99
- var updateTimelines = function updateTimelines(timelines) {
100
- var _defaultTimelines$val;
101
- var defaults = [];
102
- timelines.forEach(function (timeline) {
103
- var _timeline$border;
104
- defaults.push({
105
- tag: timeline.tag,
106
- content: timeline.content,
107
- type: timeline.type,
108
- size: timeline.size,
109
- color: timeline.color,
110
- icon: timeline.icon,
111
- filled: timeline.filled,
112
- border: (_timeline$border = timeline.border) !== null && _timeline$border !== void 0 ? _timeline$border : true
113
- });
114
- });
115
- (_defaultTimelines$val = defaultTimelines.value).splice.apply(_defaultTimelines$val, [0, defaultTimelines.value.length].concat(defaults));
116
- };
117
- var init = function init() {
118
- var _defaultTimelines$val2, _props$list;
119
- (_defaultTimelines$val2 = defaultTimelines.value).splice.apply(_defaultTimelines$val2, [0, defaultTimelines.value.length].concat([{
120
- tag: '步骤1',
121
- content: '内容1'
122
- }, {
123
- tag: '步骤2',
124
- content: '内容2'
125
- }, {
126
- tag: '步骤3',
127
- content: '内容3'
128
- }]));
129
- if ((_props$list = props.list) !== null && _props$list !== void 0 && _props$list.length) {
130
- updateTimelines(props.list);
131
- }
132
- };
133
- var titleSelect = function titleSelect(item) {
134
- try {
135
- emit('select', item);
136
- } catch (e) {
137
- console.warn(e);
138
- }
108
+ var defaultTimelines = (0,external_vue_namespaceObject.shallowRef)([]);
109
+ var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
110
+ resolveClassName = _usePrefix.resolveClassName;
111
+ var handleTitleSelect = function handleTitleSelect(item) {
112
+ emit('select', item);
139
113
  };
140
- (0,external_vue_namespaceObject.onMounted)(init);
141
114
  (0,external_vue_namespaceObject.watch)(function () {
142
115
  return props.list;
143
116
  }, function () {
144
- updateTimelines(props.list);
117
+ defaultTimelines.value = props.list.map(function (item) {
118
+ var _item$border;
119
+ return {
120
+ tag: item.tag,
121
+ content: item.content,
122
+ type: item.type,
123
+ size: item.size,
124
+ color: item.color,
125
+ icon: item.icon,
126
+ filled: item.filled,
127
+ border: (_item$border = item.border) !== null && _item$border !== void 0 ? _item$border : true,
128
+ nodeType: item.nodeType || 'template'
129
+ };
130
+ });
145
131
  }, {
132
+ immediate: true,
146
133
  deep: true
147
134
  });
148
- var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
149
- resolveClassName = _usePrefix.resolveClassName;
150
135
  return {
151
136
  defaultTimelines: defaultTimelines,
152
- titleSelect: titleSelect,
137
+ handleTitleSelect: handleTitleSelect,
153
138
  resolveClassName: resolveClassName
154
139
  };
155
140
  },
@@ -157,10 +142,7 @@ var timelineProps = {
157
142
  var _this = this;
158
143
  var isIcon = function isIcon(timeline) {
159
144
  var icon = timeline.icon;
160
- if (icon) {
161
- return _typeof(icon) === 'object' || typeof icon === 'function';
162
- }
163
- return false;
145
+ return _typeof(icon) === 'object' || typeof icon === 'function';
164
146
  };
165
147
  var makeClass = function makeClass(item) {
166
148
  var timelineClsPrefix = _this.resolveClassName('timeline');
@@ -173,21 +155,28 @@ var timelineProps = {
173
155
  var timelinesCls = (0,shared_namespaceObject.classes)({}, "".concat(timelineClsPrefix, " ").concat(timelineThemeCls, " ").concat(timelineSizeCls, " ").concat(timelinesColorsCls, " ").concat(timelineFilledCls, " ").concat(timelineCustomIcon));
174
156
  return timelinesCls;
175
157
  };
176
- var getContent = function getContent(item) {
177
- return _this.$slots.content ? (0,external_vue_namespaceObject.createVNode)("div", {
178
- "class": "".concat(_this.resolveClassName('timeline-content'))
179
- }, [_this.$slots.content(item)]) : (0,external_vue_namespaceObject.createVNode)("div", {
158
+ var renderContent = function renderContent(item) {
159
+ if (_this.$slots.content) {
160
+ return (0,external_vue_namespaceObject.createVNode)("div", {
161
+ "class": "".concat(_this.resolveClassName('timeline-content'))
162
+ }, [_this.$slots.content(item)]);
163
+ }
164
+ if (item.nodeType === 'vnode') {
165
+ return (0,external_vue_namespaceObject.createVNode)("div", {
166
+ "class": "".concat(_this.resolveClassName('timeline-content'))
167
+ }, [item.content]);
168
+ }
169
+ return (0,external_vue_namespaceObject.createVNode)("div", {
180
170
  "class": "".concat(_this.resolveClassName('timeline-content')),
181
171
  "innerHTML": item.content
182
172
  }, null);
183
173
  };
184
174
  return (0,external_vue_namespaceObject.createVNode)("ul", {
185
- "class": ["".concat(this.resolveClassName('timeline')), this.extCls]
175
+ "class": this.resolveClassName('timeline')
186
176
  }, [this.defaultTimelines.map(function (item) {
187
- var _this$$slots$default, _this$$slots$default2, _this$$slots;
188
177
  return (0,external_vue_namespaceObject.createVNode)("li", {
189
178
  "class": ["".concat(_this.resolveClassName('timeline-dot')), makeClass(item)]
190
- }, [isIcon(item) ? (0,external_vue_namespaceObject.createVNode)("div", {
179
+ }, [isIcon(item) && (0,external_vue_namespaceObject.createVNode)("div", {
191
180
  "class": "".concat(_this.resolveClassName('timeline-icon')),
192
181
  "style": {
193
182
  border: item.border ? "2px solid ".concat(item.color) : '0px',
@@ -195,16 +184,16 @@ var timelineProps = {
195
184
  }
196
185
  }, [(0,external_vue_namespaceObject.createVNode)("span", {
197
186
  "class": "".concat(_this.resolveClassName('timeline-icon-inner'))
198
- }, [typeof item.icon === 'function' ? (0,external_vue_namespaceObject.createVNode)(item.icon, null, null) : item.icon])]) : '', (0,external_vue_namespaceObject.createVNode)("div", {
187
+ }, [typeof item.icon === 'function' ? (0,external_vue_namespaceObject.createVNode)(item.icon, null, null) : item.icon])]), (0,external_vue_namespaceObject.createVNode)("div", {
199
188
  "class": "".concat(_this.resolveClassName('timeline-section'))
200
189
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
201
190
  "class": "".concat(_this.resolveClassName('timeline-title')),
202
191
  "onClick": function onClick() {
203
- _this.titleSelect(item);
192
+ return _this.handleTitleSelect(item);
204
193
  }
205
- }, [(_this$$slots$default = (_this$$slots$default2 = (_this$$slots = _this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots, item)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : (0,external_vue_namespaceObject.createVNode)("span", {
194
+ }, [item.nodeType === 'vnode' ? item.tag : (0,external_vue_namespaceObject.createVNode)("span", {
206
195
  "innerHTML": item.tag
207
- }, null)]), item.content ? getContent(item) : ''])]);
196
+ }, null)]), renderContent(item)])]);
208
197
  })]);
209
198
  }
210
199
  }));
@@ -25,58 +25,75 @@
25
25
  */
26
26
  import { ExtractPropTypes } from 'vue';
27
27
  declare const timelineProps: {
28
- list: import("vue-types").VueTypeValidableDef<unknown[]> & {
29
- default: () => unknown[];
30
- } & {
31
- default: () => unknown[];
32
- };
28
+ list: import("vue-types").VueTypeDef<{
29
+ tag: string;
30
+ content: object;
31
+ type: string;
32
+ size: string;
33
+ color: string;
34
+ icon: any;
35
+ filled: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
36
+ border: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
37
+ nodeType: "template" | "vnode";
38
+ }[]>;
33
39
  titleAble: import("vue-types").VueTypeValidableDef<boolean> & {
34
40
  default: boolean;
35
41
  } & {
36
42
  default: boolean;
37
43
  };
38
- extCls: import("vue-types").VueTypeValidableDef<string> & {
39
- default: string;
40
- };
41
44
  };
42
- export type TimelinePropTypes = ExtractPropTypes<typeof timelineProps>;
45
+ export type TimelinePropTypes = Readonly<ExtractPropTypes<typeof timelineProps>>;
43
46
  declare const _default: import("vue").DefineComponent<{
44
- list: import("vue-types").VueTypeValidableDef<unknown[]> & {
45
- default: () => unknown[];
46
- } & {
47
- default: () => unknown[];
48
- };
47
+ list: import("vue-types").VueTypeDef<{
48
+ tag: string;
49
+ content: object;
50
+ type: string;
51
+ size: string;
52
+ color: string;
53
+ icon: any;
54
+ filled: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
55
+ border: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
56
+ nodeType: "template" | "vnode";
57
+ }[]>;
49
58
  titleAble: import("vue-types").VueTypeValidableDef<boolean> & {
50
59
  default: boolean;
51
60
  } & {
52
61
  default: boolean;
53
62
  };
54
- extCls: import("vue-types").VueTypeValidableDef<string> & {
55
- default: string;
56
- };
57
63
  }, {
58
- defaultTimelines: import("vue").Ref<any[]>;
59
- titleSelect: (item: any) => void;
64
+ defaultTimelines: import("vue").ShallowRef<{
65
+ tag: string;
66
+ content: object;
67
+ type: string;
68
+ size: string;
69
+ color: string;
70
+ icon: any;
71
+ filled: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
72
+ border: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
73
+ nodeType: "template" | "vnode";
74
+ }[]>;
75
+ handleTitleSelect: (item: any) => void;
60
76
  resolveClassName: (cls: string) => string;
61
77
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "select"[], "select", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
62
- list: import("vue-types").VueTypeValidableDef<unknown[]> & {
63
- default: () => unknown[];
64
- } & {
65
- default: () => unknown[];
66
- };
78
+ list: import("vue-types").VueTypeDef<{
79
+ tag: string;
80
+ content: object;
81
+ type: string;
82
+ size: string;
83
+ color: string;
84
+ icon: any;
85
+ filled: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
86
+ border: (boolean | object | (() => boolean) | ((props: Record<string, unknown>) => boolean)) & boolean;
87
+ nodeType: "template" | "vnode";
88
+ }[]>;
67
89
  titleAble: import("vue-types").VueTypeValidableDef<boolean> & {
68
90
  default: boolean;
69
91
  } & {
70
92
  default: boolean;
71
93
  };
72
- extCls: import("vue-types").VueTypeValidableDef<string> & {
73
- default: string;
74
- };
75
94
  }>> & {
76
95
  onSelect?: (...args: any[]) => any;
77
96
  }, {
78
- extCls: string;
79
- list: unknown[];
80
97
  titleAble: boolean;
81
98
  }, {}>;
82
99
  export default _default;
@@ -12,6 +12,7 @@
12
12
  --whitesmoke-color: #fafbfd;
13
13
  --disable-color: #dcdee5;
14
14
  --disable-bg-color: #f9fafd;
15
+ --border-color: #dcdee5;
15
16
  --font-size-base: 12px;
16
17
  --font-size-medium: 14px;
17
18
  --font-size-large: 16px;
@@ -123,6 +124,8 @@
123
124
  --search-select-placeholder-color: var(--light-gray);
124
125
  --search-select-message-color: var(--danger-color);
125
126
  --search-select-menu-border-color: var(--disable-color);
127
+ --select-active-color: #e1ecff;
128
+ --select-hover-color: #f5f7fa;
126
129
  }
127
130
  * {
128
131
  box-sizing: border-box;
@@ -12,6 +12,7 @@
12
12
  --whitesmoke-color: #fafbfd;
13
13
  --disable-color: #dcdee5;
14
14
  --disable-bg-color: #f9fafd;
15
+ --border-color: #dcdee5;
15
16
  --font-size-base: 12px;
16
17
  --font-size-medium: 14px;
17
18
  --font-size-large: 16px;
@@ -123,6 +124,8 @@
123
124
  --search-select-placeholder-color: var(--light-gray);
124
125
  --search-select-message-color: var(--danger-color);
125
126
  --search-select-menu-border-color: var(--disable-color);
127
+ --select-active-color: #e1ecff;
128
+ --select-hover-color: #f5f7fa;
126
129
  }
127
130
  .bk-transfer {
128
131
  display: flex;
@@ -12,6 +12,7 @@
12
12
  --whitesmoke-color: #fafbfd;
13
13
  --disable-color: #dcdee5;
14
14
  --disable-bg-color: #f9fafd;
15
+ --border-color: #dcdee5;
15
16
  --font-size-base: 12px;
16
17
  --font-size-medium: 14px;
17
18
  --font-size-large: 16px;
@@ -123,6 +124,8 @@
123
124
  --search-select-placeholder-color: var(--light-gray);
124
125
  --search-select-message-color: var(--danger-color);
125
126
  --search-select-menu-border-color: var(--disable-color);
127
+ --select-active-color: #e1ecff;
128
+ --select-hover-color: #f5f7fa;
126
129
  }
127
130
  .bk-F-scroll-x {
128
131
  overflow-x: auto;
@@ -84,6 +84,9 @@ declare const Upload: {
84
84
  default: string;
85
85
  };
86
86
  customRequest: import("vue").PropType<import("./upload.type").UploadRequestHandler>;
87
+ selectChange: {
88
+ type: import("vue").PropType<(event: Event) => boolean | void>;
89
+ };
87
90
  beforeUpload: {
88
91
  type: import("vue").PropType<(file: import("./upload.type").UploadRawFile) => boolean | Promise<boolean>>;
89
92
  };
@@ -198,6 +201,9 @@ declare const Upload: {
198
201
  default: string;
199
202
  };
200
203
  customRequest: import("vue").PropType<import("./upload.type").UploadRequestHandler>;
204
+ selectChange: {
205
+ type: import("vue").PropType<(event: Event) => boolean | void>;
206
+ };
201
207
  beforeUpload: {
202
208
  type: import("vue").PropType<(file: import("./upload.type").UploadRawFile) => boolean | Promise<boolean>>;
203
209
  };
@@ -341,6 +347,9 @@ declare const Upload: {
341
347
  default: string;
342
348
  };
343
349
  customRequest: import("vue").PropType<import("./upload.type").UploadRequestHandler>;
350
+ selectChange: {
351
+ type: import("vue").PropType<(event: Event) => boolean | void>;
352
+ };
344
353
  beforeUpload: {
345
354
  type: import("vue").PropType<(file: import("./upload.type").UploadRawFile) => boolean | Promise<boolean>>;
346
355
  };
@@ -481,6 +490,9 @@ declare const Upload: {
481
490
  default: string;
482
491
  };
483
492
  customRequest: import("vue").PropType<import("./upload.type").UploadRequestHandler>;
493
+ selectChange: {
494
+ type: import("vue").PropType<(event: Event) => boolean | void>;
495
+ };
484
496
  beforeUpload: {
485
497
  type: import("vue").PropType<(file: import("./upload.type").UploadRawFile) => boolean | Promise<boolean>>;
486
498
  };
@@ -1431,6 +1431,9 @@ var themes = [EThemes.BUTTON, EThemes.DRAGGABLE, EThemes.PICTURE];
1431
1431
  "default": ''
1432
1432
  },
1433
1433
  customRequest: Function,
1434
+ selectChange: {
1435
+ type: Function
1436
+ },
1434
1437
  beforeUpload: {
1435
1438
  type: Function
1436
1439
  },
@@ -1796,7 +1799,8 @@ const button_less_namespaceObject = button_less_x({ });
1796
1799
  accept: props.accept,
1797
1800
  file: {
1798
1801
  type: Object
1799
- }
1802
+ },
1803
+ selectChange: props.selectChange
1800
1804
  },
1801
1805
  emits: ['change', 'remove'],
1802
1806
  setup: function setup(props, _ref) {
@@ -1835,6 +1839,10 @@ const button_less_namespaceObject = button_less_x({ });
1835
1839
  inputEl.value.click();
1836
1840
  };
1837
1841
  var handleFileChange = function handleFileChange(e) {
1842
+ var _props$selectChange;
1843
+ if (props.selectChange && ((_props$selectChange = props.selectChange) === null || _props$selectChange === void 0 ? void 0 : _props$selectChange.call(props, e)) === false) {
1844
+ return false;
1845
+ }
1838
1846
  var files = e.target.files;
1839
1847
  emit('change', Array.from(files));
1840
1848
  };
@@ -1861,39 +1869,17 @@ const button_less_namespaceObject = button_less_x({ });
1861
1869
  var dragover = (0,external_vue_namespaceObject.ref)(false);
1862
1870
  var Dragger = function Dragger() {
1863
1871
  var handleDrop = function handleDrop(e) {
1872
+ var _props$selectChange2;
1864
1873
  if (disabled.value) {
1865
1874
  return;
1866
1875
  }
1867
1876
  e.preventDefault();
1868
1877
  dragover.value = false;
1869
- var files = Array.from(e.dataTransfer.files);
1870
- if (!acceptTypes.value) {
1871
- emit('change', files);
1872
- return;
1878
+ if (props.selectChange && ((_props$selectChange2 = props.selectChange) === null || _props$selectChange2 === void 0 ? void 0 : _props$selectChange2.call(props, e)) === false) {
1879
+ return false;
1873
1880
  }
1874
- var filesFiltered = files.filter(function (file) {
1875
- var type = file.type,
1876
- name = file.name;
1877
- var extension = name.includes('.') ? ".".concat(name.split('.').pop()) : '';
1878
- var baseType = type.replace(/\/.*$/, '');
1879
- return acceptTypes.value.split(',').map(function (type) {
1880
- return type.trim();
1881
- }).filter(function (type) {
1882
- return type;
1883
- }).some(function (acceptedType) {
1884
- if (acceptedType.startsWith('.')) {
1885
- return extension === acceptedType;
1886
- }
1887
- if (/\/\*$/.test(acceptedType)) {
1888
- return baseType === acceptedType.replace(/\/\*$/, '');
1889
- }
1890
- if (/^[^/]+\/[^/]+$/.test(acceptedType)) {
1891
- return type === acceptedType;
1892
- }
1893
- return false;
1894
- });
1895
- });
1896
- emit('change', filesFiltered);
1881
+ var files = Array.from(e.dataTransfer.files);
1882
+ emit('change', files);
1897
1883
  };
1898
1884
  var handleDragover = function handleDragover(e) {
1899
1885
  e.preventDefault();
@@ -2639,7 +2625,8 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2639
2625
  theme: props.theme,
2640
2626
  multiple: props.multiple,
2641
2627
  disabled: props.disabled,
2642
- accept: props.accept
2628
+ accept: props.accept,
2629
+ selectChange: props.selectChange
2643
2630
  };
2644
2631
  });
2645
2632
  function onRemove(file, fileList) {
@@ -2660,10 +2647,14 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
2660
2647
  return;
2661
2648
  }
2662
2649
  // limit检查
2663
- if (props.limit && fileList.value.length + files.length > props.limit) {
2650
+ if (props.limit > 1 && fileList.value.length + files.length > props.limit) {
2664
2651
  emit('exceed', files, fileList.value);
2665
2652
  return;
2666
2653
  }
2654
+ // 限制1个时使用替换方式,将之前的列表清空
2655
+ if (!props.multiple && props.limit === 1) {
2656
+ fileList.value = [];
2657
+ }
2667
2658
  var sendFiles = files;
2668
2659
  if (!props.multiple || props.limit === 1) {
2669
2660
  sendFiles = files.slice(0, 1);
@@ -85,6 +85,9 @@ declare const _default: {
85
85
  default: string;
86
86
  };
87
87
  customRequest: PropType<UploadRequestHandler>;
88
+ selectChange: {
89
+ type: PropType<(event: Event) => boolean | void>;
90
+ };
88
91
  beforeUpload: {
89
92
  type: PropType<(file: UploadRawFile) => Promise<boolean> | boolean>;
90
93
  };
@@ -20,6 +20,9 @@ declare const _default: import("vue").DefineComponent<{
20
20
  file: {
21
21
  type: PropType<UploadFile>;
22
22
  };
23
+ selectChange: {
24
+ type: PropType<(event: Event) => boolean | void>;
25
+ };
23
26
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "remove")[], "change" | "remove", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
27
  theme: {
25
28
  type: PropType<"button" | "picture" | "draggable">;
@@ -40,6 +43,9 @@ declare const _default: import("vue").DefineComponent<{
40
43
  file: {
41
44
  type: PropType<UploadFile>;
42
45
  };
46
+ selectChange: {
47
+ type: PropType<(event: Event) => boolean | void>;
48
+ };
43
49
  }>> & {
44
50
  onChange?: (...args: any[]) => any;
45
51
  onRemove?: (...args: any[]) => any;
@@ -84,6 +84,9 @@ declare const _default: import("vue").DefineComponent<{
84
84
  default: string;
85
85
  };
86
86
  customRequest: import("vue").PropType<import("./upload.type").UploadRequestHandler>;
87
+ selectChange: {
88
+ type: import("vue").PropType<(event: Event) => boolean | void>;
89
+ };
87
90
  beforeUpload: {
88
91
  type: import("vue").PropType<(file: UploadRawFile) => boolean | Promise<boolean>>;
89
92
  };
@@ -191,6 +194,9 @@ declare const _default: import("vue").DefineComponent<{
191
194
  default: string;
192
195
  };
193
196
  customRequest: import("vue").PropType<import("./upload.type").UploadRequestHandler>;
197
+ selectChange: {
198
+ type: import("vue").PropType<(event: Event) => boolean | void>;
199
+ };
194
200
  beforeUpload: {
195
201
  type: import("vue").PropType<(file: UploadRawFile) => boolean | Promise<boolean>>;
196
202
  };
@@ -12,6 +12,7 @@
12
12
  --whitesmoke-color: #fafbfd;
13
13
  --disable-color: #dcdee5;
14
14
  --disable-bg-color: #f9fafd;
15
+ --border-color: #dcdee5;
15
16
  --font-size-base: 12px;
16
17
  --font-size-medium: 14px;
17
18
  --font-size-large: 16px;
@@ -123,6 +124,8 @@
123
124
  --search-select-placeholder-color: var(--light-gray);
124
125
  --search-select-message-color: var(--danger-color);
125
126
  --search-select-menu-border-color: var(--disable-color);
127
+ --select-active-color: #e1ecff;
128
+ --select-hover-color: #f5f7fa;
126
129
  }
127
130
  @keyframes loading-scale-animate {
128
131
  0% {
@@ -275,6 +275,9 @@ declare const BkVirtualRender: {
275
275
  width: string | number;
276
276
  height: string | number;
277
277
  maxHeight: number;
278
+ contentClassName: string | {
279
+ [key: string]: any;
280
+ };
278
281
  enabled: boolean;
279
282
  list: unknown[];
280
283
  minHeight: number;
@@ -284,9 +287,6 @@ declare const BkVirtualRender: {
284
287
  };
285
288
  lineHeight: any;
286
289
  scrollEvent: boolean;
287
- contentClassName: string | {
288
- [key: string]: any;
289
- };
290
290
  contentStyle: {
291
291
  [key: string]: any;
292
292
  };
@@ -456,6 +456,9 @@ declare const BkVirtualRender: {
456
456
  width: string | number;
457
457
  height: string | number;
458
458
  maxHeight: number;
459
+ contentClassName: string | {
460
+ [key: string]: any;
461
+ };
459
462
  enabled: boolean;
460
463
  list: unknown[];
461
464
  minHeight: number;
@@ -465,9 +468,6 @@ declare const BkVirtualRender: {
465
468
  };
466
469
  lineHeight: any;
467
470
  scrollEvent: boolean;
468
- contentClassName: string | {
469
- [key: string]: any;
470
- };
471
471
  contentStyle: {
472
472
  [key: string]: any;
473
473
  };
@@ -629,6 +629,9 @@ declare const BkVirtualRender: {
629
629
  width: string | number;
630
630
  height: string | number;
631
631
  maxHeight: number;
632
+ contentClassName: string | {
633
+ [key: string]: any;
634
+ };
632
635
  enabled: boolean;
633
636
  list: unknown[];
634
637
  minHeight: number;
@@ -638,9 +641,6 @@ declare const BkVirtualRender: {
638
641
  };
639
642
  lineHeight: any;
640
643
  scrollEvent: boolean;
641
- contentClassName: string | {
642
- [key: string]: any;
643
- };
644
644
  contentStyle: {
645
645
  [key: string]: any;
646
646
  };
@@ -278,6 +278,9 @@ declare const _default: import("vue").DefineComponent<{
278
278
  width: string | number;
279
279
  height: string | number;
280
280
  maxHeight: number;
281
+ contentClassName: string | {
282
+ [key: string]: any;
283
+ };
281
284
  enabled: boolean;
282
285
  list: unknown[];
283
286
  minHeight: number;
@@ -287,9 +290,6 @@ declare const _default: import("vue").DefineComponent<{
287
290
  };
288
291
  lineHeight: any;
289
292
  scrollEvent: boolean;
290
- contentClassName: string | {
291
- [key: string]: any;
292
- };
293
293
  contentStyle: {
294
294
  [key: string]: any;
295
295
  };
@@ -12,6 +12,7 @@
12
12
  --whitesmoke-color: #fafbfd;
13
13
  --disable-color: #dcdee5;
14
14
  --disable-bg-color: #f9fafd;
15
+ --border-color: #dcdee5;
15
16
  --font-size-base: 12px;
16
17
  --font-size-medium: 14px;
17
18
  --font-size-large: 16px;
@@ -123,6 +124,8 @@
123
124
  --search-select-placeholder-color: var(--light-gray);
124
125
  --search-select-message-color: var(--danger-color);
125
126
  --search-select-menu-border-color: var(--disable-color);
127
+ --select-active-color: #e1ecff;
128
+ --select-hover-color: #f5f7fa;
126
129
  }
127
130
  .bk-F-scroll-x {
128
131
  overflow-x: auto;