feat:优化代码结构
This commit is contained in:
parent
00ea15f56b
commit
6fbf1d3514
138
index.html
138
index.html
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="dark">
|
<html lang="en" >
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
|
|
@ -9,60 +9,116 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<style>
|
<style>
|
||||||
html,
|
.first-loading-wrp {
|
||||||
body,
|
display: flex;
|
||||||
#app {
|
flex-direction: column;
|
||||||
width: 100%;
|
align-items: center;
|
||||||
height: 100%;
|
justify-content: center;
|
||||||
padding: 0;
|
height: 90vh;
|
||||||
margin: 0;
|
min-height: 90vh;
|
||||||
}
|
}
|
||||||
.init-loading-wrap{
|
|
||||||
width: 100%;
|
.first-loading-wrp > h1 {
|
||||||
height: 100%;
|
font-size: 30px;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.first-loading-wrp .loading-wrp {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
padding: 98px;
|
||||||
}
|
}
|
||||||
.init-loading-inner {
|
|
||||||
width: 20px;
|
.dot {
|
||||||
height: 50px;
|
position: relative;
|
||||||
background: #1890ff;
|
box-sizing: border-box;
|
||||||
float: left;
|
display: inline-block;
|
||||||
margin: 0 3px;
|
width: 64px;
|
||||||
animation: init-loading-inner linear 1s infinite;
|
height: 64px;
|
||||||
-webkit-animation: init-loading-inner linear 1s infinite;
|
font-size: 64px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
animation: antRotate 1.2s infinite linear;
|
||||||
}
|
}
|
||||||
.init-loading-inner:nth-child(1){
|
|
||||||
animation-delay:0s;
|
.dot i {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
background-color: #1890ff;
|
||||||
|
border-radius: 100%;
|
||||||
|
opacity: 0.3;
|
||||||
|
transform: scale(0.75);
|
||||||
|
transform-origin: 50% 50%;
|
||||||
|
animation: antSpinMove 1s infinite linear alternate;
|
||||||
}
|
}
|
||||||
.init-loading-inner:nth-child(2){
|
|
||||||
animation-delay:0.15s;
|
.dot i:nth-child(1) {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
}
|
}
|
||||||
.init-loading-inner:nth-child(3){
|
|
||||||
animation-delay:0.3s;
|
.dot i:nth-child(2) {
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
-webkit-animation-delay: 0.4s;
|
||||||
|
animation-delay: 0.4s;
|
||||||
}
|
}
|
||||||
.init-loading-inner:nth-child(4){
|
|
||||||
animation-delay:0.45s;
|
.dot i:nth-child(3) {
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
-webkit-animation-delay: 0.8s;
|
||||||
|
animation-delay: 0.8s;
|
||||||
}
|
}
|
||||||
.init-loading-inner:nth-child(5){
|
|
||||||
animation-delay:0.6s;
|
.dot i:nth-child(4) {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
-webkit-animation-delay: 1.2s;
|
||||||
|
animation-delay: 1.2s;
|
||||||
}
|
}
|
||||||
@keyframes init-loading-inner{
|
|
||||||
0%,60%,100% {transform: scale(1);}
|
@keyframes antRotate {
|
||||||
30% {transform: scaleY(3);}
|
to {
|
||||||
|
-webkit-transform: rotate(405deg);
|
||||||
|
transform: rotate(405deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@-webkit-keyframes init-loading-inner{
|
|
||||||
0%,60%,100% {transform: scale(1);}
|
@-webkit-keyframes antRotate {
|
||||||
30% {transform: scaleY(3);}
|
to {
|
||||||
|
-webkit-transform: rotate(405deg);
|
||||||
|
transform: rotate(405deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes antSpinMove {
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes antSpinMove {
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<div class="init-loading-wrap">
|
<div id="vue-admin-perfect">
|
||||||
<div class="init-loading-inner"></div>
|
<div class="first-loading-wrp">
|
||||||
<div class="init-loading-inner"></div>
|
<div class="loading-wrp">
|
||||||
<div class="init-loading-inner"></div>
|
<span class="dot dot-spin">
|
||||||
<div class="init-loading-inner"></div>
|
<i></i>
|
||||||
<div class="init-loading-inner"></div>
|
<i></i>
|
||||||
|
<i></i>
|
||||||
|
<i></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<h1>vue-admin-perfect</h1>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,13 @@
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"clipboard": "^2.0.10",
|
"clipboard": "^2.0.10",
|
||||||
|
"codemirror": "^5.65.9",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
"dayjs": "^1.11.4",
|
"dayjs": "^1.11.4",
|
||||||
"default-passive-events": "^2.0.0",
|
"default-passive-events": "^2.0.0",
|
||||||
"echarts": "^5.3.1",
|
"echarts": "^5.3.1",
|
||||||
"echarts-liquidfill": "^3.1.0",
|
"echarts-liquidfill": "^3.1.0",
|
||||||
"element-plus": "^2.2.16",
|
"element-plus": "^2.2.20",
|
||||||
"exceljs": "^4.3.0",
|
"exceljs": "^4.3.0",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"fuse.js": "^6.6.2",
|
"fuse.js": "^6.6.2",
|
||||||
|
|
@ -53,8 +54,6 @@
|
||||||
"vue-splitpane": "^1.0.6",
|
"vue-splitpane": "^1.0.6",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"vuex": "^4.0.0-0",
|
"vuex": "^4.0.0-0",
|
||||||
"vxe-table": "^4.3.5",
|
|
||||||
"xe-utils": "^3.5.6",
|
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,121 @@
|
||||||
|
<template>
|
||||||
|
<textarea ref="codeEditor" placeholder="请输入..." ></textarea>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { defineComponent, onBeforeUnmount, onMounted, ref, toRefs, watch } from "vue";
|
||||||
|
// codemirror基础资源引入
|
||||||
|
import _CodeMirror from "codemirror";
|
||||||
|
import "codemirror/lib/codemirror.css";
|
||||||
|
// language
|
||||||
|
import 'codemirror/mode/javascript/javascript.js'
|
||||||
|
|
||||||
|
// theme css
|
||||||
|
import 'codemirror/theme/monokai.css'
|
||||||
|
// 折叠资源引入:开始
|
||||||
|
import "codemirror/addon/fold/foldgutter.css";
|
||||||
|
import "codemirror/addon/fold/foldcode.js";
|
||||||
|
import "codemirror/addon/fold/brace-fold.js";
|
||||||
|
import "codemirror/addon/fold/comment-fold.js";
|
||||||
|
import "codemirror/addon/fold/indent-fold.js";
|
||||||
|
import "codemirror/addon/fold/foldgutter.js";
|
||||||
|
// 折叠资源引入:结束
|
||||||
|
|
||||||
|
// 搜索资源引入:开始
|
||||||
|
import "codemirror/addon/scroll/annotatescrollbar.js";
|
||||||
|
import "codemirror/addon/search/matchesonscrollbar.js";
|
||||||
|
import "codemirror/addon/search/match-highlighter.js";
|
||||||
|
import "codemirror/addon/search/jump-to-line.js";
|
||||||
|
|
||||||
|
import "codemirror/addon/dialog/dialog.js";
|
||||||
|
import "codemirror/addon/dialog/dialog.css";
|
||||||
|
import "codemirror/addon/search/searchcursor.js";
|
||||||
|
import "codemirror/addon/search/search.js";
|
||||||
|
// 搜索资源引入:结束
|
||||||
|
|
||||||
|
// 启用placeholder
|
||||||
|
import "codemirror/addon/display/placeholder.js";
|
||||||
|
|
||||||
|
import "codemirror/addon/selection/active-line.js"; //光标行背景高亮,配置里面也需要styleActiveLine设置为true
|
||||||
|
|
||||||
|
const CodeMirror = window.CodeMirror || _CodeMirror;
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
props: {
|
||||||
|
modelValue: String,
|
||||||
|
defaultValue: String,
|
||||||
|
readOnly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setup(props, context) {
|
||||||
|
const { modelValue, defaultValue, readOnly } = toRefs(props);
|
||||||
|
const codeEditor = ref();
|
||||||
|
let editor;
|
||||||
|
watch(modelValue, () => {
|
||||||
|
if (null != editor && modelValue.value && modelValue.value !== editor.getValue()) {
|
||||||
|
// 触发v-model的双向绑定
|
||||||
|
editor.setValue(modelValue.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
watch(readOnly, () => {
|
||||||
|
if (null != editor) {
|
||||||
|
editor.setOption("readOnly", readOnly.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
|
editor = CodeMirror.fromTextArea(codeEditor.value, {
|
||||||
|
value: modelValue.value,
|
||||||
|
// mime: "text/javascript",
|
||||||
|
mode: "application/json",
|
||||||
|
indentWithTabs: false, // 在缩进时,是否需要把 n*tab宽度个空格替换成n个tab字符,默认为false
|
||||||
|
smartIndent: true, // 自动缩进,设置是否根据上下文自动缩进(和上一行相同的缩进量)。默认为true
|
||||||
|
lineNumbers: true, // 是否在编辑器左侧显示行号
|
||||||
|
matchBrackets: true, // 括号匹配
|
||||||
|
readOnly: readOnly.value,
|
||||||
|
// 启用代码折叠相关功能:开始
|
||||||
|
foldGutter: true,
|
||||||
|
lineWrapping: true, //是否自动换行
|
||||||
|
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter", "CodeMirror-lint-markers"],
|
||||||
|
// 启用代码折叠相关功能:结束
|
||||||
|
styleActiveLine: false // 光标行高亮
|
||||||
|
});
|
||||||
|
// 监听编辑器的change事件
|
||||||
|
editor.on("change", () => {
|
||||||
|
// 触发v-model的双向绑定
|
||||||
|
context.emit("update:modelValue", editor.getValue());
|
||||||
|
});
|
||||||
|
if (defaultValue.value) {
|
||||||
|
editor.setValue(defaultValue.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
if (null !== editor) {
|
||||||
|
editor.toTextArea();
|
||||||
|
editor = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return { codeEditor };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
<style lang="scss">
|
||||||
|
.CodeMirror-wrap{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.CodeMirror-gutters {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 3;
|
||||||
|
min-height: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: transparent;
|
||||||
|
border-right: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {useSettingStore} from "@/store/modules/setting"
|
import {useSettingStore} from "@/store/modules/setting"
|
||||||
import {computed} from "_vue@3.2.40@vue";
|
import {computed} from "vue";
|
||||||
const SettingStore = useSettingStore()
|
const SettingStore = useSettingStore()
|
||||||
const isCollapse = computed(() =>!SettingStore.isCollapse)
|
const isCollapse = computed(() =>!SettingStore.isCollapse)
|
||||||
const handleCollapse = () => {
|
const handleCollapse = () => {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown trigger="click" @command="setAssemblySize">
|
<el-dropdown trigger="hover" @command="setAssemblySize">
|
||||||
<svg-icon class-name="size-icon" icon-class="size" style="font-size: 20px;"/>
|
<svg-icon class-name="size-icon" icon-class="size" style="font-size: 20px;cursor: pointer"/>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-for="item in assemblySizeList" :key="item" :disabled="globalComSize === item" :command="item">
|
<el-dropdown-item v-for="item in assemblySizeList" :key="item" :disabled="globalComSize === item" :command="item">
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import VXETable from 'vxe-table'
|
|
||||||
import 'vxe-table/lib/style.css'
|
|
||||||
|
|
||||||
function useTable (app: App) {
|
|
||||||
app.use(VXETable)
|
|
||||||
// 给 vue 实例挂载内部对象,例如:
|
|
||||||
// app.config.globalProperties.$XModal = VXETable.modal
|
|
||||||
// app.config.globalProperties.$XPrint = VXETable.print
|
|
||||||
// app.config.globalProperties.$XSaveFile = VXETable.saveFile
|
|
||||||
// app.config.globalProperties.$XReadFile = VXETable.readFile
|
|
||||||
}
|
|
||||||
|
|
||||||
export default useTable
|
|
||||||
|
|
@ -24,6 +24,12 @@ const othersRouter = [{
|
||||||
name: 'editor',
|
name: 'editor',
|
||||||
meta: { title: '富文本编辑器', roles: ['other'] , icon: 'MenuIcon'}
|
meta: { title: '富文本编辑器', roles: ['other'] , icon: 'MenuIcon'}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'code-mirror',
|
||||||
|
component: () => import('@/views/other/codeMirror/index.vue'),
|
||||||
|
name: 'code-mirror',
|
||||||
|
meta: { title: '代码编辑器', roles: ['other'] , icon: 'MenuIcon'}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'mark-down',
|
path: 'mark-down',
|
||||||
component: () => import('@/views/other/markDown/index.vue'),
|
component: () => import('@/views/other/markDown/index.vue'),
|
||||||
|
|
|
||||||
|
|
@ -83,4 +83,5 @@ body{
|
||||||
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
||||||
background: white;
|
background: white;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -173,5 +173,8 @@ html.dark {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.zb-pro-table .el-table__header th{
|
||||||
|
color: white!important;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<u-container-layout>
|
<div class="app-container">
|
||||||
<el-card style="margin-bottom: 20px">
|
<div class="app-container-inner">
|
||||||
<div style="margin-bottom: 10px">输入内容,并点击复制按钮</div>
|
<el-card style="margin-bottom: 20px">
|
||||||
<el-input v-model="copyValue" placeholder="请输入" style="width: 400px; max-width: 100%" />
|
<div style="margin-bottom: 10px">输入内容,并点击复制按钮</div>
|
||||||
<el-button type="primary" @click="handleCopy(copyValue, $event)">
|
<el-input v-model="copyValue" placeholder="请输入" style="width: 400px; max-width: 100%" />
|
||||||
<el-icon style="margin-right: 6px"><document-copy /></el-icon> 复制
|
<el-button type="primary" @click="handleCopy(copyValue, $event)">
|
||||||
</el-button>
|
<el-icon style="margin-right: 6px"><document-copy /></el-icon> 复制
|
||||||
</el-card>
|
</el-button>
|
||||||
<el-card>
|
</el-card>
|
||||||
<div style="margin-bottom: 10px">复制成功后可在这粘贴测试</div>
|
<el-card>
|
||||||
<el-input v-model="testValue" placeholder="请输入" style="width: 400px; max-width: 100%" />
|
<div style="margin-bottom: 10px">复制成功后可在这粘贴测试</div>
|
||||||
</el-card>
|
<el-input v-model="testValue" placeholder="请输入" style="width: 400px; max-width: 100%" />
|
||||||
</u-container-layout>
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
<template>
|
||||||
|
<div class="m-code-mirror">
|
||||||
|
<div class="header">
|
||||||
|
<el-card >
|
||||||
|
<div>
|
||||||
|
<span>代码编辑器组件示例</span>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
<div class="footer">
|
||||||
|
<div class="footer-inner">
|
||||||
|
<CodeMirror/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import CodeMirror from '@/components/CodeMirror/index.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.m-code-mirror{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
& .header{
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
& .footer{
|
||||||
|
flex: 1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.footer-inner{
|
||||||
|
padding: 10px;
|
||||||
|
flex: 1;
|
||||||
|
background: white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
.count-to {
|
||||||
|
display: block;
|
||||||
|
margin: 10px 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 40px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: $primaryColor;
|
||||||
|
}
|
||||||
|
.label {
|
||||||
|
color: #2f4f4f;
|
||||||
|
font-size: 16px;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 15px 30px 15px 0;
|
||||||
|
}
|
||||||
|
|
@ -1,91 +1,93 @@
|
||||||
<template>
|
<template>
|
||||||
<u-container-layout class="components-container">
|
<div class="app-container">
|
||||||
<count-to
|
<div class="app-container-inner">
|
||||||
ref="example"
|
<count-to
|
||||||
class="example"
|
ref="example"
|
||||||
:start-val="options.startValInput"
|
class="count-to"
|
||||||
:end-val="options.endValInput"
|
:start-val="options.startValInput"
|
||||||
:duration="options.durationInput"
|
:end-val="options.endValInput"
|
||||||
:decimals="options.decimals"
|
:duration="options.durationInput"
|
||||||
:prefix="options.prefix"
|
:decimals="options.decimals"
|
||||||
:suffix="options.suffix"
|
:prefix="options.prefix"
|
||||||
:autoplay="true"
|
:suffix="options.suffix"
|
||||||
:separator="options.separator"
|
:autoplay="true"
|
||||||
></count-to>
|
:separator="options.separator"
|
||||||
<div style="margin-top: 40px;margin-bottom: 30px">
|
></count-to>
|
||||||
<label class="label"
|
<div style="margin-top: 40px;margin-bottom: 30px">
|
||||||
>起始值:
|
<label class="label"
|
||||||
<el-input-number
|
>起始值:
|
||||||
v-model="options.startValInput"
|
<el-input-number
|
||||||
@change="(val) => handleChange(val, 'startValInput')"
|
v-model="options.startValInput"
|
||||||
:min="0"
|
@change="(val) => handleChange(val, 'startValInput')"
|
||||||
label="描述文字"
|
:min="0"
|
||||||
></el-input-number>
|
label="描述文字"
|
||||||
</label>
|
></el-input-number>
|
||||||
<label class="label"
|
</label>
|
||||||
>最终值:
|
<label class="label"
|
||||||
<el-input-number
|
>最终值:
|
||||||
v-model="options.endValInput"
|
<el-input-number
|
||||||
@change="(val) => handleChange(val, 'endValInput')"
|
v-model="options.endValInput"
|
||||||
:min="1"
|
@change="(val) => handleChange(val, 'endValInput')"
|
||||||
label="描述文字"
|
:min="1"
|
||||||
></el-input-number>
|
label="描述文字"
|
||||||
</label>
|
></el-input-number>
|
||||||
<label class="label"
|
</label>
|
||||||
>持续时间:
|
<label class="label"
|
||||||
<el-input-number
|
>持续时间:
|
||||||
v-model="options.durationInput"
|
<el-input-number
|
||||||
@change="(val) => handleChange(val, 'durationInput')"
|
v-model="options.durationInput"
|
||||||
:min="1"
|
@change="(val) => handleChange(val, 'durationInput')"
|
||||||
label="描述文字"
|
:min="1"
|
||||||
></el-input-number>
|
label="描述文字"
|
||||||
</label>
|
></el-input-number>
|
||||||
<br />
|
</label>
|
||||||
<label class="label"
|
<br />
|
||||||
>小数位数:
|
<label class="label"
|
||||||
<el-input-number
|
>小数位数:
|
||||||
v-model="options.decimals"
|
<el-input-number
|
||||||
@change="(val) => handleChange(val, 'decimals')"
|
v-model="options.decimals"
|
||||||
:min="0"
|
@change="(val) => handleChange(val, 'decimals')"
|
||||||
label="描述文字"
|
:min="0"
|
||||||
></el-input-number>
|
label="描述文字"
|
||||||
</label>
|
></el-input-number>
|
||||||
<label class="label">
|
</label>
|
||||||
分隔符:<el-input
|
<label class="label">
|
||||||
v-model="options.separator"
|
分隔符:<el-input
|
||||||
@change="(val) => handleChange(val, 'prefix')"
|
v-model="options.separator"
|
||||||
style="width: 100px; margin-left: 10px"
|
@change="(val) => handleChange(val, 'prefix')"
|
||||||
></el-input>
|
style="width: 100px; margin-left: 10px"
|
||||||
</label>
|
></el-input>
|
||||||
<label class="label">
|
</label>
|
||||||
前缀:<el-input
|
<label class="label">
|
||||||
v-model="options.prefix"
|
前缀:<el-input
|
||||||
@change="(val) => handleChange(val, 'prefix')"
|
v-model="options.prefix"
|
||||||
style="width: 100px; margin-left: 10px"
|
@change="(val) => handleChange(val, 'prefix')"
|
||||||
></el-input>
|
style="width: 100px; margin-left: 10px"
|
||||||
</label>
|
></el-input>
|
||||||
<label class="label"
|
</label>
|
||||||
>后缀:
|
<label class="label"
|
||||||
<el-input
|
>后缀:
|
||||||
v-model="options.suffix"
|
<el-input
|
||||||
@change="(val) => handleChange(val, 'suffix')"
|
v-model="options.suffix"
|
||||||
style="width: 100px; margin-left: 10px"
|
@change="(val) => handleChange(val, 'suffix')"
|
||||||
></el-input>
|
style="width: 100px; margin-left: 10px"
|
||||||
</label>
|
></el-input>
|
||||||
|
</label>
|
||||||
|
|
||||||
<el-button type="primary" @click="start">开始</el-button>
|
<el-button type="primary" @click="start">开始</el-button>
|
||||||
<el-button type="danger" @click="pauseResume">暂停/恢复</el-button>
|
<el-button type="danger" @click="pauseResume">暂停/恢复</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-descriptions title="配置项 " :column="1" border class="descriptions">
|
<el-descriptions title="配置项 " :column="1" border class="descriptions">
|
||||||
<el-descriptions-item label="startValInput"> 起始值,默认为0 </el-descriptions-item>
|
<el-descriptions-item label="startValInput"> 起始值,默认为0 </el-descriptions-item>
|
||||||
<el-descriptions-item label="endValInput"> 最终值,默认为2017 </el-descriptions-item>
|
<el-descriptions-item label="endValInput"> 最终值,默认为2017 </el-descriptions-item>
|
||||||
<el-descriptions-item label="durationInput"> 持续时间,默认为3000 </el-descriptions-item>
|
<el-descriptions-item label="durationInput"> 持续时间,默认为3000 </el-descriptions-item>
|
||||||
<el-descriptions-item label="decimals"> 小数位数 </el-descriptions-item>
|
<el-descriptions-item label="decimals"> 小数位数 </el-descriptions-item>
|
||||||
<el-descriptions-item label="separator"> 分隔符,默认为 ',' </el-descriptions-item>
|
<el-descriptions-item label="separator"> 分隔符,默认为 ',' </el-descriptions-item>
|
||||||
<el-descriptions-item label="prefix"> 前缀 </el-descriptions-item>
|
<el-descriptions-item label="prefix"> 前缀 </el-descriptions-item>
|
||||||
<el-descriptions-item label="suffix"> 后缀 </el-descriptions-item>
|
<el-descriptions-item label="suffix"> 后缀 </el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</u-container-layout>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
@ -101,9 +103,7 @@
|
||||||
suffix: '元',
|
suffix: '元',
|
||||||
separator: ',',
|
separator: ',',
|
||||||
})
|
})
|
||||||
const handleChange = (val, type) => {
|
const handleChange = (val, type) => {}
|
||||||
|
|
||||||
}
|
|
||||||
const start = () => {
|
const start = () => {
|
||||||
example.value.start()
|
example.value.start()
|
||||||
}
|
}
|
||||||
|
|
@ -113,59 +113,5 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.example {
|
@import "./index";
|
||||||
display: block;
|
|
||||||
margin: 10px 0;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 40px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: $primaryColor;
|
|
||||||
/*background: linear-gradient(0deg,#77e0a0,#75c3e9);*/
|
|
||||||
/*-webkit-background-clip: text;*/
|
|
||||||
/*-webkit-text-fill-color: transparent;*/
|
|
||||||
}
|
|
||||||
.label {
|
|
||||||
color: #2f4f4f;
|
|
||||||
font-size: 16px;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 15px 30px 15px 0;
|
|
||||||
}
|
|
||||||
input {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 4px 7px;
|
|
||||||
width: 70px;
|
|
||||||
height: 28px;
|
|
||||||
cursor: text;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: rgba(0, 0, 0, 0.65);
|
|
||||||
background-color: #fff;
|
|
||||||
background-image: none;
|
|
||||||
border: 1px solid #d9d9d9;
|
|
||||||
border-radius: 4px;
|
|
||||||
-webkit-transition: all 0.3s;
|
|
||||||
transition: all 0.3s;
|
|
||||||
}
|
|
||||||
.startBtn {
|
|
||||||
margin-left: 20px;
|
|
||||||
font-size: 20px;
|
|
||||||
color: #30b08f;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
.startBtn:hover {
|
|
||||||
background-color: #30b08f;
|
|
||||||
color: #fff;
|
|
||||||
border-color: #30b08f;
|
|
||||||
}
|
|
||||||
.pause-resume-btn {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #e65d6e;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
.pause-resume-btn:hover {
|
|
||||||
background-color: #e65d6e;
|
|
||||||
color: #fff;
|
|
||||||
border-color: #e65d6e;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,6 @@
|
||||||
<el-descriptions-item label="参考文档"> <a href="https://www.wangeditor.com/v5/for-frame.html" target="_blank"> https://www.wangeditor.com/v5/for-frame.html </a> </el-descriptions-item>
|
<el-descriptions-item label="参考文档"> <a href="https://www.wangeditor.com/v5/for-frame.html" target="_blank"> https://www.wangeditor.com/v5/for-frame.html </a> </el-descriptions-item>
|
||||||
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
title="预览"
|
title="预览"
|
||||||
|
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
<template>
|
|
||||||
<u-container-layout>
|
|
||||||
<splitpanes style="height: 800px">
|
|
||||||
<pane min-size="20" class="left">1</pane>
|
|
||||||
<pane>
|
|
||||||
<splitpanes horizontal>
|
|
||||||
<pane class="item1">2</pane>
|
|
||||||
<pane class="item2">3</pane>
|
|
||||||
<pane class="item3">4</pane>
|
|
||||||
</splitpanes>
|
|
||||||
</pane>
|
|
||||||
<pane class="item4">5</pane>
|
|
||||||
</splitpanes>
|
|
||||||
</u-container-layout>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
// 参考文档 https://antoniandre.github.io/splitpanes/
|
|
||||||
import { Splitpanes, Pane } from 'splitpanes'
|
|
||||||
import 'splitpanes/dist/splitpanes.css'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.splitpanes__pane {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
background: red;
|
|
||||||
font-family: Helvetica, Arial, sans-serif;
|
|
||||||
color: rgba(255, 255, 255, 0.6);
|
|
||||||
font-size: 5em;
|
|
||||||
}
|
|
||||||
.left {
|
|
||||||
background: #f38181;
|
|
||||||
}
|
|
||||||
.item1 {
|
|
||||||
background: #fce38a;
|
|
||||||
}
|
|
||||||
.item2 {
|
|
||||||
background: #95e1d3;
|
|
||||||
}
|
|
||||||
.item3 {
|
|
||||||
background: rgb(72, 239, 205);
|
|
||||||
}
|
|
||||||
.item4 {
|
|
||||||
background: rgb(106, 170, 20);
|
|
||||||
}
|
|
||||||
.item5 {
|
|
||||||
background: rgb(72, 239, 205);
|
|
||||||
}
|
|
||||||
::v-deep(.splitpanes__splitter) {
|
|
||||||
min-width: 6px;
|
|
||||||
}
|
|
||||||
::v-deep(.splitpanes__splitter) {
|
|
||||||
min-height: 6px;
|
|
||||||
cursor: row-resize;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<u-container-layout>
|
<div class="app-container">
|
||||||
<div>
|
|
||||||
<el-card style="margin-bottom: 10px">
|
<el-card style="margin-bottom: 10px">
|
||||||
<template #header>
|
<template #header>
|
||||||
<span>按钮上传</span>
|
<span>按钮上传</span>
|
||||||
|
|
@ -21,14 +20,14 @@
|
||||||
<el-button type="primary">点击上传</el-button>
|
<el-button type="primary">点击上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card style="margin-bottom: 10px">
|
||||||
<template #header>
|
<template #header>
|
||||||
<span>多图片上传</span>
|
<span>多图片上传</span>
|
||||||
</template>
|
</template>
|
||||||
<Upload @update="update" v-model="imgs" />
|
<Upload @update="update" v-model="imgs" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card >
|
||||||
<template #header>
|
<template #header>
|
||||||
<span>拖拽上传</span>
|
<span>拖拽上传</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -53,8 +52,7 @@
|
||||||
<div class="el-upload__text"> 拖拽上传 <em>或者点击上传</em> </div>
|
<div class="el-upload__text"> 拖拽上传 <em>或者点击上传</em> </div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</u-container-layout>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||||
server: {
|
server: {
|
||||||
// 服务器主机名,如果允许外部访问,可设置为 "0.0.0.0" 也可设置成你的ip地址
|
// 服务器主机名,如果允许外部访问,可设置为 "0.0.0.0" 也可设置成你的ip地址
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 8100,
|
port: 8080,
|
||||||
open: true,
|
open: true,
|
||||||
https: false,
|
https: false,
|
||||||
cors: true,
|
cors: true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue