@nutui/nutui 4.0.4 → 4.0.5-beta.1

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 (76) hide show
  1. package/dist/nutui.es.js +1 -1
  2. package/dist/nutui.umd.js +2 -2
  3. package/dist/packages/_es/Address.js +3 -0
  4. package/dist/packages/_es/AddressList.js +2 -2
  5. package/dist/packages/_es/Audio.js +6 -0
  6. package/dist/packages/_es/AudioOperate.js +1 -0
  7. package/dist/packages/_es/Avatar.js +2 -0
  8. package/dist/packages/_es/AvatarGroup.js +1 -0
  9. package/dist/packages/_es/Backtop.js +2 -2
  10. package/dist/packages/_es/Barrage.js +1 -1
  11. package/dist/packages/_es/Button.js +1 -1
  12. package/dist/packages/_es/Calendar.js +1 -1
  13. package/dist/packages/_es/CalendarItem.js +1 -1
  14. package/dist/packages/_es/Cascader.js +2 -0
  15. package/dist/packages/_es/Category.js +2 -0
  16. package/dist/packages/_es/CategoryPane.js +3 -0
  17. package/dist/packages/_es/Cell.js +1 -0
  18. package/dist/packages/_es/CellGroup.js +1 -1
  19. package/dist/packages/_es/Checkbox.js +5 -1
  20. package/dist/packages/_es/CheckboxGroup.js +15 -2
  21. package/dist/packages/_es/CollapseItem.js +1 -0
  22. package/dist/packages/_es/Comment.js +5 -0
  23. package/dist/packages/_es/Countdown.js +8 -0
  24. package/dist/packages/_es/Countup.js +10 -0
  25. package/dist/packages/_es/DatePicker.js +13 -20
  26. package/dist/packages/_es/Dialog.js +6 -3
  27. package/dist/packages/_es/Ellipsis.js +2 -0
  28. package/dist/packages/_es/Empty.js +3 -0
  29. package/dist/packages/_es/Grid.js +1 -1
  30. package/dist/packages/_es/GridItem.js +2 -1
  31. package/dist/packages/_es/ImagePreview.js +2 -1
  32. package/dist/packages/_es/Input.js +2 -0
  33. package/dist/packages/_es/Invoice.js +5 -3
  34. package/dist/packages/_es/Navbar.js +6 -0
  35. package/dist/packages/_es/Noticebar.js +1 -0
  36. package/dist/packages/_es/Notify.js +4 -1
  37. package/dist/packages/_es/Picker.js +2 -0
  38. package/dist/packages/_es/PullRefresh.js +4 -0
  39. package/dist/packages/_es/Radio.js +1 -1
  40. package/dist/packages/_es/RadioGroup.js +1 -1
  41. package/dist/packages/_es/Searchbar.js +1 -0
  42. package/dist/packages/_es/ShortPassword.js +1 -0
  43. package/dist/packages/_es/Skeleton.js +10 -0
  44. package/dist/packages/_es/Sku.js +14 -0
  45. package/dist/packages/_es/Swiper.js +1 -0
  46. package/dist/packages/_es/TabbarItem.js +5 -0
  47. package/dist/packages/_es/Tabs.js +2 -0
  48. package/dist/packages/_es/Textarea.js +1 -0
  49. package/dist/packages/_es/Toast.js +10 -2
  50. package/dist/packages/_es/Tour.js +1 -0
  51. package/dist/packages/_es/Uploader.js +3 -1
  52. package/dist/packages/_es/Video.js +18 -0
  53. package/dist/packages/_es/{common-ceb98554.js → common-b9a5e726.js} +8 -0
  54. package/dist/packages/_es/{index-2a2f92bd.js → index-f933fcf6.js} +41 -4
  55. package/dist/packages/_es/{index.vue_vue_type_script_lang-1291fceb.js → index.vue_vue_type_script_lang-22dfc112.js} +1 -0
  56. package/dist/packages/_es/{index.vue_vue_type_script_lang-d4c88f85.js → index.vue_vue_type_script_lang-442e4704.js} +1 -0
  57. package/dist/packages/_es/{mountComponent-1ece4110.js → mountComponent-8b24c346.js} +7 -7
  58. package/dist/packages/button/index.scss +1 -1
  59. package/dist/packages/cellgroup/index.scss +1 -1
  60. package/dist/smartips/web-types.json +1 -1
  61. package/dist/style.css +1 -1
  62. package/dist/styles/themes/default.scss +53 -53
  63. package/dist/styles/themes/jdb.scss +53 -53
  64. package/dist/styles/themes/jddkh.scss +53 -53
  65. package/dist/styles/themes/jdt.scss +53 -53
  66. package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
  67. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  68. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  69. package/dist/types/__VUE/input/index.vue.d.ts +1 -1
  70. package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
  71. package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
  72. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  73. package/dist/types/__VUE/skeleton/index.vue.d.ts +1 -1
  74. package/dist/types/__VUE/textarea/index.vue.d.ts +1 -1
  75. package/dist/types/index.d.ts +1 -1
  76. package/package.json +1 -1
@@ -8,10 +8,15 @@ const _sfc_main = create({
8
8
  components: { Left },
9
9
  props: {
10
10
  leftShow: { type: Boolean, default: false },
11
+ //左侧 是否显示返回icon
11
12
  title: { type: String, default: "" },
13
+ //中间 文字标题
12
14
  titleIcon: { type: Boolean, default: false },
15
+ //中间
13
16
  leftText: { type: String, default: "" },
17
+ //左侧文字
14
18
  desc: { type: String, default: "" },
19
+ //右侧 按钮文字
15
20
  fixed: {
16
21
  type: Boolean,
17
22
  default: false
@@ -25,6 +30,7 @@ const _sfc_main = create({
25
30
  default: false
26
31
  },
27
32
  placeholder: {
33
+ // 生成一个等高的占位元素
28
34
  type: Boolean,
29
35
  default: true
30
36
  },
@@ -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"
@@ -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
  };
@@ -156,7 +159,7 @@ const mountNotify = (opts) => {
156
159
  return updateNotify(opts);
157
160
  }
158
161
  } else {
159
- _id = new Date().getTime() + "";
162
+ _id = (/* @__PURE__ */ new Date()).getTime() + "";
160
163
  }
161
164
  opts = { ...defaultOptions, ...opts };
162
165
  opts.id = _id;
@@ -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-d4c88f85.js";
1
+ import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-442e4704.js";
2
2
  import "vue";
3
3
  import "./component-81a4c1d0.js";
4
4
  import "../locale/lang";
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-1291fceb.js";
1
+ import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-22dfc112.js";
2
2
  import "vue";
3
3
  import "./component-81a4c1d0.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
  },
@@ -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,
@@ -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();
@@ -138,6 +138,7 @@ const _sfc_main = create({
138
138
  direction: {
139
139
  type: String,
140
140
  default: "horizontal"
141
+ //vertical
141
142
  },
142
143
  size: {
143
144
  type: String,
@@ -146,6 +147,7 @@ const _sfc_main = create({
146
147
  type: {
147
148
  type: String,
148
149
  default: "line"
150
+ //card、line、smile
149
151
  },
150
152
  titleScroll: {
151
153
  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 = () => {
@@ -3,7 +3,7 @@ import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
5
5
  import "../locale/lang";
6
- import { C as CreateComponent } from "./mountComponent-1ece4110.js";
6
+ import { C as CreateComponent } from "./mountComponent-8b24c346.js";
7
7
  import { Success, Failure, Tips, Loading } from "@nutui/icons-vue";
8
8
  const { create } = createComponent("toast");
9
9
  const _sfc_main = create({
@@ -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 = [];
@@ -257,7 +265,7 @@ const mountToast = (opts) => {
257
265
  return updateToast(opts);
258
266
  }
259
267
  } else {
260
- _id = new Date().getTime() + "";
268
+ _id = (/* @__PURE__ */ new Date()).getTime() + "";
261
269
  }
262
270
  opts = { ...defaultOptions, ...opts };
263
271
  opts.id = _id;
@@ -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,
@@ -81,7 +81,7 @@ class FileItem {
81
81
  constructor() {
82
82
  __publicField(this, "status", "ready");
83
83
  __publicField(this, "message", translate$1("ready"));
84
- __publicField(this, "uid", new Date().getTime().toString());
84
+ __publicField(this, "uid", (/* @__PURE__ */ new Date()).getTime().toString());
85
85
  __publicField(this, "name");
86
86
  __publicField(this, "url");
87
87
  __publicField(this, "type");
@@ -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" },
@@ -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
@@ -4,33 +4,57 @@ import { r as requestAniFrame } from "./raf-729dad54.js";
4
4
  import { u as useExpose } from "./index-79c5dc33.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
6
6
  const Utils = {
7
+ /**
8
+ * 是否为闫年
9
+ * @return {Boolse} true|false
10
+ */
7
11
  isLeapYear: function(y) {
8
12
  return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
9
13
  },
14
+ /**
15
+ * 返回星期数
16
+ * @return {String}
17
+ */
10
18
  getWhatDay: function(year, month, day) {
11
- const date = new Date(year + "/" + month + "/" + day);
19
+ const date = /* @__PURE__ */ new Date(year + "/" + month + "/" + day);
12
20
  const index = date.getDay();
13
21
  const dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
14
22
  return dayNames[index];
15
23
  },
24
+ /**
25
+ * 返回星期数
26
+ * @return {Number}
27
+ */
16
28
  getMonthPreDay: function(year, month) {
17
- const date = new Date(year + "/" + month + "/01");
29
+ const date = /* @__PURE__ */ new Date(year + "/" + month + "/01");
18
30
  let day = date.getDay();
19
31
  if (day == 0) {
20
32
  day = 7;
21
33
  }
22
34
  return day;
23
35
  },
36
+ /**
37
+ * 返回月份天数
38
+ * @return {Number}
39
+ */
24
40
  getMonthDays: function(year, month) {
25
41
  if (/^0/.test(month)) {
26
42
  month = month.split("")[1];
27
43
  }
28
44
  return [0, 31, this.isLeapYear(Number(year)) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
29
45
  },
46
+ /**
47
+ * 补齐数字位数
48
+ * @return {string}
49
+ */
30
50
  getNumTwoBit: function(n) {
31
51
  n = Number(n);
32
52
  return (n > 9 ? "" : "0") + n;
33
53
  },
54
+ /**
55
+ * 日期对象转成字符串
56
+ * @return {string}
57
+ */
34
58
  date2Str: function(date, split) {
35
59
  split = split || "-";
36
60
  const y = date.getFullYear();
@@ -38,13 +62,22 @@ const Utils = {
38
62
  const d = this.getNumTwoBit(date.getDate());
39
63
  return [y, m, d].join(split);
40
64
  },
65
+ /**
66
+ * 返回日期格式字符串
67
+ * @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
68
+ * @return {string} '2014-12-31'
69
+ */
41
70
  getDay: function(i) {
42
71
  i = i || 0;
43
- let date = new Date();
72
+ let date = /* @__PURE__ */ new Date();
44
73
  const diff = i * (1e3 * 60 * 60 * 24);
45
74
  date = new Date(date.getTime() + diff);
46
75
  return this.date2Str(date);
47
76
  },
77
+ /**
78
+ * 时间比较
79
+ * @return {Boolean}
80
+ */
48
81
  compareDate: function(date1, date2) {
49
82
  const startTime = new Date(date1.replace("-", "/").replace("-", "/"));
50
83
  const endTime = new Date(date2.replace("-", "/").replace("-", "/"));
@@ -53,6 +86,10 @@ const Utils = {
53
86
  }
54
87
  return true;
55
88
  },
89
+ /**
90
+ * 时间是否相等
91
+ * @return {Boolean}
92
+ */
56
93
  isEqual: function(date1, date2) {
57
94
  const startTime = new Date(date1).getTime();
58
95
  const endTime = new Date(date2).getTime();
@@ -669,7 +706,7 @@ const _sfc_main = create({
669
706
  };
670
707
  const isCurrDay = (dateInfo) => {
671
708
  const date = `${dateInfo.year}-${dateInfo.month}-${Number(dateInfo.day) < 10 ? "0" + dateInfo.day : dateInfo.day}`;
672
- return Utils.isEqual(date, Utils.date2Str(new Date()));
709
+ return Utils.isEqual(date, Utils.date2Str(/* @__PURE__ */ new Date()));
673
710
  };
674
711
  const mothsViewScroll = (e) => {
675
712
  if (state.monthsData.length <= 1) {
@@ -10,6 +10,7 @@ const _sfc_main = create({
10
10
  direction: {
11
11
  type: String,
12
12
  default: "vertical"
13
+ //horizontal
13
14
  },
14
15
  textPosition: {
15
16
  type: String,
@@ -16,6 +16,7 @@ const _sfc_main = create({
16
16
  shape: {
17
17
  type: String,
18
18
  default: "round"
19
+ // button
19
20
  },
20
21
  label: {
21
22
  type: [String, Number, Boolean],
@@ -1,22 +1,22 @@
1
1
  import { createApp } from "vue";
2
2
  import { j as isString, k as isFunction } from "./component-81a4c1d0.js";
3
3
  const CreateComponent = (options, component) => {
4
- let elWarp = document.body;
4
+ let elWrap = document.body;
5
5
  const teleport = options.teleport || "body";
6
6
  if (teleport != "body") {
7
7
  if (isString(teleport)) {
8
- elWarp = document.querySelector(teleport);
8
+ elWrap = document.querySelector(teleport);
9
9
  } else {
10
- elWarp = options.teleport;
10
+ elWrap = options.teleport;
11
11
  }
12
12
  }
13
13
  const root = document.createElement("view");
14
14
  const name = component.name ? component.name + "-" : "";
15
- const id1 = options.id || new Date().getTime();
15
+ const id1 = options.id || (/* @__PURE__ */ new Date()).getTime();
16
16
  root.id = name + id1;
17
17
  let Wrapper = {};
18
18
  if (isFunction(component.wrapper)) {
19
- Wrapper = component.wrapper(elWarp, root);
19
+ Wrapper = component.wrapper(elWrap, root);
20
20
  } else {
21
21
  Wrapper = component.wrapper;
22
22
  }
@@ -25,12 +25,12 @@ const CreateComponent = (options, component) => {
25
25
  componens && componens.forEach((comp) => {
26
26
  instance.use(comp);
27
27
  });
28
- elWarp.appendChild(root);
28
+ elWrap.appendChild(root);
29
29
  return {
30
30
  instance: instance.mount(root),
31
31
  unmount: () => {
32
32
  instance.unmount();
33
- elWarp.removeChild(root);
33
+ elWrap.removeChild(root);
34
34
  }
35
35
  };
36
36
  };
@@ -42,7 +42,7 @@
42
42
  &:active::before {
43
43
  opacity: 0.1;
44
44
  }
45
- &__warp {
45
+ &__wrap {
46
46
  height: 100%;
47
47
  width: 100%;
48
48
  display: flex;