【更新】设置抽屉内的一些bug修复,以及少数功能代码优化

pull/98/head
小诺 2023-03-26 01:57:08 +08:00 committed by 俞宝山
parent ea0ffa53ef
commit 9d0c481f85
9 changed files with 39 additions and 40 deletions

View File

@ -10,8 +10,8 @@
"license": "Apache-2.0",
"author": "yubaoshan",
"scripts": {
"serve": "vite",
"dev": "vite --mode development",
"serve": "vite --host 0.0.0.0",
"dev": "vite --mode development --host 0.0.0.0",
"preview": "vite preview",
"build": "vite build --mode production",
"prod": "vite --mode production"

View File

@ -1,5 +1,12 @@
<template>
<xn-form-container ref="signModel" v-model:visible="visible" :width="700" title="电子签名" @close="handleClear" @ok="handleOk">
<xn-form-container
ref="signModel"
v-model:visible="visible"
:width="700"
title="电子签名"
@close="handleClear"
@ok="handleOk"
>
<a-row :gutter="5">
<a-col :span="15">
<div style="border: 1px solid rgb(236 236 236)">

View File

@ -8,7 +8,7 @@
<span>{{ a.tips }}</span>
</template>
<div :class="['snowy-setting-checkbox-item', a.style]" @click="setSideStyle(a.value)">
<check-outlined v-if="sideStyle === a.value" class="snowy-setting-checkbox-item-select-icon" />
<check-outlined v-if="theme === a.value" class="snowy-setting-checkbox-item-select-icon" />
</div>
</a-tooltip>
</div>
@ -56,7 +56,7 @@
style="float: right"
:checked="topHanderThemeColorSpread"
:disabled="!topHanderThemeColorOpen"
@change="changeTopHanderThemeColorOpen"
@change="changeTopHanderThemeColorSpread"
/>
</h4>
</span>
@ -81,7 +81,7 @@
<a-form-item label="表单风格">
<a-select
:value="formStyle"
class="w-[80px]"
style="width: 80px"
size="small"
:options="xnFormStyleOptions"
@change="formStyleChange"
@ -97,8 +97,8 @@
</template>
<script>
import { colorList } from '../../config/settingConfig'
import { ThemeModeEnum } from '../../utils/enum'
import { colorList } from '@/config/settingConfig'
import { ThemeModeEnum } from '@/utils/enum'
import { globalStore } from '@/store'
import { mapState, mapStores } from 'pinia'
import tool from '@/utils/tool'
@ -112,12 +112,9 @@
topHanderThemeColorSpread: 'TOP_HANDER_THEME_COLOR_SPREAD',
moduleUnfoldOpen: 'MODULE_UNFOLD_OPEN'
}
export default defineComponent({
data() {
return {
//
sideStyle: tool.data.get('SNOWY_THEME') || this.theme,
sideStyleList: [
{
tips: '暗色主题风格',
@ -182,8 +179,12 @@
this.toggleState('topHanderThemeColorOpen')
if (!this.topHanderThemeColorOpen) {
this.globalStore.topHanderThemeColorSpread = false
tool.data.set('SNOWY_TOP_HANDER_THEME_COLOR_SPREAD', false)
}
},
changeTopHanderThemeColorSpread() {
this.toggleState('topHanderThemeColorSpread')
},
toggleState(stateName) {
this.globalStore.toggleConfig(stateName)
const toolDataName = toolDataNameMap[stateName]
@ -192,18 +193,15 @@
//
setSideStyle(value) {
this.globalStore.setTheme(value)
this.sideStyle = value
tool.data.set('SNOWY_THEME', value)
},
//
layoutStyle(value) {
this.globalStore.setLayout(value)
tool.data.set('SNOWY_LAYOUT', value)
this.layout = value
},
//
tagColor(value) {
this.globalStore.themeColor = value
tool.data.set('SNOWY_THEME_COLOR', value)
this.globalStore.setThemeColor(value)
},

View File

@ -79,9 +79,9 @@
},
computed: {
...mapState(viewTagsStore, ['viewTags']),
tagList() {
return this.viewTags
}
tagList() {
return this.viewTags
}
},
watch: {
$route(to) {

View File

@ -185,6 +185,7 @@
import { ThemeModeEnum } from '@/utils/enum'
import { globalStore, keepAliveStore } from '@/store'
import { mapState, mapActions } from 'pinia'
import tool from '@/utils/tool'
export default defineComponent({
name: 'Index',
@ -220,6 +221,7 @@
'menuIsCollapse',
'breadcrumbOpen',
'topHanderThemeColorOpen',
'topHanderThemeColorSpread',
'topHanderThemeColor',
'sideUniqueOpen',
'sysBaseConfig'
@ -264,7 +266,7 @@
window.addEventListener('resize', this.onLayoutResize)
this.moduleMenu = this.$router.getMenu()
//
const menuModuleId = this.$TOOL.data.get('SNOWY_MENU_MODULE_ID')
const menuModuleId = tool.data.get('SNOWY_MENU_MODULE_ID')
let menu = []
if (menuModuleId) {
//
@ -293,7 +295,7 @@
const menus = menu.filter((item) => item.id === id)[0].children
if (menus.length > 0) {
//
this.$TOOL.data.set('SNOWY_MENU_MODULE_ID', id)
tool.data.set('SNOWY_MENU_MODULE_ID', id)
//
this.menu = this.filterUrl(menus)
//

View File

@ -1,3 +1,13 @@
/**
* Copyright [2022] [https://www.xiaonuo.vip]
* Snowy采用APACHE LICENSE 2.0开源协议您在使用过程中需要注意以下几点
* 1.请不要删除和修改根目录下的LICENSE文件
* 2.请不要删除和修改Snowy源码头部的版权声明
* 3.本项目代码可免费商业使用商业使用请保留源码和相关描述文件的项目出处作者声明等
* 4.分发源码时候请注明软件出处 https://www.xiaonuo.vip
* 5.不可二次分发开源参与同类竞品如有想法可联系团队xiaonuobase@qq.com商议合作
* 6.若您的项目无法满足以上几点需要更多功能代码获取Snowy商业授权许可请在官网购买授权地址为 https://www.xiaonuo.vip
*/
import { defineStore } from 'pinia'
import { changeColor } from '@/utils/themeUtil'
import config from '@/config'

View File

@ -1,11 +1,5 @@
<template>
<xn-form-container
title="导入导出"
:width="700"
:visible="visible"
:destroy-on-close="true"
@close="onClose"
>
<xn-form-container title="导入导出" :width="700" :visible="visible" :destroy-on-close="true" @close="onClose">
<span
>导入数据格式严格按照系统模板进行数据录入请点击
<a-button type="primary" size="small" @click="downloadImportUserTemplate"></a-button>

View File

@ -1,11 +1,5 @@
<template>
<xn-form-container
title="修改密码"
:width="550"
:visible="visible"
:destroy-on-close="true"
@close="onClose"
>
<xn-form-container title="修改密码" :width="550" :visible="visible" :destroy-on-close="true" @close="onClose">
<a-form ref="formRef" :model="formState" :rules="rules" layout="vertical">
<a-form-item label="旧密码:" name="password" has-feedback>
<a-input

View File

@ -1,11 +1,5 @@
<template>
<xn-form-container
title="详情"
:width="700"
:visible="visible"
:destroy-on-close="true"
@close="onClose"
>
<xn-form-container title="详情" :width="700" :visible="visible" :destroy-on-close="true" @close="onClose">
<a-descriptions :column="1" size="middle" bordered class="mb-2">
<a-descriptions-item label="主题">{{ formData.subject }}</a-descriptions-item>
<a-descriptions-item label="发送时间">{{ formData.createTime }}</a-descriptions-item>