vue中预览docx、xlsx、pptx、pdf

前言:其实本来是要做全类型文件预览的,但是一直找不到合适的doc,xlx,ppt预览插件。要是有可以使用的,可以评论推荐给我

我使用的node版本:v18.19.1

参考官网:preview 文件预览 | ran

引入方式:

//安装组件
npm install ranui --save
//在需要的页面引入即可
import 'ranui/button';
import 'ranui/preview';
import 'ranui/style';
//使用方式

<div class="preview-container">
    <div id="showPreview" class="preview"></div>
    <r-preview :src="url" closeable="false"></r-preview>
</div>

我这里多了个showPreview用来处理ppt的预览,因为他原生的ppt预览是增加一个弹窗,我需要当前页面展示,样式不符合要求,我就修改了,\node_modules\ranui\dist\components\preview\index.js  里对应第一个文件

修改如下:

var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};
import { n as noop } from "./index-7913ec46.js";
import "./index-7216d6b0.js";
import { m as message } from "./index-0d5b9435.js";
const f7170ee498e0dd32cbdcb63fba8f75cc = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}.r-preview-slot{display:block}:host{cursor:pointer}.r-preview-mask{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000073;z-index:1081}.r-preview-mask .r-preview-loading{position:absolute;top:30vh;left:50vw;transform:translate(-50%);display:flex;flex-flow:column;align-items:center}.r-preview-mask .r-preview-loading-text{color:#fff;font-size:16px}.r-preview-mask .r-preview-options{width:100%;pointer-events:auto;display:flex;flex-flow:row-reverse nowrap;align-items:center;justify-content:space-between}.r-preview-mask .r-preview-options-close{margin:14px;border:none;cursor:pointer;transition:all .3s;-webkit-user-select:none;user-select:none}.r-preview-mask .r-preview-contain{max-width:calc(100vw - 20px);margin:0 auto;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center}.r-preview-mask .r-preview-contain .r-preview-context{margin:0 auto;height:calc(100vh - 68px);display:flex;flex-flow:column nowrap;justify-content:flex-start;align-items:center;overflow:auto}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main{width:100%;height:100%;margin-bottom:10px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet{font-size:13px;line-height:normal;-webkit-user-select:none;user-select:none;-moz-user-select:none;font-family:Lato,Source Sans Pro,Roboto,Helvetica,Arial,sans-serif;box-sizing:content-box;background:#fff;-webkit-font-smoothing:antialiased}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet textarea{font:400 13px Arial,Lato,Source Sans Pro,Roboto,Helvetica,sans-serif}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-sheet{position:relative;overflow:hidden}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-table{vertical-align:bottom}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-tooltip{font-family:inherit;position:absolute;padding:5px 10px;color:#fff;border-radius:1px;background:#000000;font-size:12px;z-index:201}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-tooltip:before{pointer-events:none;position:absolute;left:calc(50% - 4px);top:-4px;content:"";width:8px;height:8px;background:inherit;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:1;box-shadow:1px 1px 3px -1px #0000004d}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-color-palette{padding:5px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-color-palette table{margin:0;padding:0;border-collapse:separate;border-spacing:2;background:#fff}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-color-palette table td{margin:0;cursor:pointer;border:1px solid transparent}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-color-palette table td:hover{border-color:#ddd}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-color-palette table td .x-spreadsheet-color-palette-cell{width:16px;height:16px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-border-palette{padding:6px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-border-palette table{margin:0;padding:0;border-collapse:separate;border-spacing:0;background:#fff;table-layout:fixed}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-border-palette table td{margin:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-border-palette .x-spreadsheet-border-palette-left{border-right:1px solid #eee;padding-right:6px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-border-palette .x-spreadsheet-border-palette-left .x-spreadsheet-border-palette-cell{width:30px;height:30px;cursor:pointer;text-align:center}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-border-palette .x-spreadsheet-border-palette-left .x-spreadsheet-border-palette-cell:hover{background-color:#eee}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-border-palette .x-spreadsheet-border-palette-right{padding-left:6px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-border-palette .x-spreadsheet-border-palette-right .x-spreadsheet-line-type{position:relative;left:0;top:-3px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dropdown{position:relative}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dropdown .x-spreadsheet-dropdown-content{position:absolute;z-index:200;background:#fff;box-shadow:1px 2px 5px 2px #33333326}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dropdown.bottom-left .x-spreadsheet-dropdown-content{top:calc(100% + 5px);left:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dropdown.bottom-right .x-spreadsheet-dropdown-content{top:calc(100% + 5px);right:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dropdown.top-left .x-spreadsheet-dropdown-content{bottom:calc(100% + 5px);left:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dropdown.top-right .x-spreadsheet-dropdown-content{bottom:calc(100% + 5px);right:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dropdown .x-spreadsheet-dropdown-title{padding:0 5px;display:inline-block}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-resizer{position:absolute;z-index:11}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-resizer .x-spreadsheet-resizer-hover{background-color:#4b89ff40}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-resizer .x-spreadsheet-resizer-line{position:absolute}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-resizer.horizontal{cursor:row-resize}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-resizer.horizontal .x-spreadsheet-resizer-line{border-bottom:2px dashed #4b89ff;left:0;bottom:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-resizer.vertical{cursor:col-resize}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-resizer.vertical .x-spreadsheet-resizer-line{border-right:2px dashed #4b89ff;top:0;right:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-scrollbar{position:absolute;bottom:0;right:0;background-color:#f4f5f8;opacity:.9;z-index:12}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-scrollbar.horizontal{right:15px;overflow-x:scroll;overflow-y:hidden}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-scrollbar.horizontal>div{height:1px;background:#ddd}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-scrollbar.vertical{bottom:15px;overflow-x:hidden;overflow-y:scroll}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-scrollbar.vertical>div{width:1px;background:#ddd}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-overlayer{position:absolute;left:0;top:0;z-index:10}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-overlayer .x-spreadsheet-overlayer-content{position:absolute;overflow:hidden;pointer-events:none;width:100%;height:100%}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-editor,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector{box-sizing:content-box;position:absolute;overflow:hidden;pointer-events:none;top:0;left:0;width:100%;height:100%}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector .hide-input{position:absolute;z-index:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector .hide-input input{padding:0;width:0;border:none!important}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector .x-spreadsheet-selector-area{position:absolute;border:2px solid #4b89ff;background:rgba(75,137,255,.1);z-index:5}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector .x-spreadsheet-selector-clipboard,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector .x-spreadsheet-selector-autofill{position:absolute;background:transparent;z-index:100}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector .x-spreadsheet-selector-clipboard{border:2px dashed #4b89ff}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector .x-spreadsheet-selector-autofill{border:1px dashed rgba(0,0,0,.45)}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-selector .x-spreadsheet-selector-corner{pointer-events:auto;position:absolute;cursor:crosshair;font-size:0;height:5px;width:5px;right:-5px;bottom:-5px;border:2px solid #ffffff;background:#4b89ff}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-editor{z-index:20}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-editor .x-spreadsheet-editor-area{position:absolute;text-align:left;border:2px solid #4b89ff;line-height:0;z-index:100;pointer-events:auto}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-editor .x-spreadsheet-editor-area textarea{box-sizing:content-box;border:none;padding:0 3px;outline:none;resize:none;text-align:start;overflow-y:hidden;font:400 13px Arial,Lato,Source Sans Pro,Roboto,Helvetica,sans-serif;color:inherit;white-space:normal;word-wrap:break-word;line-height:22px;margin:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-editor .x-spreadsheet-editor-area .textline{overflow:hidden;visibility:hidden;position:fixed;top:0;left:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item{-webkit-user-select:none;user-select:none;background:0;border:1px solid transparent;outline:none;height:26px;color:#000000e6;line-height:26px;list-style:none;padding:2px 10px;cursor:default;text-align:left;overflow:hidden}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item.disabled{pointer-events:none;opacity:.5}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item:hover,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item.active{background:rgba(0,0,0,.05)}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item.divider{height:0;padding:0;margin:5px 0;border:none;border-bottom:1px solid rgba(0,0,0,.1)}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item .label{float:right;opacity:.65;font-size:1em}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item.state,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-header.state{padding-left:35px!important;position:relative}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item.state:before,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-header.state:before{content:"";position:absolute;width:10px;height:10px;left:12px;top:calc(50% - 5px);background:rgba(0,0,0,.08);border-radius:2px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-item.state.checked:before,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-header.state.checked:before{background:#4b89ff}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-checkbox{position:relative;display:inline-block;backface-visibility:hidden;outline:0;vertical-align:baseline;font-style:normal;font-size:1rem;line-height:1em}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-checkbox>input{position:absolute;top:0;left:0;opacity:0!important;outline:0;z-index:-1}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-suggest,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-contextmenu,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-sort-filter{position:absolute;box-shadow:1px 2px 5px 2px #33333326;background:#fff;z-index:100;width:260px;pointer-events:auto;overflow:auto}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-suggest{width:200px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-filter{border:1px solid #e9e9e9;font-size:12px;margin:10px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-filter .x-spreadsheet-header{padding:.5em .75em;background:#f8f8f9;border-bottom:1px solid #e9e9e9;border-left:1px solid transparent}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-filter .x-spreadsheet-body{height:200px;overflow-y:auto}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-filter .x-spreadsheet-body .x-spreadsheet-item{height:20px;line-height:20px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-sort-filter .x-spreadsheet-buttons{margin:10px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-bottombar{height:40px;padding:0 30px;text-align:left;background:#f5f6f7;display:flex}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-bottombar{position:relative;border-top:1px solid #e0e2e4}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-bottombar .x-spreadsheet-menu>li{line-height:40px;height:40px;padding-top:0;padding-bottom:0;vertical-align:middle;border-right:1px solid #e8eaed}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-menu{list-style:none;margin:0;padding:0;-webkit-user-select:none;user-select:none}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-menu>li{float:left;line-height:1.25em;padding:.785em 1em;margin:0;vertical-align:middle;text-align:left;font-weight:400;color:#80868b;white-space:nowrap;cursor:pointer;transition:all .3s;font-weight:700}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-menu>li.active{background-color:#fff;color:#000000a6}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-menu>li .x-spreadsheet-dropdown{display:inline-block}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-print{position:absolute;left:0;top:0;z-index:100;width:100%;height:100%;display:flex;flex-direction:column}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-print-bar{background:#424242;height:60px;line-height:60px;padding:0 30px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-print-bar .-title{color:#fff;font-weight:700;font-size:1.2em;float:left}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-print-bar .-right{float:right;margin-top:12px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-print-content{display:flex;flex:auto;flex-direction:row;background:#d0d0d0;height:calc(100% - 60px)}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-print-content .-sider{flex:0 0 300px;width:300px;border-left:2px solid #ccc;background:#fff}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-print-content .-content{flex:auto;overflow-x:auto;overflow-y:scroll;height:100%}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-canvas-card-wraper{margin:40px 20px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-canvas-card{background:#fff;margin:auto;page-break-before:auto;page-break-after:always;box-shadow:0 8px 10px 1px #00000024,0 3px 14px 3px #0000001f,0 4px 5px #0003}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar{color:#000000a6;background:#ffffff;-webkit-user-select:none;user-select:none}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-header{font-weight:700;line-height:30px;text-align:center;width:100%;float:left;background:#f9fafb}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-header .calendar-header-left{padding-left:5px;float:left}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-header .calendar-header-right{float:right}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-header .calendar-header-right a{padding:3px 0;margin-right:2px;border-radius:2px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-header .calendar-header-right a:hover{background:rgba(0,0,0,.08)}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-body{border-collapse:collapse;border-spacing:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-body th,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-body td{width:14.28571429%;min-width:32px;text-align:center;font-weight:700;line-height:30px;padding:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-body td>.cell:hover{background:#ecf6fd}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-body td>.cell.active,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-body td>.cell.active:hover{background:#ecf6fd;color:#2185d0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-calendar .calendar-body td>.cell.disabled{pointer-events:none;opacity:.5}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-datepicker{box-shadow:2px 2px 5px #0003;position:absolute;left:0;top:calc(100% + 5px);z-index:10;width:auto}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-buttons{display:flex;justify-content:flex-end}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-buttons .x-spreadsheet-button{margin-left:8px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-button{display:inline-block;border-radius:3px;line-height:1em;min-height:1em;white-space:nowrap;text-align:center;cursor:pointer;font-size:1em;font-weight:700;padding:.75em 1em;color:#0009;background:#e0e1e2;text-decoration:none;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;outline:none;vertical-align:baseline;zoom:1;-webkit-user-select:none;user-select:none;transition:all .1s linear}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-button.active,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-button:hover{background-color:#c0c1c2;color:#000c}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-button.primary{color:#fff;background-color:#2185d0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-button.primary:hover,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-button.primary.active{color:#fff;background-color:#1678c2}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-input{font-size:1em;position:relative;font-weight:400;display:inline-flex;color:#000000de}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-input input{z-index:1;margin:0;max-width:100%;flex:1 0 auto;outline:0;-webkit-tap-highlight-color:rgba(255,255,255,0);text-align:left;line-height:30px;height:30px;padding:0 8px;background:#fff;border:1px solid #e9e9e9;border-radius:3px;transition:box-shadow .1s ease,border-color .1s ease;box-shadow:inset 0 1px 2px #0a0a0a0f}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-input input:focus{border-color:#4b89ff;box-shadow:inset 0 1px 2px #4b89ff33}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-select{position:relative;display:inline-block;background:#fff;border:1px solid #e9e9e9;border-radius:2px;cursor:pointer;color:#000000de;-webkit-user-select:none;user-select:none;box-shadow:inset 0 1px 2px #0a0a0a0f}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-select .input-text{text-overflow:ellipsis;white-space:nowrap;min-width:60px;width:auto;height:30px;line-height:30px;padding:0 8px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-fields{display:flex;flex-direction:row;flex-wrap:wrap}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-fields .x-spreadsheet-form-field{flex:0 1 auto}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-fields .x-spreadsheet-form-field .label{display:inline-block;margin:0 10px 0 0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-field{display:block;vertical-align:middle;margin-left:10px;margin-bottom:10px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-field:first-child{margin-left:0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-field.error .x-spreadsheet-form-select,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-field.error input{border-color:#f04134}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-form-field .tip{color:#f04134;font-size:.9em}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dimmer{display:none;position:absolute;top:0!important;left:0!important;width:100%;height:100%;text-align:center;vertical-align:middle;background-color:#0009;opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.5s;animation-duration:.5s;transition:background-color .5s linear;-webkit-user-select:none;user-select:none;z-index:1000}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-dimmer.active{display:block;opacity:1}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main form fieldset{border:none}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main form fieldset label{display:block;margin-bottom:.5em;font-size:1em;color:#666}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main form fieldset select{font-size:1.1em;width:100%;background-color:#fff;border:none;border-bottom:2px solid #ddd;padding:.5em .85em;border-radius:2px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-modal,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-toast{font-size:13px;position:fixed;z-index:1001;text-align:left;line-height:1.25em;min-width:360px;color:#000000de;font-family:Lato,Source Sans Pro,Roboto,Helvetica,Arial,sans-serif;border-radius:4px;border:1px solid rgba(0,0,0,.1);background-color:#fff;background-clip:padding-box;box-shadow:#0003 0 2px 8px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-toast{background-color:#ffffffd9}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-modal-header,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-toast-header{font-weight:600;background-clip:padding-box;background-color:#ffffffd9;border-bottom:1px solid rgba(0,0,0,.05);border-radius:4px 4px 0 0}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-toast-header{color:#f2711c}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-modal-header{border-bottom:1px solid #e0e2e4;background:rgba(0,0,0,.08);font-size:1.0785em}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-modal-header,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-modal-content,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-toast-header,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-toast-content{padding:.75em 1em}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-excel-main .x-spreadsheet-menu li:first-child{display:none}.r-preview-mask .r-preview-contain .r-preview-context .docx-wrapper{background:none}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section{width:100%;height:690px;position:relative;border:1px solid #333;background-color:#efefef;text-align:center;border-radius:10px;box-shadow:1px 1px 3px #aaa;overflow:hidden}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.block{position:absolute;top:0;left:0;width:100%}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.content{display:flex;flex-direction:column}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.v-up{justify-content:flex-start}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.v-mid{justify-content:center}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.v-down{justify-content:flex-end}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.h-left{align-items:flex-start;text-align:left}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.h-mid{align-items:center;text-align:center}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.h-right{align-items:flex-end;text-align:right}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.up-left{justify-content:flex-start;align-items:flex-start;text-align:left}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.up-center{justify-content:flex-start;align-items:center}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.up-right{justify-content:flex-start;align-items:flex-end}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.center-left{justify-content:center;align-items:flex-start;text-align:left}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.center-center{justify-content:center;align-items:center}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.center-right{justify-content:center;align-items:flex-end}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.down-left{justify-content:flex-end;align-items:flex-start;text-align:left}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.down-center{justify-content:flex-end;align-items:center}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section div.down-right{justify-content:flex-end;align-items:flex-end}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main li.slide{margin:10px 0;font-size:18px}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main div.footer{text-align:center}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section table{position:absolute}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section table,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section th,.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section td{border:1px solid black}.r-preview-mask .r-preview-contain .r-preview-context .r-preview-pptx-main section svg.drawing{position:absolute;overflow:visible}\n';
const index$2 = "";
const { warning = noop } = message;
const PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
const PDF = "application/pdf";
const DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
const XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
const XLS = "application/vnd.ms-excel";
async function Custom() {
  if (typeof document !== "undefined" && !customElements.get("r-preview") && true) {
    const { renderPptx } = await import("./index-7b8840f9.js");
    const { renderDocx } = await import("./docx-c5d02d8c.js");
    const { renderPdf } = await import("./pdf-bdb7818a.js");
    const { renderExcel } = await import("./index-c14450a9.js");
    const requestUrlToBuffer = (src, options) => {
      if (typeof XMLHttpRequest === "undefined") {
        throw new Error("XMLHttpRequest is not defined");
      }
      if (typeof document === "undefined") {
        return Promise.reject("document is not defined");
      }
      return new Promise(function(resolve, reject) {
        const xhr = new XMLHttpRequest();
        xhr.open(options.method || "GET", src, true);
        xhr.responseType = options.responseType || "arraybuffer";
        xhr.onload = function() {
          if (xhr.status === 200) {
            resolve({ success: true, data: xhr.response, message: "" });
          } else {
            reject({
              success: false,
              data: xhr.status,
              message: `The request status is${xhr.status}`
            });
          }
        };
        xhr.onerror = function(e) {
          reject({ success: false, data: e, message: `` });
        };
        xhr.onprogress = (event) => {
          options.onProgress && options.onProgress(event);
        };
        xhr.withCredentials = options.withCredentials || false;
        if (options.headers) {
          Object.keys(options.headers).forEach(function(key) {
            (options == null ? void 0 : options.headers) && xhr.setRequestHeader(key, options.headers[key]);
          });
        }
        xhr.send(options.body);
      });
    };
    const renderPpt = (file, dom) => {
      return new Promise((resolve, reject) => {
        const reader = new FileReader();
        reader.readAsArrayBuffer(file);
        reader.onload = () => {
          var _a;
          if (reader.result && dom) {
            const param = {
              pptx: reader.result,
              resultElement: dom
            };
            (_a = renderPptx(param)) == null ? void 0 : _a.then(() => {
              resolve();
            });
          }
        };
        reader.onerror = (error) => {
          reject(error);
        };
        reader.onabort = (abort) => {
          reject(abort);
        };
      });
    };
    const renderWord = (file, dom) => {
      return Promise.resolve().then(
        () => renderDocx({ buffer: file, bodyContainer: dom })
      );
    };
    const renderFileMap = /* @__PURE__ */ new Map([
      [PDF, renderPdf],
      [PPTX, renderPpt],
      [DOCX, renderWord],
      [XLSX, renderExcel],
      [XLS, renderExcel]
    ]);
    class CustomElement extends HTMLElement {
      constructor() {
        super();
        __publicField(this, "_loadingText");
        __publicField(this, "preview");
        __publicField(this, "previewContext");
        __publicField(this, "_slot");
        __publicField(this, "_div");
        __publicField(this, "_loadingElement");
        __publicField(this, "createLoading", () => {
          this._loadingElement = document.createElement("div");
          this._loadingElement.setAttribute("class", "r-preview-loading");
          const icon = document.createElement("r-icon");
          icon.setAttribute("name", "loading");
          icon.setAttribute("size", "100");
          icon.setAttribute("color", "#1E90FF");
          icon.setAttribute("spin", "");
          this._loadingText = document.createElement("div");
          this._loadingElement.appendChild(icon);
          this._loadingText.setAttribute("class", "r-preview-loading-text");
          this._loadingElement.appendChild(this._loadingText);
          return this._loadingElement;
        });
        __publicField(this, "onProgress", (event) => {
          const num = event.loaded / event.total * 100;
          const progress = Math.min(99, num).toFixed(2) + "%";
          if (this._loadingText && this._loadingElement) {
            this._loadingText.innerText = `Loading ${progress}`;
            if (num >= 100) {
              setTimeout(() => {
                var _a;
                (_a = this.preview) == null ? void 0 : _a.removeChild(this._loadingElement);
              }, 300);
            }
          }
        });
        __publicField(this, "handleFile", async (file) => {
          try {
            if (typeof file === "string") {
              const { success, data, message: message2 } = await requestUrlToBuffer(file, {
                onProgress: this.onProgress,
                responseType: "blob"
              });
              if (success && data) {
                file = new File([data], data.name, { type: data.type });
                const { type } = file;
                const handler = renderFileMap.get(type);
                if (handler && this.previewContext) {
                  if (type === XLSX || type === XLS) {
                    this.previewContext.style.setProperty("width", "100%");
                  } else {
                    this.previewContext.style.setProperty("width", "100%");
                  }
                  handler(file, this.previewContext);
                }
              } else {
                warning(message2);
              }
            }
          } catch (error) {
          }
        });
        __publicField(this, "closePreview", () => {
          if (this.preview) {
            document.body.removeChild(this.preview);
            this.preview = void 0;
          }
        });
        __publicField(this, "showPreview", () => {
          var _a;
          if (this.src) {
            if (this.preview) {
              this.preview.style.display = "block";
            } else {
              this.preview = document.createElement("div");
              this.preview.setAttribute("class", "r-preview-mask");
              this.preview.setAttribute("id", "r-preview-mask");
              const previewOption = document.createElement("div");
              previewOption.setAttribute("class", "r-preview-options");
              if (this.closeable !== "false") {
                const previewCloseButton = document.createElement("r-icon");
                previewCloseButton.setAttribute(
                  "class",
                  "r-preview-options-close"
                );
                previewCloseButton.setAttribute("name", "close-circle-fill");
                previewCloseButton.setAttribute("size", "40");
                previewCloseButton.addEventListener("click", this.closePreview);
                previewOption.appendChild(previewCloseButton);
              }
              const previewContain = document.createElement("div");
              previewContain.setAttribute("class", "r-preview-contain");
              this.previewContext = document.createElement("div");
              this.previewContext.setAttribute("class", "r-preview-context");
              previewContain.appendChild(this.previewContext);
              this.preview.appendChild(previewOption);
              (_a = this.preview) == null ? void 0 : _a.appendChild(previewContain);
              this._loadingElement = this.createLoading();
              this.preview.appendChild(this._loadingElement);
              document.getElementById('showPreview').appendChild(this.preview);
              // document.body.appendChild(this.preview);
            }
            this.handleFile(this.src);
          }
        });
        this._div = document.createElement("div");
        this.preview = document.getElementById("r-preview-mask");
        this._slot = document.createElement("slot");
        this._div.appendChild(this._slot);
        this._slot.setAttribute("class", "r-preview-slot");
        this._div.setAttribute("class", "r-preview");
        const shadowRoot = this.attachShadow({ mode: "closed" });
        const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
        F7170EE498E0DD32CBDCB63FBA8F75CC.textContent = f7170ee498e0dd32cbdcb63fba8f75cc;
        shadowRoot.appendChild(F7170EE498E0DD32CBDCB63FBA8F75CC);
        shadowRoot.appendChild(this._div);
      }
      static get observedAttributes() {
        return ["src", "closeable"];
      }
      get label() {
        return this.getAttribute("label");
      }
      set label(value) {
        if (value)
          this.setAttribute("label", value);
      }
      get src() {
        return this.getAttribute("src");
      }
      set src(value) {
        if (value)
          this.setAttribute("src", value);
      }
      get closeable() {
        return this.getAttribute("closeable");
      }
      set closeable(value) {
        if (value)
          this.setAttribute("closeable", value);
      }
      connectedCallback() {
        this.preview = document.getElementById("r-preview-mask");
        this.addEventListener("click", this.showPreview);
      }
      disconnectedCallback() {
        this.removeEventListener("click", this.showPreview);
      }
      attributeChangedCallback(name, oldValue, newValue) {
        if (newValue !== oldValue) {
          if (name === "src" && newValue) {
            this.setAttribute("src", newValue);
            this.showPreview();
          }
        }
      }
    }
    customElements.define("r-preview", CustomElement);
  }
}
const index = Custom();
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: index
}, Symbol.toStringTag, { value: "Module" }));
export {
  index as a,
  index$1 as i
};

好像是pdf在预览时样式很奇怪:所以pdf我是通过ifream进行预览

 <iframe :src="url" class="pdfBox"></iframe>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/535842.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

20232831 2023-2024-2 《网络攻防实践》第5次作业

目录 20232831 2023-2024-2 《网络攻防实践》第5次作业1.实验内容&#xff08;1&#xff09;防火墙配置&#xff08;具体IP配置参考自己的IP设置&#xff09;&#xff08;2&#xff09;动手实践&#xff1a;Snort&#xff08;3&#xff09;分析配置规则 2.实验过程3.学习中遇到…

【论文阅读——SplitFed: When Federated Learning Meets Split Learning】

级别CCFA 1.摘要 联邦学习&#xff08;FL&#xff09;和分割学习&#xff08;SL&#xff09;是两种流行的分布式机器学习方法。两者都采用了模型对数据的场景&#xff1b;客户端在不共享原始数据的情况下训练和测试机器学习模型。由于机器学习模型的架构在客户端和服务器之间…

HWOD:二维数组下标合法性判断

一、知识点 1、停止读取的判定条件有两种写法 (1)&#xff1a;while(scanf()!EOF) (2)&#xff1a;while(scanf()>0) 在代码提交平台(1)和(2)都可以用 在本地&#xff0c;只能用(2)&#xff0c;且要有非法输入的配合。比如要读取的是整数&#xff0c;但输入了字符串&am…

微信小程序自定义关闭按钮在弹窗下面的效果

效果图: 我之前用vant 的popup的弹窗写&#xff0c;会出现close图标移动到弹窗内容外部不可见。 自定义代码&#xff1a; popup.JS/*** 生命周期函数--监听页面初次渲染完成*/onReady() {//自定义弹窗 动态获取屏幕高度var that this;wx.getSystemInfo({success: (result) &…

如何排查k8s集群中Pod内mysqld进程占用内存消耗过高?

文章目录 1. **查看容器资源使用情况**&#xff1a;2. **进入容器内部**&#xff1a;3. **检查进程内存使用**&#xff1a;4. **MySQL服务器状态检查**&#xff1a;5. **MySQL日志分析**&#xff1a;6. **使用专门的MySQL监控工具**&#xff1a;7. **配置文件检查**&#xff1a…

一个PDF文件含有多篇不同的内容,如何把这些内容分离出来?

一&#xff0c;PDF的含义 PDF&#xff0c;全称Portable Document Format&#xff0c;即便携式文档格式&#xff0c;是一种由Adobe Systems开发的文件格式&#xff0c;用于呈现文档&#xff0c;包括文本、图像、向量图形、字体、颜色、页面布局等&#xff0c;并可在不同的操作系…

LLMs之ToolAlpaca:ToolAlpaca(通用工具学习框架/工具使用语料库)的简介、安装和使用方法、案例应用之详细攻略

LLMs之ToolAlpaca&#xff1a;ToolAlpaca(通用工具学习框架/工具使用语料库)的简介、安装和使用方法、案例应用之详细攻略 目录 ToolAlpaca的简介 0、《ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Cases》翻译与解读 1、数据集列表 2…

PDF文件内容可以转成word版本吗?答案是肯定的 PDF转word的方法

一&#xff0c;PDF转Word的必要性 随着信息技术的飞速发展&#xff0c;文档的格式和转换成为了我们日常生活和工作中不可避免的一部分。其中&#xff0c;PDF转Word的需求尤为突出。PDF作为一种跨平台的文档格式&#xff0c;具有阅读效果好、不易被篡改等优点&#xff0c;但在编…

科技论文和会议录制高质量Presentation Video视频方法

一、背景 机器人领域&#xff0c;许多高质量的期刊和会议&#xff08;如IEEE旗下的TRO&#xff0c;RAL&#xff0c;IROS&#xff0c;ICRA等&#xff09;在你的论文收录后&#xff0c;需要上传一个Presentation Video材料&#xff0c;且对设备兼容性和视频质量有较高要求&#…

个人劳保用品穿戴检测系统 安全帽、工服、面罩、防护手套、防护鞋、安全背带穿戴检测等

背景 在工业生产、医疗护理、消防救援等高风险领域&#xff0c;正确穿戴个人防护装备或劳保用品&#xff08;PPE&#xff1a;Personal Protective Equipment&#xff09;是保障人员安全的重要措施&#xff0c;如安全帽、反光衣、安全背带等。然而&#xff0c;现实中往往会出现…

最新ChatGPT网站系统源码Midjourney-AI绘画,GPTs,AI换脸支持

一、前言 SparkAi创作系统是基于ChatGPT进行开发的Ai智能问答系统和Midjourney绘画系统&#xff0c;支持OpenAI-GPT全模型国内AI全模型。本期针对源码系统整体测试下来非常完美&#xff0c;那么如何搭建部署AI创作ChatGPT&#xff1f;小编这里写一个详细图文教程吧。已支持GPT…

微服务学习(黑马)

学习黑马的微服务课程的笔记 导学 微服务架构 认识微服务 SpringCloud spring.io/projects/spring-cloud/ 服务拆分和远程调用 根据订单id查询订单功能 存在的问题 硬编码 eureka注册中心 搭建eureka 服务注册 在order-service中完成服务拉取 Ribbon负载均衡 Nacos注册中心…

mars3d.MaterialType.Image2修改配置面状:图片2的speed数值实现动画效果说明

摘要&#xff1a; mars3d.MaterialType.Image2修改配置面状&#xff1a;图片2的speed数值实现动画效果说明 前提&#xff1a; 1.在示例中&#xff0c;尝试给mars3d.MaterialType.Image2材质的图片加上speed参数&#xff0c;实现动画效果&#xff0c;但是没有看到流动效果说明…

AI工具导航网站比较分析

介绍 本篇博客将从FutureTools和GPT-3 Demo两个AI工具导航网站出发&#xff0c;进行全面比较分析&#xff0c;为读者提供深入了解和选择适合需求的信息。同时针对需求提供标题和内容。 标题 "AI工具导航网站&#xff1a;FutureTools与GPT-3 Demo的全面比较分析" 内容…

背 单 词 (考研词汇闪过)

单词&#xff1a; 买考研词汇闪过 研究艾宾浩斯遗忘曲线 https://www.bilibili.com/video/BV18Y4y1h7YR/?spm_id_from333.337.search-card.all.click&vd_source5cbefe6dd70d6d84830a5891ceab2bf9 单词方法 闪记背两排&#xff08;5min&#xff09;重复一遍&#xff08;2mi…

MySQL数据库的详解(1)

DDL&#xff08;数据库操作&#xff09; 查询 查询所有数据库&#xff1a;show databases;当前数据库&#xff1a;select database(); 创建 创建数据库&#xff1a;create database [ if not exists] 数据库名 ; 使用 使用数据库&#xff1a;use 数据库名 ; 删除 删除数…

Nginx 基础应用实战 06 构建一个PHP的站点

Nginx 基础应用实战 06 构建一个PHP的站点 使用套件 lmnp https://oneinstack.com 安装完成后 搭建bbs https://www.discuz.net/ 搭建博客 https://wordpress.com https://cn.wordpress.org/ CMS系统 http://www.dedecms.com/ 构建Lua站点 Openresty Nginx Lua …

【强化学习实践】Gym+倒立单摆+创建自己的环境

一、Gym Gym是OpenAI开发的一个强化学习算法测试环境集合包。Gym提供了多种标准的环境&#xff0c;包括经典的游戏&#xff08;如Atari游戏&#xff09;、机器人模拟任务以及其他各种类型的问题&#xff0c;供开发者测试和训练强化学习智能体。在Gym环境中&#xff0c;开发者可…

2024最新AI系统【SparkAI】,ChatGPT商业运营版系统源码/ai问答/ai绘画/GPTs,SunoAI音乐生成大模型/带分销AIGC搭建部署教程

一、文章前言 SparkAi创作系统是基于ChatGPT进行开发的ai智能问答系统和Midjourney-AI绘画系统&#xff0c;支持OpenAI-GPT全模型国内AI全模型。本期针对源码系统整体测试下来非常完美&#xff0c;那么如何搭建部署AI创作ChatGPT&#xff1f;小编这里写一个详细图文教程吧。已…

利用Python实现可视化交互界面:Dash

Dash是一个低代码数据框架&#xff0c;用Python实现可视化交互界面&#xff0c;不用写Javascript&#xff0c;开源&#xff0c;支持回调、HTML组件等功能。 安装 pip install dash使用 # Import packages from dash import Dash, html, dash_table, dcc, callback, Output, …