Merge branch 'main' of http://101.43.53.74:3000/Admin.NET/Admin.NET
This commit is contained in:
commit
29e085c138
@ -26,6 +26,8 @@ using OnceMi.AspNetCore.OSS;
|
|||||||
using SixLabors.ImageSharp.Web.DependencyInjection;
|
using SixLabors.ImageSharp.Web.DependencyInjection;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.Encodings.Web;
|
||||||
|
using System.Text.Unicode;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Admin.NET.Web.Core;
|
namespace Admin.NET.Web.Core;
|
||||||
@ -100,7 +102,12 @@ public class Startup : AppStartup
|
|||||||
.AddNewtonsoftJson(options => SetNewtonsoftJsonSetting(options.SerializerSettings))
|
.AddNewtonsoftJson(options => SetNewtonsoftJsonSetting(options.SerializerSettings))
|
||||||
//.AddXmlSerializerFormatters()
|
//.AddXmlSerializerFormatters()
|
||||||
//.AddXmlDataContractSerializerFormatters()
|
//.AddXmlDataContractSerializerFormatters()
|
||||||
.AddInjectWithUnifyResult<AdminResultProvider>();
|
.AddInjectWithUnifyResult<AdminResultProvider>()
|
||||||
|
.AddJsonOptions(options =>
|
||||||
|
{
|
||||||
|
// 解决中文乱码,返回数据被转为Unicode字符串的问题
|
||||||
|
options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
|
||||||
|
});
|
||||||
|
|
||||||
// 三方授权登录OAuth
|
// 三方授权登录OAuth
|
||||||
services.AddOAuth();
|
services.AddOAuth();
|
||||||
|
|||||||
@ -1,5 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-model="state.dialogVisible" draggable :close-on-click-modal="false" :width="Number(state.width) + Number(8) + 'mm'">
|
<el-dialog v-model="state.dialogVisible" draggable :close-on-click-modal="false" :width="Number(state.width) + Number(8) + 'mm'">
|
||||||
|
<template #header>
|
||||||
|
<div style="color: #fff">
|
||||||
|
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Printer />
|
||||||
|
</el-icon>
|
||||||
|
<span>{{ props.title }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div id="preview_content" ref="previewContentRef"></div>
|
<div id="preview_content" ref="previewContentRef"></div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button :loading="state.waitShowPrinter" type="primary" icon="ele-Printer" @click.stop="print">直接打印</el-button>
|
<el-button :loading="state.waitShowPrinter" type="primary" icon="ele-Printer" @click.stop="print">直接打印</el-button>
|
||||||
@ -12,6 +19,14 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, reactive, ref } from 'vue';
|
import { nextTick, reactive, ref } from 'vue';
|
||||||
|
|
||||||
|
//父级传递来的参数
|
||||||
|
var props = defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
waitShowPrinter: false,
|
waitShowPrinter: false,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user