@uxda/appkit 4.2.77 → 4.2.78
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/dist/index.js +14 -16
- package/package.json +1 -1
- package/src/notice/components/NoticeBanner.vue +9 -4
package/dist/index.js
CHANGED
|
@@ -5106,7 +5106,7 @@ var script$h = /* @__PURE__ */ defineComponent({
|
|
|
5106
5106
|
bannerStyle: { type: null, required: false, default: "" },
|
|
5107
5107
|
fixed: { type: Boolean, required: false, default: false }
|
|
5108
5108
|
},
|
|
5109
|
-
emits: ["detail", "close", "view", "popup"],
|
|
5109
|
+
emits: ["detail", "close", "view", "popup", "hasBanner"],
|
|
5110
5110
|
setup(__props, { emit: __emit }) {
|
|
5111
5111
|
const props = __props;
|
|
5112
5112
|
const { noticeClick } = useNotice();
|
|
@@ -5130,6 +5130,12 @@ var script$h = /* @__PURE__ */ defineComponent({
|
|
|
5130
5130
|
emits("popup", !!popMessages.value.length);
|
|
5131
5131
|
}
|
|
5132
5132
|
);
|
|
5133
|
+
watch(
|
|
5134
|
+
() => bannerMessages.value,
|
|
5135
|
+
() => {
|
|
5136
|
+
emits("hasBanner", !!bannerMessages.value.length);
|
|
5137
|
+
}
|
|
5138
|
+
);
|
|
5133
5139
|
async function queryNoticeMsg() {
|
|
5134
5140
|
const appkitOptions = useAppKitOptions();
|
|
5135
5141
|
const $http = useHttp$1();
|
|
@@ -5230,7 +5236,7 @@ var script$h = /* @__PURE__ */ defineComponent({
|
|
|
5230
5236
|
onClose: ($event) => unref(onClose)(item, key)
|
|
5231
5237
|
}, {
|
|
5232
5238
|
default: withCtx(() => [
|
|
5233
|
-
_cache[
|
|
5239
|
+
_cache[3] || (_cache[3] = createElementVNode(
|
|
5234
5240
|
"img",
|
|
5235
5241
|
{
|
|
5236
5242
|
class: "notice-banner-icon",
|
|
@@ -5265,20 +5271,12 @@ var script$h = /* @__PURE__ */ defineComponent({
|
|
|
5265
5271
|
/* CLASS, STYLE, NEED_HYDRATION */
|
|
5266
5272
|
)) : createCommentVNode("v-if", true),
|
|
5267
5273
|
createCommentVNode(" \u7CFB\u7EDF\u516C\u544A\u5F3A\u5236\u5F39\u6846 "),
|
|
5268
|
-
(openBlock(
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
message: item,
|
|
5275
|
-
onClose: ($event) => popMessages.value.splice(key, 1),
|
|
5276
|
-
onView: ($event) => onView(item)
|
|
5277
|
-
}, null, 8, ["message", "onClose", "onView"]);
|
|
5278
|
-
}),
|
|
5279
|
-
128
|
|
5280
|
-
/* KEYED_FRAGMENT */
|
|
5281
|
-
))
|
|
5274
|
+
popMessages.value.length ? (openBlock(), createBlock(script$i, {
|
|
5275
|
+
key: 1,
|
|
5276
|
+
message: popMessages.value[0],
|
|
5277
|
+
onClose: _cache[1] || (_cache[1] = ($event) => popMessages.value.splice(0, 1)),
|
|
5278
|
+
onView: _cache[2] || (_cache[2] = ($event) => onView(popMessages.value[0]))
|
|
5279
|
+
}, null, 8, ["message"])) : createCommentVNode("v-if", true)
|
|
5282
5280
|
],
|
|
5283
5281
|
64
|
|
5284
5282
|
/* STABLE_FRAGMENT */
|
package/package.json
CHANGED
|
@@ -12,9 +12,8 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<!-- 系统公告强制弹框 -->
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
</template>
|
|
15
|
+
<NoticePopup v-if="popMessages.length" :message="popMessages[0]" @close="popMessages.splice(0, 1)"
|
|
16
|
+
@view="onView(popMessages[0])" />
|
|
18
17
|
</template>
|
|
19
18
|
|
|
20
19
|
<script lang="ts" setup>
|
|
@@ -65,6 +64,12 @@ watch(
|
|
|
65
64
|
emits('popup', !!popMessages.value.length)
|
|
66
65
|
}
|
|
67
66
|
)
|
|
67
|
+
watch(
|
|
68
|
+
() => bannerMessages.value,
|
|
69
|
+
() => {
|
|
70
|
+
emits('hasBanner', !!bannerMessages.value.length)
|
|
71
|
+
}
|
|
72
|
+
)
|
|
68
73
|
|
|
69
74
|
// 查询当前用户当前应用系统消息
|
|
70
75
|
async function queryNoticeMsg() {
|
|
@@ -167,7 +172,7 @@ const onTouchEnd = debounce(() => {
|
|
|
167
172
|
}, 100)
|
|
168
173
|
|
|
169
174
|
// 父组件事件
|
|
170
|
-
const emits = defineEmits(['detail', 'close', 'view', 'popup'])
|
|
175
|
+
const emits = defineEmits(['detail', 'close', 'view', 'popup', 'hasBanner'])
|
|
171
176
|
</script>
|
|
172
177
|
|
|
173
178
|
<style lang="scss">
|