|
@@ -1,66 +1,68 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <div
|
|
|
+ <!-- <div> -->
|
|
|
+ <!-- <div
|
|
|
class="forward"
|
|
|
:class="[isH5 ? 'forward-h5' : '']"
|
|
|
v-if="show"
|
|
|
ref="dialog"
|
|
|
+ ></div> -->
|
|
|
+ <MaskTUI :show="show" @update:show="onMaskShow">
|
|
|
+ <Transfer
|
|
|
+ title="转发"
|
|
|
+ :list="list"
|
|
|
+ :isSearch="false"
|
|
|
+ :isH5="isH5"
|
|
|
+ :isCustomItem="true"
|
|
|
+ :resultShow="true"
|
|
|
+ @submit="handleForWordMessage"
|
|
|
+ @cancel="toggleShow"
|
|
|
>
|
|
|
- <Transfer
|
|
|
- title="转发"
|
|
|
- :list="list"
|
|
|
- :isSearch="false"
|
|
|
- :isH5="isH5"
|
|
|
- :isCustomItem="true"
|
|
|
- :resultShow="true"
|
|
|
- @submit="handleForWordMessage"
|
|
|
- @cancel="toggleShow"
|
|
|
- >
|
|
|
- <template #left="{ data }">
|
|
|
- <slot name="left" :data="data" />
|
|
|
- </template>
|
|
|
- <template #right="{ data }">
|
|
|
- <slot name="right" :data="data" />
|
|
|
- </template>
|
|
|
- </Transfer>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <template #left="{ data }">
|
|
|
+ <slot name="left" :data="data" />
|
|
|
+ </template>
|
|
|
+ <template #right="{ data }">
|
|
|
+ <slot name="right" :data="data" />
|
|
|
+ </template>
|
|
|
+ </Transfer>
|
|
|
+ </MaskTUI>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, reactive, watchEffect, toRefs, ref } from 'vue';
|
|
|
-import Transfer from '../../../../components/transferTUI/index.vue';
|
|
|
-import { handleErrorPrompts } from '../../../utils';
|
|
|
-import { onClickOutside } from '@vueuse/core';
|
|
|
+import { defineComponent, reactive, watchEffect, toRefs, ref } from "vue";
|
|
|
+import Transfer from "../../../../components/transferTUI/index.vue";
|
|
|
+import MaskTUI from "../../../../components/maskTUI/mask.vue";
|
|
|
+import { handleErrorPrompts } from "../../../utils";
|
|
|
+// import { onClickOutside } from "@vueuse/core";
|
|
|
|
|
|
const Forward = defineComponent({
|
|
|
components: {
|
|
|
- Transfer
|
|
|
+ Transfer,
|
|
|
+ MaskTUI,
|
|
|
},
|
|
|
- name: '转发',
|
|
|
+ name: "转发",
|
|
|
props: {
|
|
|
list: {
|
|
|
type: Array,
|
|
|
- default: () => []
|
|
|
+ default: () => [],
|
|
|
},
|
|
|
message: {
|
|
|
type: Object,
|
|
|
- default: () => ({})
|
|
|
+ default: () => ({}),
|
|
|
},
|
|
|
show: {
|
|
|
type: Boolean,
|
|
|
- default: () => false
|
|
|
+ default: () => false,
|
|
|
},
|
|
|
isH5: {
|
|
|
type: Boolean,
|
|
|
- default: () => false
|
|
|
- }
|
|
|
+ default: () => false,
|
|
|
+ },
|
|
|
},
|
|
|
setup(props: any, ctx: any) {
|
|
|
const data = reactive({
|
|
|
list: [],
|
|
|
show: false,
|
|
|
- to: -1
|
|
|
+ to: -1,
|
|
|
});
|
|
|
|
|
|
const dialog: any = ref();
|
|
@@ -73,16 +75,22 @@ const Forward = defineComponent({
|
|
|
const toggleShow = () => {
|
|
|
data.show = !data.show;
|
|
|
if (!data.show) {
|
|
|
- ctx.emit('update:show', data.show);
|
|
|
+ ctx.emit("update:show", data.show);
|
|
|
data.to = -1;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- onClickOutside(dialog, () => {
|
|
|
- data.show = false;
|
|
|
- ctx.emit('update:show', data.show);
|
|
|
+ const onMaskShow = (val: boolean) => {
|
|
|
+ data.show = val;
|
|
|
+ ctx.emit("update:show", data.show);
|
|
|
data.to = -1;
|
|
|
- });
|
|
|
+ };
|
|
|
+
|
|
|
+ // onClickOutside(dialog, () => {
|
|
|
+ // data.show = false;
|
|
|
+ // ctx.emit('update:show', data.show);
|
|
|
+ // data.to = -1;
|
|
|
+ // });
|
|
|
|
|
|
const handleForWordMessage = async (list: any) => {
|
|
|
list.map(async (item: any) => {
|
|
@@ -98,22 +106,23 @@ const Forward = defineComponent({
|
|
|
return {
|
|
|
...toRefs(data),
|
|
|
toggleShow,
|
|
|
+ onMaskShow,
|
|
|
handleForWordMessage,
|
|
|
- dialog
|
|
|
+ dialog,
|
|
|
};
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
export default Forward;
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-@import url('../../../../styles/common.scss');
|
|
|
-@import url('../../../../styles/icon.scss');
|
|
|
+@import url("../../../../styles/common.scss");
|
|
|
+@import url("../../../../styles/icon.scss");
|
|
|
.forward {
|
|
|
position: absolute;
|
|
|
z-index: 5;
|
|
|
box-sizing: border-box;
|
|
|
- border-radius: 8px;
|
|
|
+ border-radius: 16px;
|
|
|
padding: 15px 20px;
|
|
|
padding: 0;
|
|
|
left: -90px;
|