Commit a2049d79 by yancanhua

Merge branch 'release/venus-usedcar-h5/1.0.0' of http://192.168.3.233:8090/monor…

…epo/venus into release/venus-usedcar-h5/1.0.0
2 parents 8326c603 2a24d6e5
Pipeline #115 for a2049d79 failed in 0 seconds
export * from "./inspect-report";
export * from "./page";
export * from "./record";
export * from "./template";
......@@ -7,26 +7,28 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
ButtonSelect: typeof import('./components/customizeForm/buttonSelect.vue')['default']
CustomizeUploadFile: typeof import('./components/customizeForm/customizeUploadFile.vue')['default']
Index: typeof import('./components/customizeForm/Index.vue')['default']
ButtonSelect: typeof import('./components/CustomizeForm/buttonSelect.vue')['default']
CustomizeUploadFile: typeof import('./components/CustomizeForm/customizeUploadFile.vue')['default']
Index: typeof import('./components/CustomizeForm/Index.vue')['default']
Layouts: typeof import('./layouts/index.vue')['default']
LogoutConfirmModal: typeof import('./components/LogoutConfirmModal.vue')['default']
PageTitle: typeof import('./components/PageTitle.vue')['default']
PageTop: typeof import('./components/PageTop.vue')['default']
RadioSelect: typeof import('./components/customizeForm/radioSelect.vue')['default']
RadioSelect: typeof import('./components/CustomizeForm/radioSelect.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SelectDatePicker: typeof import('./components/customizeForm/selectDatePicker.vue')['default']
SelectDropdown: typeof import('./components/customizeForm/selectDropdown.vue')['default']
SelectDatePicker: typeof import('./components/CustomizeForm/selectDatePicker.vue')['default']
SelectDropdown: typeof import('./components/CustomizeForm/selectDropdown.vue')['default']
VanActionSheet: typeof import('vant/es')['ActionSheet']
VanButton: typeof import('vant/es')['Button']
VanCheckbox: typeof import('vant/es')['Checkbox']
VanDatePicker: typeof import('vant/es')['DatePicker']
VanEmpty: typeof import('vant/es')['Empty']
VanField: typeof import('vant/es')['Field']
VanForm: typeof import('vant/es')['Form']
VanIcon: typeof import('vant/es')['Icon']
VanImage: typeof import('vant/es')['Image']
VanImagePreview: typeof import('vant/es')['ImagePreview']
VanList: typeof import('vant/es')['List']
VanLoading: typeof import('vant/es')['Loading']
VanOverlay: typeof import('vant/es')['Overlay']
......@@ -37,9 +39,14 @@ declare module 'vue' {
VanRadio: typeof import('vant/es')['Radio']
VanRadioGroup: typeof import('vant/es')['RadioGroup']
VanSearch: typeof import('vant/es')['Search']
VanSkeleton: typeof import('vant/es')['Skeleton']
VanSlider: typeof import('vant/es')['Slider']
VanSwipe: typeof import('vant/es')['Swipe']
VanSwipeItem: typeof import('vant/es')['SwipeItem']
VanTab: typeof import('vant/es')['Tab']
VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTabs: typeof import('vant/es')['Tabs']
VanTag: typeof import('vant/es')['Tag']
WorkOrderStatusTags: typeof import('./components/WorkOrderStatusTags.vue')['default']
}
......
......@@ -5,6 +5,7 @@ import { computed, nextTick, onMounted, ref } from "vue";
import { useRoute, useRouter } from "vue-router";
import { detail } from "@api/modules/inspect-report";
import { showToast } from "vant";
const route = useRoute();
const router = useRouter();
......@@ -298,6 +299,28 @@ const arcStyle = computed(() => {
};
});
async function copyCurrentPageLink() {
const url = window.location.href;
try {
if (navigator.clipboard?.writeText) {
await navigator.clipboard.writeText(url);
} else {
const ta = document.createElement("textarea");
ta.value = url;
ta.setAttribute("readonly", "");
ta.style.position = "fixed";
ta.style.left = "-9999px";
document.body.append(ta);
ta.select();
document.execCommand("copy");
ta.remove();
}
showToast("已复制链接");
} catch {
showToast("复制失败,请重试");
}
}
onMounted(() => {
fetchDetail();
});
......@@ -603,6 +626,14 @@ onMounted(() => {
</div>
</div>
<div class="report-share">
<button class="report-share__btn"
type="button"
@click="copyCurrentPageLink">
分享
</button>
</div>
<van-image-preview closeable
:images="albumPreviewUrls"
:show="albumPreviewShow"
......@@ -636,6 +667,24 @@ onMounted(() => {
background: #f2f3f7;
}
.report-share {
padding: $spacing-base $spacing-md 0;
}
.report-share__btn {
display: block;
width: 100%;
padding-block: 12px;
padding-inline: $spacing-md;
font-size: $font-size-lg;
font-weight: 500;
color: #fff;
cursor: pointer;
background: $color-primary;
border: none;
border-radius: $radius-base;
}
// ===== 顶部认证头 =====
.cert-header {
display: flex;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!