@opentiny/vue-drawer 2.18.0 → 2.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 +7 -2
- package/lib/pc.js +10 -14
- package/package.json +7 -7
- package/src/index.d.ts +6 -1
- package/src/service.d.ts +1 -0
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 = "2.
|
|
167
|
+
var version = "2.undefined";
|
|
163
168
|
Drawer.model = {
|
|
164
169
|
prop: "visible",
|
|
165
170
|
event: "update:visible"
|
package/lib/pc.js
CHANGED
|
@@ -78,7 +78,7 @@ var __vue2_script = defineComponent({
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "mask", "dragable", "maskClosable", "lockScroll", "flex", "showClose", "zIndex", "beforeClose", "tipsProps", "customSlots"]),
|
|
81
|
+
props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "height", "mask", "dragable", "maskClosable", "lockScroll", "flex", "showClose", "zIndex", "beforeClose", "tipsProps", "customSlots"]),
|
|
82
82
|
emits: ["update:visible", "open", "close", "confirm", "drag"],
|
|
83
83
|
setup: function setup$1(props2, context) {
|
|
84
84
|
return setup({
|
|
@@ -135,7 +135,7 @@ var render2 = function render3() {
|
|
|
135
135
|
}, "tiny-drawer-main", _vm.customClass],
|
|
136
136
|
style: {
|
|
137
137
|
width: ["left", "right"].includes(_vm.placement) ? _vm.state.computedWidth : null,
|
|
138
|
-
height: ["top", "bottom"].includes(_vm.placement)
|
|
138
|
+
height: ["top", "bottom", "left", "right"].includes(_vm.placement) || _vm.dragable ? _vm.state.computedHeight : null,
|
|
139
139
|
zIndex: _vm.zIndex
|
|
140
140
|
},
|
|
141
141
|
attrs: {
|
|
@@ -220,30 +220,26 @@ var render2 = function render3() {
|
|
|
220
220
|
"node": _vm.customSlots.footer
|
|
221
221
|
}
|
|
222
222
|
}) : [_c("tiny-button", {
|
|
223
|
-
|
|
224
|
-
reverse: _vm.state.btnOrderReversed
|
|
225
|
-
}],
|
|
223
|
+
staticClass: "tiny-drawer__cancel-btn",
|
|
226
224
|
attrs: {
|
|
227
|
-
"
|
|
225
|
+
"plain": ""
|
|
228
226
|
},
|
|
229
227
|
on: {
|
|
230
228
|
"click": function click($event) {
|
|
231
|
-
return _vm.handleClose("
|
|
229
|
+
return _vm.handleClose("cancel");
|
|
232
230
|
}
|
|
233
231
|
}
|
|
234
|
-
}, [_vm._v(_vm._s(_vm.t("ui.button.
|
|
235
|
-
|
|
236
|
-
reverse: _vm.state.btnOrderReversed
|
|
237
|
-
}],
|
|
232
|
+
}, [_vm._v(_vm._s(_vm.t("ui.button.cancel")))]), _c("tiny-button", {
|
|
233
|
+
staticClass: "tiny-drawer__confirm-btn",
|
|
238
234
|
attrs: {
|
|
239
|
-
"
|
|
235
|
+
"type": "primary"
|
|
240
236
|
},
|
|
241
237
|
on: {
|
|
242
238
|
"click": function click($event) {
|
|
243
|
-
return _vm.handleClose("
|
|
239
|
+
return _vm.handleClose("confirm");
|
|
244
240
|
}
|
|
245
241
|
}
|
|
246
|
-
}, [_vm._v(_vm._s(_vm.t("ui.button.
|
|
242
|
+
}, [_vm._v(_vm._s(_vm.t("ui.button.confirm")))])]];
|
|
247
243
|
})], 2) : _vm._e()])])])], 1);
|
|
248
244
|
};
|
|
249
245
|
var staticRenderFns = [];
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-drawer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.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": "~2.
|
|
11
|
-
"@opentiny/vue-tooltip": "~2.
|
|
12
|
-
"@opentiny/vue-common": "~2.
|
|
13
|
-
"@opentiny/vue-renderless": "~3.
|
|
14
|
-
"@opentiny/vue-icon": "~2.
|
|
15
|
-
"@opentiny/vue-theme": "~3.
|
|
10
|
+
"@opentiny/vue-button": "~2.19.0",
|
|
11
|
+
"@opentiny/vue-tooltip": "~2.19.0",
|
|
12
|
+
"@opentiny/vue-common": "~2.19.0",
|
|
13
|
+
"@opentiny/vue-renderless": "~3.19.0",
|
|
14
|
+
"@opentiny/vue-icon": "~2.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: (
|
|
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;
|