@opentinyvue/vue-exception 3.21.0 → 3.22.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 +4 -12
- package/package.json +5 -6
- package/lib/mobile.js +0 -141
- package/src/mobile.vue.d.ts +0 -33
package/lib/index.js
CHANGED
|
@@ -7,20 +7,12 @@ function _extends() {
|
|
|
7
7
|
return n;
|
|
8
8
|
}, _extends.apply(null, arguments);
|
|
9
9
|
}
|
|
10
|
-
import { defineComponent, $
|
|
11
|
-
import MobileTemplate from "./mobile.js";
|
|
10
|
+
import { defineComponent, $props, $setup, $prefix } from "@opentinyvue/vue-common";
|
|
12
11
|
import MobileFirstTemplate from "./mobile-first.js";
|
|
13
|
-
import "@opentinyvue/vue-theme-mobile/exception/index.css";
|
|
14
12
|
var template = function template2(mode) {
|
|
15
13
|
var _process$env;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return MobileTemplate;
|
|
19
|
-
}
|
|
20
|
-
if ("mobile-first" === (tinyMode || mode)) {
|
|
21
|
-
return MobileFirstTemplate;
|
|
22
|
-
}
|
|
23
|
-
return MobileTemplate;
|
|
14
|
+
typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
|
|
15
|
+
return MobileFirstTemplate;
|
|
24
16
|
};
|
|
25
17
|
var Exception = defineComponent({
|
|
26
18
|
name: $prefix + "Exception",
|
|
@@ -50,7 +42,7 @@ var Exception = defineComponent({
|
|
|
50
42
|
});
|
|
51
43
|
}
|
|
52
44
|
});
|
|
53
|
-
var version = "3.
|
|
45
|
+
var version = "3.undefined";
|
|
54
46
|
Exception.install = function(Vue) {
|
|
55
47
|
Vue.component(Exception.name, Exception);
|
|
56
48
|
};
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-exception",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.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
|
-
"@opentinyvue/vue-renderless": "~3.
|
|
11
|
-
"@opentinyvue/vue-common": "~3.
|
|
12
|
-
"@opentinyvue/vue-button": "~3.
|
|
13
|
-
"@opentinyvue/vue-
|
|
14
|
-
"@opentinyvue/vue-icon": "~3.21.0"
|
|
10
|
+
"@opentinyvue/vue-renderless": "~3.22.0",
|
|
11
|
+
"@opentinyvue/vue-common": "~3.22.0",
|
|
12
|
+
"@opentinyvue/vue-button": "~3.22.0",
|
|
13
|
+
"@opentinyvue/vue-icon": "~3.22.0"
|
|
15
14
|
},
|
|
16
15
|
"license": "MIT",
|
|
17
16
|
"types": "index.d.ts",
|
package/lib/mobile.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { renderless, api } from '@opentinyvue/vue-renderless/exception/vue';
|
|
2
|
-
import { defineComponent, $prefix, setup } from '@opentinyvue/vue-common';
|
|
3
|
-
import Button from '@opentinyvue/vue-button';
|
|
4
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, toDisplayString, createCommentVNode, createVNode, withCtx, createTextVNode } from 'vue';
|
|
5
|
-
|
|
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
|
-
};
|
|
15
|
-
}
|
|
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;
|
|
23
|
-
}
|
|
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
|
-
};
|
|
38
|
-
|
|
39
|
-
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
|
-
name: $prefix + "Exception",
|
|
41
|
-
components: {
|
|
42
|
-
TinyButton: Button
|
|
43
|
-
},
|
|
44
|
-
props: {
|
|
45
|
-
type: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: "nodata"
|
|
48
|
-
},
|
|
49
|
-
message: String,
|
|
50
|
-
subMessage: String,
|
|
51
|
-
exceptionClass: String,
|
|
52
|
-
buttonText: String,
|
|
53
|
-
imageUrl: String
|
|
54
|
-
},
|
|
55
|
-
setup: function setup$1(props, context) {
|
|
56
|
-
return setup({
|
|
57
|
-
props,
|
|
58
|
-
context,
|
|
59
|
-
renderless,
|
|
60
|
-
api
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
var _hoisted_1 = {
|
|
65
|
-
class: "tiny-mobile-exception__content"
|
|
66
|
-
};
|
|
67
|
-
var _hoisted_2 = ["src"];
|
|
68
|
-
var _hoisted_3 = {
|
|
69
|
-
class: "tiny-mobile-exception__content-message"
|
|
70
|
-
};
|
|
71
|
-
var _hoisted_4 = {
|
|
72
|
-
class: "main-message"
|
|
73
|
-
};
|
|
74
|
-
var _hoisted_5 = {
|
|
75
|
-
key: 0,
|
|
76
|
-
class: "sub-message"
|
|
77
|
-
};
|
|
78
|
-
var _hoisted_6 = {
|
|
79
|
-
class: "tiny-mobile-exception__footer"
|
|
80
|
-
};
|
|
81
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
82
|
-
var _component_tiny_button = resolveComponent("tiny-button");
|
|
83
|
-
return openBlock(), createElementBlock(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
class: normalizeClass(["tiny-mobile-exception", _ctx.exceptionClass])
|
|
87
|
-
},
|
|
88
|
-
[createElementVNode("div", _hoisted_1, [_ctx.imageUrl ? (openBlock(), createElementBlock("img", {
|
|
89
|
-
key: 0,
|
|
90
|
-
src: _ctx.imageUrl,
|
|
91
|
-
class: "tiny-mobile-exception__image"
|
|
92
|
-
}, null, 8, _hoisted_2)) : (openBlock(), createElementBlock(
|
|
93
|
-
"div",
|
|
94
|
-
{
|
|
95
|
-
key: 1,
|
|
96
|
-
class: normalizeClass(["tiny-mobile-exception__content-view", ["tiny-mobile-exception__content-" + _ctx.type]])
|
|
97
|
-
},
|
|
98
|
-
null,
|
|
99
|
-
2
|
|
100
|
-
/* CLASS */
|
|
101
|
-
)), renderSlot(_ctx.$slots, "content", {}, function() {
|
|
102
|
-
return [createElementVNode("div", _hoisted_3, [createElementVNode(
|
|
103
|
-
"div",
|
|
104
|
-
_hoisted_4,
|
|
105
|
-
toDisplayString(_ctx.state.message),
|
|
106
|
-
1
|
|
107
|
-
/* TEXT */
|
|
108
|
-
), _ctx.subMessage ? (openBlock(), createElementBlock(
|
|
109
|
-
"div",
|
|
110
|
-
_hoisted_5,
|
|
111
|
-
toDisplayString(_ctx.subMessage),
|
|
112
|
-
1
|
|
113
|
-
/* TEXT */
|
|
114
|
-
)) : createCommentVNode("v-if", true), _ctx.type === "nodata" ? renderSlot(_ctx.$slots, "default", {
|
|
115
|
-
key: 1
|
|
116
|
-
}, function() {
|
|
117
|
-
return [createVNode(_component_tiny_button, {
|
|
118
|
-
onClick: _ctx.create,
|
|
119
|
-
type: "primary",
|
|
120
|
-
size: "medium",
|
|
121
|
-
round: ""
|
|
122
|
-
}, {
|
|
123
|
-
default: withCtx(function() {
|
|
124
|
-
return [createTextVNode(
|
|
125
|
-
toDisplayString(_ctx.buttonText ? _ctx.buttonText : _ctx.t("ui.exception.create")),
|
|
126
|
-
1
|
|
127
|
-
/* TEXT */
|
|
128
|
-
)];
|
|
129
|
-
}),
|
|
130
|
-
_: 1
|
|
131
|
-
/* STABLE */
|
|
132
|
-
}, 8, ["onClick"])];
|
|
133
|
-
}) : createCommentVNode("v-if", true)])];
|
|
134
|
-
})]), createElementVNode("div", _hoisted_6, [renderSlot(_ctx.$slots, "footer")])],
|
|
135
|
-
2
|
|
136
|
-
/* CLASS */
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
140
|
-
|
|
141
|
-
export { mobile as default };
|
package/src/mobile.vue.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
-
type: {
|
|
3
|
-
type: StringConstructor;
|
|
4
|
-
default: string;
|
|
5
|
-
};
|
|
6
|
-
message: StringConstructor;
|
|
7
|
-
subMessage: StringConstructor;
|
|
8
|
-
exceptionClass: StringConstructor;
|
|
9
|
-
buttonText: StringConstructor;
|
|
10
|
-
imageUrl: StringConstructor;
|
|
11
|
-
}, {
|
|
12
|
-
t: (this: any, path: any, options?: any) => any;
|
|
13
|
-
vm: any;
|
|
14
|
-
f: (props: any, attrs?: {}) => {};
|
|
15
|
-
a: (attrs: any, filters: any, include: any) => {};
|
|
16
|
-
d: (props: any) => void;
|
|
17
|
-
dp: (props: any) => void;
|
|
18
|
-
gcls: (key: any) => any;
|
|
19
|
-
m: (...cssClasses: any[]) => string;
|
|
20
|
-
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
21
|
-
type: {
|
|
22
|
-
type: StringConstructor;
|
|
23
|
-
default: string;
|
|
24
|
-
};
|
|
25
|
-
message: StringConstructor;
|
|
26
|
-
subMessage: StringConstructor;
|
|
27
|
-
exceptionClass: StringConstructor;
|
|
28
|
-
buttonText: StringConstructor;
|
|
29
|
-
imageUrl: StringConstructor;
|
|
30
|
-
}>>, {
|
|
31
|
-
type: string;
|
|
32
|
-
}, {}>;
|
|
33
|
-
export default _default;
|