@opentiny/vue-drawer 3.18.0 → 3.19.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.
package/lib/index.js CHANGED
@@ -30,7 +30,8 @@ var $constants = {
30
30
  };
31
31
  return scrollLockClasses[mode] || "";
32
32
  },
33
- DEFAULT_WIDTH: "500px"
33
+ DEFAULT_WIDTH: "500px",
34
+ DEFAULT_HEIGHT: "100vh"
34
35
  };
35
36
  var drawerProps = _extends({}, $props, {
36
37
  _constants: {
@@ -51,6 +52,9 @@ var drawerProps = _extends({}, $props, {
51
52
  width: {
52
53
  type: String
53
54
  },
55
+ height: {
56
+ type: String
57
+ },
54
58
  title: String,
55
59
  showClose: {
56
60
  type: Boolean,
@@ -105,6 +109,7 @@ var defaultConfigs = {
105
109
  customClass: null,
106
110
  placement: "right",
107
111
  width: null,
112
+ height: null,
108
113
  title: "",
109
114
  showClose: true,
110
115
  showHeader: true,
@@ -159,7 +164,7 @@ var service = function service2(configs) {
159
164
  });
160
165
  return instance;
161
166
  };
162
- var version = "3.18.0";
167
+ var version = "3.undefined";
163
168
  Drawer.model = {
164
169
  prop: "visible",
165
170
  event: "update:visible"
package/lib/pc.js CHANGED
@@ -61,7 +61,7 @@ var _sfc_main = defineComponent({
61
61
  }
62
62
  }
63
63
  },
64
- props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "mask", "dragable", "maskClosable", "lockScroll", "flex", "showClose", "zIndex", "beforeClose", "tipsProps", "customSlots"]),
64
+ props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "height", "mask", "dragable", "maskClosable", "lockScroll", "flex", "showClose", "zIndex", "beforeClose", "tipsProps", "customSlots"]),
65
65
  emits: ["update:visible", "open", "close", "confirm", "drag"],
66
66
  setup: function setup$1(props2, context) {
67
67
  return setup({
@@ -155,7 +155,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
155
155
  }, "tiny-drawer-main", _ctx.customClass]),
156
156
  style: normalizeStyle({
157
157
  width: ["left", "right"].includes(_ctx.placement) ? _ctx.state.computedWidth : null,
158
- height: ["top", "bottom"].includes(_ctx.placement) && _ctx.dragable && _ctx.state.height ? _ctx.state.height + "px" : null,
158
+ height: ["top", "bottom", "left", "right"].includes(_ctx.placement) || _ctx.dragable ? _ctx.state.computedHeight : null,
159
159
  zIndex: _ctx.zIndex
160
160
  })
161
161
  },
@@ -251,42 +251,38 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
251
251
  key: 1
252
252
  },
253
253
  [createVNode(_component_tiny_button, {
254
- type: "primary",
255
- class: normalizeClass(["tiny-drawer__confirm-btn", {
256
- reverse: _ctx.state.btnOrderReversed
257
- }]),
254
+ plain: "",
255
+ class: "tiny-drawer__cancel-btn",
258
256
  onClick: _cache[2] || (_cache[2] = function($event) {
259
- return _ctx.handleClose("confirm");
257
+ return _ctx.handleClose("cancel");
260
258
  })
261
259
  }, {
262
260
  default: withCtx(function() {
263
261
  return [createTextVNode(
264
- toDisplayString(_ctx.t("ui.button.confirm")),
262
+ toDisplayString(_ctx.t("ui.button.cancel")),
265
263
  1
266
264
  /* TEXT */
267
265
  )];
268
266
  }),
269
267
  _: 1
270
268
  /* STABLE */
271
- }, 8, ["class"]), createVNode(_component_tiny_button, {
272
- plain: "",
273
- class: normalizeClass(["tiny-drawer__cancel-btn", {
274
- reverse: _ctx.state.btnOrderReversed
275
- }]),
269
+ }), createVNode(_component_tiny_button, {
270
+ type: "primary",
271
+ class: "tiny-drawer__confirm-btn",
276
272
  onClick: _cache[3] || (_cache[3] = function($event) {
277
- return _ctx.handleClose("cancel");
273
+ return _ctx.handleClose("confirm");
278
274
  })
279
275
  }, {
280
276
  default: withCtx(function() {
281
277
  return [createTextVNode(
282
- toDisplayString(_ctx.t("ui.button.cancel")),
278
+ toDisplayString(_ctx.t("ui.button.confirm")),
283
279
  1
284
280
  /* TEXT */
285
281
  )];
286
282
  }),
287
283
  _: 1
288
284
  /* STABLE */
289
- }, 8, ["class"])],
285
+ })],
290
286
  64
291
287
  /* STABLE_FRAGMENT */
292
288
  ))];
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@opentiny/vue-drawer",
3
- "version": "3.18.0",
3
+ "version": "3.19.1",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentiny/vue-button": "~3.18.0",
11
- "@opentiny/vue-tooltip": "~3.18.0",
12
- "@opentiny/vue-common": "~3.18.0",
13
- "@opentiny/vue-renderless": "~3.18.0",
14
- "@opentiny/vue-icon": "~3.18.0",
15
- "@opentiny/vue-theme": "~3.18.0"
10
+ "@opentiny/vue-button": "~3.19.0",
11
+ "@opentiny/vue-tooltip": "~3.19.0",
12
+ "@opentiny/vue-common": "~3.19.0",
13
+ "@opentiny/vue-renderless": "~3.19.0",
14
+ "@opentiny/vue-icon": "~3.19.0",
15
+ "@opentiny/vue-theme": "~3.19.0"
16
16
  },
17
17
  "license": "MIT",
18
18
  "types": "index.d.ts"
package/src/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export declare const $constants: {
2
2
  SCROLL_LOCK_CLASS(mode: string): string;
3
3
  DEFAULT_WIDTH: string;
4
+ DEFAULT_HEIGHT: string;
4
5
  };
5
6
  export declare const drawerProps: {
6
7
  _constants: {
@@ -8,13 +9,14 @@ export declare const drawerProps: {
8
9
  default: () => {
9
10
  SCROLL_LOCK_CLASS(mode: string): string;
10
11
  DEFAULT_WIDTH: string;
12
+ DEFAULT_HEIGHT: string;
11
13
  };
12
14
  };
13
15
  visible: {
14
16
  type: BooleanConstructor;
15
17
  default: boolean;
16
18
  };
17
- customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
19
+ customClass: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
18
20
  placement: {
19
21
  type: StringConstructor;
20
22
  default: string;
@@ -22,6 +24,9 @@ export declare const drawerProps: {
22
24
  width: {
23
25
  type: StringConstructor;
24
26
  };
27
+ height: {
28
+ type: StringConstructor;
29
+ };
25
30
  title: StringConstructor;
26
31
  showClose: {
27
32
  type: BooleanConstructor;
@@ -72,13 +77,14 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
72
77
  default: () => {
73
78
  SCROLL_LOCK_CLASS(mode: string): string;
74
79
  DEFAULT_WIDTH: string;
80
+ DEFAULT_HEIGHT: string;
75
81
  };
76
82
  };
77
83
  visible: {
78
84
  type: BooleanConstructor;
79
85
  default: boolean;
80
86
  };
81
- customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
87
+ customClass: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
82
88
  placement: {
83
89
  type: StringConstructor;
84
90
  default: string;
@@ -86,6 +92,9 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
86
92
  width: {
87
93
  type: StringConstructor;
88
94
  };
95
+ height: {
96
+ type: StringConstructor;
97
+ };
89
98
  title: StringConstructor;
90
99
  showClose: {
91
100
  type: BooleanConstructor;
@@ -137,13 +146,14 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
137
146
  default: () => {
138
147
  SCROLL_LOCK_CLASS(mode: string): string;
139
148
  DEFAULT_WIDTH: string;
149
+ DEFAULT_HEIGHT: string;
140
150
  };
141
151
  };
142
152
  visible: {
143
153
  type: BooleanConstructor;
144
154
  default: boolean;
145
155
  };
146
- customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
156
+ customClass: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
147
157
  placement: {
148
158
  type: StringConstructor;
149
159
  default: string;
@@ -151,6 +161,9 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
151
161
  width: {
152
162
  type: StringConstructor;
153
163
  };
164
+ height: {
165
+ type: StringConstructor;
166
+ };
154
167
  title: StringConstructor;
155
168
  showClose: {
156
169
  type: BooleanConstructor;
@@ -195,18 +208,18 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
195
208
  tiny_theme: StringConstructor;
196
209
  tiny_chart_theme: ObjectConstructor;
197
210
  }>>, {
211
+ visible: boolean;
212
+ mask: boolean;
198
213
  tiny_mode_root: boolean;
199
214
  _constants: Record<string, any>;
200
215
  placement: string;
201
216
  zIndex: number;
202
- mask: boolean;
203
- visible: boolean;
204
- showClose: boolean;
205
217
  showHeader: boolean;
206
218
  showFooter: boolean;
207
- maskClosable: boolean;
208
219
  dragable: boolean;
220
+ maskClosable: boolean;
209
221
  lockScroll: boolean;
210
222
  flex: boolean;
223
+ showClose: boolean;
211
224
  }, {}>;
212
225
  export default _default;
@@ -1,5 +1,7 @@
1
1
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ visible?: any;
2
3
  title?: any;
4
+ mask?: any;
3
5
  tiny_mode?: any;
4
6
  tiny_mode_root?: any;
5
7
  tiny_template?: any;
@@ -9,13 +11,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
9
11
  tiny_chart_theme?: any;
10
12
  width?: any;
11
13
  placement?: any;
12
- mask?: any;
13
- visible?: any;
14
14
  customClass?: any;
15
15
  showHeader?: any;
16
16
  showFooter?: any;
17
- maskClosable?: any;
18
17
  dragable?: any;
18
+ maskClosable?: any;
19
19
  lockScroll?: any;
20
20
  flex?: any;
21
21
  beforeClose?: any;
@@ -27,8 +27,10 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
27
27
  d: (props: any) => void;
28
28
  dp: (props: any) => void;
29
29
  gcls: (key: any) => any;
30
- }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "confirm" | "update:visible" | "open")[], "close" | "confirm" | "update:visible" | "open", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
30
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "confirm" | "open" | "update:visible")[], "close" | "confirm" | "open" | "update:visible", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
31
+ visible?: any;
31
32
  title?: any;
33
+ mask?: any;
32
34
  tiny_mode?: any;
33
35
  tiny_mode_root?: any;
34
36
  tiny_template?: any;
@@ -38,23 +40,23 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
38
40
  tiny_chart_theme?: any;
39
41
  width?: any;
40
42
  placement?: any;
41
- mask?: any;
42
- visible?: any;
43
43
  customClass?: any;
44
44
  showHeader?: any;
45
45
  showFooter?: any;
46
- maskClosable?: any;
47
46
  dragable?: any;
47
+ maskClosable?: any;
48
48
  lockScroll?: any;
49
49
  flex?: any;
50
50
  beforeClose?: any;
51
51
  }>>> & {
52
52
  onClose?: ((...args: any[]) => any) | undefined;
53
- "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
54
53
  onConfirm?: ((...args: any[]) => any) | undefined;
55
54
  onOpen?: ((...args: any[]) => any) | undefined;
55
+ "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
56
56
  }, {
57
+ readonly visible?: any;
57
58
  readonly title?: any;
59
+ readonly mask?: any;
58
60
  readonly tiny_mode?: any;
59
61
  readonly tiny_mode_root?: any;
60
62
  readonly tiny_template?: any;
@@ -64,13 +66,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
64
66
  readonly tiny_chart_theme?: any;
65
67
  readonly width?: any;
66
68
  readonly placement?: any;
67
- readonly mask?: any;
68
- readonly visible?: any;
69
69
  readonly customClass?: any;
70
70
  readonly showHeader?: any;
71
71
  readonly showFooter?: any;
72
- readonly maskClosable?: any;
73
72
  readonly dragable?: any;
73
+ readonly maskClosable?: any;
74
74
  readonly lockScroll?: any;
75
75
  readonly flex?: any;
76
76
  readonly beforeClose?: any;
package/src/pc.vue.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ visible?: any;
2
3
  title?: any;
4
+ mask?: any;
3
5
  tiny_mode?: any;
4
6
  tiny_mode_root?: any;
5
7
  tiny_template?: any;
@@ -8,19 +10,18 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
8
10
  tiny_theme?: any;
9
11
  tiny_chart_theme?: any;
10
12
  width?: any;
13
+ height?: any;
11
14
  placement?: any;
12
- zIndex?: any;
13
- mask?: any;
14
- visible?: any;
15
15
  customClass?: any;
16
- showClose?: any;
16
+ zIndex?: any;
17
17
  showHeader?: any;
18
18
  showFooter?: any;
19
- maskClosable?: any;
20
19
  dragable?: any;
20
+ maskClosable?: any;
21
21
  lockScroll?: any;
22
22
  flex?: any;
23
23
  beforeClose?: any;
24
+ showClose?: any;
24
25
  tipsProps?: any;
25
26
  customSlots?: any;
26
27
  }>, {
@@ -31,8 +32,10 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
31
32
  d: (props: any) => void;
32
33
  dp: (props: any) => void;
33
34
  gcls: (key: any) => any;
34
- }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "drag" | "confirm" | "update:visible" | "open")[], "close" | "drag" | "confirm" | "update:visible" | "open", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
35
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "drag" | "confirm" | "open" | "update:visible")[], "close" | "drag" | "confirm" | "open" | "update:visible", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
36
+ visible?: any;
35
37
  title?: any;
38
+ mask?: any;
36
39
  tiny_mode?: any;
37
40
  tiny_mode_root?: any;
38
41
  tiny_template?: any;
@@ -41,29 +44,30 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
41
44
  tiny_theme?: any;
42
45
  tiny_chart_theme?: any;
43
46
  width?: any;
47
+ height?: any;
44
48
  placement?: any;
45
- zIndex?: any;
46
- mask?: any;
47
- visible?: any;
48
49
  customClass?: any;
49
- showClose?: any;
50
+ zIndex?: any;
50
51
  showHeader?: any;
51
52
  showFooter?: any;
52
- maskClosable?: any;
53
53
  dragable?: any;
54
+ maskClosable?: any;
54
55
  lockScroll?: any;
55
56
  flex?: any;
56
57
  beforeClose?: any;
58
+ showClose?: any;
57
59
  tipsProps?: any;
58
60
  customSlots?: any;
59
61
  }>>> & {
60
62
  onClose?: ((...args: any[]) => any) | undefined;
61
63
  onDrag?: ((...args: any[]) => any) | undefined;
62
- "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
63
64
  onConfirm?: ((...args: any[]) => any) | undefined;
64
65
  onOpen?: ((...args: any[]) => any) | undefined;
66
+ "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
65
67
  }, {
68
+ readonly visible?: any;
66
69
  readonly title?: any;
70
+ readonly mask?: any;
67
71
  readonly tiny_mode?: any;
68
72
  readonly tiny_mode_root?: any;
69
73
  readonly tiny_template?: any;
@@ -72,19 +76,18 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
72
76
  readonly tiny_theme?: any;
73
77
  readonly tiny_chart_theme?: any;
74
78
  readonly width?: any;
79
+ readonly height?: any;
75
80
  readonly placement?: any;
76
- readonly zIndex?: any;
77
- readonly mask?: any;
78
- readonly visible?: any;
79
81
  readonly customClass?: any;
80
- readonly showClose?: any;
82
+ readonly zIndex?: any;
81
83
  readonly showHeader?: any;
82
84
  readonly showFooter?: any;
83
- readonly maskClosable?: any;
84
85
  readonly dragable?: any;
86
+ readonly maskClosable?: any;
85
87
  readonly lockScroll?: any;
86
88
  readonly flex?: any;
87
89
  readonly beforeClose?: any;
90
+ readonly showClose?: any;
88
91
  readonly tipsProps?: any;
89
92
  readonly customSlots?: any;
90
93
  }, {}>;
package/src/service.d.ts CHANGED
@@ -13,6 +13,7 @@ export declare const defaultConfigs: {
13
13
  customClass: null;
14
14
  placement: string;
15
15
  width: null;
16
+ height: null;
16
17
  title: string;
17
18
  showClose: boolean;
18
19
  showHeader: boolean;