@varlet/ui 3.3.2 → 3.3.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.3.2",
4
+ "version": "3.3.3",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -2578,6 +2578,10 @@
2578
2578
  {
2579
2579
  "name": "title",
2580
2580
  "description": "Dialog title"
2581
+ },
2582
+ {
2583
+ "name": "actions",
2584
+ "description": "Dialog actions"
2581
2585
  }
2582
2586
  ]
2583
2587
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.3.2",
4
+ "version": "3.3.3",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -2737,6 +2737,10 @@
2737
2737
  {
2738
2738
  "name": "title",
2739
2739
  "description": "对话框标题"
2740
+ },
2741
+ {
2742
+ "name": "actions",
2743
+ "description": "对话框底部操作区域"
2740
2744
  }
2741
2745
  ]
2742
2746
  },
@@ -3289,7 +3293,7 @@
3289
3293
  },
3290
3294
  {
3291
3295
  "name": "scroll-to-error",
3292
- "description": "是否在效验不通过时滚动到不通过的表单项,可选值为 `start` `end`",
3296
+ "description": "是否在校验不通过时滚动到不通过的表单项,可选值为 `start` `end`",
3293
3297
  "default": "-",
3294
3298
  "value": {
3295
3299
  "type": "string",
package/lib/varlet.cjs.js CHANGED
@@ -11714,60 +11714,66 @@ function __render__$R(_ctx, _cache) {
11714
11714
  6
11715
11715
  /* CLASS, STYLE */
11716
11716
  ),
11717
- vue.createElementVNode(
11718
- "div",
11719
- {
11720
- class: vue.normalizeClass(_ctx.n("actions"))
11721
- },
11722
- [
11723
- _ctx.cancelButton ? (vue.openBlock(), vue.createBlock(_component_var_button, {
11724
- key: 0,
11725
- class: vue.normalizeClass(_ctx.classes(_ctx.n("button"), _ctx.n("cancel-button"))),
11726
- "var-dialog-cover": "",
11727
- text: "",
11728
- "text-color": _ctx.cancelButtonTextColor,
11729
- color: _ctx.cancelButtonColor,
11730
- onClick: _ctx.cancel
11731
- }, {
11732
- default: vue.withCtx(() => {
11733
- var _a;
11734
- return [
11735
- vue.createTextVNode(
11736
- vue.toDisplayString((_a = _ctx.cancelButtonText) != null ? _a : (_ctx.pt ? _ctx.pt : _ctx.t)("dialogCancelButtonText")),
11737
- 1
11738
- /* TEXT */
11739
- )
11740
- ];
11741
- }),
11742
- _: 1
11743
- /* STABLE */
11744
- }, 8, ["class", "text-color", "color", "onClick"])) : vue.createCommentVNode("v-if", true),
11745
- _ctx.confirmButton ? (vue.openBlock(), vue.createBlock(_component_var_button, {
11746
- key: 1,
11747
- class: vue.normalizeClass(_ctx.classes(_ctx.n("button"), _ctx.n("confirm-button"))),
11748
- "var-dialog-cover": "",
11749
- text: "",
11750
- "text-color": _ctx.confirmButtonTextColor,
11751
- color: _ctx.confirmButtonColor,
11752
- onClick: _ctx.confirm
11753
- }, {
11754
- default: vue.withCtx(() => {
11755
- var _a;
11756
- return [
11757
- vue.createTextVNode(
11758
- vue.toDisplayString((_a = _ctx.confirmButtonText) != null ? _a : (_ctx.pt ? _ctx.pt : _ctx.t)("dialogConfirmButtonText")),
11759
- 1
11760
- /* TEXT */
11761
- )
11762
- ];
11763
- }),
11764
- _: 1
11765
- /* STABLE */
11766
- }, 8, ["class", "text-color", "color", "onClick"])) : vue.createCommentVNode("v-if", true)
11767
- ],
11768
- 2
11769
- /* CLASS */
11770
- )
11717
+ vue.renderSlot(_ctx.$slots, "actions", {
11718
+ slotClass: _ctx.n("actions"),
11719
+ cancel: _ctx.cancel,
11720
+ confirm: _ctx.confirm
11721
+ }, () => [
11722
+ vue.createElementVNode(
11723
+ "div",
11724
+ {
11725
+ class: vue.normalizeClass(_ctx.n("actions"))
11726
+ },
11727
+ [
11728
+ _ctx.cancelButton ? (vue.openBlock(), vue.createBlock(_component_var_button, {
11729
+ key: 0,
11730
+ class: vue.normalizeClass(_ctx.classes(_ctx.n("button"), _ctx.n("cancel-button"))),
11731
+ "var-dialog-cover": "",
11732
+ text: "",
11733
+ "text-color": _ctx.cancelButtonTextColor,
11734
+ color: _ctx.cancelButtonColor,
11735
+ onClick: _ctx.cancel
11736
+ }, {
11737
+ default: vue.withCtx(() => {
11738
+ var _a;
11739
+ return [
11740
+ vue.createTextVNode(
11741
+ vue.toDisplayString((_a = _ctx.cancelButtonText) != null ? _a : (_ctx.pt ? _ctx.pt : _ctx.t)("dialogCancelButtonText")),
11742
+ 1
11743
+ /* TEXT */
11744
+ )
11745
+ ];
11746
+ }),
11747
+ _: 1
11748
+ /* STABLE */
11749
+ }, 8, ["class", "text-color", "color", "onClick"])) : vue.createCommentVNode("v-if", true),
11750
+ _ctx.confirmButton ? (vue.openBlock(), vue.createBlock(_component_var_button, {
11751
+ key: 1,
11752
+ class: vue.normalizeClass(_ctx.classes(_ctx.n("button"), _ctx.n("confirm-button"))),
11753
+ "var-dialog-cover": "",
11754
+ text: "",
11755
+ "text-color": _ctx.confirmButtonTextColor,
11756
+ color: _ctx.confirmButtonColor,
11757
+ onClick: _ctx.confirm
11758
+ }, {
11759
+ default: vue.withCtx(() => {
11760
+ var _a;
11761
+ return [
11762
+ vue.createTextVNode(
11763
+ vue.toDisplayString((_a = _ctx.confirmButtonText) != null ? _a : (_ctx.pt ? _ctx.pt : _ctx.t)("dialogConfirmButtonText")),
11764
+ 1
11765
+ /* TEXT */
11766
+ )
11767
+ ];
11768
+ }),
11769
+ _: 1
11770
+ /* STABLE */
11771
+ }, 8, ["class", "text-color", "color", "onClick"])) : vue.createCommentVNode("v-if", true)
11772
+ ],
11773
+ 2
11774
+ /* CLASS */
11775
+ )
11776
+ ])
11771
11777
  ],
11772
11778
  16
11773
11779
  /* FULL_PROPS */
@@ -28863,7 +28869,7 @@ withInstall(stdin_default$1);
28863
28869
  withPropsDefaultsSetter(stdin_default$1, props);
28864
28870
  const _WatermarkComponent = stdin_default$1;
28865
28871
  var stdin_default = stdin_default$1;
28866
- const version = "3.3.2";
28872
+ const version = "3.3.3";
28867
28873
  function install(app) {
28868
28874
  stdin_default$5G.install && app.use(stdin_default$5G);
28869
28875
  stdin_default$5E.install && app.use(stdin_default$5E);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -48,9 +48,9 @@
48
48
  "@popperjs/core": "^2.11.6",
49
49
  "dayjs": "^1.10.4",
50
50
  "decimal.js": "^10.2.1",
51
- "@varlet/icons": "3.3.2",
52
- "@varlet/shared": "3.3.2",
53
- "@varlet/use": "3.3.2"
51
+ "@varlet/icons": "3.3.3",
52
+ "@varlet/shared": "3.3.3",
53
+ "@varlet/use": "3.3.3"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.4.21",
@@ -64,9 +64,9 @@
64
64
  "typescript": "^5.1.5",
65
65
  "vue": "3.4.21",
66
66
  "vue-router": "4.2.0",
67
- "@varlet/cli": "3.3.2",
68
- "@varlet/ui": "3.3.2",
69
- "@varlet/touch-emulator": "3.3.2"
67
+ "@varlet/cli": "3.3.3",
68
+ "@varlet/ui": "3.3.3",
69
+ "@varlet/touch-emulator": "3.3.3"
70
70
  },
71
71
  "scripts": {
72
72
  "dev": "varlet-cli dev",
package/types/dialog.d.ts CHANGED
@@ -40,12 +40,19 @@ export interface DialogProps extends BasicAttributes {
40
40
  'onUpdate:show'?: ListenerProp<(show: boolean) => void>
41
41
  }
42
42
 
43
+ export interface DialogActionsData {
44
+ slotClass: string
45
+ cancel: () => void
46
+ confirm: () => void
47
+ }
48
+
43
49
  export class DialogComponent extends VarComponent {
44
50
  $props: DialogProps
45
51
 
46
52
  $slots: {
47
53
  default(): VNode[]
48
54
  title(): VNode[]
55
+ actions(data: DialogActionsData): VNode[]
49
56
  }
50
57
  }
51
58