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 System;
|
||||
using System.Linq;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Unicode;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Admin.NET.Web.Core;
|
||||
@ -100,7 +102,12 @@ public class Startup : AppStartup
|
||||
.AddNewtonsoftJson(options => SetNewtonsoftJsonSetting(options.SerializerSettings))
|
||||
//.AddXmlSerializerFormatters()
|
||||
//.AddXmlDataContractSerializerFormatters()
|
||||
.AddInjectWithUnifyResult<AdminResultProvider>();
|
||||
.AddInjectWithUnifyResult<AdminResultProvider>()
|
||||
.AddJsonOptions(options =>
|
||||
{
|
||||
// 解决中文乱码,返回数据被转为Unicode字符串的问题
|
||||
options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
|
||||
});
|
||||
|
||||
// 三方授权登录OAuth
|
||||
services.AddOAuth();
|
||||
|
||||
@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<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>
|
||||
<template #footer>
|
||||
<el-button :loading="state.waitShowPrinter" type="primary" icon="ele-Printer" @click.stop="print">直接打印</el-button>
|
||||
@ -12,6 +19,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, reactive, ref } from 'vue';
|
||||
|
||||
//父级传递来的参数
|
||||
var props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
|
||||
const state = reactive({
|
||||
dialogVisible: false,
|
||||
waitShowPrinter: false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user