@nutui/nutui 4.0.9-beta.2 → 4.0.10-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 (38) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +6 -28
  3. package/dist/nutui.es.js +1 -1
  4. package/dist/nutui.js +17123 -0
  5. package/dist/nutui.umd.js +1 -7
  6. package/dist/packages/_es/Collapse.js +15 -10
  7. package/dist/packages/_es/Dialog.js +11 -4
  8. package/dist/packages/_es/ImagePreview.js +14 -4
  9. package/dist/packages/_es/Menu.js +1 -2
  10. package/dist/packages/_es/MenuItem.js +24 -34
  11. package/dist/packages/_es/Picker.js +7 -11
  12. package/dist/packages/_es/Row.js +12 -12
  13. package/dist/packages/_es/Searchbar.js +9 -7
  14. package/dist/packages/_es/Tabs.js +8 -6
  15. package/dist/packages/col/index.scss +2 -2
  16. package/dist/packages/imagepreview/index.scss +0 -5
  17. package/dist/packages/menuitem/index.scss +7 -10
  18. package/dist/packages/searchbar/index.scss +4 -0
  19. package/dist/smartips/web-types.json +3 -3
  20. package/dist/style.css +1 -1
  21. package/dist/styles/themes/default.scss +48 -48
  22. package/dist/styles/themes/jdb.scss +48 -48
  23. package/dist/styles/themes/jddkh.scss +48 -48
  24. package/dist/styles/themes/jdt.scss +48 -48
  25. package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
  26. package/dist/types/__VUE/dialog/index.d.ts +1 -0
  27. package/dist/types/__VUE/dialog/index.vue.d.ts +1 -0
  28. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +9 -0
  29. package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
  30. package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
  31. package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
  32. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  33. package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
  34. package/dist/types/__VUE/row/index.vue.d.ts +1 -1
  35. package/dist/types/__VUE/searchbar/index.vue.d.ts +11 -2
  36. package/dist/types/__VUE/tabs/index.vue.d.ts +12 -0
  37. package/dist/types/index.d.ts +1 -1
  38. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { ref, computed, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
1
+ import { ref, computed, watch, provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
2
2
  import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
@@ -7,7 +7,7 @@ const _sfc_main = create({
7
7
  props: {
8
8
  modelValue: {
9
9
  type: [String, Number, Array],
10
- default: () => []
10
+ default: ""
11
11
  },
12
12
  accordion: {
13
13
  type: Boolean,
@@ -17,30 +17,35 @@ const _sfc_main = create({
17
17
  emits: ["update:modelValue", "change"],
18
18
  setup(props, { emit }) {
19
19
  const collapseDom = ref(null);
20
+ const innerValue = ref(props.modelValue || (props.accordion ? "" : []));
20
21
  const classes = computed(() => {
21
22
  const prefixCls = componentName;
22
23
  return {
23
24
  [prefixCls]: true
24
25
  };
25
26
  });
27
+ watch(() => props.modelValue, (val) => {
28
+ innerValue.value = val;
29
+ });
26
30
  const changeVal = (val, name, status = true) => {
31
+ innerValue.value = val;
27
32
  emit("update:modelValue", val);
28
33
  emit("change", val, name, status);
29
34
  };
30
35
  const updateVal = (name) => {
31
36
  if (props.accordion) {
32
- if (props.modelValue === name) {
37
+ if (innerValue.value === name) {
33
38
  changeVal("", name, false);
34
39
  } else {
35
40
  changeVal(name, name, true);
36
41
  }
37
42
  } else {
38
- if (Array.isArray(props.modelValue)) {
39
- if (props.modelValue.includes(name)) {
40
- const newValue = props.modelValue.filter((v) => v !== name);
43
+ if (Array.isArray(innerValue.value)) {
44
+ if (innerValue.value.includes(name)) {
45
+ const newValue = innerValue.value.filter((v) => v !== name);
41
46
  changeVal(newValue, name, false);
42
47
  } else {
43
- const newValue = props.modelValue.concat([name]);
48
+ const newValue = innerValue.value.concat([name]);
44
49
  changeVal(newValue, name, true);
45
50
  }
46
51
  } else {
@@ -50,9 +55,9 @@ const _sfc_main = create({
50
55
  };
51
56
  const isExpanded = (name) => {
52
57
  if (props.accordion) {
53
- return props.modelValue === name;
54
- } else if (Array.isArray(props.modelValue)) {
55
- return props.modelValue.includes(name);
58
+ return innerValue.value === name;
59
+ } else if (Array.isArray(innerValue.value)) {
60
+ return innerValue.value.includes(name);
56
61
  }
57
62
  return false;
58
63
  };
@@ -41,7 +41,7 @@ const _sfc_main = create({
41
41
  props: __spreadProps(__spreadValues({}, popupProps), {
42
42
  closeOnClickOverlay: {
43
43
  type: Boolean,
44
- default: false
44
+ default: true
45
45
  },
46
46
  title: {
47
47
  type: String,
@@ -147,6 +147,11 @@ const _sfc_main = create({
147
147
  emit("ok");
148
148
  closed("ok");
149
149
  };
150
+ const onClickOverlay = () => {
151
+ if (props.closeOnClickOverlay) {
152
+ closed("");
153
+ }
154
+ };
150
155
  const contentStyle = computed(() => {
151
156
  return {
152
157
  textAlign: props.textAlign
@@ -158,6 +163,7 @@ const _sfc_main = create({
158
163
  onCancel,
159
164
  onOk,
160
165
  showPopup,
166
+ onClickOverlay,
161
167
  contentStyle,
162
168
  translate
163
169
  };
@@ -175,14 +181,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
175
181
  teleport: _ctx.teleport,
176
182
  visible: _ctx.showPopup,
177
183
  "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event),
178
- "close-on-click-overlay": _ctx.closeOnClickOverlay,
184
+ "close-on-click-overlay": false,
179
185
  "lock-scroll": _ctx.lockScroll,
180
186
  "pop-class": _ctx.popClass,
181
187
  "overlay-class": _ctx.overlayClass,
182
188
  "overlay-style": _ctx.overlayStyle,
183
189
  style: normalizeStyle(_ctx.popStyle),
184
190
  round: "",
185
- onClickOverlay: _ctx.closed,
191
+ onClickOverlay: _ctx.onClickOverlay,
186
192
  onClickCloseIcon: _ctx.closed
187
193
  }, {
188
194
  default: withCtx(() => [
@@ -238,7 +244,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
238
244
  ], 2)
239
245
  ]),
240
246
  _: 3
241
- }, 8, ["teleport", "visible", "close-on-click-overlay", "lock-scroll", "pop-class", "overlay-class", "overlay-style", "style", "onClickOverlay", "onClickCloseIcon"]);
247
+ }, 8, ["teleport", "visible", "lock-scroll", "pop-class", "overlay-class", "overlay-style", "style", "onClickOverlay", "onClickCloseIcon"]);
242
248
  }
243
249
  const Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
244
250
  class DialogOptions {
@@ -270,6 +276,7 @@ class DialogOptions {
270
276
  __publicField(this, "noCancelBtn", false);
271
277
  __publicField(this, "okBtnDisabled", false);
272
278
  __publicField(this, "closeOnPopstate", false);
279
+ __publicField(this, "closeOnClickOverlay", true);
273
280
  __publicField(this, "lockScroll", true);
274
281
  }
275
282
  }
@@ -22,7 +22,7 @@ var __publicField = (obj, key, value) => {
22
22
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
23
23
  return value;
24
24
  };
25
- import { reactive, computed, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, createElementBlock, createCommentVNode, ref, onMounted, Fragment, renderList, toDisplayString, normalizeClass, renderSlot, createVNode, h } from "vue";
25
+ import { reactive, computed, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeStyle, createElementBlock, createCommentVNode, ref, onMounted, Fragment, renderList, toDisplayString, normalizeClass, renderSlot, createVNode, nextTick, h } from "vue";
26
26
  import { c as createComponent, e as clamp, d as preventDefault, i as isArray } from "./component-81a4c1d0.js";
27
27
  import { u as useRect } from "./index-29892cda.js";
28
28
  import { u as useTouch } from "./index-7a7385e4.js";
@@ -63,6 +63,10 @@ const _sfc_main$1 = create$1({
63
63
  rootHeight: {
64
64
  type: Number,
65
65
  default: 0
66
+ },
67
+ contentClose: {
68
+ type: Boolean,
69
+ default: true
66
70
  }
67
71
  }),
68
72
  emits: ["close", "scale"],
@@ -204,7 +208,9 @@ const _sfc_main$1 = create$1({
204
208
  toggleScale();
205
209
  } else {
206
210
  doubleTapTimer = setTimeout(() => {
207
- emit("close");
211
+ if (props.contentClose) {
212
+ emit("close");
213
+ }
208
214
  doubleTapTimer = null;
209
215
  }, TAP_TIME);
210
216
  }
@@ -445,9 +451,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
445
451
  show: _ctx.showPop,
446
452
  "init-no": _ctx.active + 1,
447
453
  onClose: _ctx.onClose,
454
+ "content-close": _ctx.contentClose,
448
455
  maxZoom: _ctx.maxZoom,
449
456
  minZoom: _ctx.minZoom
450
- }, null, 8, ["video", "image", "rootHeight", "rootWidth", "show", "init-no", "onClose", "maxZoom", "minZoom"]);
457
+ }, null, 8, ["video", "image", "rootHeight", "rootWidth", "show", "init-no", "onClose", "content-close", "maxZoom", "minZoom"]);
451
458
  }), 128))
452
459
  ]),
453
460
  _: 1
@@ -502,7 +509,10 @@ class ImagePreviewFunction {
502
509
  setup() {
503
510
  return () => {
504
511
  options.onClose = () => {
505
- unmount();
512
+ options.show = false;
513
+ nextTick(() => {
514
+ unmount();
515
+ });
506
516
  };
507
517
  return h(ImagePreview, options);
508
518
  };
@@ -25,9 +25,8 @@ const _sfc_main = create({
25
25
  },
26
26
  duration: {
27
27
  type: [Number, String],
28
- default: 0
28
+ default: 0.3
29
29
  },
30
- titleIcon: String,
31
30
  closeOnClickOverlay: {
32
31
  type: Boolean,
33
32
  default: true
@@ -17,14 +17,14 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { reactive, computed, inject, getCurrentInstance, onUnmounted, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, renderSlot, createCommentVNode, toDisplayString } from "vue";
20
+ import { reactive, computed, inject, getCurrentInstance, onUnmounted, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeStyle, createElementVNode, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
21
21
  import { c as createComponent } from "./component-81a4c1d0.js";
22
22
  import { P as Popup } from "./index-da0a7662.js";
23
23
  import { Check } from "@nutui/icons-vue";
24
24
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
25
25
  import "../locale/lang";
26
26
  import "./Overlay.js";
27
- const { componentName, create } = createComponent("menu-item");
27
+ const { create } = createComponent("menu-item");
28
28
  const _sfc_main = create({
29
29
  props: {
30
30
  title: String,
@@ -42,23 +42,17 @@ const _sfc_main = create({
42
42
  default: 1
43
43
  },
44
44
  activeTitleClass: String,
45
- inactiveTitleClass: String,
46
- optionIcon: {
47
- type: String,
48
- default: "Check"
49
- }
45
+ inactiveTitleClass: String
50
46
  },
51
47
  components: {
52
48
  [Popup.name]: Popup,
53
49
  Check
54
50
  },
55
51
  emits: ["update:modelValue", "change", "open", "close"],
56
- setup(props, { emit, slots }) {
52
+ setup(props, { emit }) {
57
53
  const state = reactive({
58
54
  showPopup: false,
59
- transition: true,
60
- showWrapper: false,
61
- isShowPlaceholderElement: false
55
+ showWrapper: false
62
56
  });
63
57
  const useParent = () => {
64
58
  const parent2 = inject("menuParent", null);
@@ -69,32 +63,30 @@ const _sfc_main = create({
69
63
  onUnmounted(() => {
70
64
  removeLink(instance);
71
65
  });
72
- return {
73
- parent: parent2
74
- };
66
+ return { parent: parent2 };
75
67
  }
76
68
  };
77
69
  const { parent } = useParent();
78
- const classes = computed(() => {
79
- const prefixCls = componentName;
80
- return {
81
- [prefixCls]: true
70
+ const style = computed(() => {
71
+ return parent.props.direction === "down" ? {
72
+ top: parent.offset.value + "px"
73
+ } : {
74
+ bottom: parent.offset.value + "px"
82
75
  };
83
76
  });
84
77
  const placeholderElementStyle = computed(() => {
85
78
  const heightStyle = { height: parent.offset.value + "px" };
86
79
  if (parent.props.direction === "down") {
87
- return heightStyle;
80
+ return __spreadProps(__spreadValues({}, heightStyle), { top: "0px" });
88
81
  } else {
89
- return __spreadProps(__spreadValues({}, heightStyle), { top: "auto" });
82
+ return __spreadProps(__spreadValues({}, heightStyle), { bottom: "0px" });
90
83
  }
91
84
  });
92
- const toggle = (show = !state.showPopup, options = {}) => {
85
+ const toggle = (show = !state.showPopup) => {
93
86
  if (show === state.showPopup) {
94
87
  return;
95
88
  }
96
89
  state.showPopup = show;
97
- state.isShowPlaceholderElement = show;
98
90
  if (show) {
99
91
  state.showWrapper = true;
100
92
  emit("open");
@@ -110,7 +102,6 @@ const _sfc_main = create({
110
102
  };
111
103
  const onClick = (option) => {
112
104
  state.showPopup = false;
113
- state.isShowPlaceholderElement = false;
114
105
  if (option.value !== props.modelValue) {
115
106
  emit("update:modelValue", option.value);
116
107
  emit("change", option.value);
@@ -119,14 +110,13 @@ const _sfc_main = create({
119
110
  const handleClose = () => {
120
111
  emit("close");
121
112
  state.showWrapper = false;
122
- state.isShowPlaceholderElement = false;
123
113
  };
124
114
  const handleClickOutside = () => {
125
115
  state.showPopup = false;
126
116
  emit("close");
127
117
  };
128
118
  return {
129
- classes,
119
+ style,
130
120
  placeholderElementStyle,
131
121
  renderTitle,
132
122
  state,
@@ -144,24 +134,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
144
134
  const _component_Check = resolveComponent("Check");
145
135
  const _component_nut_popup = resolveComponent("nut-popup");
146
136
  return withDirectives((openBlock(), createElementBlock("view", {
147
- class: normalizeClass(_ctx.classes)
137
+ class: "nut-menu-item",
138
+ style: normalizeStyle(_ctx.style)
148
139
  }, [
149
140
  withDirectives(createElementVNode("div", {
150
141
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClickOutside && _ctx.handleClickOutside(...args)),
151
- class: normalizeClass(["nut-menu-item-placeholder-element", { up: _ctx.parent.props.direction === "up" }]),
142
+ class: "nut-menu-item-placeholder-element",
152
143
  style: normalizeStyle(_ctx.placeholderElementStyle)
153
- }, null, 6), [
154
- [vShow, _ctx.state.isShowPlaceholderElement]
144
+ }, null, 4), [
145
+ [vShow, _ctx.state.showPopup]
155
146
  ]),
156
147
  createVNode(_component_nut_popup, mergeProps({
157
- style: _ctx.parent.props.direction === "down" ? { top: _ctx.parent.offset.value + "px" } : { bottom: _ctx.parent.offset.value + "px" },
158
- overlayStyle: _ctx.parent.props.direction === "down" ? { top: _ctx.parent.offset.value + "px" } : { bottom: _ctx.parent.offset.value + "px", top: "auto" }
148
+ style: { position: "absolute" },
149
+ overlayStyle: { position: "absolute" }
159
150
  }, _ctx.$attrs, {
160
151
  visible: _ctx.state.showPopup,
161
152
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.state.showPopup = $event),
162
153
  position: _ctx.parent.props.direction === "down" ? "top" : "bottom",
163
154
  duration: _ctx.parent.props.duration,
164
- "pop-class": "nut-menu__pop",
165
155
  "destroy-on-close": false,
166
156
  overlay: _ctx.parent.props.overlay,
167
157
  onClosed: _ctx.handleClose,
@@ -198,8 +188,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
198
188
  ])
199
189
  ]),
200
190
  _: 3
201
- }, 16, ["style", "overlayStyle", "visible", "position", "duration", "overlay", "onClosed", "lockScroll", "close-on-click-overlay"])
202
- ], 2)), [
191
+ }, 16, ["visible", "position", "duration", "overlay", "onClosed", "lockScroll", "close-on-click-overlay"])
192
+ ], 4)), [
203
193
  [vShow, _ctx.state.showWrapper]
204
194
  ]);
205
195
  }
@@ -28,7 +28,7 @@ const usePicker = (props, emit) => {
28
28
  const state = reactive({
29
29
  formattedColumns: props.columns
30
30
  });
31
- let defaultValues = ref([]);
31
+ const defaultValues = ref([]);
32
32
  const pickerColumn = ref([]);
33
33
  const swipeRef = (el) => {
34
34
  if (el && pickerColumn.value.length < columnsList.value.length) {
@@ -42,13 +42,9 @@ const usePicker = (props, emit) => {
42
42
  };
43
43
  });
44
44
  const selectedOptions = computed(() => {
45
- let optins = [];
46
- columnsList.value.map((column2, index) => {
47
- let currOptions = [];
48
- currOptions = column2.filter((item) => item.value == defaultValues.value[index]);
49
- optins.push(currOptions[0]);
45
+ return columnsList.value.map((column2, index) => {
46
+ return column2.find((item) => item.value === defaultValues.value[index]);
50
47
  });
51
- return optins;
52
48
  });
53
49
  const columnsType = computed(() => {
54
50
  const firstColumn = state.formattedColumns[0];
@@ -83,8 +79,8 @@ const usePicker = (props, emit) => {
83
79
  while (cursor && cursor.children) {
84
80
  const options = cursor.children;
85
81
  const value = defaultValues2[columnIndex];
86
- let index = options.findIndex((columnItem) => columnItem.value == value);
87
- if (index == -1)
82
+ let index = options.findIndex((columnItem) => columnItem.value === value);
83
+ if (index === -1)
88
84
  index = 0;
89
85
  cursor = cursor.children[index];
90
86
  columnIndex++;
@@ -110,7 +106,7 @@ const usePicker = (props, emit) => {
110
106
  index++;
111
107
  cursor = cursor.children[0];
112
108
  }
113
- if (cursor && cursor.children && cursor.children.length == 0) {
109
+ if (cursor && cursor.children && cursor.children.length === 0) {
114
110
  defaultValues.value = defaultValues.value.slice(0, index + 1);
115
111
  }
116
112
  } else {
@@ -350,7 +346,7 @@ const _sfc_main$1 = create$1({
350
346
  };
351
347
  const modifyStatus = (type) => {
352
348
  const { column: column2 } = props;
353
- let index = column2.findIndex((columnItem) => columnItem.value == props.value);
349
+ let index = column2.findIndex((columnItem) => columnItem.value === props.value);
354
350
  state.currIndex = index === -1 ? 1 : index + 1;
355
351
  let move = index === -1 ? 0 : index * +props.optionHeight;
356
352
  type && setChooseValue();
@@ -1,4 +1,4 @@
1
- import { provide, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
1
+ import { provide, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
2
2
  import { c as createComponent } from "./component-81a4c1d0.js";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
@@ -33,23 +33,23 @@ const _sfc_main = create({
33
33
  const getClass = (prefix, type) => {
34
34
  return prefix ? type ? `nut-row-${prefix}-${type}` : "" : `nut-row-${type}`;
35
35
  };
36
- const getClasses = () => {
37
- return `
38
- ${getClass("", props.type)}
39
- ${getClass("justify", props.justify)}
40
- ${getClass("align", props.align)}
41
- ${getClass("flex", props.flexWrap)}
42
- ${prefixCls}
43
- `;
44
- };
36
+ const classes = computed(() => {
37
+ return [
38
+ prefixCls,
39
+ getClass("", props.type),
40
+ getClass("justify", props.justify),
41
+ getClass("align", props.align),
42
+ getClass("flex", props.flexWrap)
43
+ ];
44
+ });
45
45
  return {
46
- getClasses
46
+ classes
47
47
  };
48
48
  }
49
49
  });
50
50
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
51
51
  return openBlock(), createElementBlock("view", {
52
- class: normalizeClass(_ctx.getClasses())
52
+ class: normalizeClass(_ctx.classes)
53
53
  }, [
54
54
  renderSlot(_ctx.$slots, "default")
55
55
  ], 2);
@@ -32,12 +32,16 @@ const _sfc_main = create({
32
32
  },
33
33
  inputType: {
34
34
  type: String,
35
- default: "textarea"
35
+ default: "text"
36
36
  },
37
37
  label: {
38
38
  type: String,
39
39
  default: ""
40
40
  },
41
+ shape: {
42
+ type: String,
43
+ default: "round"
44
+ },
41
45
  maxLength: {
42
46
  type: [String, Number],
43
47
  default: "9999"
@@ -64,9 +68,7 @@ const _sfc_main = create({
64
68
  },
65
69
  focusStyle: {
66
70
  type: Object,
67
- // eslint-disable-next-line @typescript-eslint/no-empty-function
68
- default: () => {
69
- }
71
+ default: () => ({})
70
72
  },
71
73
  autofocus: {
72
74
  type: Boolean,
@@ -96,7 +98,7 @@ const _sfc_main = create({
96
98
  "click-left-icon",
97
99
  "click-right-icon"
98
100
  ],
99
- setup(props, { slots, emit }) {
101
+ setup(props, { emit }) {
100
102
  const state = reactive({
101
103
  active: false
102
104
  });
@@ -215,7 +217,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
215
217
  renderSlot(_ctx.$slots, "leftout")
216
218
  ])) : createCommentVNode("", true),
217
219
  createElementVNode("view", {
218
- class: "nut-searchbar__search-input",
220
+ class: normalizeClass([`nut-searchbar__search-input`, _ctx.shape]),
219
221
  style: normalizeStyle(__spreadValues(__spreadValues({}, _ctx.inputSearchbarStyle), _ctx.focusCss))
220
222
  }, [
221
223
  _ctx.$slots.leftin ? (openBlock(), createElementBlock("view", {
@@ -266,7 +268,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
266
268
  renderSlot(_ctx.$slots, "rightin")
267
269
  ])) : createCommentVNode("", true)
268
270
  ], 2)
269
- ], 4),
271
+ ], 6),
270
272
  _ctx.$slots.rightout ? (openBlock(), createElementBlock("view", _hoisted_5, [
271
273
  renderSlot(_ctx.$slots, "rightout")
272
274
  ])) : createCommentVNode("", true)
@@ -404,10 +404,13 @@ const _sfc_main = create({
404
404
  };
405
405
  });
406
406
  const titleStyle = computed(() => {
407
- return {
408
- marginLeft: pxCheck(props.titleGutter),
409
- marginRight: pxCheck(props.titleGutter)
410
- };
407
+ if (!props.titleGutter)
408
+ return {};
409
+ const px = pxCheck(props.titleGutter);
410
+ if (props.direction === "vertical") {
411
+ return { marginTop: px, marginBottom: px };
412
+ }
413
+ return { marginLeft: px, marginRight: px };
411
414
  });
412
415
  return __spreadValues(__spreadValues({
413
416
  navRef,
@@ -430,8 +433,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
430
433
  const _component_nut_sticky = resolveComponent("nut-sticky");
431
434
  return openBlock(), createElementBlock("view", {
432
435
  class: normalizeClass(["nut-tabs", [_ctx.direction]]),
433
- ref: "container",
434
- id: "container"
436
+ ref: "container"
435
437
  }, [
436
438
  _ctx.sticky ? (openBlock(), createBlock(_component_nut_sticky, {
437
439
  key: 0,
@@ -15,10 +15,10 @@
15
15
 
16
16
  @for $i from 1 through 24 {
17
17
  .nut-col-offset-#{$i} {
18
- margin-left: calc(100 / 24) * $i * 1%;
18
+ margin-left: calc((100 / 24) * #{$i} * 1%);
19
19
  }
20
20
 
21
21
  .nut-col-#{$i} {
22
- width: calc(100 / 24) * $i * 1%;
22
+ width: calc((100 / 24) * #{$i} * 1%);
23
23
  }
24
24
  }
@@ -18,11 +18,6 @@
18
18
  object-fit: contain;
19
19
  }
20
20
 
21
- &-taro-img {
22
- width: 100%;
23
- height: 100%;
24
- }
25
-
26
21
  &-index {
27
22
  position: fixed;
28
23
  z-index: 2002;
@@ -9,6 +9,13 @@
9
9
  }
10
10
 
11
11
  .nut-menu-item {
12
+ position: fixed;
13
+ z-index: $menu-bar-opened-z-index;
14
+ left: 0;
15
+ right: 0;
16
+ height: 100vh;
17
+ overflow: hidden;
18
+
12
19
  .active {
13
20
  font-weight: $menu-active-item-font-weight;
14
21
  color: $menu-item-active-text-color !important;
@@ -40,20 +47,10 @@
40
47
  }
41
48
  }
42
49
 
43
- .nut-menu__pop {
44
- transition: height linear 3s;
45
- transform: none;
46
- }
47
-
48
50
  .nut-menu-item-placeholder-element {
49
51
  position: fixed;
50
- top: $menu-bar-line-height;
51
52
  left: 0;
52
53
  right: 0;
53
54
  z-index: $menu-bar-opened-z-index;
54
55
  background-color: transparent;
55
-
56
- &.up {
57
- bottom: $menu-bar-line-height;
58
- }
59
56
  }
@@ -48,6 +48,10 @@
48
48
  background: $searchbar-input-background;
49
49
  box-sizing: border-box;
50
50
 
51
+ &.square {
52
+ border-radius: 0;
53
+ }
54
+
51
55
  .nut-searchbar__input-inner {
52
56
  display: flex;
53
57
  position: relative;
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "NutUI",
5
- "version": "4.0.9-beta.2",
5
+ "version": "4.0.10-beta.1",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -2794,7 +2794,7 @@
2794
2794
  },
2795
2795
  {
2796
2796
  "name": "content-close",
2797
- "default": "`false`",
2797
+ "default": "`true`",
2798
2798
  "description": "点击图片可以退出预览",
2799
2799
  "value": {
2800
2800
  "type": "boolean",
@@ -4924,7 +4924,7 @@
4924
4924
  },
4925
4925
  {
4926
4926
  "name": "shape",
4927
- "default": "`square`",
4927
+ "default": "`round`",
4928
4928
  "description": "搜索框形状,可选值为 `square` `round`",
4929
4929
  "value": {
4930
4930
  "type": "string",