refactor: vue3.3 defineOptions

pull/177/head
xingyu 2023-06-21 19:14:34 +08:00
parent a5c7c886ee
commit 922f83d99c
259 changed files with 955 additions and 381 deletions

View File

@ -1,10 +1,12 @@
<script lang="ts" name="APP" setup> <script lang="ts" setup>
import { isDark } from '@/utils/is' import { isDark } from '@/utils/is'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import routerSearch from '@/components/RouterSearch/index.vue' import routerSearch from '@/components/RouterSearch/index.vue'
defineOptions({ name: 'APP' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('app') const prefixCls = getPrefixCls('app')
const appStore = useAppStore() const appStore = useAppStore()

View File

@ -1,7 +1,9 @@
<script lang="ts" name="BackTop" setup> <script lang="ts" setup>
import { ElBacktop } from 'element-plus' import { ElBacktop } from 'element-plus'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'BackTop' })
const { getPrefixCls, variables } = useDesign() const { getPrefixCls, variables } = useDesign()
const prefixCls = getPrefixCls('backtop') const prefixCls = getPrefixCls('backtop')

View File

@ -1,4 +1,4 @@
<script lang="ts" name="ConfigGlobal" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useLocaleStore } from '@/store/modules/locale' import { useLocaleStore } from '@/store/modules/locale'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
@ -7,6 +7,8 @@ import { useDesign } from '@/hooks/web/useDesign'
import { ElementPlusSize } from '@/types/elementPlus' import { ElementPlusSize } from '@/types/elementPlus'
import { useWindowSize } from '@vueuse/core' import { useWindowSize } from '@vueuse/core'
defineOptions({ name: 'ConfigGlobal' })
const { variables } = useDesign() const { variables } = useDesign()
const appStore = useAppStore() const appStore = useAppStore()

View File

@ -1,7 +1,9 @@
<script lang="ts" name="ContentDetailWrap" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'ContentDetailWrap' })
const { t } = useI18n() const { t } = useI18n()
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()

View File

@ -1,7 +1,9 @@
<script lang="ts" name="ContentWrap" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'ContentWrap' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('content-wrap') const prefixCls = getPrefixCls('content-wrap')

View File

@ -1,9 +1,11 @@
<script lang="ts" name="CountTo" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import { isNumber } from '@/utils/is' import { isNumber } from '@/utils/is'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'CountTo' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('count-to') const prefixCls = getPrefixCls('count-to')

View File

@ -1,7 +1,9 @@
<script lang="ts" name="Crontab" setup> <script lang="ts" setup>
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { PropType } from 'vue' import { PropType } from 'vue'
defineOptions({ name: 'Crontab' })
interface shortcutsType { interface shortcutsType {
text: string text: string
value: string value: string
@ -966,37 +968,37 @@ const submit = () => {
<style scoped> <style scoped>
.sc-cron:deep(.el-tabs__item) { .sc-cron:deep(.el-tabs__item) {
height: auto; height: auto;
line-height: 1;
padding: 0 7px; padding: 0 7px;
line-height: 1;
vertical-align: bottom; vertical-align: bottom;
} }
.sc-cron-num { .sc-cron-num {
text-align: center;
margin-bottom: 15px;
width: 100%; width: 100%;
margin-bottom: 15px;
text-align: center;
} }
.sc-cron-num h2 { .sc-cron-num h2 {
font-size: 12px;
margin-bottom: 15px; margin-bottom: 15px;
font-size: 12px;
font-weight: normal; font-weight: normal;
} }
.sc-cron-num h4 { .sc-cron-num h4 {
display: block; display: block;
height: 32px;
line-height: 30px;
width: 100%; width: 100%;
font-size: 12px; height: 32px;
padding: 0 15px; padding: 0 15px;
font-size: 12px;
line-height: 30px;
background: var(--el-color-primary-light-9); background: var(--el-color-primary-light-9);
border-radius: 4px; border-radius: 4px;
} }
.sc-cron:deep(.el-tabs__item.is-active) .sc-cron-num h4 { .sc-cron:deep(.el-tabs__item.is-active) .sc-cron-num h4 {
background: var(--el-color-primary);
color: #fff; color: #fff;
background: var(--el-color-primary);
} }
[data-theme='dark'] .sc-cron-num h4 { [data-theme='dark'] .sc-cron-num h4 {

View File

@ -113,7 +113,7 @@
</Dialog> </Dialog>
</div> </div>
</template> </template>
<script lang="ts" name="CopperModal" setup> <script lang="ts" setup>
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { dataURLtoBlob } from '@/utils/filt' import { dataURLtoBlob } from '@/utils/filt'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
@ -121,6 +121,8 @@ import type { CropendResult, Cropper } from './types'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { CropperImage } from '@/components/Cropper' import { CropperImage } from '@/components/Cropper'
defineOptions({ name: 'CopperModal' })
const props = defineProps({ const props = defineProps({
srcValue: propTypes.string.def(''), srcValue: propTypes.string.def(''),
circled: propTypes.bool.def(true) circled: propTypes.bool.def(true)

View File

@ -10,7 +10,7 @@
/> />
</div> </div>
</template> </template>
<script lang="ts" name="Cropper" setup> <script lang="ts" setup>
import { CSSProperties, PropType } from 'vue' import { CSSProperties, PropType } from 'vue'
import Cropper from 'cropperjs' import Cropper from 'cropperjs'
import 'cropperjs/dist/cropper.css' import 'cropperjs/dist/cropper.css'
@ -18,6 +18,8 @@ import { useDesign } from '@/hooks/web/useDesign'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDebounceFn } from '@vueuse/core' import { useDebounceFn } from '@vueuse/core'
defineOptions({ name: 'Cropper' })
type Options = Cropper.Options type Options = Cropper.Options
const defaultOptions: Options = { const defaultOptions: Options = {

View File

@ -11,13 +11,15 @@
/> />
</div> </div>
</template> </template>
<script lang="ts" name="CropperAvatar" setup> <script lang="ts" setup>
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import CopperModal from './CopperModal.vue' import CopperModal from './CopperModal.vue'
defineOptions({ name: 'CropperAvatar' })
const props = defineProps({ const props = defineProps({
width: propTypes.string.def('200px'), width: propTypes.string.def('200px'),
value: propTypes.string.def(''), value: propTypes.string.def(''),
@ -83,14 +85,14 @@ $prefix-cls: #{$namespace}--cropper-avatar;
} }
&-image-mask { &-image-mask {
opacity: 0%;
position: absolute; position: absolute;
width: inherit; width: inherit;
height: inherit; height: inherit;
border-radius: inherit;
border: inherit;
background: rgb(0 0 0 / 40%);
cursor: pointer; cursor: pointer;
background: rgb(0 0 0 / 40%);
border: inherit;
border-radius: inherit;
opacity: 0;
transition: opacity 0.4s; transition: opacity 0.4s;
::v-deep(svg) { ::v-deep(svg) {
@ -99,7 +101,7 @@ $prefix-cls: #{$namespace}--cropper-avatar;
} }
&-image-mask:hover { &-image-mask:hover {
opacity: 4000%; opacity: 40;
} }
&-upload-btn { &-upload-btn {
@ -121,21 +123,18 @@ $prefix-cls: #{$namespace}--cropper-avatar;
height: 120px; height: 120px;
} }
.user-info-head:hover:after { .user-info-head:hover::after {
content: '+';
position: absolute; position: absolute;
left: 0; inset: 0;
right: 0;
top: 0;
bottom: 0;
color: #eee;
background: rgba(0, 0, 0, 0.5);
font-size: 24px; font-size: 24px;
font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
cursor: pointer; font-style: normal;
line-height: 110px; line-height: 110px;
color: #eee;
cursor: pointer;
background: rgb(0 0 0 / 50%);
border-radius: 50%; border-radius: 50%;
content: '+';
} }
</style> </style>

View File

@ -1,4 +1,4 @@
<script lang="ts" name="Descriptions" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
@ -6,6 +6,8 @@ import { propTypes } from '@/utils/propTypes'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { DescriptionsSchema } from '@/types/descriptions' import { DescriptionsSchema } from '@/types/descriptions'
defineOptions({ name: 'Descriptions' })
const appStore = useAppStore() const appStore = useAppStore()
const mobile = computed(() => appStore.getMobile) const mobile = computed(() => appStore.getMobile)

View File

@ -1,7 +1,10 @@
<script lang="ts" name="Dialog" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { isNumber } from '@/utils/is' import { isNumber } from '@/utils/is'
// eslint-disable-next-line vue/no-reserved-component-names
defineOptions({ name: 'Dialog' })
const slots = useSlots() const slots = useSlots()
const props = defineProps({ const props = defineProps({

View File

@ -5,9 +5,11 @@
</template> </template>
</el-alert> </el-alert>
</template> </template>
<script setup lang="tsx" name="DocAlert"> <script setup lang="tsx">
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
defineOptions({ name: 'DocAlert' })
const props = defineProps({ const props = defineProps({
title: propTypes.string, title: propTypes.string,
url: propTypes.string url: propTypes.string
@ -25,8 +27,8 @@ const getEnable = () => {
</script> </script>
<style scoped> <style scoped>
.el-alert--success.is-light { .el-alert--success.is-light {
border: 1px solid green;
margin-bottom: 10px; margin-bottom: 10px;
cursor: pointer; cursor: pointer;
border: 1px solid green;
} }
</style> </style>

View File

@ -1,4 +1,4 @@
<script lang="ts" name="EChart" setup> <script lang="ts" setup>
import type { EChartsOption } from 'echarts' import type { EChartsOption } from 'echarts'
import echarts from '@/plugins/echarts' import echarts from '@/plugins/echarts'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
@ -9,6 +9,8 @@ import { useAppStore } from '@/store/modules/app'
import { isString } from '@/utils/is' import { isString } from '@/utils/is'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'EChart' })
const { getPrefixCls, variables } = useDesign() const { getPrefixCls, variables } = useDesign()
const prefixCls = getPrefixCls('echart') const prefixCls = getPrefixCls('echart')

View File

@ -1,4 +1,4 @@
<script lang="ts" name="Editor" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import { Editor, Toolbar } from '@wangeditor/editor-for-vue' import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import { i18nChangeLanguage, IDomEditor, IEditorConfig } from '@wangeditor/editor' import { i18nChangeLanguage, IDomEditor, IEditorConfig } from '@wangeditor/editor'
@ -8,6 +8,8 @@ import { ElMessage } from 'element-plus'
import { useLocaleStore } from '@/store/modules/locale' import { useLocaleStore } from '@/store/modules/locale'
import { getAccessToken, getTenantId } from '@/utils/auth' import { getAccessToken, getTenantId } from '@/utils/auth'
defineOptions({ name: 'Editor' })
type InsertFnType = (url: string, alt: string, href: string) => void type InsertFnType = (url: string, alt: string, href: string) => void
const localeStore = useLocaleStore() const localeStore = useLocaleStore()

View File

@ -1,9 +1,11 @@
<script lang="ts" name="Error" setup> <script lang="ts" setup>
import pageError from '@/assets/svgs/404.svg' import pageError from '@/assets/svgs/404.svg'
import networkError from '@/assets/svgs/500.svg' import networkError from '@/assets/svgs/500.svg'
import noPermission from '@/assets/svgs/403.svg' import noPermission from '@/assets/svgs/403.svg'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
defineOptions({ name: 'Error' })
interface ErrorMap { interface ErrorMap {
url: string url: string
message: string message: string

View File

@ -1,6 +1,8 @@
<script lang="ts" name="IFrame" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
defineOptions({ name: 'IFrame' })
const props = defineProps({ const props = defineProps({
src: propTypes.string.def('') src: propTypes.string.def('')
}) })

View File

@ -1,8 +1,10 @@
<script lang="ts" name="Icon" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import Iconify from '@purge-icons/generated' import Iconify from '@purge-icons/generated'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'Icon' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('icon') const prefixCls = getPrefixCls('icon')

View File

@ -1,8 +1,10 @@
<script lang="ts" name="IconSelect" setup> <script lang="ts" setup>
import { CSSProperties } from 'vue' import { CSSProperties } from 'vue'
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
import { IconJson } from '@/components/Icon/src/data' import { IconJson } from '@/components/Icon/src/data'
defineOptions({ name: 'IconSelect' })
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined type ParameterCSSProperties = (item?: string) => CSSProperties | undefined
const props = defineProps({ const props = defineProps({
@ -189,10 +191,10 @@ watch(
.icon-item { .icon-item {
&:hover { &:hover {
border-color: var(--el-color-primary);
color: var(--el-color-primary); color: var(--el-color-primary);
transition: all 0.4s; border-color: var(--el-color-primary);
transform: scaleX(1.05); transform: scaleX(1.05);
transition: all 0.4s;
} }
} }
@ -213,15 +215,15 @@ watch(
} }
:deep(.el-tabs__item) { :deep(.el-tabs__item) {
height: 30px;
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
height: 30px;
line-height: 30px; line-height: 30px;
} }
:deep(.el-tabs__header), :deep(.el-tabs__header),
:deep(.el-tabs__nav-wrap) { :deep(.el-tabs__nav-wrap) {
margin: 0;
position: static; position: static;
margin: 0;
} }
</style> </style>

View File

@ -1,7 +1,9 @@
<script lang="ts" name="ImageViewer" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
defineOptions({ name: 'ImageViewer' })
const props = defineProps({ const props = defineProps({
urlList: { urlList: {
type: Array as PropType<string[]>, type: Array as PropType<string[]>,

View File

@ -1,9 +1,11 @@
<script lang="ts" name="InfoTip" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { TipSchema } from '@/types/infoTip' import { TipSchema } from '@/types/infoTip'
defineOptions({ name: 'InfoTip' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('infotip') const prefixCls = getPrefixCls('infotip')

View File

@ -1,10 +1,12 @@
<script lang="ts" name="InputPassword" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useConfigGlobal } from '@/hooks/web/useConfigGlobal' import { useConfigGlobal } from '@/hooks/web/useConfigGlobal'
import type { ZxcvbnResult } from '@zxcvbn-ts/core' import type { ZxcvbnResult } from '@zxcvbn-ts/core'
import { zxcvbn } from '@zxcvbn-ts/core' import { zxcvbn } from '@zxcvbn-ts/core'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'InputPassword' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('input-password') const prefixCls = getPrefixCls('input-password')
@ -94,7 +96,7 @@ $prefix-cls: #{$namespace}-input-password;
background-color: transparent; background-color: transparent;
border-color: var(--el-color-white); border-color: var(--el-color-white);
border-style: solid; border-style: solid;
border-width: 0 5px 0 5px; border-width: 0 5px;
content: ''; content: '';
} }

View File

@ -14,9 +14,11 @@
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
/> />
</template> </template>
<script name="Pagination" setup> <script setup lang="ts">
import { computed } from 'vue' import { computed } from 'vue'
defineOptions({ name: 'Pagination' })
const props = defineProps({ const props = defineProps({
// //
total: { total: {

View File

@ -1,4 +1,4 @@
<script lang="ts" name="Qrcode" setup> <script lang="ts" setup>
import { computed, nextTick, PropType, ref, unref, watch } from 'vue' import { computed, nextTick, PropType, ref, unref, watch } from 'vue'
import QRCode, { QRCodeRenderersOptions } from 'qrcode' import QRCode, { QRCodeRenderersOptions } from 'qrcode'
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
@ -7,6 +7,8 @@ import { useDesign } from '@/hooks/web/useDesign'
import { isString } from '@/utils/is' import { isString } from '@/utils/is'
import { QrcodeLogo } from '@/types/qrcode' import { QrcodeLogo } from '@/types/qrcode'
defineOptions({ name: 'Qrcode' })
const props = defineProps({ const props = defineProps({
// img canvas,imglogo // img canvas,imglogo
tag: propTypes.string.validate((v: string) => ['canvas', 'img'].includes(v)).def('canvas'), tag: propTypes.string.validate((v: string) => ['canvas', 'img'].includes(v)).def('canvas'),
@ -241,7 +243,7 @@ $prefix-cls: #{$namespace}-qrcode;
.#{$prefix-cls} { .#{$prefix-cls} {
&--disabled { &--disabled {
background: rgba(255, 255, 255, 0.95); background: rgb(255 255 255 / 95%);
& > div { & > div {
transform: translate(-50%, -50%); transform: translate(-50%, -50%);

View File

@ -1,4 +1,4 @@
<script lang="ts" name="Search" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
@ -7,6 +7,8 @@ import { findIndex } from '@/utils'
import { cloneDeep } from 'lodash-es' import { cloneDeep } from 'lodash-es'
import { FormSchema } from '@/types/form' import { FormSchema } from '@/types/form'
defineOptions({ name: 'Search' })
const { t } = useI18n() const { t } = useI18n()
const props = defineProps({ const props = defineProps({

View File

@ -1,8 +1,10 @@
<script lang="ts" name="Sticky" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { isClient, useEventListener, useWindowSize } from '@vueuse/core' import { isClient, useEventListener, useWindowSize } from '@vueuse/core'
import type { CSSProperties } from 'vue' import type { CSSProperties } from 'vue'
defineOptions({ name: 'Sticky' })
const props = defineProps({ const props = defineProps({
// (px) // (px)
offset: propTypes.number.def(0), offset: propTypes.number.def(0),

View File

@ -1,6 +1,8 @@
<script lang="ts" name="Tooltip" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
defineOptions({ name: 'Tooltip' })
defineProps({ defineProps({
titel: propTypes.string.def(''), titel: propTypes.string.def(''),
message: propTypes.string.def(''), message: propTypes.string.def(''),

View File

@ -32,13 +32,15 @@
</el-upload> </el-upload>
</div> </div>
</template> </template>
<script setup lang="ts" name="UploadFile"> <script setup lang="ts">
import { PropType } from 'vue' import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth' import { getAccessToken, getTenantId } from '@/utils/auth'
import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile } from 'element-plus' import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile } from 'element-plus'
defineOptions({ name: 'UploadFile' })
const message = useMessage() // const message = useMessage() //
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])
@ -143,21 +145,25 @@ const listToString = (list: UploadUserFile[], separator?: string) => {
.upload-file-uploader { .upload-file-uploader {
margin-bottom: 5px; margin-bottom: 5px;
} }
:deep(.upload-file-list .el-upload-list__item) { :deep(.upload-file-list .el-upload-list__item) {
border: 1px solid #e4e7ed; border: 1px solid #e4e7ed;
line-height: 2; line-height: 2;
margin-bottom: 10px; margin-bottom: 10px;
position: relative; position: relative;
} }
:deep(.el-upload-list__item-file-name) { :deep(.el-upload-list__item-file-name) {
max-width: 250px; max-width: 250px;
} }
:deep(.upload-file-list .ele-upload-list__item-content) { :deep(.upload-file-list .ele-upload-list__item-content) {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
color: inherit; color: inherit;
} }
:deep(.ele-upload-list__item-content-action .el-link) { :deep(.ele-upload-list__item-content-action .el-link) {
margin-right: 10px; margin-right: 10px;
} }

View File

@ -50,13 +50,15 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="UploadImg"> <script setup lang="ts">
import type { UploadProps } from 'element-plus' import type { UploadProps } from 'element-plus'
import { generateUUID } from '@/utils' import { generateUUID } from '@/utils'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth' import { getAccessToken, getTenantId } from '@/utils/auth'
defineOptions({ name: 'UploadImg' })
type FileTypes = type FileTypes =
| 'image/apng' | 'image/apng'
| 'image/bmp' | 'image/bmp'
@ -79,7 +81,7 @@ const props = defineProps({
fileType: propTypes.array.def(['image/jpeg', 'image/png', 'image/gif']), // ==> ["image/jpeg", "image/png", "image/gif"] fileType: propTypes.array.def(['image/jpeg', 'image/png', 'image/gif']), // ==> ["image/jpeg", "image/png", "image/gif"]
height: propTypes.string.def('150px'), // ==> 150px height: propTypes.string.def('150px'), // ==> 150px
width: propTypes.string.def('150px'), // ==> 150px width: propTypes.string.def('150px'), // ==> 150px
borderRadius: propTypes.string.def('8px') // ==> 8px borderradius: propTypes.string.def('8px') // ==> 8px
}) })
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -130,29 +132,34 @@ const uploadError = () => {
:deep(.el-upload), :deep(.el-upload),
:deep(.el-upload-dragger) { :deep(.el-upload-dragger) {
border: 1px dashed var(--el-color-danger) !important; border: 1px dashed var(--el-color-danger) !important;
&:hover { &:hover {
border-color: var(--el-color-primary) !important; border-color: var(--el-color-primary) !important;
} }
} }
} }
} }
:deep(.disabled) { :deep(.disabled) {
.el-upload, .el-upload,
.el-upload-dragger { .el-upload-dragger {
cursor: not-allowed !important; cursor: not-allowed !important;
background: var(--el-disabled-bg-color); background: var(--el-disabled-bg-color);
border: 1px dashed var(--el-border-color-darker) !important; border: 1px dashed var(--el-border-color-darker) !important;
&:hover { &:hover {
border: 1px dashed var(--el-border-color-darker) !important; border: 1px dashed var(--el-border-color-darker) !important;
} }
} }
} }
.upload-box { .upload-box {
.no-border { .no-border {
:deep(.el-upload) { :deep(.el-upload) {
border: none !important; border: none !important;
} }
} }
:deep(.upload) { :deep(.upload) {
.el-upload { .el-upload {
position: relative; position: relative;
@ -163,14 +170,17 @@ const uploadError = () => {
height: v-bind(height); height: v-bind(height);
overflow: hidden; overflow: hidden;
border: 1px dashed var(--el-border-color-darker); border: 1px dashed var(--el-border-color-darker);
border-radius: v-bind(borderRadius); border-radius: v-bind(borderradius);
transition: var(--el-transition-duration-fast); transition: var(--el-transition-duration-fast);
&:hover { &:hover {
border-color: var(--el-color-primary); border-color: var(--el-color-primary);
.upload-handle { .upload-handle {
opacity: 1; opacity: 1;
} }
} }
.el-upload-dragger { .el-upload-dragger {
display: flex; display: flex;
align-items: center; align-items: center;
@ -181,20 +191,24 @@ const uploadError = () => {
overflow: hidden; overflow: hidden;
background-color: transparent; background-color: transparent;
border: 1px dashed var(--el-border-color-darker); border: 1px dashed var(--el-border-color-darker);
border-radius: v-bind(borderRadius); border-radius: v-bind(borderradius);
&:hover { &:hover {
border: 1px dashed var(--el-color-primary); border: 1px dashed var(--el-color-primary);
} }
} }
.el-upload-dragger.is-dragover { .el-upload-dragger.is-dragover {
background-color: var(--el-color-primary-light-9); background-color: var(--el-color-primary-light-9);
border: 2px dashed var(--el-color-primary) !important; border: 2px dashed var(--el-color-primary) !important;
} }
.upload-image { .upload-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain; object-fit: contain;
} }
.upload-empty { .upload-empty {
position: relative; position: relative;
display: flex; display: flex;
@ -204,11 +218,13 @@ const uploadError = () => {
font-size: 12px; font-size: 12px;
line-height: 30px; line-height: 30px;
color: var(--el-color-info); color: var(--el-color-info);
.el-icon { .el-icon {
font-size: 28px; font-size: 28px;
color: var(--el-text-color-secondary); color: var(--el-text-color-secondary);
} }
} }
.upload-handle { .upload-handle {
position: absolute; position: absolute;
top: 0; top: 0;
@ -223,6 +239,7 @@ const uploadError = () => {
background: rgb(0 0 0 / 60%); background: rgb(0 0 0 / 60%);
opacity: 0; opacity: 0;
transition: var(--el-transition-duration-fast); transition: var(--el-transition-duration-fast);
.handle-icon { .handle-icon {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -230,11 +247,13 @@ const uploadError = () => {
justify-content: center; justify-content: center;
padding: 0 6%; padding: 0 6%;
color: aliceblue; color: aliceblue;
.el-icon { .el-icon {
margin-bottom: 40%; margin-bottom: 40%;
font-size: 130%; font-size: 130%;
line-height: 130%; line-height: 130%;
} }
span { span {
font-size: 85%; font-size: 85%;
line-height: 85%; line-height: 85%;
@ -243,6 +262,7 @@ const uploadError = () => {
} }
} }
} }
.el-upload__tip { .el-upload__tip {
line-height: 18px; line-height: 18px;
text-align: center; text-align: center;

View File

@ -45,7 +45,7 @@
/> />
</div> </div>
</template> </template>
<script lang="ts" name="UploadImgs" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import type { UploadFile, UploadProps, UploadUserFile } from 'element-plus' import type { UploadFile, UploadProps, UploadUserFile } from 'element-plus'
import { ElNotification } from 'element-plus' import { ElNotification } from 'element-plus'
@ -53,6 +53,8 @@ import { ElNotification } from 'element-plus'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { getAccessToken, getTenantId } from '@/utils/auth' import { getAccessToken, getTenantId } from '@/utils/auth'
defineOptions({ name: 'UploadImgs' })
const message = useMessage() // const message = useMessage() //
type FileTypes = type FileTypes =
@ -80,7 +82,7 @@ const props = defineProps({
fileType: propTypes.array.def(['image/jpeg', 'image/png', 'image/gif']), // ==> ["image/jpeg", "image/png", "image/gif"] fileType: propTypes.array.def(['image/jpeg', 'image/png', 'image/gif']), // ==> ["image/jpeg", "image/png", "image/gif"]
height: propTypes.string.def('150px'), // ==> 150px height: propTypes.string.def('150px'), // ==> 150px
width: propTypes.string.def('150px'), // ==> 150px width: propTypes.string.def('150px'), // ==> 150px
borderRadius: propTypes.string.def('8px') // ==> 8px borderradius: propTypes.string.def('8px') // ==> 8px
}) })
const uploadHeaders = ref({ const uploadHeaders = ref({
@ -88,7 +90,7 @@ const uploadHeaders = ref({
'tenant-id': getTenantId() 'tenant-id': getTenantId()
}) })
const fileList = ref<UploadUserFile[]>() const fileList = ref<UploadUserFile[]>([])
// fix: // fix:
watch( watch(
() => props.modelValue, () => props.modelValue,
@ -216,7 +218,7 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
border: 1px dashed var(--el-border-color-darker); border: 1px dashed var(--el-border-color-darker);
border-radius: v-bind(borderRadius); border-radius: v-bind(borderradius);
&:hover { &:hover {
border: 1px dashed var(--el-color-primary); border: 1px dashed var(--el-color-primary);
@ -233,7 +235,7 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
width: v-bind(width); width: v-bind(width);
height: v-bind(height); height: v-bind(height);
background-color: transparent; background-color: transparent;
border-radius: v-bind(borderRadius); border-radius: v-bind(borderradius);
} }
.upload-image { .upload-image {

File diff suppressed because one or more lines are too long

View File

@ -57,7 +57,7 @@
</div> </div>
</div> </div>
</template> </template>
<script name="VerifyPoints" setup type="text/babel"> <script setup type="text/babel">
/** /**
* VerifyPoints * VerifyPoints
* @description 点选 * @description 点选

View File

@ -71,7 +71,7 @@
</div> </div>
</div> </div>
</template> </template>
<script name="VerifySlide" setup type="text/babel"> <script setup type="text/babel">
/** /**
* VerifySlide * VerifySlide
* @description 滑块 * @description 滑块

View File

@ -1,7 +1,9 @@
<script lang="ts" name="XButton" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
defineOptions({ name: 'XButton' })
const props = defineProps({ const props = defineProps({
modelValue: propTypes.bool.def(false), modelValue: propTypes.bool.def(false),
loading: propTypes.bool.def(false), loading: propTypes.bool.def(false),

View File

@ -1,7 +1,9 @@
<script lang="ts" name="XTextButton" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { PropType } from 'vue' import { PropType } from 'vue'
defineOptions({ name: 'XTextButton' })
const props = defineProps({ const props = defineProps({
modelValue: propTypes.bool.def(false), modelValue: propTypes.bool.def(false),
loading: propTypes.bool.def(false), loading: propTypes.bool.def(false),

View File

@ -206,7 +206,7 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="MyProcessDesigner"> <script setup lang="ts">
// import 'bpmn-js/dist/assets/diagram-js.css' // // import 'bpmn-js/dist/assets/diagram-js.css' //
// import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css' // import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css'
// import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css' // import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css'
@ -244,6 +244,9 @@ import { XmlNode, XmlNodeType, parseXmlString } from 'steady-xml'
// const eventName = reactive({ // const eventName = reactive({
// name: '' // name: ''
// }) // })
defineOptions({ name: 'MyProcessDesigner' })
const bpmnCanvas = ref() const bpmnCanvas = ref()
const refFile = ref() const refFile = ref()
const emit = defineEmits([ const emit = defineEmits([

View File

@ -6,10 +6,14 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="MyProcessViewer"> <script setup lang="ts">
import BpmnViewer from 'bpmn-js/lib/Viewer' import BpmnViewer from 'bpmn-js/lib/Viewer'
import DefaultEmptyXML from './plugins/defaultEmpty' import DefaultEmptyXML from './plugins/defaultEmpty'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'MyProcessViewer' })
const props = defineProps({ const props = defineProps({
value: { value: {
// BPMN XML // BPMN XML

View File

@ -5,9 +5,11 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="MyProcessPalette"> <script setup lang="ts">
import { assign } from 'min-dash' import { assign } from 'min-dash'
defineOptions({ name: 'MyProcessPalette' })
const bpmnInstances = () => (window as any).bpmnInstances const bpmnInstances = () => (window as any).bpmnInstances
const addTask = (event, options: any = {}) => { const addTask = (event, options: any = {}) => {
const ElementFactory = bpmnInstances().elementFactory const ElementFactory = bpmnInstances().elementFactory

View File

@ -62,7 +62,7 @@
</el-collapse> </el-collapse>
</div> </div>
</template> </template>
<script setup lang="ts" name="MyPropertiesPanel"> <script setup lang="ts">
import ElementBaseInfo from './base/ElementBaseInfo.vue' import ElementBaseInfo from './base/ElementBaseInfo.vue'
import ElementOtherConfig from './other/ElementOtherConfig.vue' import ElementOtherConfig from './other/ElementOtherConfig.vue'
import ElementTask from './task/ElementTask.vue' import ElementTask from './task/ElementTask.vue'
@ -73,6 +73,9 @@ import ElementListeners from './listeners/ElementListeners.vue'
import ElementProperties from './properties/ElementProperties.vue' import ElementProperties from './properties/ElementProperties.vue'
// import ElementForm from './form/ElementForm.vue' // import ElementForm from './form/ElementForm.vue'
import UserTaskListeners from './listeners/UserTaskListeners.vue' import UserTaskListeners from './listeners/UserTaskListeners.vue'
defineOptions({ name: 'MyPropertiesPanel' })
/** /**
* 侧边栏 * 侧边栏
* @Author MiyueFE * @Author MiyueFE

View File

@ -7,8 +7,9 @@
href="https://doc.iocoder.cn/bpm/#_3-%E6%B5%81%E7%A8%8B%E5%9B%BE%E7%A4%BA%E4%BE%8B" href="https://doc.iocoder.cn/bpm/#_3-%E6%B5%81%E7%A8%8B%E5%9B%BE%E7%A4%BA%E4%BE%8B"
type="danger" type="danger"
target="_blank" target="_blank"
>如何实现实现会签或签</el-link
> >
如何实现实现会签或签
</el-link>
<el-form-item label="流程标识" prop="id"> <el-form-item label="流程标识" prop="id">
<el-input <el-input
v-model="needProps.id" v-model="needProps.id"
@ -37,7 +38,9 @@
</el-form> </el-form>
</div> </div>
</template> </template>
<script setup lang="ts" name="ElementBaseInfo"> <script setup lang="ts">
defineOptions({ name: 'ElementBaseInfo' })
const props = defineProps({ const props = defineProps({
businessObject: { businessObject: {
type: Object, type: Object,

View File

@ -62,7 +62,9 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="FlowCondition"> <script setup lang="ts">
defineOptions({ name: 'FlowCondition' })
const props = defineProps({ const props = defineProps({
businessObject: Object, businessObject: Object,
type: String type: String

View File

@ -222,7 +222,9 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="ElementForm"> <script setup lang="ts">
defineOptions({ name: 'ElementForm' })
const props = defineProps({ const props = defineProps({
id: String, id: String,
type: String type: String

View File

@ -241,10 +241,13 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script setup lang="ts" name="ElementListeners"> <script setup lang="ts">
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { createListenerObject, updateElementExtensions } from '../../utils' import { createListenerObject, updateElementExtensions } from '../../utils'
import { initListenerType, initListenerForm, listenerType, fieldType } from './utilSelf' import { initListenerType, initListenerForm, listenerType, fieldType } from './utilSelf'
defineOptions({ name: 'ElementListeners' })
const props = defineProps({ const props = defineProps({
id: String, id: String,
type: String type: String

View File

@ -287,10 +287,13 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script setup lang="ts" name="UserTaskListeners"> <script setup lang="ts">
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { createListenerObject, updateElementExtensions } from '../../utils' import { createListenerObject, updateElementExtensions } from '../../utils'
import { initListenerForm, initListenerType, eventType, listenerType, fieldType } from './utilSelf' import { initListenerForm, initListenerType, eventType, listenerType, fieldType } from './utilSelf'
defineOptions({ name: 'UserTaskListeners' })
const props = defineProps({ const props = defineProps({
id: String, id: String,
type: String type: String

View File

@ -66,7 +66,9 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="ElementMultiInstance"> <script setup lang="ts">
defineOptions({ name: 'ElementMultiInstance' })
const props = defineProps({ const props = defineProps({
businessObject: Object, businessObject: Object,
type: String type: String

View File

@ -16,7 +16,8 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="ElementOtherConfig"> <script setup lang="ts">
defineOptions({ name: 'ElementOtherConfig' })
const props = defineProps({ const props = defineProps({
id: String id: String
}) })

View File

@ -6,17 +6,18 @@
<el-table-column label="属性值" prop="value" min-width="100px" show-overflow-tooltip /> <el-table-column label="属性值" prop="value" min-width="100px" show-overflow-tooltip />
<el-table-column label="操作" width="110px"> <el-table-column label="操作" width="110px">
<template #default="scope"> <template #default="scope">
<el-button link @click="openAttributesForm(scope.row, scope.$index)" size="small" <el-button link @click="openAttributesForm(scope.row, scope.$index)" size="small">
>编辑</el-button 编辑
> </el-button>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<el-button <el-button
link link
size="small" size="small"
style="color: #ff4d4f" style="color: #ff4d4f"
@click="removeAttributes(scope.row, scope.$index)" @click="removeAttributes(scope.row, scope.$index)"
>移除</el-button
> >
移除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -52,8 +53,9 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="ElementProperties"> <script setup lang="ts">
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
defineOptions({ name: 'ElementProperties' })
const props = defineProps({ const props = defineProps({
id: String, id: String,
type: String type: String

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="panel-tab__content"> <div class="panel-tab__content">
<div class="panel-tab__content--title"> <div class="panel-tab__content--title">
<span><Icon icon="ep:menu" style="margin-right: 8px; color: #555555" />消息列表</span> <span><Icon icon="ep:menu" style="margin-right: 8px; color: #555" />消息列表</span>
<XButton type="primary" title="创建新消息" preIcon="ep:plus" @click="openModel('message')" /> <XButton type="primary" title="创建新消息" preIcon="ep:plus" @click="openModel('message')" />
</div> </div>
<el-table :data="messageList" border> <el-table :data="messageList" border>
@ -11,9 +11,9 @@
</el-table> </el-table>
<div <div
class="panel-tab__content--title" class="panel-tab__content--title"
style="padding-top: 8px; margin-top: 8px; border-top: 1px solid #eeeeee" style="padding-top: 8px; margin-top: 8px; border-top: 1px solid #eee"
> >
<span><Icon icon="ep:menu" style="margin-right: 8px; color: #555555" />信号列表</span> <span><Icon icon="ep:menu" style="margin-right: 8px; color: #555" />信号列表</span>
<XButton type="primary" title="创建新信号" preIcon="ep:plus" @click="openModel('signal')" /> <XButton type="primary" title="创建新信号" preIcon="ep:plus" @click="openModel('signal')" />
</div> </div>
<el-table :data="signalList" border> <el-table :data="signalList" border>
@ -45,7 +45,9 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script setup lang="ts" name="SignalAndMassage"> <script setup lang="ts">
defineOptions({ name: 'SignalAndMassage' })
const message = useMessage() const message = useMessage()
const signalList = ref<any[]>([]) const signalList = ref<any[]>([])
const messageList = ref<any[]>([]) const messageList = ref<any[]>([])

View File

@ -20,11 +20,13 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="ElementTaskConfig"> <script setup lang="ts">
import UserTask from './task-components/UserTask.vue' import UserTask from './task-components/UserTask.vue'
import ScriptTask from './task-components/ScriptTask.vue' import ScriptTask from './task-components/ScriptTask.vue'
import ReceiveTask from './task-components/ReceiveTask.vue' import ReceiveTask from './task-components/ReceiveTask.vue'
defineOptions({ name: 'ElementTaskConfig' })
const props = defineProps({ const props = defineProps({
id: String, id: String,
type: String type: String

View File

@ -48,7 +48,8 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="ReceiveTask"> <script setup lang="ts">
defineOptions({ name: 'ReceiveTask' })
const props = defineProps({ const props = defineProps({
id: String, id: String,
type: String type: String

View File

@ -44,7 +44,8 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="ScriptTask"> <script setup lang="ts">
defineOptions({ name: 'ScriptTask' })
const props = defineProps({ const props = defineProps({
id: String, id: String,
type: String type: String

View File

@ -37,7 +37,8 @@
</div> </div>
</template> </template>
<script setup lang="ts" name="UserTask"> <script setup lang="ts">
defineOptions({ name: 'UserTask' })
const props = defineProps({ const props = defineProps({
id: String, id: String,
type: String type: String

View File

@ -1,8 +1,10 @@
<script lang="ts" name="AppView" setup> <script lang="ts" setup>
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { Footer } from '@/layout/components/Footer' import { Footer } from '@/layout/components/Footer'
defineOptions({ name: 'AppView' })
const appStore = useAppStore() const appStore = useAppStore()
const layout = computed(() => appStore.getLayout) const layout = computed(() => appStore.getLayout)

View File

@ -1,8 +1,10 @@
<script lang="ts" name="Collapse" setup> <script lang="ts" setup>
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'Collapse' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('collapse') const prefixCls = getPrefixCls('collapse')

View File

@ -1,4 +1,4 @@
<script lang="ts" name="ContextMenu" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
@ -6,6 +6,8 @@ import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { contextMenuSchema } from '@/types/contextMenu' import { contextMenuSchema } from '@/types/contextMenu'
import type { ElDropdown } from 'element-plus' import type { ElDropdown } from 'element-plus'
defineOptions({ name: 'ContextMenu' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('context-menu') const prefixCls = getPrefixCls('context-menu')

View File

@ -1,7 +1,9 @@
<script lang="ts" name="Footer" setup> <script lang="ts" setup>
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'Footer' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('footer') const prefixCls = getPrefixCls('footer')

View File

@ -1,9 +1,11 @@
<script lang="ts" name="LocaleDropdown" setup> <script lang="ts" setup>
import { useLocaleStore } from '@/store/modules/locale' import { useLocaleStore } from '@/store/modules/locale'
import { useLocale } from '@/hooks/web/useLocale' import { useLocale } from '@/hooks/web/useLocale'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'LocaleDropdown' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('locale-dropdown') const prefixCls = getPrefixCls('locale-dropdown')

View File

@ -1,8 +1,10 @@
<script lang="ts" name="Logo" setup> <script lang="ts" setup>
import { computed, onMounted, ref, unref, watch } from 'vue' import { computed, onMounted, ref, unref, watch } from 'vue'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'Logo' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('logo') const prefixCls = getPrefixCls('logo')

View File

@ -1,7 +1,9 @@
<script lang="ts" name="Message" setup> <script lang="ts" setup>
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as NotifyMessageApi from '@/api/system/notify/message' import * as NotifyMessageApi from '@/api/system/notify/message'
defineOptions({ name: 'Message' })
const { push } = useRouter() const { push } = useRouter()
const activeName = ref('notice') const activeName = ref('notice')
const unreadCount = ref(0) // const unreadCount = ref(0) //

View File

@ -1,9 +1,11 @@
<script lang="ts" name="ScreenFull" setup> <script lang="ts" setup>
import { Icon } from '@/components/Icon' import { Icon } from '@/components/Icon'
import { useFullscreen } from '@vueuse/core' import { useFullscreen } from '@vueuse/core'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'ScreenFull' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('screenfull') const prefixCls = getPrefixCls('screenfull')

View File

@ -1,4 +1,4 @@
<script lang="ts" name="Setting" setup> <script lang="ts" setup>
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { useClipboard, useCssVar } from '@vueuse/core' import { useClipboard, useCssVar } from '@vueuse/core'
@ -13,6 +13,8 @@ import ColorRadioPicker from './components/ColorRadioPicker.vue'
import InterfaceDisplay from './components/InterfaceDisplay.vue' import InterfaceDisplay from './components/InterfaceDisplay.vue'
import LayoutRadioPicker from './components/LayoutRadioPicker.vue' import LayoutRadioPicker from './components/LayoutRadioPicker.vue'
defineOptions({ name: 'Setting' })
const { t } = useI18n() const { t } = useI18n()
const appStore = useAppStore() const appStore = useAppStore()

View File

@ -1,8 +1,10 @@
<script lang="ts" name="ColorRadioPicker" setup> <script lang="ts" setup>
import { PropType } from 'vue' import { PropType } from 'vue'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'ColorRadioPicker' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('color-radio-picker') const prefixCls = getPrefixCls('color-radio-picker')

View File

@ -1,10 +1,12 @@
<script lang="ts" name="InterfaceDisplay" setup> <script lang="ts" setup>
import { setCssVar } from '@/utils' import { setCssVar } from '@/utils'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { useWatermark } from '@/hooks/web/useWatermark' import { useWatermark } from '@/hooks/web/useWatermark'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
defineOptions({ name: 'InterfaceDisplay' })
const { t } = useI18n() const { t } = useI18n()
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const { setWatermark } = useWatermark() const { setWatermark } = useWatermark()

View File

@ -1,7 +1,9 @@
<script lang="ts" name="LayoutRadioPicker" setup> <script lang="ts" setup>
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'LayoutRadioPicker' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('layout-radio-picker') const prefixCls = getPrefixCls('layout-radio-picker')
@ -66,7 +68,7 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
border: 2px solid #e5e7eb; border: 2px solid #e5e7eb;
border-radius: 4px; border-radius: 4px;
&:before { &::before {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -78,14 +80,14 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
content: ''; content: '';
} }
&:after { &::after {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 25%; height: 25%;
background-color: #fff; background-color: #fff;
border-radius: 4px 4px 0 4px; border-radius: 4px 4px 0;
content: ''; content: '';
} }
} }
@ -94,7 +96,7 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
border: 2px solid #e5e7eb; border: 2px solid #e5e7eb;
border-radius: 4px; border-radius: 4px;
&:before { &::before {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -106,7 +108,7 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
content: ''; content: '';
} }
&:after { &::after {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -122,7 +124,7 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
border: 2px solid #e5e7eb; border: 2px solid #e5e7eb;
border-radius: 4px; border-radius: 4px;
&:before { &::before {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -139,7 +141,7 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
border: 2px solid #e5e7eb; border: 2px solid #e5e7eb;
border-radius: 4px; border-radius: 4px;
&:before { &::before {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -151,7 +153,7 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
content: ''; content: '';
} }
&:after { &::after {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;

View File

@ -1,10 +1,12 @@
<script lang="ts" name="SizeDropdown" setup> <script lang="ts" setup>
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { ElementPlusSize } from '@/types/elementPlus' import { ElementPlusSize } from '@/types/elementPlus'
defineOptions({ name: 'SizeDropdown' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('size-dropdown') const prefixCls = getPrefixCls('size-dropdown')

View File

@ -1,4 +1,4 @@
<script lang="ts" name="TagsView" setup> <script lang="ts" setup>
import type { RouteLocationNormalizedLoaded, RouterLinkProps } from 'vue-router' import type { RouteLocationNormalizedLoaded, RouterLinkProps } from 'vue-router'
import { usePermissionStore } from '@/store/modules/permission' import { usePermissionStore } from '@/store/modules/permission'
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
@ -11,6 +11,8 @@ import { ElScrollbar } from 'element-plus'
import { useScrollTo } from '@/hooks/event/useScrollTo' import { useScrollTo } from '@/hooks/event/useScrollTo'
import { useTemplateRefsList } from '@vueuse/core' import { useTemplateRefsList } from '@vueuse/core'
defineOptions({ name: 'TagsView' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('tags-view') const prefixCls = getPrefixCls('tags-view')
@ -483,7 +485,7 @@ $prefix-cls: #{$namespace}-tags-view;
} }
} }
&:after { &::after {
position: absolute; position: absolute;
top: 1px; top: 1px;
left: 0; left: 0;
@ -502,7 +504,7 @@ $prefix-cls: #{$namespace}-tags-view;
padding-right: 16px; padding-right: 16px;
margin-left: 4px; margin-left: 4px;
font-size: 12px; font-size: 12px;
border-radius: 3px 3px 3px 3px; border-radius: 3px;
cursor: pointer; cursor: pointer;
border: 1px solid #d9d9d9; border: 1px solid #d9d9d9;
@ -549,7 +551,7 @@ $prefix-cls: #{$namespace}-tags-view;
} }
} }
&:after { &::after {
border-right: 1px solid var(--el-border-color); border-right: 1px solid var(--el-border-color);
border-left: 1px solid var(--el-border-color); border-left: 1px solid var(--el-border-color);
} }
@ -561,7 +563,7 @@ $prefix-cls: #{$namespace}-tags-view;
height: calc(100% - 4px); height: calc(100% - 4px);
padding-right: 16px; padding-right: 16px;
font-size: 12px; font-size: 12px;
border-radius: 3px 3px 3px 3px; border-radius: 3px;
cursor: pointer; cursor: pointer;
border: 1px solid var(--el-border-color); border: 1px solid var(--el-border-color);
} }

View File

@ -1,8 +1,10 @@
<script lang="ts" name="ThemeSwitch" setup> <script lang="ts" setup>
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { useIcon } from '@/hooks/web/useIcon' import { useIcon } from '@/hooks/web/useIcon'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
defineOptions({ name: 'ThemeSwitch' })
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('theme-switch') const prefixCls = getPrefixCls('theme-switch')

View File

@ -1,4 +1,4 @@
<script lang="ts" name="UserInfo" setup> <script lang="ts" setup>
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
@ -7,6 +7,8 @@ import avatarImg from '@/assets/imgs/avatar.gif'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
defineOptions({ name: 'UserInfo' })
const { t } = useI18n() const { t } = useI18n()
const { wsCache } = useCache() const { wsCache } = useCache()

View File

@ -1,6 +1,8 @@
<template> <template>
<Error type="403" @error-click="push('/')" /> <Error type="403" @error-click="push('/')" />
</template> </template>
<script lang="ts" name="Error403" setup> <script lang="ts" setup>
defineOptions({ name: 'Error403' })
const { push } = useRouter() const { push } = useRouter()
</script> </script>

View File

@ -1,6 +1,7 @@
<template> <template>
<Error @error-click="push('/')" /> <Error @error-click="push('/')" />
</template> </template>
<script lang="ts" name="Error404" setup> <script lang="ts" setup>
defineOptions({ name: 'Error404' })
const { push } = useRouter() const { push } = useRouter()
</script> </script>

View File

@ -1,6 +1,7 @@
<template> <template>
<Error type="500" @error-click="push('/')" /> <Error type="500" @error-click="push('/')" />
</template> </template>
<script lang="ts" name="Error500" setup> <script lang="ts" setup>
defineOptions({ name: 'Error500' })
const { push } = useRouter() const { push } = useRouter()
</script> </script>

View File

@ -160,7 +160,7 @@
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<script setup lang="ts" name="Home"> <script setup lang="ts">
import { set } from 'lodash-es' import { set } from 'lodash-es'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
import { formatTime } from '@/utils' import { formatTime } from '@/utils'
@ -171,6 +171,8 @@ import avatarImg from '@/assets/imgs/avatar.gif'
import type { WorkplaceTotal, Project, Notice, Shortcut } from './types' import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
import { pieOptions, barOptions } from './echarts-data' import { pieOptions, barOptions } from './echarts-data'
defineOptions({ name: 'Home' })
const { t } = useI18n() const { t } = useI18n()
const userStore = useUserStore() const userStore = useUserStore()
const { setWatermark } = useWatermark() const { setWatermark } = useWatermark()

View File

@ -140,7 +140,7 @@
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<script lang="ts" name="Home2" setup> <script lang="ts" setup>
import { set } from 'lodash-es' import { set } from 'lodash-es'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
@ -148,6 +148,8 @@ import { useDesign } from '@/hooks/web/useDesign'
import type { AnalysisTotalTypes } from './types' import type { AnalysisTotalTypes } from './types'
import { barOptions, lineOptions, pieOptions } from './echarts-data' import { barOptions, lineOptions, pieOptions } from './echarts-data'
defineOptions({ name: 'Home2' })
const { t } = useI18n() const { t } = useI18n()
const loading = ref(true) const loading = ref(true)
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()

View File

@ -60,7 +60,7 @@
</div> </div>
</div> </div>
</template> </template>
<script lang="ts" name="Login" setup> <script lang="ts" setup>
import { underlineToHump } from '@/utils' import { underlineToHump } from '@/utils'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
@ -70,6 +70,8 @@ import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components' import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components'
defineOptions({ name: 'Login' })
const { t } = useI18n() const { t } = useI18n()
const appStore = useAppStore() const appStore = useAppStore()
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()

View File

@ -143,7 +143,7 @@
</el-row> </el-row>
</el-form> </el-form>
</template> </template>
<script lang="ts" name="LoginForm" setup> <script lang="ts" setup>
import { ElLoading } from 'element-plus' import { ElLoading } from 'element-plus'
import LoginFormTitle from './LoginFormTitle.vue' import LoginFormTitle from './LoginFormTitle.vue'
import type { RouteLocationNormalizedLoaded } from 'vue-router' import type { RouteLocationNormalizedLoaded } from 'vue-router'
@ -155,6 +155,8 @@ import { usePermissionStore } from '@/store/modules/permission'
import * as LoginApi from '@/api/login' import * as LoginApi from '@/api/login'
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin' import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
defineOptions({ name: 'LoginForm' })
const { t } = useI18n() const { t } = useI18n()
const message = useMessage() const message = useMessage()
const iconHouse = useIcon({ icon: 'ep:house' }) const iconHouse = useIcon({ icon: 'ep:house' })

View File

@ -3,9 +3,11 @@
{{ getFormTitle }} {{ getFormTitle }}
</h2> </h2>
</template> </template>
<script lang="ts" name="LoginFormTitle" setup> <script lang="ts" setup>
import { LoginStateEnum, useLoginState } from './useLogin' import { LoginStateEnum, useLoginState } from './useLogin'
defineOptions({ name: 'LoginFormTitle' })
const { t } = useI18n() const { t } = useI18n()
const { getLoginState } = useLoginState() const { getLoginState } = useLoginState()

View File

@ -92,7 +92,7 @@
</el-row> </el-row>
</el-form> </el-form>
</template> </template>
<script lang="ts" name="MobileForm" setup> <script lang="ts" setup>
import type { RouteLocationNormalizedLoaded } from 'vue-router' import type { RouteLocationNormalizedLoaded } from 'vue-router'
import { useIcon } from '@/hooks/web/useIcon' import { useIcon } from '@/hooks/web/useIcon'
@ -103,6 +103,8 @@ import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login'
import LoginFormTitle from './LoginFormTitle.vue' import LoginFormTitle from './LoginFormTitle.vue'
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin' import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
defineOptions({ name: 'MobileForm' })
const { t } = useI18n() const { t } = useI18n()
const message = useMessage() const message = useMessage()
const permissionStore = usePermissionStore() const permissionStore = usePermissionStore()

View File

@ -16,12 +16,14 @@
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<script lang="ts" name="QrCodeForm" setup> <script lang="ts" setup>
import logoImg from '@/assets/imgs/logo.png' import logoImg from '@/assets/imgs/logo.png'
import LoginFormTitle from './LoginFormTitle.vue' import LoginFormTitle from './LoginFormTitle.vue'
import { LoginStateEnum, useLoginState } from './useLogin' import { LoginStateEnum, useLoginState } from './useLogin'
defineOptions({ name: 'QrCodeForm' })
const { t } = useI18n() const { t } = useI18n()
const { handleBackLogin, getLoginState } = useLoginState() const { handleBackLogin, getLoginState } = useLoginState()
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.QR_CODE) const getShow = computed(() => unref(getLoginState) === LoginStateEnum.QR_CODE)

View File

@ -35,7 +35,7 @@
</template> </template>
</Form> </Form>
</template> </template>
<script lang="ts" name="RegisterForm" setup> <script lang="ts" setup>
import type { FormRules } from 'element-plus' import type { FormRules } from 'element-plus'
import { useForm } from '@/hooks/web/useForm' import { useForm } from '@/hooks/web/useForm'
@ -44,6 +44,8 @@ import LoginFormTitle from './LoginFormTitle.vue'
import { LoginStateEnum, useLoginState } from './useLogin' import { LoginStateEnum, useLoginState } from './useLogin'
import { FormSchema } from '@/types/form' import { FormSchema } from '@/types/form'
defineOptions({ name: 'RegisterForm' })
const { t } = useI18n() const { t } = useI18n()
const { required } = useValidator() const { required } = useValidator()
const { register, elFormRef } = useForm() const { register, elFormRef } = useForm()

View File

@ -38,11 +38,14 @@
</div> </div>
</div> </div>
</template> </template>
<script lang="ts" name="SSOLogin" setup> <script lang="ts" setup>
import LoginFormTitle from './LoginFormTitle.vue' import LoginFormTitle from './LoginFormTitle.vue'
import * as OAuth2Api from '@/api/login/oauth2' import * as OAuth2Api from '@/api/login/oauth2'
import { LoginStateEnum, useLoginState } from './useLogin' import { LoginStateEnum, useLoginState } from './useLogin'
import type { RouteLocationNormalizedLoaded } from 'vue-router' import type { RouteLocationNormalizedLoaded } from 'vue-router'
defineOptions({ name: 'SSOLogin' })
const route = useRoute() // const route = useRoute() //
const { currentRoute } = useRouter() // const { currentRoute } = useRouter() //
const { getLoginState, setLoginState } = useLoginState() const { getLoginState, setLoginState } = useLoginState()

View File

@ -10,10 +10,8 @@
<XButton :title="t('common.save')" @click="submit()" /> <XButton :title="t('common.save')" @click="submit()" />
<XButton :title="t('common.reset')" type="danger" @click="init()" /> <XButton :title="t('common.reset')" type="danger" @click="init()" />
</template> </template>
<script lang="ts" name="BasicInfo" setup> <script lang="ts" setup>
import type { FormRules } from 'element-plus' import type { FormRules } from 'element-plus'
import { ElMessage } from 'element-plus'
import { FormSchema } from '@/types/form' import { FormSchema } from '@/types/form'
import type { FormExpose } from '@/components/Form' import type { FormExpose } from '@/components/Form'
import { import {
@ -22,7 +20,10 @@ import {
UserProfileUpdateReqVO UserProfileUpdateReqVO
} from '@/api/system/user/profile' } from '@/api/system/user/profile'
defineOptions({ name: 'BasicInfo' })
const { t } = useI18n() const { t } = useI18n()
const message = useMessage() //
// //
const rules = reactive<FormRules>({ const rules = reactive<FormRules>({
nickname: [{ required: true, message: t('profile.rules.nickname'), trigger: 'blur' }], nickname: [{ required: true, message: t('profile.rules.nickname'), trigger: 'blur' }],
@ -74,7 +75,7 @@ const submit = () => {
if (valid) { if (valid) {
const data = unref(formRef)?.formModel as UserProfileUpdateReqVO const data = unref(formRef)?.formModel as UserProfileUpdateReqVO
await updateUserProfile(data) await updateUserProfile(data)
ElMessage.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
await init() await init()
} }
}) })

View File

@ -46,12 +46,14 @@
</ul> </ul>
</div> </div>
</template> </template>
<script lang="ts" name="ProfileUser" setup> <script lang="ts" setup>
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import UserAvatar from './UserAvatar.vue' import UserAvatar from './UserAvatar.vue'
import { getUserProfile, ProfileVO } from '@/api/system/user/profile' import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
defineOptions({ name: 'ProfileUser' })
const { t } = useI18n() const { t } = useI18n()
const userInfo = ref<ProfileVO>() const userInfo = ref<ProfileVO>()
const getUserInfo = async () => { const getUserInfo = async () => {
@ -79,7 +81,7 @@ onMounted(async () => {
} }
.list-group { .list-group {
padding-left: 0px; padding-left: 0;
list-style: none; list-style: none;
} }
@ -87,7 +89,7 @@ onMounted(async () => {
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #e7eaec;
border-top: 1px solid #e7eaec; border-top: 1px solid #e7eaec;
margin-bottom: -1px; margin-bottom: -1px;
padding: 11px 0px; padding: 11px 0;
font-size: 13px; font-size: 13px;
} }

View File

@ -15,12 +15,14 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
<script lang="ts" name="ResetPwd" setup> <script lang="ts" setup>
import type { FormInstance, FormRules } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus'
import { InputPassword } from '@/components/InputPassword' import { InputPassword } from '@/components/InputPassword'
import { updateUserPassword } from '@/api/system/user/profile' import { updateUserPassword } from '@/api/system/user/profile'
defineOptions({ name: 'ResetPwd' })
const { t } = useI18n() const { t } = useI18n()
const message = useMessage() const message = useMessage()
const formRef = ref<FormInstance>() const formRef = ref<FormInstance>()

View File

@ -10,10 +10,12 @@
/> />
</div> </div>
</template> </template>
<script lang="ts" name="UserAvatar" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { uploadAvatar } from '@/api/system/user/profile' import { uploadAvatar } from '@/api/system/user/profile'
defineOptions({ name: 'UserAvatar' })
const props = defineProps({ const props = defineProps({
img: propTypes.string.def('') img: propTypes.string.def('')
}) })

View File

@ -21,11 +21,13 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</template> </template>
<script lang="ts" name="UserSocial" setup> <script lang="ts" setup>
import { SystemUserSocialTypeEnum } from '@/utils/constants' import { SystemUserSocialTypeEnum } from '@/utils/constants'
import { getUserProfile, ProfileVO } from '@/api/system/user/profile' import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
import { socialAuthRedirect, socialBind, socialUnbind } from '@/api/system/user/socialUser' import { socialAuthRedirect, socialBind, socialUnbind } from '@/api/system/user/socialUser'
defineOptions({ name: 'UserSocial' })
const message = useMessage() const message = useMessage()
const socialUsers = ref<any[]>([]) const socialUsers = ref<any[]>([])
const userInfo = ref<ProfileVO>() const userInfo = ref<ProfileVO>()

View File

@ -1,7 +1,9 @@
<template> <template>
<div></div> <div></div>
</template> </template>
<script setup lang="ts" name="Redirect"> <script setup lang="ts">
defineOptions({ name: 'Redirect' })
const { currentRoute, replace } = useRouter() const { currentRoute, replace } = useRouter()
const { params, query } = unref(currentRoute) const { params, query } = unref(currentRoute)
const { path, _redirect_type = 'path' } = params const { path, _redirect_type = 'path' } = params

View File

@ -94,12 +94,15 @@
</Dialog> </Dialog>
</template> </template>
<script setup lang="ts" name="BpmProcessDefinition"> <script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package' import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package'
import * as DefinitionApi from '@/api/bpm/definition' import * as DefinitionApi from '@/api/bpm/definition'
import { setConfAndFields2 } from '@/utils/formCreate' import { setConfAndFields2 } from '@/utils/formCreate'
defineOptions({ name: 'BpmProcessDefinition' })
const { push } = useRouter() // const { push } = useRouter() //
const { query } = useRoute() // const { query } = useRoute() //

View File

@ -38,7 +38,7 @@
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script lang="ts" name="BpmFormEditor" setup> <script lang="ts" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants' import { CommonStatusEnum } from '@/utils/constants'
import * as FormApi from '@/api/bpm/form' import * as FormApi from '@/api/bpm/form'
@ -46,6 +46,8 @@ import FcDesigner from '@form-create/designer'
import { encodeConf, encodeFields, setConfAndFields } from '@/utils/formCreate' import { encodeConf, encodeFields, setConfAndFields } from '@/utils/formCreate'
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
defineOptions({ name: 'BpmFormEditor' })
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
const { push, currentRoute } = useRouter() // const { push, currentRoute } = useRouter() //

View File

@ -90,12 +90,14 @@
</Dialog> </Dialog>
</template> </template>
<script lang="ts" name="BpmForm" setup> <script lang="ts" setup>
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as FormApi from '@/api/bpm/form' import * as FormApi from '@/api/bpm/form'
import { setConfAndFields2 } from '@/utils/formCreate' import { setConfAndFields2 } from '@/utils/formCreate'
defineOptions({ name: 'BpmForm' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const { currentRoute, push } = useRouter() // const { currentRoute, push } = useRouter() //

View File

@ -41,12 +41,14 @@
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script lang="ts" name="UserGroupForm" setup> <script lang="ts" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants' import { CommonStatusEnum } from '@/utils/constants'
import * as UserGroupApi from '@/api/bpm/userGroup' import * as UserGroupApi from '@/api/bpm/userGroup'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
defineOptions({ name: 'UserGroupForm' })
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //

View File

@ -111,13 +111,16 @@
<UserGroupForm ref="formRef" @success="getList" /> <UserGroupForm ref="formRef" @success="getList" />
</template> </template>
<script setup lang="ts" name="BpmUserGroup"> <script setup lang="ts">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as UserGroupApi from '@/api/bpm/userGroup' import * as UserGroupApi from '@/api/bpm/userGroup'
import * as UserApi from '@/api/system/user' import * as UserApi from '@/api/system/user'
import UserGroupForm from './UserGroupForm.vue' import UserGroupForm from './UserGroupForm.vue'
import { UserVO } from '@/api/system/user' import { UserVO } from '@/api/system/user'
defineOptions({ name: 'BpmUserGroup' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //

View File

@ -121,12 +121,14 @@
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script lang="ts" name="ModelForm" setup> <script lang="ts" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import * as ModelApi from '@/api/bpm/model' import * as ModelApi from '@/api/bpm/model'
import * as FormApi from '@/api/bpm/form' import * as FormApi from '@/api/bpm/form'
defineOptions({ name: 'ModelForm' })
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //

View File

@ -49,9 +49,11 @@
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script lang="ts" name="ModelImportForm" setup> <script lang="ts" setup>
import { getAccessToken, getTenantId } from '@/utils/auth' import { getAccessToken, getTenantId } from '@/utils/auth'
defineOptions({ name: 'ModelImportForm' })
const message = useMessage() // const message = useMessage() //
const dialogVisible = ref(false) // const dialogVisible = ref(false) //

View File

@ -24,7 +24,7 @@
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts" name="BpmModelEditor"> <script setup lang="ts">
import { MyProcessDesigner, MyProcessPenal } from '@/components/bpmnProcessDesigner/package' import { MyProcessDesigner, MyProcessPenal } from '@/components/bpmnProcessDesigner/package'
// //
import CustomContentPadProvider from '@/components/bpmnProcessDesigner/package/designer/plugins/content-pad' import CustomContentPadProvider from '@/components/bpmnProcessDesigner/package/designer/plugins/content-pad'
@ -32,6 +32,8 @@ import CustomContentPadProvider from '@/components/bpmnProcessDesigner/package/d
import CustomPaletteProvider from '@/components/bpmnProcessDesigner/package/designer/plugins/palette' import CustomPaletteProvider from '@/components/bpmnProcessDesigner/package/designer/plugins/palette'
import * as ModelApi from '@/api/bpm/model' import * as ModelApi from '@/api/bpm/model'
defineOptions({ name: 'BpmModelEditor' })
const router = useRouter() // const router = useRouter() //
const { query } = useRoute() // const { query } = useRoute() //
const message = useMessage() // const message = useMessage() //

View File

@ -226,7 +226,7 @@
</Dialog> </Dialog>
</template> </template>
<script setup lang="ts" name="BpmModel"> <script setup lang="ts">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter, formatDate } from '@/utils/formatTime' import { dateFormatter, formatDate } from '@/utils/formatTime'
import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package' import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package'
@ -235,6 +235,9 @@ import * as FormApi from '@/api/bpm/form'
import ModelForm from './ModelForm.vue' import ModelForm from './ModelForm.vue'
import ModelImportForm from '@/views/bpm/model/ModelImportForm.vue' import ModelImportForm from '@/views/bpm/model/ModelImportForm.vue'
import { setConfAndFields2 } from '@/utils/formCreate' import { setConfAndFields2 } from '@/utils/formCreate'
defineOptions({ name: 'BpmModel' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const { push } = useRouter() // const { push } = useRouter() //

View File

@ -42,10 +42,13 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
<script setup name="BpmOALeaveCreate" lang="ts"> <script setup lang="ts">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import * as LeaveApi from '@/api/bpm/leave' import * as LeaveApi from '@/api/bpm/leave'
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
defineOptions({ name: 'BpmOALeaveCreate' })
const message = useMessage() // const message = useMessage() //
const { delView } = useTagsViewStore() // const { delView } = useTagsViewStore() //
const { currentRoute } = useRouter() // const { currentRoute } = useRouter() //

View File

@ -16,12 +16,14 @@
</el-descriptions> </el-descriptions>
</ContentWrap> </ContentWrap>
</template> </template>
<script lang="ts" name="BpmOALeaveDetail" setup> <script lang="ts" setup>
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import * as LeaveApi from '@/api/bpm/leave' import * as LeaveApi from '@/api/bpm/leave'
defineOptions({ name: 'BpmOALeaveDetail' })
const { query } = useRoute() // const { query } = useRoute() //
const props = defineProps({ const props = defineProps({

View File

@ -138,11 +138,14 @@
/> />
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts" name="BpmOALeave"> <script setup lang="ts">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as LeaveApi from '@/api/bpm/leave' import * as LeaveApi from '@/api/bpm/leave'
import * as ProcessInstanceApi from '@/api/bpm/processInstance' import * as ProcessInstanceApi from '@/api/bpm/processInstance'
defineOptions({ name: 'BpmOALeave' })
const message = useMessage() // const message = useMessage() //
const router = useRouter() // const router = useRouter() //
const { t } = useI18n() // const { t } = useI18n() //

View File

@ -46,13 +46,16 @@
<ProcessInstanceBpmnViewer :bpmn-xml="bpmnXML as any" /> <ProcessInstanceBpmnViewer :bpmn-xml="bpmnXML as any" />
</ContentWrap> </ContentWrap>
</template> </template>
<script setup lang="ts" name="BpmProcessInstanceCreate"> <script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import * as DefinitionApi from '@/api/bpm/definition' import * as DefinitionApi from '@/api/bpm/definition'
import * as ProcessInstanceApi from '@/api/bpm/processInstance' import * as ProcessInstanceApi from '@/api/bpm/processInstance'
import { setConfAndFields2 } from '@/utils/formCreate' import { setConfAndFields2 } from '@/utils/formCreate'
import type { ApiAttrs } from '@form-create/element-ui/types/config' import type { ApiAttrs } from '@form-create/element-ui/types/config'
import ProcessInstanceBpmnViewer from '../detail/ProcessInstanceBpmnViewer.vue' import ProcessInstanceBpmnViewer from '../detail/ProcessInstanceBpmnViewer.vue'
defineOptions({ name: 'BpmProcessInstanceCreate' })
const router = useRouter() // const router = useRouter() //
const message = useMessage() // const message = useMessage() //

View File

@ -14,11 +14,13 @@
/> />
</el-card> </el-card>
</template> </template>
<script lang="ts" name="BpmProcessInstanceBpmnViewer" setup> <script lang="ts" setup>
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package' import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package'
import * as ActivityApi from '@/api/bpm/activity' import * as ActivityApi from '@/api/bpm/activity'
defineOptions({ name: 'BpmProcessInstanceBpmnViewer' })
const props = defineProps({ const props = defineProps({
loading: propTypes.bool, // loading: propTypes.bool, //
id: propTypes.string, // id: propTypes.string, //

Some files were not shown because too many files have changed in this diff Show More