@nutui/nutui 4.0.1-beta.2 → 4.0.1-beta.3

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 (80) hide show
  1. package/dist/nutui.es.js +10 -17
  2. package/dist/nutui.umd.js +2 -158
  3. package/dist/packages/_es/Address.js +3 -0
  4. package/dist/packages/_es/Audio.js +6 -0
  5. package/dist/packages/_es/AudioOperate.js +1 -0
  6. package/dist/packages/_es/Avatar.js +2 -0
  7. package/dist/packages/_es/AvatarGroup.js +1 -0
  8. package/dist/packages/_es/Badge.js +5 -1
  9. package/dist/packages/_es/Barrage.js +5 -3
  10. package/dist/packages/_es/Calendar.js +7 -2
  11. package/dist/packages/_es/CalendarItem.js +1 -1
  12. package/dist/packages/_es/Cascader.js +2 -0
  13. package/dist/packages/_es/Category.js +2 -0
  14. package/dist/packages/_es/CategoryPane.js +3 -0
  15. package/dist/packages/_es/Cell.js +1 -0
  16. package/dist/packages/_es/Checkbox.js +17 -2
  17. package/dist/packages/_es/CollapseItem.js +1 -0
  18. package/dist/packages/_es/Comment.js +5 -0
  19. package/dist/packages/_es/Countdown.js +8 -0
  20. package/dist/packages/_es/Countup.js +10 -0
  21. package/dist/packages/_es/DatePicker.js +2 -0
  22. package/dist/packages/_es/Dialog.js +3 -0
  23. package/dist/packages/_es/Ellipsis.js +2 -0
  24. package/dist/packages/_es/Empty.js +3 -0
  25. package/dist/packages/_es/Grid.js +1 -1
  26. package/dist/packages/_es/GridItem.js +2 -1
  27. package/dist/packages/_es/ImagePreview.js +1 -0
  28. package/dist/packages/_es/Input.js +20 -12
  29. package/dist/packages/_es/Invoice.js +5 -3
  30. package/dist/packages/_es/Navbar.js +6 -0
  31. package/dist/packages/_es/Noticebar.js +50 -18
  32. package/dist/packages/_es/Notify.js +3 -0
  33. package/dist/packages/_es/Picker.js +2 -0
  34. package/dist/packages/_es/PullRefresh.js +4 -0
  35. package/dist/packages/_es/Radio.js +1 -1
  36. package/dist/packages/_es/RadioGroup.js +1 -1
  37. package/dist/packages/_es/Searchbar.js +1 -0
  38. package/dist/packages/_es/ShortPassword.js +1 -0
  39. package/dist/packages/_es/Signature.js +1 -1
  40. package/dist/packages/_es/Skeleton.js +10 -0
  41. package/dist/packages/_es/Sku.js +14 -0
  42. package/dist/packages/_es/Swiper.js +5 -2
  43. package/dist/packages/_es/TabbarItem.js +5 -0
  44. package/dist/packages/_es/Tabs.js +2 -0
  45. package/dist/packages/_es/Textarea.js +1 -0
  46. package/dist/packages/_es/Toast.js +8 -0
  47. package/dist/packages/_es/Tour.js +1 -0
  48. package/dist/packages/_es/Uploader.js +5 -2
  49. package/dist/packages/_es/Video.js +18 -0
  50. package/dist/packages/_es/{common-05c67d9a.js → common-0c815463.js} +8 -0
  51. package/dist/packages/_es/{index-4f2972bc.js → index-0432a798.js} +147 -32
  52. package/dist/packages/_es/{index.vue_vue_type_script_lang-ee936659.js → index.vue_vue_type_script_lang-0725f0ae.js} +1 -0
  53. package/dist/packages/_es/{index.vue_vue_type_script_lang-8b9f3de5.js → index.vue_vue_type_script_lang-9c679f64.js} +1 -0
  54. package/dist/packages/badge/index.scss +3 -0
  55. package/dist/packages/checkbox/index.scss +41 -0
  56. package/dist/packages/input/index.scss +6 -8
  57. package/dist/packages/noticebar/index.scss +4 -0
  58. package/dist/packages/uploader/index.scss +7 -2
  59. package/dist/resolver/index.d.ts +6 -0
  60. package/dist/resolver/index.js +1 -0
  61. package/dist/resolver/index.mjs +24 -0
  62. package/dist/smartips/web-types.json +20 -2
  63. package/dist/style.css +1 -1
  64. package/dist/styles/themes/default.scss +44 -44
  65. package/dist/styles/themes/jdb.scss +44 -44
  66. package/dist/styles/themes/jddkh.scss +44 -44
  67. package/dist/styles/themes/jdt.scss +44 -44
  68. package/dist/styles/variables-jdb.scss +9 -1
  69. package/dist/styles/variables-jddkh.scss +9 -1
  70. package/dist/styles/variables-jdt.scss +8 -0
  71. package/dist/styles/variables.scss +8 -0
  72. package/dist/types/__VUE/badge/index.vue.d.ts +9 -0
  73. package/dist/types/__VUE/calendaritem/type.d.ts +1 -0
  74. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  75. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -0
  76. package/dist/types/__VUE/swiper/index.vue.d.ts +8 -1
  77. package/dist/types/index.d.ts +1 -2
  78. package/dist/types/resolver/index.d.ts +6 -0
  79. package/dist/types/utils/date.d.ts +4 -0
  80. package/package.json +6 -7
@@ -7,6 +7,7 @@ import "../locale/lang";
7
7
  const { componentName, create } = createComponent("noticebar");
8
8
  const _sfc_main = create({
9
9
  props: {
10
+ // 滚动方向 across 横向 vertical 纵向
10
11
  direction: {
11
12
  type: String,
12
13
  default: "across"
@@ -88,7 +89,8 @@ const _sfc_main = create({
88
89
  distance: 0,
89
90
  timer: null,
90
91
  keepAlive: false,
91
- isCanScroll: null
92
+ isCanScroll: null,
93
+ showNotica: true
92
94
  });
93
95
  const classes = computed(() => {
94
96
  const prefixCls = componentName;
@@ -166,7 +168,6 @@ const _sfc_main = create({
166
168
  const wrapWidth = wrap.value.getBoundingClientRect().width;
167
169
  const offsetWidth = content.value.getBoundingClientRect().width;
168
170
  state.isCanScroll = props.scrollable == null ? offsetWidth > wrapWidth : props.scrollable;
169
- console.log(111, state.isCanScroll);
170
171
  if (state.isCanScroll) {
171
172
  state.wrapWidth = wrapWidth;
172
173
  state.offsetWidth = offsetWidth;
@@ -235,7 +236,8 @@ const _sfc_main = create({
235
236
  onMounted(() => {
236
237
  if (props.direction == "vertical") {
237
238
  if (slots.default) {
238
- state.scrollList = [].concat(slots.default()[0].children);
239
+ updateSlotChild();
240
+ watchSlots();
239
241
  } else {
240
242
  state.scrollList = [].concat(props.list);
241
243
  }
@@ -246,6 +248,28 @@ const _sfc_main = create({
246
248
  initScrollWrap(props.text);
247
249
  }
248
250
  });
251
+ const updateSlotChild = () => {
252
+ if (slots.default)
253
+ state.scrollList = [].concat(slots.default()[0].children);
254
+ };
255
+ const watchSlots = () => {
256
+ setTimeout(() => {
257
+ var observer = new MutationObserver((slots2) => {
258
+ state.showNotica = false;
259
+ setTimeout(() => {
260
+ state.showNotica = true;
261
+ });
262
+ updateSlotChild();
263
+ });
264
+ const ele = document.getElementsByClassName("nut-noticebar-custom-item")[0];
265
+ if (ele) {
266
+ observer.observe(ele, {
267
+ childList: true,
268
+ subtree: true
269
+ });
270
+ }
271
+ }, 100);
272
+ };
249
273
  onActivated(() => {
250
274
  if (state.keepAlive) {
251
275
  state.keepAlive = false;
@@ -284,7 +308,9 @@ const _hoisted_2 = {
284
308
  ref: "wrap",
285
309
  class: "nut-noticebar__page-wrap"
286
310
  };
287
- const _hoisted_3 = ["onClick"];
311
+ const _hoisted_3 = { class: "showNotica" };
312
+ const _hoisted_4 = { class: "nut-noticebar-custom-item" };
313
+ const _hoisted_5 = ["onClick"];
288
314
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
289
315
  const _component_Notice = resolveComponent("Notice");
290
316
  const _component_CircleClose = resolveComponent("CircleClose");
@@ -338,19 +364,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
338
364
  class: "nut-noticebar__vertical",
339
365
  style: normalizeStyle(_ctx.barStyle)
340
366
  }, [
341
- _ctx.slots.default ? (openBlock(), createElementBlock("view", {
342
- key: 0,
343
- class: "nut-noticebar__vertical-list",
344
- style: normalizeStyle(_ctx.horseLampStyle)
345
- }, [
346
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
347
- return openBlock(), createBlock(_component_ScrollItem, {
348
- key: index2,
349
- style: normalizeStyle({ height: _ctx.height + "px", "line-height": _ctx.height + "px" }),
350
- item
351
- }, null, 8, ["style", "item"]);
352
- }), 128))
353
- ], 4)) : (openBlock(), createElementBlock("ul", {
367
+ _ctx.slots.default ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
368
+ createElementVNode("view", {
369
+ class: "nut-noticebar__vertical-list",
370
+ style: normalizeStyle(_ctx.horseLampStyle)
371
+ }, [
372
+ createElementVNode("div", _hoisted_3, [
373
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
374
+ return openBlock(), createBlock(_component_ScrollItem, {
375
+ key: index2,
376
+ style: normalizeStyle({ height: _ctx.height + "px", "line-height": _ctx.height + "px" }),
377
+ item
378
+ }, null, 8, ["style", "item"]);
379
+ }), 128))
380
+ ])
381
+ ], 4),
382
+ createElementVNode("view", _hoisted_4, [
383
+ renderSlot(_ctx.$slots, "default")
384
+ ])
385
+ ], 64)) : (openBlock(), createElementBlock("ul", {
354
386
  key: 1,
355
387
  class: "nut-noticebar__vertical-list",
356
388
  style: normalizeStyle(_ctx.horseLampStyle)
@@ -361,7 +393,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
361
393
  key: index2,
362
394
  style: normalizeStyle({ height: _ctx.pxCheck(_ctx.height) }),
363
395
  onClick: ($event) => _ctx.go(item)
364
- }, toDisplayString(item), 13, _hoisted_3);
396
+ }, toDisplayString(item), 13, _hoisted_5);
365
397
  }), 128))
366
398
  ], 4)),
367
399
  createElementVNode("view", {
@@ -109,6 +109,9 @@ const defaultOptions = {
109
109
  duration: 3e3,
110
110
  className: "",
111
111
  onClose: Function,
112
+ // onClick: null,
113
+ // onOpened: null,
114
+ // textTimer: null,
112
115
  teleport: "",
113
116
  unmount: new Function()
114
117
  };
@@ -159,12 +159,14 @@ const usePicker = (props, emit) => {
159
159
  const { create: create$1 } = createComponent("picker-column");
160
160
  const _sfc_main$1 = create$1({
161
161
  props: {
162
+ // 当前选中项
162
163
  value: [String, Number],
163
164
  columnsType: String,
164
165
  column: {
165
166
  type: Array,
166
167
  default: () => []
167
168
  },
169
+ // 是否开启3D效果
168
170
  threeDimensional: {
169
171
  type: Boolean,
170
172
  default: true
@@ -25,6 +25,10 @@ const _sfc_main = create({
25
25
  type: String,
26
26
  default: translate("loading")
27
27
  },
28
+ // completeTxt: {
29
+ // type: String,
30
+ // default: ''
31
+ // },
28
32
  headHeight: {
29
33
  type: [String, Number],
30
34
  default: 50
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-8b9f3de5.js";
1
+ import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-9c679f64.js";
2
2
  import "vue";
3
3
  import "./component-bb5ff48e.js";
4
4
  import "../locale/lang";
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-ee936659.js";
1
+ import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-0725f0ae.js";
2
2
  import "vue";
3
3
  import "./component-bb5ff48e.js";
4
4
  import "../locale/lang";
@@ -45,6 +45,7 @@ const _sfc_main = create({
45
45
  },
46
46
  focusStyle: {
47
47
  type: Object,
48
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
48
49
  default: () => {
49
50
  }
50
51
  },
@@ -42,6 +42,7 @@ const _sfc_main = create({
42
42
  },
43
43
  length: {
44
44
  type: [String, Number],
45
+ //4~6
45
46
  default: 6
46
47
  }
47
48
  },
@@ -125,8 +125,8 @@ const _sfc_main = create({
125
125
  }
126
126
  const _canvas = isCanvasBlank(canvas2) ? "请绘制签名" : canvas2;
127
127
  const _filePath = isCanvasBlank(canvas2) ? "" : dataurl;
128
- clear();
129
128
  emit("confirm", _canvas, _filePath);
129
+ clear();
130
130
  };
131
131
  onMounted(() => {
132
132
  if (isCanvasSupported()) {
@@ -7,42 +7,52 @@ const component = (components) => {
7
7
  return {
8
8
  components,
9
9
  props: {
10
+ //每行宽度
10
11
  width: {
11
12
  type: String,
12
13
  default: "100px"
13
14
  },
15
+ //每行高度
14
16
  height: {
15
17
  type: String,
16
18
  default: "15px"
17
19
  },
20
+ //是否显示动画
18
21
  animated: {
19
22
  type: Boolean,
20
23
  default: false
21
24
  },
25
+ //头像
22
26
  avatar: {
23
27
  type: Boolean,
24
28
  default: false
25
29
  },
30
+ //头像形状:正方形/圆形
26
31
  avatarShape: {
27
32
  type: String,
28
33
  default: "round"
29
34
  },
35
+ //头像大小
30
36
  avatarSize: {
31
37
  type: String,
32
38
  default: "50px"
33
39
  },
40
+ //是否显示骨架屏
34
41
  loading: {
35
42
  type: Boolean,
36
43
  default: true
37
44
  },
45
+ //标题/段落 圆角风格
38
46
  round: {
39
47
  type: Boolean,
40
48
  default: false
41
49
  },
50
+ //显示段落行数
42
51
  row: {
43
52
  type: String,
44
53
  default: "1"
45
54
  },
55
+ //是否显示段落标题
46
56
  title: {
47
57
  type: Boolean,
48
58
  default: true
@@ -124,6 +124,7 @@ const SkuSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_rend
124
124
  const { componentName: componentName$2, create: create$2 } = createComponent("sku-stepper");
125
125
  const _sfc_main$2 = create$2({
126
126
  props: {
127
+ // 购买数量最大值
127
128
  stepperMax: {
128
129
  type: [Number, String],
129
130
  default: 99999
@@ -132,10 +133,12 @@ const _sfc_main$2 = create$2({
132
133
  type: [Number, String],
133
134
  default: 1
134
135
  },
136
+ // stepper 前文案提示
135
137
  stepperExtraText: {
136
138
  type: [Function, Boolean],
137
139
  default: false
138
140
  },
141
+ // 数量选择左侧文案
139
142
  stepperTitle: {
140
143
  type: String,
141
144
  default: "购买数量"
@@ -214,6 +217,7 @@ const SkuStepper = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_ren
214
217
  const { componentName: componentName$1, create: create$1 } = createComponent("sku-operate");
215
218
  const _sfc_main$1 = create$1({
216
219
  props: {
220
+ // 底部按钮配置 confirm cart buy
217
221
  btnOptions: {
218
222
  type: Array,
219
223
  default: () => ["confirm"]
@@ -222,10 +226,12 @@ const _sfc_main$1 = create$1({
222
226
  type: String,
223
227
  default: ""
224
228
  },
229
+ // 立即购买文案
225
230
  buyText: {
226
231
  type: String,
227
232
  default: "立即购买"
228
233
  },
234
+ // 加入购物车文案
229
235
  addCartText: {
230
236
  type: String,
231
237
  default: "加入购物车"
@@ -297,22 +303,27 @@ const _sfc_main = create({
297
303
  type: Object,
298
304
  default: {}
299
305
  },
306
+ // stepper 最大值
300
307
  stepperMax: {
301
308
  type: [Number, String],
302
309
  default: 99999
303
310
  },
311
+ // stepper 最小值
304
312
  stepperMin: {
305
313
  type: [Number, String],
306
314
  default: 1
307
315
  },
316
+ // 底部按钮配置 confirm cart buy
308
317
  btnOptions: {
309
318
  type: Array,
310
319
  default: () => ["confirm"]
311
320
  },
321
+ // 数量选择左侧文案
312
322
  stepperTitle: {
313
323
  type: String,
314
324
  default: ""
315
325
  },
326
+ // stepper 前面文案
316
327
  stepperExtraText: {
317
328
  type: [Function, Boolean],
318
329
  default: false
@@ -321,14 +332,17 @@ const _sfc_main = create({
321
332
  type: String,
322
333
  default: ""
323
334
  },
335
+ // 立即购买文案
324
336
  buyText: {
325
337
  type: String,
326
338
  default: ""
327
339
  },
340
+ // 加入购物车文案
328
341
  addCartText: {
329
342
  type: String,
330
343
  default: ""
331
344
  },
345
+ // 确定文案
332
346
  confirmText: {
333
347
  type: String,
334
348
  default: ""
@@ -19,6 +19,7 @@ const _sfc_main = create({
19
19
  direction: {
20
20
  type: String,
21
21
  default: "horizontal"
22
+ //horizontal and vertical
22
23
  },
23
24
  paginationVisible: {
24
25
  type: Boolean,
@@ -69,7 +70,7 @@ const _sfc_main = create({
69
70
  moving: false,
70
71
  offset: 0,
71
72
  touchTime: 0,
72
- autoplayTimer: 0,
73
+ autoplayTimer: null,
73
74
  children: [],
74
75
  childrenVNode: [],
75
76
  style: {}
@@ -210,7 +211,9 @@ const _sfc_main = create({
210
211
  }
211
212
  };
212
213
  const stopAutoPlay = () => {
213
- clearTimeout(state.autoplayTimer);
214
+ if (state.autoplayTimer) {
215
+ clearTimeout(state.autoplayTimer);
216
+ }
214
217
  };
215
218
  const jump = (pace) => {
216
219
  resettPosition();
@@ -10,6 +10,7 @@ const _sfc_main = create({
10
10
  components: { [Badge.name]: Badge },
11
11
  props: {
12
12
  tabTitle: {
13
+ // 标签页的标题
13
14
  type: String,
14
15
  default: ""
15
16
  },
@@ -17,9 +18,11 @@ const _sfc_main = create({
17
18
  type: String
18
19
  },
19
20
  icon: {
21
+ // 标签页显示的icon
20
22
  type: Object
21
23
  },
22
24
  href: {
25
+ // 标签页的跳转链接
23
26
  type: String,
24
27
  default: ""
25
28
  },
@@ -32,7 +35,9 @@ const _sfc_main = create({
32
35
  const parent = inject("parent");
33
36
  const state = reactive({
34
37
  unactiveColor: parent.unactiveColor,
38
+ // 未选中的颜色
35
39
  activeColor: parent.activeColor,
40
+ // 选中的颜色
36
41
  index: 0
37
42
  });
38
43
  const router = useRouter();
@@ -36,6 +36,7 @@ const _sfc_main = create({
36
36
  direction: {
37
37
  type: String,
38
38
  default: "horizontal"
39
+ //vertical
39
40
  },
40
41
  size: {
41
42
  type: String,
@@ -44,6 +45,7 @@ const _sfc_main = create({
44
45
  type: {
45
46
  type: String,
46
47
  default: "line"
48
+ //card、line、smile
47
49
  },
48
50
  titleScroll: {
49
51
  type: Boolean,
@@ -67,6 +67,7 @@ const _sfc_main = create({
67
67
  const styles = computed(() => {
68
68
  return {
69
69
  textAlign: props.textAlign
70
+ // resize: props.autosize ? 'vertical' : 'none'
70
71
  };
71
72
  });
72
73
  const getContentHeight = () => {
@@ -196,7 +196,9 @@ const defaultOptions = {
196
196
  msg: "",
197
197
  id: "",
198
198
  duration: 2e3,
199
+ //显示时间(毫秒)
199
200
  center: true,
201
+ // 未实现
200
202
  type: "text",
201
203
  title: "",
202
204
  customClass: "",
@@ -205,13 +207,19 @@ const defaultOptions = {
205
207
  iconSize: "20",
206
208
  icon: null,
207
209
  textAlignCenter: true,
210
+ // 未实现
208
211
  loadingRotate: true,
212
+ // 未实现
209
213
  bgColor: "",
210
214
  onClose: null,
215
+ // 未实现
211
216
  unmount: null,
212
217
  cover: false,
218
+ //透明遮罩层 // 未实现
213
219
  coverColor: "",
220
+ // 未实现
214
221
  closeOnClickOverlay: false
222
+ // 未实现
215
223
  };
216
224
  let idsMap = [];
217
225
  let optsMap = [];
@@ -19,6 +19,7 @@ const _sfc_main = create({
19
19
  type: {
20
20
  type: String,
21
21
  default: "step"
22
+ // tile
22
23
  },
23
24
  steps: {
24
25
  type: Array,
@@ -103,9 +103,11 @@ const _sfc_main = create({
103
103
  props: {
104
104
  name: { type: String, default: "file" },
105
105
  url: { type: String, default: "" },
106
+ // defaultFileList: { type: Array, default: () => new Array<FileItem>() },
106
107
  timeout: { type: [Number, String], default: 1e3 * 30 },
107
108
  fileList: { type: Array, default: () => [] },
108
109
  isPreview: { type: Boolean, default: true },
110
+ // picture、list
109
111
  listType: { type: String, default: "picture" },
110
112
  isDeletable: { type: Boolean, default: true },
111
113
  method: { type: String, default: "post" },
@@ -437,11 +439,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
437
439
  }, [
438
440
  createVNode(_component_Link, { class: "nut-uploader__preview-img__file__link" }),
439
441
  createElementVNode("view", _hoisted_13, toDisplayString(item.name), 1),
440
- createVNode(_component_Del, {
442
+ _ctx.isDeletable ? (openBlock(), createBlock(_component_Del, {
443
+ key: 0,
441
444
  color: "#808080",
442
445
  class: "nut-uploader__preview-img__file__del",
443
446
  onClick: ($event) => _ctx.onDelete(item, index2)
444
- }, null, 8, ["onClick"])
447
+ }, null, 8, ["onClick"])) : createCommentVNode("", true)
445
448
  ], 10, _hoisted_12),
446
449
  item.status == "uploading" ? (openBlock(), createBlock(_component_nut_progress, {
447
450
  key: 0,
@@ -29,13 +29,17 @@ const _sfc_main = create({
29
29
  type: Object,
30
30
  default: {
31
31
  autoplay: false,
32
+ //是否自动播放
32
33
  volume: 0.5,
33
34
  poster: "",
34
35
  loop: false,
35
36
  controls: true,
36
37
  muted: false,
38
+ //是否静音
37
39
  disabled: false,
40
+ //禁止操作
38
41
  playsinline: false,
42
+ //行内展示
39
43
  touchPlay: false,
40
44
  preload: ""
41
45
  },
@@ -52,30 +56,44 @@ const _sfc_main = create({
52
56
  const state = reactive({
53
57
  videoElm: null,
54
58
  initial: true,
59
+ //控制封面的显示
55
60
  showToolbox: false,
61
+ //控制控制器和标题的显示
62
+ // 视频容器元素
56
63
  player: {
57
64
  $player: null,
58
65
  pos: null
59
66
  },
67
+ // progress进度条元素
60
68
  progressBar: {
61
69
  progressElm: null,
70
+ // 进度条DOM对象
62
71
  pos: null
63
72
  },
73
+ // video控制显示设置
64
74
  videoSet: {
65
75
  loaded: 0,
76
+ // 缓存长度
66
77
  displayTime: "00:00",
78
+ // 进度时间
67
79
  totalTime: "00:00",
80
+ // 总时间
68
81
  progress: {
69
82
  width: 0,
83
+ // 进度条长度
70
84
  current: 0
85
+ // 进度条当前位置
71
86
  }
72
87
  },
73
88
  state: {
74
89
  controlShow: true,
75
90
  vol: 0.5,
91
+ //音量
76
92
  currentTime: 0,
93
+ //当前时间
77
94
  fullScreen: false,
78
95
  playing: false,
96
+ //是否正在播放
79
97
  isLoading: false,
80
98
  isEnd: false,
81
99
  isError: false,
@@ -68,33 +68,41 @@ function useProvide(key, childName) {
68
68
  const { componentName } = createComponent("grid");
69
69
  const GRID_KEY = Symbol("grid");
70
70
  const gridProps = {
71
+ // 列数
71
72
  columnNum: {
72
73
  type: [Number, String],
73
74
  default: 4
74
75
  },
76
+ // 是否显示边框
75
77
  border: {
76
78
  type: Boolean,
77
79
  default: true
78
80
  },
81
+ // 格子之间间隔距离
79
82
  gutter: {
80
83
  type: [Number, String],
81
84
  default: 0
82
85
  },
86
+ // 是否内容居中
83
87
  center: {
84
88
  type: Boolean,
85
89
  default: true
86
90
  },
91
+ // 是否固定正方形
87
92
  square: {
88
93
  type: Boolean,
89
94
  default: false
90
95
  },
96
+ // 内容与文字翻转
91
97
  reverse: {
92
98
  type: Boolean,
93
99
  default: false
94
100
  },
101
+ // 内容排列方向
95
102
  direction: {
96
103
  type: String
97
104
  },
105
+ // 是否开启点击反馈
98
106
  clickable: {
99
107
  type: Boolean,
100
108
  default: false