@opentinyvue/vue-dialog-box 2.21.0 → 3.21.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 +1 -1
- package/lib/mobile-first.js +192 -186
- package/lib/mobile.js +112 -95
- package/lib/pc.js +158 -149
- package/package.json +4 -4
- package/src/index.d.ts +270 -1
- package/src/mobile-first.vue.d.ts +119 -1
- package/src/mobile.vue.d.ts +74 -1
- package/src/pc.vue.d.ts +118 -1
package/lib/index.js
CHANGED
package/lib/mobile-first.js
CHANGED
|
@@ -2,38 +2,42 @@ import { renderless, api } from '@opentinyvue/vue-renderless/dialog-box/vue';
|
|
|
2
2
|
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import { IconClose, IconFullscreen, IconMinscreen } from '@opentinyvue/vue-icon';
|
|
4
4
|
import ActionSheet from '@opentinyvue/vue-action-sheet';
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, renderSlot, toDisplayString, createCommentVNode, vShow, createBlock, mergeProps, createSlots, renderList, normalizeProps, guardReactiveProps } from 'vue';
|
|
5
6
|
|
|
6
|
-
function
|
|
7
|
-
var
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
8
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
10
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
11
|
+
t && (r = t);
|
|
12
|
+
var o = 0;
|
|
13
|
+
return function() {
|
|
14
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var originalRender = options.render;
|
|
21
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
22
|
-
hook.call(context);
|
|
23
|
-
return originalRender(h, context);
|
|
24
|
-
};
|
|
25
|
-
} else {
|
|
26
|
-
var existing = options.beforeCreate;
|
|
27
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
28
|
-
}
|
|
17
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
+
}
|
|
19
|
+
function _unsupportedIterableToArray(r, a) {
|
|
20
|
+
if (r) {
|
|
21
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
22
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
23
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
29
24
|
}
|
|
30
|
-
return {
|
|
31
|
-
exports: scriptExports,
|
|
32
|
-
options
|
|
33
|
-
};
|
|
34
25
|
}
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
32
|
+
var target = sfc.__vccOpts || sfc;
|
|
33
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
34
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
35
|
+
target[key] = val;
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
35
39
|
|
|
36
|
-
var
|
|
40
|
+
var _sfc_main = defineComponent({
|
|
37
41
|
components: {
|
|
38
42
|
IconClose: IconClose(),
|
|
39
43
|
IconFullscreen: IconFullscreen(),
|
|
@@ -55,167 +59,169 @@ var __vue2_script = defineComponent({
|
|
|
55
59
|
});
|
|
56
60
|
}
|
|
57
61
|
});
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
62
|
+
var _hoisted_1 = {
|
|
63
|
+
key: 0
|
|
64
|
+
};
|
|
65
|
+
var _hoisted_2 = {
|
|
66
|
+
"data-tag": "tiny-dialog-box__title",
|
|
67
|
+
class: "text-sm text-color-text-primary mr-4 flex-1 font-bold"
|
|
68
|
+
};
|
|
69
|
+
var _hoisted_3 = {
|
|
70
|
+
key: 1,
|
|
71
|
+
"data-tag": "tiny-dialog-box__footer",
|
|
72
|
+
class: "pt-4 pr-6 pb-4 pl-6 text-right box-border border-t border-t-color-bg-3 [&_[data-tag=tiny-button]]:mx-1 [&_[data-tag=tiny-button]]:my-0 [&_[data-tag=tiny-toolbar]_[data-tag=tiny-button]]:my-0 [&_[data-tag=tiny-toolbar]_[data-tag=tiny-button]]:mx-1"
|
|
73
|
+
};
|
|
74
|
+
var _hoisted_4 = {
|
|
75
|
+
key: 1
|
|
76
|
+
};
|
|
77
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
78
|
+
var _component_icon_fullscreen = resolveComponent("icon-fullscreen");
|
|
79
|
+
var _component_icon_minscreen = resolveComponent("icon-minscreen");
|
|
80
|
+
var _component_icon_close = resolveComponent("icon-close");
|
|
81
|
+
var _component_tiny_action_sheet = resolveComponent("tiny-action-sheet");
|
|
82
|
+
return openBlock(), createElementBlock("div", null, [_ctx.state.current !== "default" ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(Transition, {
|
|
83
|
+
duration: _ctx.noAnimation ? 0 : void 0,
|
|
84
|
+
name: _ctx.state.animationName,
|
|
85
|
+
onAfterEnter: _ctx.afterEnter,
|
|
86
|
+
onAfterLeave: _ctx.afterLeave,
|
|
87
|
+
persisted: ""
|
|
88
|
+
}, {
|
|
89
|
+
default: withCtx(function() {
|
|
90
|
+
return [withDirectives(createElementVNode(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
class: normalizeClass(["fixed inset-0 m-0 flex items-center", _ctx.dialogClass]),
|
|
94
|
+
"data-tag": "tiny-dialog-box__wrapper",
|
|
95
|
+
onClick: _cache[4] || (_cache[4] = withModifiers(function() {
|
|
96
|
+
return _ctx.handleWrapperClick && _ctx.handleWrapperClick.apply(_ctx, arguments);
|
|
97
|
+
}, ["self"]))
|
|
98
|
+
},
|
|
99
|
+
[(_ctx.destroyOnClose ? _ctx.visible : true) ? (openBlock(), createElementBlock(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
ref: "dialog",
|
|
103
|
+
"data-tag": "tiny-dialog-box",
|
|
104
|
+
class: normalizeClass([[{
|
|
105
|
+
"left-0 top-0 w-screen h-screen": _ctx.state.isFull,
|
|
106
|
+
"text-center": _ctx.center,
|
|
107
|
+
"flex flex-col rounded-none": _ctx.rightSlide
|
|
108
|
+
}], "absolute bg-color-bg-1 border-none overflow-hidden shadow-xl rounded flex flex-col"]),
|
|
109
|
+
style: normalizeStyle(_ctx.state.style),
|
|
110
|
+
key: _ctx.state.key
|
|
111
|
+
},
|
|
112
|
+
[_ctx.showHeader ? (openBlock(), createElementBlock(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
key: 0,
|
|
116
|
+
"data-tag": "tiny-dialog-box__header",
|
|
117
|
+
class: "px-6 py-4 leading-5.5 bg-color-bg-1 flex justify-between items-center border-b border-b-color-bg-3",
|
|
118
|
+
onMousedown: _cache[3] || (_cache[3] = function() {
|
|
119
|
+
return _ctx.handleDrag && _ctx.handleDrag.apply(_ctx, arguments);
|
|
120
|
+
})
|
|
121
|
+
},
|
|
122
|
+
[renderSlot(_ctx.$slots, "title", {}, function() {
|
|
123
|
+
return [createElementVNode(
|
|
124
|
+
"span",
|
|
125
|
+
_hoisted_2,
|
|
126
|
+
toDisplayString(_ctx.title),
|
|
127
|
+
1
|
|
128
|
+
/* TEXT */
|
|
129
|
+
)];
|
|
130
|
+
}), _ctx.resize && !_ctx.state.isFull ? (openBlock(), createElementBlock("button", {
|
|
131
|
+
key: 0,
|
|
132
|
+
type: "button",
|
|
133
|
+
"data-tag": "tiny-dialog-box__headerbtn",
|
|
134
|
+
class: "border-none p-0 leading-none cursor-pointer focus:outline-0",
|
|
135
|
+
"aria-label": "Resize",
|
|
136
|
+
onClick: _cache[0] || (_cache[0] = function($event) {
|
|
137
|
+
return _ctx.toggleFullScreen(true);
|
|
138
|
+
})
|
|
139
|
+
}, [createVNode(_component_icon_fullscreen, {
|
|
140
|
+
"data-tag": "tiny-svg-size tiny-dialog-box__close",
|
|
141
|
+
class: "fill-color-text-primary text-base hover:fill-color-brand"
|
|
142
|
+
})])) : createCommentVNode("v-if", true), _ctx.resize && _ctx.state.isFull ? (openBlock(), createElementBlock("button", {
|
|
143
|
+
key: 1,
|
|
144
|
+
type: "button",
|
|
145
|
+
"data-tag": "tiny-dialog-box__headerbtn",
|
|
146
|
+
class: "border-none p-0 leading-none cursor-pointer focus:outline-0",
|
|
147
|
+
"aria-label": "Resize",
|
|
148
|
+
onClick: _cache[1] || (_cache[1] = function($event) {
|
|
149
|
+
return _ctx.toggleFullScreen(false);
|
|
150
|
+
})
|
|
151
|
+
}, [createVNode(_component_icon_minscreen, {
|
|
152
|
+
"data-tag": "tiny-svg-size tiny-dialog-box__close",
|
|
153
|
+
class: "fill-color-text-primary text-base hover:fill-color-brand"
|
|
154
|
+
})])) : createCommentVNode("v-if", true), _ctx.showClose ? (openBlock(), createElementBlock("button", {
|
|
155
|
+
key: 2,
|
|
156
|
+
type: "button",
|
|
157
|
+
"data-tag": "tiny-dialog-box__headerbtn",
|
|
158
|
+
class: "border-none p-0 leading-none cursor-pointer focus:outline-0",
|
|
159
|
+
"aria-label": "Close",
|
|
160
|
+
onClick: _cache[2] || (_cache[2] = function($event) {
|
|
161
|
+
return _ctx.handleClose("close", $event);
|
|
162
|
+
})
|
|
163
|
+
}, [createVNode(_component_icon_close, {
|
|
164
|
+
"data-tag": "tiny-svg-size tiny-dialog-box__close",
|
|
165
|
+
class: "fill-color-text-primary text-base hover:fill-color-brand"
|
|
166
|
+
})])) : createCommentVNode("v-if", true)],
|
|
167
|
+
32
|
|
168
|
+
/* NEED_HYDRATION */
|
|
169
|
+
)) : createCommentVNode("v-if", true), createElementVNode(
|
|
170
|
+
"div",
|
|
171
|
+
{
|
|
172
|
+
"data-tag": "tiny-dialog-box__body",
|
|
173
|
+
class: normalizeClass(["text-left pt-0 pr-6 pb-0 pl-6 mb-3 mt-3 text-color-text-primary leading-5.5 text-sm overflow-auto", [_ctx.rightSlide || _ctx.state.isFull ? "max-h-[none] flex-auto" : "max-h-[65vh]"]])
|
|
174
|
+
},
|
|
175
|
+
[renderSlot(_ctx.$slots, "default")],
|
|
176
|
+
2
|
|
177
|
+
/* CLASS */
|
|
178
|
+
), _ctx.slots.footer ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "footer", {
|
|
179
|
+
beforeClose: _ctx.beforeClose
|
|
180
|
+
})])) : createCommentVNode("v-if", true)],
|
|
181
|
+
6
|
|
182
|
+
/* CLASS, STYLE */
|
|
183
|
+
)) : createCommentVNode("v-if", true)],
|
|
184
|
+
2
|
|
185
|
+
/* CLASS */
|
|
186
|
+
), [[vShow, _ctx.visible]])];
|
|
187
|
+
}),
|
|
188
|
+
_: 3
|
|
189
|
+
/* FORWARDED */
|
|
190
|
+
}, 8, ["duration", "name", "onAfterEnter", "onAfterLeave"])])) : createCommentVNode("v-if", true), _ctx.state.current === "default" ? (openBlock(), createElementBlock("div", _hoisted_4, [(_ctx.destroyOnClose ? _ctx.visible : true) ? (openBlock(), createBlock(_component_tiny_action_sheet, mergeProps({
|
|
191
|
+
key: 0,
|
|
192
|
+
ref: "dialog"
|
|
193
|
+
}, _ctx.$props, {
|
|
194
|
+
"show-footer": true,
|
|
195
|
+
mask: _ctx.modal,
|
|
196
|
+
"mask-closable": _ctx.closeOnClickModal,
|
|
197
|
+
"before-close": _ctx.beforeClose,
|
|
198
|
+
"onUpdate:visible": _cache[5] || (_cache[5] = function($event) {
|
|
199
|
+
return _ctx.$emit("update:visible", $event);
|
|
200
|
+
})
|
|
201
|
+
}), createSlots({
|
|
202
|
+
_: 2
|
|
203
|
+
/* DYNAMIC */
|
|
204
|
+
}, [renderList(_ctx.slots, function(value, name) {
|
|
205
|
+
return {
|
|
206
|
+
name,
|
|
207
|
+
fn: withCtx(function(scopeData) {
|
|
208
|
+
return [(openBlock(), createElementBlock(
|
|
209
|
+
"div",
|
|
210
|
+
{
|
|
211
|
+
class: normalizeClass({
|
|
200
212
|
"flex w-full justify-between px-4 [&_[data-tag=tiny-button]]:flex-grow [&_[data-tag=tiny-button]:nth-child(2)]:ml-2": name === "footer",
|
|
201
213
|
"px-4 min-h-[250px]": name === "default"
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
function __vue2_injectStyles(context) {
|
|
213
|
-
for (var o in __cssModules) {
|
|
214
|
-
this[o] = __cssModules[o];
|
|
215
|
-
}
|
|
214
|
+
}),
|
|
215
|
+
key: name
|
|
216
|
+
},
|
|
217
|
+
[renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(scopeData)))],
|
|
218
|
+
2
|
|
219
|
+
/* CLASS */
|
|
220
|
+
))];
|
|
221
|
+
})
|
|
222
|
+
};
|
|
223
|
+
})]), 1040, ["mask", "mask-closable", "before-close"])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)]);
|
|
216
224
|
}
|
|
217
|
-
var mobileFirst = /* @__PURE__ */
|
|
218
|
-
return __component__.exports;
|
|
219
|
-
}();
|
|
225
|
+
var mobileFirst = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
220
226
|
|
|
221
227
|
export { mobileFirst as default };
|
package/lib/mobile.js
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
import { renderless, api } from '@opentinyvue/vue-renderless/dialog-box/vue';
|
|
2
2
|
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import '@opentinyvue/vue-theme-mobile/dialog-box/index.css';
|
|
4
|
+
import { openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, withModifiers, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, vShow } from 'vue';
|
|
4
5
|
|
|
5
|
-
function
|
|
6
|
-
var
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
7
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
8
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
9
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
10
|
+
t && (r = t);
|
|
11
|
+
var o = 0;
|
|
12
|
+
return function() {
|
|
13
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
14
|
+
};
|
|
11
15
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var originalRender = options.render;
|
|
20
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
21
|
-
hook.call(context);
|
|
22
|
-
return originalRender(h, context);
|
|
23
|
-
};
|
|
24
|
-
} else {
|
|
25
|
-
var existing = options.beforeCreate;
|
|
26
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
27
|
-
}
|
|
16
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
17
|
+
}
|
|
18
|
+
function _unsupportedIterableToArray(r, a) {
|
|
19
|
+
if (r) {
|
|
20
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
21
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
22
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
28
23
|
}
|
|
29
|
-
return {
|
|
30
|
-
exports: scriptExports,
|
|
31
|
-
options
|
|
32
|
-
};
|
|
33
24
|
}
|
|
25
|
+
function _arrayLikeToArray(r, a) {
|
|
26
|
+
(null == a || a > r.length) && (a = r.length);
|
|
27
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
31
|
+
var target = sfc.__vccOpts || sfc;
|
|
32
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
33
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
34
|
+
target[key] = val;
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
34
38
|
|
|
35
|
-
var
|
|
39
|
+
var _sfc_main = defineComponent({
|
|
36
40
|
emits: ["update:visible", "change", "before-close", "open", "close", "opened", "confirm", "cancel", "closed"],
|
|
37
41
|
props: [].concat(props, ["visible", "title", "modal", "closeOnClickModal", "modalAppendToBody", "appendToBody", "width", "top", "showHeader", "destroyOnClose"]),
|
|
38
42
|
model: {
|
|
@@ -48,75 +52,88 @@ var __vue2_script = defineComponent({
|
|
|
48
52
|
});
|
|
49
53
|
}
|
|
50
54
|
});
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _c = _vm._self._c || _h;
|
|
55
|
-
return _c("transition", {
|
|
56
|
-
attrs: {
|
|
57
|
-
"name": "dialog-fade"
|
|
58
|
-
}
|
|
59
|
-
}, [_c("div", {
|
|
60
|
-
directives: [{
|
|
61
|
-
name: "show",
|
|
62
|
-
rawName: "v-show",
|
|
63
|
-
value: _vm.visible,
|
|
64
|
-
expression: "visible"
|
|
65
|
-
}],
|
|
66
|
-
staticClass: "tiny-mobile-dialog-box__wrapper",
|
|
67
|
-
on: {
|
|
68
|
-
"click": function click($event) {
|
|
69
|
-
if ($event.target !== $event.currentTarget) return null;
|
|
70
|
-
return _vm.handleWrapperClick.apply(null, arguments);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}, [_c("div", {
|
|
74
|
-
key: _vm.state.key,
|
|
75
|
-
ref: "dialog",
|
|
76
|
-
staticClass: "tiny-mobile-dialog-box",
|
|
77
|
-
class: {
|
|
78
|
-
"is-hide-header": !_vm.showHeader
|
|
79
|
-
}
|
|
80
|
-
}, [_vm.showHeader ? _c("div", {
|
|
81
|
-
staticClass: "tiny-mobile-dialog-box__header"
|
|
82
|
-
}, [_vm._t("title", function() {
|
|
83
|
-
return [_c("span", {
|
|
84
|
-
staticClass: "tiny-mobile-dialog-box__title"
|
|
85
|
-
}, [_vm._v(_vm._s(_vm.title))])];
|
|
86
|
-
})], 2) : _vm._e(), _c("div", {
|
|
87
|
-
staticClass: "tiny-mobile-dialog-box__body"
|
|
88
|
-
}, [_vm._t("default")], 2), _c("div", {
|
|
89
|
-
staticClass: "tiny-mobile-dialog-box__footer"
|
|
90
|
-
}, [_vm._t("footer", function() {
|
|
91
|
-
return [_c("button", {
|
|
92
|
-
staticClass: "tiny-mobile-dialog-box__button cancel-button",
|
|
93
|
-
attrs: {
|
|
94
|
-
"type": "button"
|
|
95
|
-
},
|
|
96
|
-
on: {
|
|
97
|
-
"click": _vm.handleCancel
|
|
98
|
-
}
|
|
99
|
-
}, [_vm._v(" " + _vm._s(_vm.t("ui.dialogBox.cancel")) + " ")]), _c("button", {
|
|
100
|
-
staticClass: "tiny-mobile-dialog-box__button confirm-button",
|
|
101
|
-
attrs: {
|
|
102
|
-
"type": "button"
|
|
103
|
-
},
|
|
104
|
-
on: {
|
|
105
|
-
"click": _vm.handleConfirm
|
|
106
|
-
}
|
|
107
|
-
}, [_vm._v(" " + _vm._s(_vm.t("ui.dialogBox.confirm")) + " ")])];
|
|
108
|
-
})], 2)])])]);
|
|
55
|
+
var _hoisted_1 = {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "tiny-mobile-dialog-box__header"
|
|
109
58
|
};
|
|
110
|
-
var
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
59
|
+
var _hoisted_2 = {
|
|
60
|
+
class: "tiny-mobile-dialog-box__title"
|
|
61
|
+
};
|
|
62
|
+
var _hoisted_3 = {
|
|
63
|
+
class: "tiny-mobile-dialog-box__body"
|
|
64
|
+
};
|
|
65
|
+
var _hoisted_4 = {
|
|
66
|
+
class: "tiny-mobile-dialog-box__footer"
|
|
67
|
+
};
|
|
68
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
69
|
+
return openBlock(), createBlock(Transition, {
|
|
70
|
+
name: "dialog-fade",
|
|
71
|
+
persisted: ""
|
|
72
|
+
}, {
|
|
73
|
+
default: withCtx(function() {
|
|
74
|
+
return [withDirectives(createElementVNode(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
class: "tiny-mobile-dialog-box__wrapper",
|
|
78
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(function() {
|
|
79
|
+
return _ctx.handleWrapperClick && _ctx.handleWrapperClick.apply(_ctx, arguments);
|
|
80
|
+
}, ["self"]))
|
|
81
|
+
},
|
|
82
|
+
[(openBlock(), createElementBlock(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
ref: "dialog",
|
|
86
|
+
class: normalizeClass([{
|
|
87
|
+
"is-hide-header": !_ctx.showHeader
|
|
88
|
+
}, "tiny-mobile-dialog-box"]),
|
|
89
|
+
key: _ctx.state.key
|
|
90
|
+
},
|
|
91
|
+
[_ctx.showHeader ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, function() {
|
|
92
|
+
return [createElementVNode(
|
|
93
|
+
"span",
|
|
94
|
+
_hoisted_2,
|
|
95
|
+
toDisplayString(_ctx.title),
|
|
96
|
+
1
|
|
97
|
+
/* TEXT */
|
|
98
|
+
)];
|
|
99
|
+
})])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "footer", {}, function() {
|
|
100
|
+
return [createElementVNode(
|
|
101
|
+
"button",
|
|
102
|
+
{
|
|
103
|
+
type: "button",
|
|
104
|
+
onClick: _cache[0] || (_cache[0] = function() {
|
|
105
|
+
return _ctx.handleCancel && _ctx.handleCancel.apply(_ctx, arguments);
|
|
106
|
+
}),
|
|
107
|
+
class: "tiny-mobile-dialog-box__button cancel-button"
|
|
108
|
+
},
|
|
109
|
+
toDisplayString(_ctx.t("ui.dialogBox.cancel")),
|
|
110
|
+
1
|
|
111
|
+
/* TEXT */
|
|
112
|
+
), createElementVNode(
|
|
113
|
+
"button",
|
|
114
|
+
{
|
|
115
|
+
type: "button",
|
|
116
|
+
onClick: _cache[1] || (_cache[1] = function() {
|
|
117
|
+
return _ctx.handleConfirm && _ctx.handleConfirm.apply(_ctx, arguments);
|
|
118
|
+
}),
|
|
119
|
+
class: "tiny-mobile-dialog-box__button confirm-button"
|
|
120
|
+
},
|
|
121
|
+
toDisplayString(_ctx.t("ui.dialogBox.confirm")),
|
|
122
|
+
1
|
|
123
|
+
/* TEXT */
|
|
124
|
+
)];
|
|
125
|
+
})])],
|
|
126
|
+
2
|
|
127
|
+
/* CLASS */
|
|
128
|
+
))],
|
|
129
|
+
512
|
|
130
|
+
/* NEED_PATCH */
|
|
131
|
+
), [[vShow, _ctx.visible]])];
|
|
132
|
+
}),
|
|
133
|
+
_: 3
|
|
134
|
+
/* FORWARDED */
|
|
135
|
+
});
|
|
117
136
|
}
|
|
118
|
-
var mobile = /* @__PURE__ */
|
|
119
|
-
return __component__.exports;
|
|
120
|
-
}();
|
|
137
|
+
var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
121
138
|
|
|
122
139
|
export { mobile as default };
|