查缺补漏,规范命名

This commit is contained in:
xiangheng
2024-10-25 13:26:23 +08:00
parent bdac94a6b3
commit ca33912c94
12 changed files with 37 additions and 19 deletions

View File

@@ -16,6 +16,7 @@
"echarts", "echarts",
"execa", "execa",
"highlightjs", "highlightjs",
"iconfont",
"logicflow", "logicflow",
"nprogress", "nprogress",
"pinia", "pinia",

View File

@@ -3,7 +3,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref, onMounted } from 'vue'
import 'vform3-builds/dist/designer.style.css' //引入VForm3样式 import 'vform3-builds/dist/designer.style.css' //引入VForm3样式
const designerRef = ref(null) const designerRef = ref(null)
function setData(json) { function setData(json) {

View File

@@ -18,8 +18,9 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'
import type { PropType } from 'vue' import type { PropType } from 'vue'
import { LinkTypeEnum, type Link } from '.' import { LinkTypeEnum, type Link } from './index'
defineProps({ defineProps({
modelValue: { modelValue: {

View File

@@ -49,7 +49,11 @@ export default defineComponent({
position: relative; position: relative;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
@apply bg-br-extra-light border border-br-extra-light;
background-color: var(--el-border-color-extra-light);
border-width: 1px;
border-color: var(--el-border-color-extra-light);
.image, .image,
.video { .video {
display: block; display: block;

View File

@@ -4,7 +4,7 @@
<div <div
ref="textRef" ref="textRef"
class="overflow-text truncate" class="overflow-text truncate"
:style="{ textOverflow: overfloType }" :style="{ textOverflow: overflowType }"
> >
{{ content }} {{ content }}
</div> </div>
@@ -28,7 +28,7 @@ const props = defineProps({
type: String as PropType<Placement>, type: String as PropType<Placement>,
default: 'top' default: 'top'
}, },
overfloType: { overflowType: {
type: String as PropType<'ellipsis' | 'unset' | 'clip'>, type: String as PropType<'ellipsis' | 'unset' | 'clip'>,
default: 'ellipsis' default: 'ellipsis'
} }

View File

@@ -149,7 +149,7 @@ const secretKey = ref(''), //后端返回的ase加密秘钥
blockBackImgBase = ref(''), //验证滑块的背景图片 blockBackImgBase = ref(''), //验证滑块的背景图片
backToken = ref(''), //后端返回的唯一token值 backToken = ref(''), //后端返回的唯一token值
startMoveTime = ref(), //移动开始的时间 startMoveTime = ref(), //移动开始的时间
endMovetime = ref(), //移动结束的时间 endMoveTime = ref(), //移动结束的时间
tipWords = ref(''), tipWords = ref(''),
text = ref(''), text = ref(''),
finishText = ref(''), finishText = ref(''),
@@ -257,7 +257,7 @@ function move(e) {
//鼠标松开 //鼠标松开
function end() { function end() {
endMovetime.value = +new Date() endMoveTime.value = +new Date()
//判断是否重合 //判断是否重合
if (status.value && isEnd.value == false) { if (status.value && isEnd.value == false) {
let moveLeftDistance = parseInt((moveBlockLeft.value || '').replace('px', '')) let moveLeftDistance = parseInt((moveBlockLeft.value || '').replace('px', ''))
@@ -284,7 +284,7 @@ function end() {
}, 1500) }, 1500)
} }
passFlag.value = true passFlag.value = true
tipWords.value = `${((endMovetime.value - startMoveTime.value) / 1000).toFixed( tipWords.value = `${((endMoveTime.value - startMoveTime.value) / 1000).toFixed(
2 2
)}s验证成功` )}s验证成功`
setTimeout(() => { setTimeout(() => {

View File

@@ -5,8 +5,8 @@ import CryptoJS from 'crypto-js'
* */ * */
export function aesEncrypt(word, keyWord = 'XwKsGlMcdPMEhR1B') { export function aesEncrypt(word, keyWord = 'XwKsGlMcdPMEhR1B') {
const key = CryptoJS.enc.Utf8.parse(keyWord) const key = CryptoJS.enc.Utf8.parse(keyWord)
const srcs = CryptoJS.enc.Utf8.parse(word) const src = CryptoJS.enc.Utf8.parse(word)
const encrypted = CryptoJS.AES.encrypt(srcs, key, { const encrypted = CryptoJS.AES.encrypt(src, key, {
mode: CryptoJS.mode.ECB, mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7 padding: CryptoJS.pad.Pkcs7
}) })

View File

@@ -51,9 +51,17 @@ const settingStore = useSettingStore()
<style lang="scss"> <style lang="scss">
.navbar { .navbar {
height: var(--navbar-height); height: var(--navbar-height);
@apply flex px-2 bg-body;
display: flex;
padding-left: 8px;
padding-right: 8px;
background-color: var(--el-bg-color);
.navbar-item { .navbar-item {
@apply h-full flex justify-center items-center hover:bg-page; height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--el-bg-color-page);
} }
} }
</style> </style>

View File

@@ -215,7 +215,10 @@ const resetTheme = () => {
<style lang="scss" scoped> <style lang="scss" scoped>
.icon-select { .icon-select {
@apply absolute left-1/2 top-1/2; position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
</style> </style>

View File

@@ -3,7 +3,7 @@
<el-drawer <el-drawer
v-model="showMenuDrawer" v-model="showMenuDrawer"
direction="ltr" direction="ltr"
:size="drawderSize" :size="drawerSize"
title="主题设置" title="主题设置"
:with-header="false" :with-header="false"
> >
@@ -33,7 +33,7 @@ const showMenuDrawer = computed({
} }
}) })
const drawderSize = computed(() => { const drawerSize = computed(() => {
return `${settingStore.sideWidth + 1}px` return `${settingStore.sideWidth + 1}px`
}) })
</script> </script>

View File

@@ -1,18 +1,18 @@
<template> <template>
<div class="logo"> <div class="logo">
<image-contain :width="szie" :height="szie" :src="config.webLogo" /> <image-contain :width="size" :height="size" :src="config.webLogo" />
<transition name="title-width"> <transition name="title-width">
<div <div
v-show="showTitle" v-show="showTitle"
class="logo-title overflow-hidden whitespace-nowrap" class="logo-title overflow-hidden whitespace-nowrap"
:class="{ 'text-white': theme == ThemeEnum.DARK }" :class="{ 'text-white': theme == ThemeEnum.DARK }"
:style="{ left: `${szie + 16}px` }" :style="{ left: `${size + 16}px` }"
> >
<overflow-tooltip <overflow-tooltip
:content="title || config.webName" :content="title || config.webName"
:teleported="true" :teleported="true"
placement="bottom" placement="bottom"
overflo-type="unset" overflow-type="unset"
> >
</overflow-tooltip> </overflow-tooltip>
</div> </div>
@@ -28,7 +28,7 @@ defineOptions({
name: 'SideLogo' name: 'SideLogo'
}) })
defineProps({ defineProps({
szie: { type: Number, default: 34 }, size: { type: Number, default: 34 },
title: { type: String }, title: { type: String },
theme: { type: String }, theme: { type: String },
showTitle: { type: Boolean, default: true } showTitle: { type: Boolean, default: true }

View File

@@ -1,5 +1,6 @@
import { getConfig } from '@/api/app' import { getConfig } from '@/api/app'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { nextTick } from 'vue'
interface AppSate { interface AppSate {
config: Record<string, any> config: Record<string, any>
isMobile: boolean isMobile: boolean