widget.qw 1.0.88 → 1.0.89
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/build/style.css +6 -6
- package/build/widget.qw.es.js +7 -42
- package/build/widget.qw.umd.js +6 -41
- package/package.json +1 -1
- package/src/components/HeadBar.vue +5 -10
- package/src/main.js +3 -0
package/build/style.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
.enterprise-header[data-v-
|
|
2
|
+
.enterprise-header[data-v-435ecee6] {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
|
|
13
13
|
margin-bottom: 4px;
|
|
14
14
|
}
|
|
15
|
-
.header-title[data-v-
|
|
15
|
+
.header-title[data-v-435ecee6] {
|
|
16
16
|
font-size: 14px;
|
|
17
17
|
font-weight: 500;
|
|
18
18
|
white-space: nowrap;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
text-overflow: ellipsis;
|
|
21
21
|
max-width: 70%;
|
|
22
22
|
}
|
|
23
|
-
.header-btn[data-v-
|
|
23
|
+
.header-btn[data-v-435ecee6] {
|
|
24
24
|
position: absolute;
|
|
25
25
|
width: 48px;
|
|
26
26
|
height: 48px;
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
cursor: pointer;
|
|
36
36
|
padding: 0;
|
|
37
37
|
}
|
|
38
|
-
.header-btn[data-v-
|
|
38
|
+
.header-btn[data-v-435ecee6]:disabled {
|
|
39
39
|
opacity: 0.5;
|
|
40
40
|
cursor: not-allowed;
|
|
41
41
|
}
|
|
42
|
-
.back-btn[data-v-
|
|
42
|
+
.back-btn[data-v-435ecee6] {
|
|
43
43
|
left: 0;
|
|
44
44
|
}
|
|
45
|
-
.home-btn[data-v-
|
|
45
|
+
.home-btn[data-v-435ecee6] {
|
|
46
46
|
right: 0;
|
|
47
47
|
}
|
|
48
48
|
|
package/build/widget.qw.es.js
CHANGED
|
@@ -38,41 +38,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
38
38
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
import {
|
|
41
|
+
import { computed, resolveComponent, openBlock, createElementBlock, unref, createVNode, createCommentVNode, createElementVNode, toDisplayString, onUnmounted, onDeactivated, isRef, watch, onMounted, nextTick, onActivated, ref, reactive, getCurrentInstance, provide, inject, isVNode, defineComponent, onBeforeUnmount, watchEffect, mergeProps, Transition, Teleport, withDirectives, vShow, Fragment, createApp, resolveDirective, createBlock, withCtx, renderList, createTextVNode, createSlots, withModifiers, onBeforeUpdate, normalizeClass, renderSlot } from "vue";
|
|
42
42
|
var vm = {};
|
|
43
|
-
|
|
44
|
-
* vue-router v4.0.15
|
|
45
|
-
* (c) 2022 Eduardo San Martin Morote
|
|
46
|
-
* @license MIT
|
|
47
|
-
*/
|
|
48
|
-
const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
|
|
49
|
-
const PolySymbol = (name2) => hasSymbol ? Symbol(name2) : "_vr_" + name2;
|
|
50
|
-
const routerKey = /* @__PURE__ */ PolySymbol("r");
|
|
51
|
-
const routeLocationKey = /* @__PURE__ */ PolySymbol("rl");
|
|
52
|
-
var NavigationType;
|
|
53
|
-
(function(NavigationType2) {
|
|
54
|
-
NavigationType2["pop"] = "pop";
|
|
55
|
-
NavigationType2["push"] = "push";
|
|
56
|
-
})(NavigationType || (NavigationType = {}));
|
|
57
|
-
var NavigationDirection;
|
|
58
|
-
(function(NavigationDirection2) {
|
|
59
|
-
NavigationDirection2["back"] = "back";
|
|
60
|
-
NavigationDirection2["forward"] = "forward";
|
|
61
|
-
NavigationDirection2["unknown"] = "";
|
|
62
|
-
})(NavigationDirection || (NavigationDirection = {}));
|
|
63
|
-
var NavigationFailureType;
|
|
64
|
-
(function(NavigationFailureType2) {
|
|
65
|
-
NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted";
|
|
66
|
-
NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled";
|
|
67
|
-
NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated";
|
|
68
|
-
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
69
|
-
function useRouter() {
|
|
70
|
-
return inject(routerKey);
|
|
71
|
-
}
|
|
72
|
-
function useRoute() {
|
|
73
|
-
return inject(routeLocationKey);
|
|
74
|
-
}
|
|
75
|
-
var HeadBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.enterprise-header[data-v-d3934054] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n background-color: #2d8cf0; /* \u4F01\u4E1A\u5FAE\u4FE1\u98CE\u683C\u84DD\u8272 */\r\n background-color: #fff;\r\n color: white;\r\n color: #000;\r\n position: relative;\r\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);\r\n margin-bottom: 4px;\n}\n.header-title[data-v-d3934054] {\r\n font-size: 14px;\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 70%;\n}\n.header-btn[data-v-d3934054] {\r\n position: absolute;\r\n width: 48px;\r\n height: 48px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background: transparent;\r\n border: none;\r\n color: white;\r\n color: #000;\r\n font-size: 20px;\r\n cursor: pointer;\r\n padding: 0;\n}\n.header-btn[data-v-d3934054]:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\n}\n.back-btn[data-v-d3934054] {\r\n left: 0;\n}\n.home-btn[data-v-d3934054] {\r\n right: 0;\n}\r\n \r\n \r\n ")();
|
|
43
|
+
var HeadBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.enterprise-header[data-v-435ecee6] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n background-color: #2d8cf0; /* \u4F01\u4E1A\u5FAE\u4FE1\u98CE\u683C\u84DD\u8272 */\r\n background-color: #fff;\r\n color: white;\r\n color: #000;\r\n position: relative;\r\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);\r\n margin-bottom: 4px;\n}\n.header-title[data-v-435ecee6] {\r\n font-size: 14px;\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 70%;\n}\n.header-btn[data-v-435ecee6] {\r\n position: absolute;\r\n width: 48px;\r\n height: 48px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background: transparent;\r\n border: none;\r\n color: white;\r\n color: #000;\r\n font-size: 20px;\r\n cursor: pointer;\r\n padding: 0;\n}\n.header-btn[data-v-435ecee6]:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\n}\n.back-btn[data-v-435ecee6] {\r\n left: 0;\n}\n.home-btn[data-v-435ecee6] {\r\n right: 0;\n}\r\n \r\n \r\n ")();
|
|
76
44
|
var _export_sfc = (sfc, props) => {
|
|
77
45
|
const target = sfc.__vccOpts || sfc;
|
|
78
46
|
for (const [key, val] of props) {
|
|
@@ -101,22 +69,19 @@ const _sfc_main$x = {
|
|
|
101
69
|
},
|
|
102
70
|
setup(__props) {
|
|
103
71
|
const props = __props;
|
|
104
|
-
const router2 = useRouter();
|
|
105
|
-
const route = useRoute();
|
|
106
72
|
const canGoBack = computed(() => {
|
|
107
73
|
return window.history.length > 1;
|
|
108
74
|
});
|
|
109
75
|
const handleBack = () => {
|
|
110
|
-
console.log("back", router2, route);
|
|
111
76
|
if (canGoBack.value) {
|
|
112
|
-
|
|
77
|
+
vm.routerCallback().back();
|
|
113
78
|
} else {
|
|
114
|
-
|
|
79
|
+
vm.routerCallback().push(props.homePath);
|
|
115
80
|
}
|
|
116
81
|
};
|
|
117
82
|
const handleHome = () => {
|
|
118
|
-
if (
|
|
119
|
-
|
|
83
|
+
if (vm.routerCallback().path !== props.homePath) {
|
|
84
|
+
vm.routerCallback().push(props.homePath);
|
|
120
85
|
}
|
|
121
86
|
};
|
|
122
87
|
return (_ctx, _cache) => {
|
|
@@ -136,7 +101,7 @@ const _sfc_main$x = {
|
|
|
136
101
|
};
|
|
137
102
|
}
|
|
138
103
|
};
|
|
139
|
-
var HeadBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-
|
|
104
|
+
var HeadBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-435ecee6"]]);
|
|
140
105
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
141
106
|
function getAugmentedNamespace(n) {
|
|
142
107
|
if (n.__esModule)
|
package/build/widget.qw.umd.js
CHANGED
|
@@ -43,39 +43,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
43
43
|
})(this, function(exports, vue) {
|
|
44
44
|
"use strict";
|
|
45
45
|
var vm = {};
|
|
46
|
-
|
|
47
|
-
* vue-router v4.0.15
|
|
48
|
-
* (c) 2022 Eduardo San Martin Morote
|
|
49
|
-
* @license MIT
|
|
50
|
-
*/
|
|
51
|
-
const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
|
|
52
|
-
const PolySymbol = (name2) => hasSymbol ? Symbol(name2) : "_vr_" + name2;
|
|
53
|
-
const routerKey = /* @__PURE__ */ PolySymbol("r");
|
|
54
|
-
const routeLocationKey = /* @__PURE__ */ PolySymbol("rl");
|
|
55
|
-
var NavigationType;
|
|
56
|
-
(function(NavigationType2) {
|
|
57
|
-
NavigationType2["pop"] = "pop";
|
|
58
|
-
NavigationType2["push"] = "push";
|
|
59
|
-
})(NavigationType || (NavigationType = {}));
|
|
60
|
-
var NavigationDirection;
|
|
61
|
-
(function(NavigationDirection2) {
|
|
62
|
-
NavigationDirection2["back"] = "back";
|
|
63
|
-
NavigationDirection2["forward"] = "forward";
|
|
64
|
-
NavigationDirection2["unknown"] = "";
|
|
65
|
-
})(NavigationDirection || (NavigationDirection = {}));
|
|
66
|
-
var NavigationFailureType;
|
|
67
|
-
(function(NavigationFailureType2) {
|
|
68
|
-
NavigationFailureType2[NavigationFailureType2["aborted"] = 4] = "aborted";
|
|
69
|
-
NavigationFailureType2[NavigationFailureType2["cancelled"] = 8] = "cancelled";
|
|
70
|
-
NavigationFailureType2[NavigationFailureType2["duplicated"] = 16] = "duplicated";
|
|
71
|
-
})(NavigationFailureType || (NavigationFailureType = {}));
|
|
72
|
-
function useRouter() {
|
|
73
|
-
return vue.inject(routerKey);
|
|
74
|
-
}
|
|
75
|
-
function useRoute() {
|
|
76
|
-
return vue.inject(routeLocationKey);
|
|
77
|
-
}
|
|
78
|
-
var HeadBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.enterprise-header[data-v-d3934054] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n background-color: #2d8cf0; /* \u4F01\u4E1A\u5FAE\u4FE1\u98CE\u683C\u84DD\u8272 */\r\n background-color: #fff;\r\n color: white;\r\n color: #000;\r\n position: relative;\r\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);\r\n margin-bottom: 4px;\n}\n.header-title[data-v-d3934054] {\r\n font-size: 14px;\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 70%;\n}\n.header-btn[data-v-d3934054] {\r\n position: absolute;\r\n width: 48px;\r\n height: 48px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background: transparent;\r\n border: none;\r\n color: white;\r\n color: #000;\r\n font-size: 20px;\r\n cursor: pointer;\r\n padding: 0;\n}\n.header-btn[data-v-d3934054]:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\n}\n.back-btn[data-v-d3934054] {\r\n left: 0;\n}\n.home-btn[data-v-d3934054] {\r\n right: 0;\n}\r\n \r\n \r\n ")();
|
|
46
|
+
var HeadBar_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.enterprise-header[data-v-435ecee6] {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n background-color: #2d8cf0; /* \u4F01\u4E1A\u5FAE\u4FE1\u98CE\u683C\u84DD\u8272 */\r\n background-color: #fff;\r\n color: white;\r\n color: #000;\r\n position: relative;\r\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);\r\n margin-bottom: 4px;\n}\n.header-title[data-v-435ecee6] {\r\n font-size: 14px;\r\n font-weight: 500;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 70%;\n}\n.header-btn[data-v-435ecee6] {\r\n position: absolute;\r\n width: 48px;\r\n height: 48px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background: transparent;\r\n border: none;\r\n color: white;\r\n color: #000;\r\n font-size: 20px;\r\n cursor: pointer;\r\n padding: 0;\n}\n.header-btn[data-v-435ecee6]:disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed;\n}\n.back-btn[data-v-435ecee6] {\r\n left: 0;\n}\n.home-btn[data-v-435ecee6] {\r\n right: 0;\n}\r\n \r\n \r\n ")();
|
|
79
47
|
var _export_sfc = (sfc, props) => {
|
|
80
48
|
const target = sfc.__vccOpts || sfc;
|
|
81
49
|
for (const [key, val] of props) {
|
|
@@ -104,22 +72,19 @@ var __async = (__this, __arguments, generator) => {
|
|
|
104
72
|
},
|
|
105
73
|
setup(__props) {
|
|
106
74
|
const props = __props;
|
|
107
|
-
const router2 = useRouter();
|
|
108
|
-
const route = useRoute();
|
|
109
75
|
const canGoBack = vue.computed(() => {
|
|
110
76
|
return window.history.length > 1;
|
|
111
77
|
});
|
|
112
78
|
const handleBack = () => {
|
|
113
|
-
console.log("back", router2, route);
|
|
114
79
|
if (canGoBack.value) {
|
|
115
|
-
|
|
80
|
+
vm.routerCallback().back();
|
|
116
81
|
} else {
|
|
117
|
-
|
|
82
|
+
vm.routerCallback().push(props.homePath);
|
|
118
83
|
}
|
|
119
84
|
};
|
|
120
85
|
const handleHome = () => {
|
|
121
|
-
if (
|
|
122
|
-
|
|
86
|
+
if (vm.routerCallback().path !== props.homePath) {
|
|
87
|
+
vm.routerCallback().push(props.homePath);
|
|
123
88
|
}
|
|
124
89
|
};
|
|
125
90
|
return (_ctx, _cache) => {
|
|
@@ -139,7 +104,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
139
104
|
};
|
|
140
105
|
}
|
|
141
106
|
};
|
|
142
|
-
var HeadBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-
|
|
107
|
+
var HeadBar = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-435ecee6"]]);
|
|
143
108
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
144
109
|
function getAugmentedNamespace(n) {
|
|
145
110
|
if (n.__esModule)
|
package/package.json
CHANGED
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script setup>
|
|
28
|
-
import { useRouter, useRoute } from 'vue-router'
|
|
29
28
|
import { defineProps, computed } from 'vue'
|
|
29
|
+
import vm from "@/vm"
|
|
30
30
|
|
|
31
31
|
// 定义组件属性
|
|
32
32
|
const props = defineProps({
|
|
@@ -43,10 +43,6 @@
|
|
|
43
43
|
}
|
|
44
44
|
})
|
|
45
45
|
|
|
46
|
-
// 路由相关
|
|
47
|
-
const router = useRouter()
|
|
48
|
-
const route = useRoute()
|
|
49
|
-
|
|
50
46
|
// 判断是否可以返回
|
|
51
47
|
const canGoBack = computed(() => {
|
|
52
48
|
// 可以根据实际路由历史判断,这里简单处理
|
|
@@ -55,20 +51,19 @@
|
|
|
55
51
|
|
|
56
52
|
// 处理返回逻辑
|
|
57
53
|
const handleBack = () => {
|
|
58
|
-
console.log('back',router,route)
|
|
59
54
|
if (canGoBack.value) {
|
|
60
|
-
|
|
55
|
+
vm.routerCallback().back()
|
|
61
56
|
} else {
|
|
62
57
|
// 如果不能返回,则跳转到首页
|
|
63
|
-
|
|
58
|
+
vm.routerCallback().push(props.homePath)
|
|
64
59
|
}
|
|
65
60
|
}
|
|
66
61
|
|
|
67
62
|
// 处理返回首页逻辑
|
|
68
63
|
const handleHome = () => {
|
|
69
64
|
// 如果已经在首页,则不执行跳转
|
|
70
|
-
if (
|
|
71
|
-
|
|
65
|
+
if (vm.routerCallback().path !== props.homePath) {
|
|
66
|
+
vm.routerCallback().push(props.homePath)
|
|
72
67
|
}
|
|
73
68
|
}
|
|
74
69
|
</script>
|