@opentiny/vue-drawer 3.8.3 → 3.10.0
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 +42 -5
- package/lib/mobile-first.js +26 -23
- package/lib/pc.js +230 -0
- package/package.json +5 -4
- package/src/index.d.ts +24 -2
- package/src/mobile-first.vue.d.ts +17 -15
- package/src/pc.vue.d.ts +17 -0
package/lib/index.js
CHANGED
|
@@ -13,13 +13,34 @@ function _extends() {
|
|
|
13
13
|
return _extends.apply(this, arguments);
|
|
14
14
|
}
|
|
15
15
|
import { $prefix, $props, $setup } from "@opentiny/vue-common";
|
|
16
|
+
import PcTemplate from "./pc.js";
|
|
16
17
|
import MobileFirstTemplate from "./mobile-first.js";
|
|
17
|
-
var template = function template2() {
|
|
18
|
-
|
|
18
|
+
var template = function template2(mode) {
|
|
19
|
+
if ("pc" === (process.env.TINY_MODE || mode)) {
|
|
20
|
+
return PcTemplate;
|
|
21
|
+
}
|
|
22
|
+
if ("mobile-first" === (process.env.TINY_MODE || mode)) {
|
|
23
|
+
return MobileFirstTemplate;
|
|
24
|
+
}
|
|
25
|
+
return PcTemplate;
|
|
26
|
+
};
|
|
27
|
+
var $constants = {
|
|
28
|
+
SCROLL_LOCK_CLASS: function SCROLL_LOCK_CLASS(mode) {
|
|
29
|
+
var scrollLockClasses = {
|
|
30
|
+
"mobile-first": "overflow-hidden"
|
|
31
|
+
};
|
|
32
|
+
return scrollLockClasses[mode] || "";
|
|
33
|
+
}
|
|
19
34
|
};
|
|
20
35
|
var Drawer = {
|
|
21
36
|
name: $prefix + "Drawer",
|
|
22
37
|
props: _extends({}, $props, {
|
|
38
|
+
_constants: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: function _default() {
|
|
41
|
+
return $constants;
|
|
42
|
+
}
|
|
43
|
+
},
|
|
23
44
|
visible: {
|
|
24
45
|
type: Boolean,
|
|
25
46
|
default: false
|
|
@@ -31,9 +52,13 @@ var Drawer = {
|
|
|
31
52
|
},
|
|
32
53
|
width: {
|
|
33
54
|
type: String,
|
|
34
|
-
default: "
|
|
55
|
+
default: "500px"
|
|
35
56
|
},
|
|
36
57
|
title: String,
|
|
58
|
+
showClose: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true
|
|
61
|
+
},
|
|
37
62
|
showHeader: {
|
|
38
63
|
type: Boolean,
|
|
39
64
|
default: true
|
|
@@ -50,7 +75,19 @@ var Drawer = {
|
|
|
50
75
|
type: Boolean,
|
|
51
76
|
default: true
|
|
52
77
|
},
|
|
53
|
-
dragable: Boolean
|
|
78
|
+
dragable: Boolean,
|
|
79
|
+
lockScroll: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true
|
|
82
|
+
},
|
|
83
|
+
flex: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false
|
|
86
|
+
},
|
|
87
|
+
zIndex: {
|
|
88
|
+
type: Number,
|
|
89
|
+
default: 2e3
|
|
90
|
+
}
|
|
54
91
|
}),
|
|
55
92
|
setup: function setup(props, context) {
|
|
56
93
|
return $setup({
|
|
@@ -60,7 +97,7 @@ var Drawer = {
|
|
|
60
97
|
});
|
|
61
98
|
}
|
|
62
99
|
};
|
|
63
|
-
var version = "3.
|
|
100
|
+
var version = "3.10.0";
|
|
64
101
|
Drawer.model = {
|
|
65
102
|
prop: "modelValue",
|
|
66
103
|
event: "update:modelValue"
|
package/lib/mobile-first.js
CHANGED
|
@@ -2,7 +2,7 @@ import { renderless, api } from "@opentiny/vue-renderless/drawer/vue";
|
|
|
2
2
|
import { props, setup as _setup } from "@opentiny/vue-common";
|
|
3
3
|
import { IconClose } from "@opentiny/vue-icon";
|
|
4
4
|
import Button from "@opentiny/vue-button";
|
|
5
|
-
import { resolveComponent, withDirectives, openBlock, createElementBlock,
|
|
5
|
+
import { resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, createCommentVNode, createElementVNode, normalizeStyle, renderSlot, toDisplayString, createVNode, withCtx, createTextVNode, vShow } from "vue";
|
|
6
6
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
7
7
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
8
8
|
if (it)
|
|
@@ -53,7 +53,7 @@ var _sfc_main = {
|
|
|
53
53
|
TinyButton: Button,
|
|
54
54
|
IconClose: IconClose()
|
|
55
55
|
},
|
|
56
|
-
props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "mask", "dragable", "maskClosable"]),
|
|
56
|
+
props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "mask", "dragable", "maskClosable", "lockScroll", "flex"]),
|
|
57
57
|
setup: function setup(props2, context) {
|
|
58
58
|
return _setup({
|
|
59
59
|
props: props2,
|
|
@@ -68,13 +68,13 @@ var _hoisted_1 = {
|
|
|
68
68
|
class: "text-sm"
|
|
69
69
|
};
|
|
70
70
|
var _hoisted_2 = {
|
|
71
|
-
class: /* @__PURE__ */ normalizeClass(["flex-auto flex-col flex max-h-full"])
|
|
71
|
+
class: /* @__PURE__ */ normalizeClass(["flex-auto flex-col flex max-h-full overflow-hidden"])
|
|
72
72
|
};
|
|
73
73
|
var _hoisted_3 = {
|
|
74
74
|
key: 0,
|
|
75
75
|
"data-tag": "drawer-header",
|
|
76
76
|
ref: "header",
|
|
77
|
-
class: "flex leading-6 p-4 text-base items-center"
|
|
77
|
+
class: "flex-none flex leading-6 p-4 text-base items-center"
|
|
78
78
|
};
|
|
79
79
|
var _hoisted_4 = {
|
|
80
80
|
key: 0,
|
|
@@ -84,17 +84,12 @@ var _hoisted_5 = {
|
|
|
84
84
|
class: "flex-1 flex items-center justify-end"
|
|
85
85
|
};
|
|
86
86
|
var _hoisted_6 = {
|
|
87
|
-
"data-tag": "drawer-body",
|
|
88
|
-
ref: "body",
|
|
89
|
-
class: "flex-auto flex flex-col overflow-auto"
|
|
90
|
-
};
|
|
91
|
-
var _hoisted_7 = {
|
|
92
87
|
key: 1,
|
|
93
88
|
"data-tag": "drawer-footer",
|
|
94
89
|
ref: "footer",
|
|
95
90
|
class: "px-4 py-3"
|
|
96
91
|
};
|
|
97
|
-
var
|
|
92
|
+
var _hoisted_7 = {
|
|
98
93
|
class: "flex-1 text-right"
|
|
99
94
|
};
|
|
100
95
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -103,13 +98,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
103
98
|
return withDirectives((openBlock(), createElementBlock(
|
|
104
99
|
"div",
|
|
105
100
|
_hoisted_1,
|
|
106
|
-
[
|
|
101
|
+
[$props.mask ? (openBlock(), createElementBlock(
|
|
107
102
|
"div",
|
|
108
103
|
{
|
|
109
104
|
key: 0,
|
|
110
105
|
ref: "mask",
|
|
111
|
-
class: normalizeClass(_ctx.m("fixed z-50
|
|
112
|
-
"
|
|
106
|
+
class: normalizeClass(_ctx.m("fixed z-50 left-0 right-0 top-0 bottom-0 w-full h-full transition-opacity ease-linear duration-200", {
|
|
107
|
+
"bg-color-bg-7": _ctx.state.toggle
|
|
113
108
|
})),
|
|
114
109
|
onClick: _cache[0] || (_cache[0] = function($event) {
|
|
115
110
|
return $props.maskClosable && _ctx.close();
|
|
@@ -118,15 +113,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
118
113
|
null,
|
|
119
114
|
2
|
|
120
115
|
/* CLASS */
|
|
121
|
-
)) : createCommentVNode("v-if", true),
|
|
116
|
+
)) : createCommentVNode("v-if", true), createElementVNode(
|
|
122
117
|
"div",
|
|
123
118
|
{
|
|
124
119
|
"data-tag": "tiny-drawer-main",
|
|
125
120
|
ref: "drawerBox",
|
|
126
|
-
class: normalizeClass(_ctx.m("fixed w-full max-w-full flex flex-col bg-
|
|
121
|
+
class: normalizeClass(_ctx.m("fixed w-full max-w-full flex flex-col bg-color-bg-1 z-50 shadow-sm border-color-border-separator", {
|
|
127
122
|
"transition-all ease-linear duration-200": !_ctx.state.dragEvent.isDrag
|
|
128
123
|
}, {
|
|
129
124
|
"h-full": ["left", "right"].includes($props.placement)
|
|
125
|
+
}, {
|
|
126
|
+
"max-h-full": ["top", "bottom"].includes($props.placement)
|
|
130
127
|
}, {
|
|
131
128
|
"left-0 bottom-0 translate-y-full border-t-0.5": $props.placement === "bottom"
|
|
132
129
|
}, {
|
|
@@ -155,7 +152,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
155
152
|
null,
|
|
156
153
|
2
|
|
157
154
|
/* CLASS */
|
|
158
|
-
)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_2, [
|
|
155
|
+
)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_2, [$props.showHeader ? (openBlock(), createElementBlock(
|
|
159
156
|
"div",
|
|
160
157
|
_hoisted_3,
|
|
161
158
|
[renderSlot(_ctx.$slots, "header", {}, function() {
|
|
@@ -174,16 +171,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
174
171
|
})],
|
|
175
172
|
512
|
|
176
173
|
/* NEED_PATCH */
|
|
177
|
-
)) : createCommentVNode("v-if", true),
|
|
174
|
+
)) : createCommentVNode("v-if", true), createElementVNode(
|
|
178
175
|
"div",
|
|
179
|
-
|
|
176
|
+
{
|
|
177
|
+
"data-tag": "drawer-body",
|
|
178
|
+
ref: "body",
|
|
179
|
+
class: normalizeClass(["flex-auto overflow-auto", {
|
|
180
|
+
"flex flex-col": $props.flex
|
|
181
|
+
}])
|
|
182
|
+
},
|
|
180
183
|
[renderSlot(_ctx.$slots, "default")],
|
|
181
|
-
|
|
182
|
-
/*
|
|
183
|
-
),
|
|
184
|
+
2
|
|
185
|
+
/* CLASS */
|
|
186
|
+
), $props.showFooter ? (openBlock(), createElementBlock(
|
|
184
187
|
"div",
|
|
185
|
-
|
|
186
|
-
[createElementVNode("div",
|
|
188
|
+
_hoisted_6,
|
|
189
|
+
[createElementVNode("div", _hoisted_7, [renderSlot(_ctx.$slots, "footer", {}, function() {
|
|
187
190
|
return [createVNode(_component_tiny_button, {
|
|
188
191
|
tiny_mode: "mobile-first",
|
|
189
192
|
onClick: _ctx.close
|
package/lib/pc.js
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { renderless, api } from "@opentiny/vue-renderless/drawer/vue";
|
|
2
|
+
import { props, setup as _setup } from "@opentiny/vue-common";
|
|
3
|
+
import "@opentiny/vue-theme/drawer/index.css";
|
|
4
|
+
import { IconClose } from "@opentiny/vue-icon";
|
|
5
|
+
import Button from "@opentiny/vue-button";
|
|
6
|
+
import { resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createCommentVNode, createElementVNode, renderSlot, toDisplayString, createVNode, withCtx, createTextVNode, vShow } from "vue";
|
|
7
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
8
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
9
|
+
if (it)
|
|
10
|
+
return (it = it.call(o)).next.bind(it);
|
|
11
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
12
|
+
if (it)
|
|
13
|
+
o = it;
|
|
14
|
+
var i = 0;
|
|
15
|
+
return function() {
|
|
16
|
+
if (i >= o.length)
|
|
17
|
+
return { done: true };
|
|
18
|
+
return { done: false, value: o[i++] };
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22
|
+
}
|
|
23
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
24
|
+
if (!o)
|
|
25
|
+
return;
|
|
26
|
+
if (typeof o === "string")
|
|
27
|
+
return _arrayLikeToArray(o, minLen);
|
|
28
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
29
|
+
if (n === "Object" && o.constructor)
|
|
30
|
+
n = o.constructor.name;
|
|
31
|
+
if (n === "Map" || n === "Set")
|
|
32
|
+
return Array.from(o);
|
|
33
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
34
|
+
return _arrayLikeToArray(o, minLen);
|
|
35
|
+
}
|
|
36
|
+
function _arrayLikeToArray(arr, len) {
|
|
37
|
+
if (len == null || len > arr.length)
|
|
38
|
+
len = arr.length;
|
|
39
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
40
|
+
arr2[i] = arr[i];
|
|
41
|
+
return arr2;
|
|
42
|
+
}
|
|
43
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
44
|
+
var target = sfc.__vccOpts || sfc;
|
|
45
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
46
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
47
|
+
target[key] = val;
|
|
48
|
+
}
|
|
49
|
+
return target;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var _sfc_main = {
|
|
53
|
+
components: {
|
|
54
|
+
TinyButton: Button,
|
|
55
|
+
IconClose: IconClose()
|
|
56
|
+
},
|
|
57
|
+
props: [].concat(props, ["visible", "title", "showHeader", "showFooter", "customClass", "placement", "width", "mask", "dragable", "maskClosable", "lockScroll", "flex", "showClose", "zIndex"]),
|
|
58
|
+
setup: function setup(props2, context) {
|
|
59
|
+
return _setup({
|
|
60
|
+
props: props2,
|
|
61
|
+
context,
|
|
62
|
+
renderless,
|
|
63
|
+
api
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
var _hoisted_1 = {
|
|
68
|
+
"data-tag": "tiny-drawer",
|
|
69
|
+
class: "tiny-drawer"
|
|
70
|
+
};
|
|
71
|
+
var _hoisted_2 = {
|
|
72
|
+
key: 0,
|
|
73
|
+
"data-tag": "drawer-drag-bar",
|
|
74
|
+
ref: "dragBar",
|
|
75
|
+
class: /* @__PURE__ */ normalizeClass(["tiny-drawer__drag-bar"])
|
|
76
|
+
};
|
|
77
|
+
var _hoisted_3 = {
|
|
78
|
+
class: "tiny-drawer__box"
|
|
79
|
+
};
|
|
80
|
+
var _hoisted_4 = {
|
|
81
|
+
key: 0,
|
|
82
|
+
"data-tag": "drawer-header",
|
|
83
|
+
ref: "header",
|
|
84
|
+
class: "tiny-drawer__header-wrapper"
|
|
85
|
+
};
|
|
86
|
+
var _hoisted_5 = {
|
|
87
|
+
class: "tiny-drawer__header"
|
|
88
|
+
};
|
|
89
|
+
var _hoisted_6 = {
|
|
90
|
+
key: 0,
|
|
91
|
+
class: "tiny-drawer__title"
|
|
92
|
+
};
|
|
93
|
+
var _hoisted_7 = {
|
|
94
|
+
class: "tiny-drawer__header-right"
|
|
95
|
+
};
|
|
96
|
+
var _hoisted_8 = {
|
|
97
|
+
key: 1,
|
|
98
|
+
"data-tag": "drawer-footer",
|
|
99
|
+
ref: "footer",
|
|
100
|
+
class: "tiny-drawer__footer"
|
|
101
|
+
};
|
|
102
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
103
|
+
var _component_icon_close = resolveComponent("icon-close");
|
|
104
|
+
var _component_tiny_button = resolveComponent("tiny-button");
|
|
105
|
+
return withDirectives((openBlock(), createElementBlock(
|
|
106
|
+
"div",
|
|
107
|
+
_hoisted_1,
|
|
108
|
+
[$props.mask ? (openBlock(), createElementBlock(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
key: 0,
|
|
112
|
+
ref: "mask",
|
|
113
|
+
class: normalizeClass(["tiny-drawer__mask", {
|
|
114
|
+
"show-bg-color": _ctx.state.toggle
|
|
115
|
+
}]),
|
|
116
|
+
style: normalizeStyle({
|
|
117
|
+
zIndex: $props.zIndex
|
|
118
|
+
}),
|
|
119
|
+
onClick: _cache[0] || (_cache[0] = function($event) {
|
|
120
|
+
return $props.maskClosable && _ctx.close();
|
|
121
|
+
})
|
|
122
|
+
},
|
|
123
|
+
null,
|
|
124
|
+
6
|
|
125
|
+
/* CLASS, STYLE */
|
|
126
|
+
)) : createCommentVNode("v-if", true), createElementVNode(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
"data-tag": "tiny-drawer-main",
|
|
130
|
+
ref: "drawerBox",
|
|
131
|
+
class: normalizeClass(["tiny-drawer__main", {
|
|
132
|
+
"is-left": $props.placement === "left",
|
|
133
|
+
"is-right": $props.placement === "right",
|
|
134
|
+
"is-top": $props.placement === "top",
|
|
135
|
+
"is-bottom": $props.placement === "bottom",
|
|
136
|
+
"drag-effects": !_ctx.state.dragEvent.isDrag
|
|
137
|
+
}, $props.customClass]),
|
|
138
|
+
style: normalizeStyle({
|
|
139
|
+
width: ["left", "right"].includes($props.placement) ? _ctx.state.computedWidth : null,
|
|
140
|
+
zIndex: $props.zIndex
|
|
141
|
+
})
|
|
142
|
+
},
|
|
143
|
+
[$props.dragable ? (openBlock(), createElementBlock(
|
|
144
|
+
"div",
|
|
145
|
+
_hoisted_2,
|
|
146
|
+
null,
|
|
147
|
+
512
|
|
148
|
+
/* NEED_PATCH */
|
|
149
|
+
)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3, [$props.showHeader ? (openBlock(), createElementBlock(
|
|
150
|
+
"div",
|
|
151
|
+
_hoisted_4,
|
|
152
|
+
[renderSlot(_ctx.$slots, "header", {}, function() {
|
|
153
|
+
return [createElementVNode("div", _hoisted_5, [$props.title ? (openBlock(), createElementBlock(
|
|
154
|
+
"div",
|
|
155
|
+
_hoisted_6,
|
|
156
|
+
toDisplayString($props.title),
|
|
157
|
+
1
|
|
158
|
+
/* TEXT */
|
|
159
|
+
)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_7, [renderSlot(_ctx.$slots, "header-right")])])];
|
|
160
|
+
}), $props.showClose ? (openBlock(), createElementBlock("button", {
|
|
161
|
+
key: 0,
|
|
162
|
+
type: "button",
|
|
163
|
+
class: "tiny-drawer__headerbtn",
|
|
164
|
+
"aria-label": "Close",
|
|
165
|
+
onClick: _cache[1] || (_cache[1] = function() {
|
|
166
|
+
return _ctx.close && _ctx.close.apply(_ctx, arguments);
|
|
167
|
+
})
|
|
168
|
+
}, [createVNode(_component_icon_close, {
|
|
169
|
+
class: "tiny-svg-size tiny-drawer__close"
|
|
170
|
+
})])) : createCommentVNode("v-if", true)],
|
|
171
|
+
512
|
|
172
|
+
/* NEED_PATCH */
|
|
173
|
+
)) : createCommentVNode("v-if", true), createElementVNode(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
"data-tag": "drawer-body",
|
|
177
|
+
ref: "body",
|
|
178
|
+
class: normalizeClass(["tiny-drawer__body", {
|
|
179
|
+
"flex flex-col": $props.flex
|
|
180
|
+
}])
|
|
181
|
+
},
|
|
182
|
+
[renderSlot(_ctx.$slots, "default")],
|
|
183
|
+
2
|
|
184
|
+
/* CLASS */
|
|
185
|
+
), $props.showFooter ? (openBlock(), createElementBlock(
|
|
186
|
+
"div",
|
|
187
|
+
_hoisted_8,
|
|
188
|
+
[renderSlot(_ctx.$slots, "footer", {}, function() {
|
|
189
|
+
return [createVNode(_component_tiny_button, {
|
|
190
|
+
type: "primary",
|
|
191
|
+
onClick: _ctx.confirm
|
|
192
|
+
}, {
|
|
193
|
+
default: withCtx(function() {
|
|
194
|
+
return [createTextVNode(
|
|
195
|
+
toDisplayString(_ctx.t("ui.button.confirm")),
|
|
196
|
+
1
|
|
197
|
+
/* TEXT */
|
|
198
|
+
)];
|
|
199
|
+
}),
|
|
200
|
+
_: 1
|
|
201
|
+
/* STABLE */
|
|
202
|
+
}, 8, ["onClick"]), createVNode(_component_tiny_button, {
|
|
203
|
+
plain: "",
|
|
204
|
+
onClick: _ctx.close
|
|
205
|
+
}, {
|
|
206
|
+
default: withCtx(function() {
|
|
207
|
+
return [createTextVNode(
|
|
208
|
+
toDisplayString(_ctx.t("ui.button.cancel")),
|
|
209
|
+
1
|
|
210
|
+
/* TEXT */
|
|
211
|
+
)];
|
|
212
|
+
}),
|
|
213
|
+
_: 1
|
|
214
|
+
/* STABLE */
|
|
215
|
+
}, 8, ["onClick"])];
|
|
216
|
+
})],
|
|
217
|
+
512
|
|
218
|
+
/* NEED_PATCH */
|
|
219
|
+
)) : createCommentVNode("v-if", true)])],
|
|
220
|
+
6
|
|
221
|
+
/* CLASS, STYLE */
|
|
222
|
+
)],
|
|
223
|
+
512
|
|
224
|
+
/* NEED_PATCH */
|
|
225
|
+
)), [[vShow, $props.visible]]);
|
|
226
|
+
}
|
|
227
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
228
|
+
export {
|
|
229
|
+
pc as default
|
|
230
|
+
};
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-drawer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
|
+
"type": "module",
|
|
8
9
|
"dependencies": {
|
|
9
|
-
"@opentiny/vue-button": "~3.
|
|
10
|
-
"@opentiny/vue-common": "~3.
|
|
11
|
-
"@opentiny/vue-renderless": "~3.
|
|
10
|
+
"@opentiny/vue-button": "~3.10.0",
|
|
11
|
+
"@opentiny/vue-common": "~3.10.0",
|
|
12
|
+
"@opentiny/vue-renderless": "~3.10.0"
|
|
12
13
|
},
|
|
13
14
|
"license": "MIT",
|
|
14
15
|
"types": "index.d.ts"
|
package/src/index.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
name: string;
|
|
3
3
|
props: {
|
|
4
|
+
_constants: {
|
|
5
|
+
type: ObjectConstructor;
|
|
6
|
+
default: () => {
|
|
7
|
+
SCROLL_LOCK_CLASS(mode: any): any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
4
10
|
visible: {
|
|
5
11
|
type: BooleanConstructor;
|
|
6
12
|
default: boolean;
|
|
7
13
|
};
|
|
8
|
-
customClass: (ObjectConstructor |
|
|
14
|
+
customClass: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
|
|
9
15
|
placement: {
|
|
10
16
|
type: StringConstructor;
|
|
11
17
|
default: string;
|
|
@@ -15,6 +21,10 @@ declare const _default: {
|
|
|
15
21
|
default: string;
|
|
16
22
|
};
|
|
17
23
|
title: StringConstructor;
|
|
24
|
+
showClose: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
18
28
|
showHeader: {
|
|
19
29
|
type: BooleanConstructor;
|
|
20
30
|
default: boolean;
|
|
@@ -32,6 +42,18 @@ declare const _default: {
|
|
|
32
42
|
default: boolean;
|
|
33
43
|
};
|
|
34
44
|
dragable: BooleanConstructor;
|
|
45
|
+
lockScroll: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
flex: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
zIndex: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
default: number;
|
|
56
|
+
};
|
|
35
57
|
tiny_mode: StringConstructor;
|
|
36
58
|
tiny_mode_root: BooleanConstructor;
|
|
37
59
|
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
@@ -39,7 +61,7 @@ declare const _default: {
|
|
|
39
61
|
tiny_theme: StringConstructor;
|
|
40
62
|
tiny_chart_theme: ObjectConstructor;
|
|
41
63
|
};
|
|
42
|
-
setup(props: any, context: any): () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
64
|
+
setup(props: any, context: any): () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
43
65
|
[key: string]: any;
|
|
44
66
|
}>;
|
|
45
67
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
}>, {
|
|
4
|
+
t: (this: any, path: any, options?: any) => any;
|
|
5
|
+
vm: any;
|
|
6
|
+
f: (props: any, attrs?: {}) => {};
|
|
7
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
8
|
+
d: (props: any) => void;
|
|
9
|
+
dp: (props: any) => void;
|
|
10
|
+
gcls: (key: any) => any;
|
|
11
|
+
m: (...cssClasses: any[]) => string;
|
|
12
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
}>>>, {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export default _default;
|
package/src/pc.vue.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
}>, {
|
|
4
|
+
t: (this: any, path: any, options?: any) => any;
|
|
5
|
+
vm: any;
|
|
6
|
+
f: (props: any, attrs?: {}) => {};
|
|
7
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
8
|
+
d: (props: any) => void;
|
|
9
|
+
dp: (props: any) => void;
|
|
10
|
+
gcls: (key: any) => any;
|
|
11
|
+
m: (...cssClasses: any[]) => string;
|
|
12
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
}>>>, {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export default _default;
|