@varlet/ui 3.2.11 → 3.2.12

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.
@@ -1,4 +1,5 @@
1
1
  import '../../styles/common.css'
2
2
  import '../../icon/icon.css'
3
+ import '../../ripple/ripple.css'
3
4
  import '../cell.css'
4
5
  import '../CellSfc.css'
@@ -94,7 +94,7 @@ function __render__(_ctx, _cache) {
94
94
  onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleTextClick && _ctx.handleTextClick(...args))
95
95
  },
96
96
  [
97
- _renderSlot(_ctx.$slots, "default")
97
+ _renderSlot(_ctx.$slots, "default", { checked: _ctx.checked })
98
98
  ],
99
99
  2
100
100
  /* CLASS */
@@ -28,10 +28,11 @@ function __render__(_ctx, _cache) {
28
28
  { key: 0 },
29
29
  _renderList(_ctx.checkboxGroupOptions, (option) => {
30
30
  return _openBlock(), _createBlock(_component_checkbox_group_option, {
31
- key: option.value.toString(),
32
- checked: _ctx.modelValue.includes(option.value),
31
+ key: option[_ctx.valueKey],
32
+ "label-key": _ctx.labelKey,
33
+ "value-key": _ctx.valueKey,
33
34
  option
34
- }, null, 8, ["checked", "option"]);
35
+ }, null, 8, ["label-key", "value-key", "option"]);
35
36
  }),
36
37
  128
37
38
  /* KEYED_FRAGMENT */
@@ -1,24 +1,41 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  import { defineComponent } from "vue";
3
- import Checkbox from "../checkbox/index.mjs";
4
3
  import { isFunction } from "@varlet/shared";
5
-
4
+ import { createNamespace } from "../utils/components.mjs";
5
+ import Checkbox from "../checkbox/index.mjs";
6
+ const {
7
+ name
8
+ } = createNamespace("checkbox-group-option");
6
9
  var stdin_default = defineComponent({
7
- name: "CheckboxGroupOption",
10
+ name,
8
11
  props: {
9
- checked: Boolean,
10
- option: Object
12
+ labelKey: {
13
+ type: String,
14
+ required: true
15
+ },
16
+ valueKey: {
17
+ type: String,
18
+ required: true
19
+ },
20
+ option: {
21
+ type: Object,
22
+ required: true
23
+ }
11
24
  },
12
25
  setup(props) {
13
26
  return () => {
14
- if (props.option == null) {
15
- return;
16
- }
27
+ const {
28
+ option,
29
+ labelKey,
30
+ valueKey
31
+ } = props;
17
32
  return _createVNode(Checkbox, {
18
- "checkedValue": props.option.value,
19
- "disabled": props.option.disabled
33
+ "checkedValue": option[valueKey],
34
+ "disabled": option.disabled
20
35
  }, {
21
- default: () => [isFunction(props.option.label) ? props.option.label(props.option, props.checked) : props.option.label]
36
+ default: ({
37
+ checked
38
+ }) => isFunction(option[labelKey]) ? option[labelKey](option, checked) : option[labelKey]
22
39
  });
23
40
  };
24
41
  }
@@ -6,6 +6,14 @@ const props = {
6
6
  },
7
7
  max: [String, Number],
8
8
  options: Array,
9
+ labelKey: {
10
+ type: String,
11
+ default: "label"
12
+ },
13
+ valueKey: {
14
+ type: String,
15
+ default: "value"
16
+ },
9
17
  direction: {
10
18
  type: String,
11
19
  default: "horizontal"
@@ -1,5 +1,5 @@
1
- import '../../checkbox/checkbox.css'
2
1
  import '../../styles/common.css'
3
2
  import '../../form-details/formDetails.css'
3
+ import '../../checkbox/checkbox.css'
4
4
  import '../checkboxGroup.css'
5
5
  import '../CheckboxGroupSfc.css'
@@ -8,7 +8,7 @@ import { toNumber, isEmpty, preventDefault, call } from "@varlet/shared";
8
8
  const { name, n, classes } = createNamespace("floating-panel");
9
9
  const DEFAULT_START_ANCHOR = 100;
10
10
  const OVERFLOW_REDUCE_RATIO = 0.2;
11
- import { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from "vue";
11
+ import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock } from "vue";
12
12
  function __render__(_ctx, _cache) {
13
13
  return _openBlock(), _createBlock(_Teleport, {
14
14
  to: _ctx.teleport === false ? void 0 : _ctx.teleport,
@@ -31,25 +31,27 @@ function __render__(_ctx, _cache) {
31
31
  onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.handleTouchend && _ctx.handleTouchend(...args))
32
32
  },
33
33
  [
34
- _createElementVNode(
35
- "div",
36
- {
37
- class: _normalizeClass(_ctx.n("header"))
38
- },
39
- [
40
- _createElementVNode(
41
- "div",
42
- {
43
- class: _normalizeClass(_ctx.n("header-toolbar"))
44
- },
45
- null,
46
- 2
47
- /* CLASS */
48
- )
49
- ],
50
- 2
51
- /* CLASS */
52
- ),
34
+ _renderSlot(_ctx.$slots, "header", {}, () => [
35
+ _createElementVNode(
36
+ "div",
37
+ {
38
+ class: _normalizeClass(_ctx.n("header"))
39
+ },
40
+ [
41
+ _createElementVNode(
42
+ "div",
43
+ {
44
+ class: _normalizeClass(_ctx.n("header-toolbar"))
45
+ },
46
+ null,
47
+ 2
48
+ /* CLASS */
49
+ )
50
+ ],
51
+ 2
52
+ /* CLASS */
53
+ )
54
+ ]),
53
55
  _createElementVNode(
54
56
  "div",
55
57
  {
@@ -262,7 +262,7 @@ import './tooltip/style/index.mjs'
262
262
  import './uploader/style/index.mjs'
263
263
  import './watermark/style/index.mjs'
264
264
 
265
- const version = '3.2.11'
265
+ const version = '3.2.12'
266
266
 
267
267
  function install(app) {
268
268
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -174,7 +174,7 @@ export * from './tooltip/index.mjs'
174
174
  export * from './uploader/index.mjs'
175
175
  export * from './watermark/index.mjs'
176
176
 
177
- const version = '3.2.11'
177
+ const version = '3.2.12'
178
178
 
179
179
  function install(app) {
180
180
  ActionSheet.install && app.use(ActionSheet)
@@ -1,4 +1,5 @@
1
1
  import '../../styles/common.css'
2
2
  import '../../styles/elevation.css'
3
+ import '../../ripple/ripple.css'
3
4
  import '../paper.css'
4
5
  import '../PaperSfc.css'
@@ -1,7 +1,7 @@
1
1
  import '../../styles/common.css'
2
- import '../SnackbarSfc.css'
3
2
  import '../../styles/elevation.css'
4
3
  import '../../loading/loading.css'
5
4
  import '../../icon/icon.css'
6
5
  import '../snackbar.css'
7
6
  import '../coreSfc.css'
7
+ import '../SnackbarSfc.css'
@@ -1,11 +1,12 @@
1
1
  import '../../styles/common.css'
2
2
  import '../../styles/elevation.css'
3
+ import '../../hover-overlay/hoverOverlay.css'
4
+ import '../../ripple/ripple.css'
3
5
  import '../../form-details/formDetails.css'
4
6
  import '../../icon/icon.css'
5
7
  import '../../popup/popup.css'
6
8
  import '../../swipe/swipe.css'
7
9
  import '../../swipe-item/swipeItem.css'
8
10
  import '../../image-preview/imagePreview.css'
9
- import '../../hover-overlay/hoverOverlay.css'
10
11
  import '../uploader.css'
11
12
  import '../UploaderSfc.css'