@opentinyvue/vue-exception 2.21.0 → 2.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 CHANGED
@@ -7,20 +7,12 @@ function _extends() {
7
7
  return n;
8
8
  }, _extends.apply(null, arguments);
9
9
  }
10
- import { defineComponent, $prefix, $props, $setup } from "@opentinyvue/vue-common";
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
- var tinyMode = typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
17
- if ("mobile" === (tinyMode || mode)) {
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 = "2.21.0";
45
+ var version = "2.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": "2.21.0",
3
+ "version": "2.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.21.0",
11
- "@opentinyvue/vue-common": "~2.21.0",
12
- "@opentinyvue/vue-button": "~2.21.0",
13
- "@opentinyvue/vue-theme-mobile": "~3.21.0",
14
- "@opentinyvue/vue-icon": "~2.21.0"
10
+ "@opentinyvue/vue-renderless": "~3.22.0",
11
+ "@opentinyvue/vue-common": "~2.22.0",
12
+ "@opentinyvue/vue-button": "~2.22.0",
13
+ "@opentinyvue/vue-icon": "~2.22.0"
15
14
  },
16
15
  "license": "MIT",
17
16
  "types": "index.d.ts",
package/lib/mobile.js DELETED
@@ -1,112 +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
-
5
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
6
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
7
- if (render) {
8
- options.render = render;
9
- options.staticRenderFns = staticRenderFns;
10
- options._compiled = true;
11
- }
12
- var hook;
13
- if (injectStyles) {
14
- hook = injectStyles;
15
- }
16
- if (hook) {
17
- if (options.functional) {
18
- options._injectStyles = hook;
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
- }
28
- }
29
- return {
30
- exports: scriptExports,
31
- options
32
- };
33
- }
34
-
35
- var __vue2_script = defineComponent({
36
- name: $prefix + "Exception",
37
- components: {
38
- TinyButton: Button
39
- },
40
- props: {
41
- type: {
42
- type: String,
43
- default: "nodata"
44
- },
45
- message: String,
46
- subMessage: String,
47
- exceptionClass: String,
48
- buttonText: String,
49
- imageUrl: String
50
- },
51
- setup: function setup$1(props, context) {
52
- return setup({
53
- props,
54
- context,
55
- renderless,
56
- api
57
- });
58
- }
59
- });
60
- var render = function render2() {
61
- var _vm = this;
62
- var _h = _vm.$createElement;
63
- var _c = _vm._self._c || _h;
64
- return _c("div", {
65
- staticClass: "tiny-mobile-exception",
66
- class: _vm.exceptionClass
67
- }, [_c("div", {
68
- staticClass: "tiny-mobile-exception__content"
69
- }, [_vm.imageUrl ? _c("img", {
70
- staticClass: "tiny-mobile-exception__image",
71
- attrs: {
72
- "src": _vm.imageUrl
73
- }
74
- }) : _c("div", {
75
- staticClass: "tiny-mobile-exception__content-view",
76
- class: ["tiny-mobile-exception__content-" + _vm.type]
77
- }), _vm._t("content", function() {
78
- return [_c("div", {
79
- staticClass: "tiny-mobile-exception__content-message"
80
- }, [_c("div", {
81
- staticClass: "main-message"
82
- }, [_vm._v(" " + _vm._s(_vm.state.message) + " ")]), _vm.subMessage ? _c("div", {
83
- staticClass: "sub-message"
84
- }, [_vm._v(" " + _vm._s(_vm.subMessage) + " ")]) : _vm._e(), _vm.type === "nodata" ? _vm._t("default", function() {
85
- return [_c("tiny-button", {
86
- attrs: {
87
- "type": "primary",
88
- "size": "medium",
89
- "round": ""
90
- },
91
- on: {
92
- "click": _vm.create
93
- }
94
- }, [_vm._v(" " + _vm._s(_vm.buttonText ? _vm.buttonText : _vm.t("ui.exception.create")) + " ")])];
95
- }) : _vm._e()], 2)];
96
- })], 2), _c("div", {
97
- staticClass: "tiny-mobile-exception__footer"
98
- }, [_vm._t("footer")], 2)]);
99
- };
100
- var staticRenderFns = [];
101
- var __cssModules = {};
102
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
103
- function __vue2_injectStyles(context) {
104
- for (var o in __cssModules) {
105
- this[o] = __cssModules[o];
106
- }
107
- }
108
- var mobile = /* @__PURE__ */ function() {
109
- return __component__.exports;
110
- }();
111
-
112
- export { mobile as default };
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;