fix: eslint
parent
4730da70a1
commit
66a1da3dd2
|
@ -135,8 +135,10 @@ function handleOk() {
|
|||
<template>
|
||||
<Drawer :root-class-name="prefixCls" v-bind="getBindValues" @close="onClose">
|
||||
<template v-if="!$slots.title" #title>
|
||||
<DrawerHeader :title="getMergeProps.title as any" :is-detail="isDetail" :show-detail-back="showDetailBack"
|
||||
@close="onClose">
|
||||
<DrawerHeader
|
||||
:title="getMergeProps.title as any" :is-detail="isDetail" :show-detail-back="showDetailBack"
|
||||
@close="onClose"
|
||||
>
|
||||
<template #titleToolbar>
|
||||
<slot name="titleToolbar" />
|
||||
</template>
|
||||
|
@ -146,8 +148,10 @@ function handleOk() {
|
|||
<slot name="title" />
|
||||
</template>
|
||||
|
||||
<ScrollContainer v-loading="getLoading" :style="getScrollContentStyle"
|
||||
:loading-tip="loadingText || t('common.loadingText')">
|
||||
<ScrollContainer
|
||||
v-loading="getLoading" :style="getScrollContentStyle"
|
||||
:loading-tip="loadingText || t('common.loadingText')"
|
||||
>
|
||||
<slot />
|
||||
</ScrollContainer>
|
||||
<DrawerFooter v-bind="getProps" :height="getFooterHeight" @close="onClose" @ok="handleOk">
|
||||
|
|
|
@ -114,7 +114,9 @@ function emitChange() {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Transfer v-bind="getAttrs" :data-source="getdataSource" :filter-option="filterOption" :render="(item) => item.title"
|
||||
<Transfer
|
||||
v-bind="getAttrs" :data-source="getdataSource" :filter-option="filterOption" :render="(item) => item.title"
|
||||
:show-select-all="showSelectAll" :selected-keys="selectedKeys" :target-keys="getTargetKeys" :show-search="showSearch"
|
||||
@change="handleChange" />
|
||||
@change="handleChange"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -24,8 +24,8 @@ const activeClass = computed(() => {
|
|||
return props.schema.key === props.currentItem.key ? 'active' : 'unactivated'
|
||||
})
|
||||
/**
|
||||
* 删除当前项
|
||||
*/
|
||||
* 删除当前项
|
||||
*/
|
||||
function handleDelete() {
|
||||
const traverse = (schemas: IVFormComponent[]) => {
|
||||
schemas.some((formItem, index) => {
|
||||
|
|
|
@ -18,9 +18,9 @@ const state = reactive<{
|
|||
jsonData: {} as IFormConfig, // json数据
|
||||
})
|
||||
/**
|
||||
* 显示Json数据弹框
|
||||
* @param jsonData
|
||||
*/
|
||||
* 显示Json数据弹框
|
||||
* @param jsonData
|
||||
*/
|
||||
function showModal(jsonData: IFormConfig) {
|
||||
formatRules(jsonData.schemas)
|
||||
state.jsonData = jsonData
|
||||
|
|
|
@ -23,9 +23,9 @@ export default defineComponent({
|
|||
const { formConfig } = useFormDesignState()
|
||||
|
||||
/**
|
||||
* 拖拽完成事件
|
||||
* @param newIndex
|
||||
*/
|
||||
* 拖拽完成事件
|
||||
* @param newIndex
|
||||
*/
|
||||
const addItem = ({ newIndex }: any) => {
|
||||
formConfig.value.schemas = formConfig.value.schemas || []
|
||||
|
||||
|
@ -35,9 +35,9 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
/**
|
||||
* 拖拽开始事件
|
||||
* @param e {Object} 事件对象
|
||||
*/
|
||||
* 拖拽开始事件
|
||||
* @param e {Object} 事件对象
|
||||
*/
|
||||
const handleDragStart = (e: any) => {
|
||||
emit('handleSetSelectItem', formConfig.value.schemas[e.oldIndex])
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ export default defineComponent({
|
|||
<div class="draggable-box">
|
||||
<Draggable
|
||||
v-model="formConfig.schemas"
|
||||
class="ant-row list-main"
|
||||
class="list-main ant-row"
|
||||
group="form-draggable"
|
||||
:component-data="{ name: 'list', tag: 'div', type: 'transition-group' }"
|
||||
ghost-class="moving"
|
||||
|
|
|
@ -61,8 +61,8 @@ const formItemProps = computed(() => {
|
|||
: {}
|
||||
|
||||
/**
|
||||
* 将字符串正则格式化成正则表达式
|
||||
*/
|
||||
* 将字符串正则格式化成正则表达式
|
||||
*/
|
||||
|
||||
const newConfig = Object.assign(
|
||||
{},
|
||||
|
@ -97,8 +97,8 @@ function handleClick(schema: IVFormComponent) {
|
|||
emit(schema.componentProps?.handle)
|
||||
}
|
||||
/**
|
||||
* 处理异步属性,异步属性会导致一些属性渲染错误,如defaultValue异步加载会导致渲染不出来,故而此处只处理options,treeData,同步属性在cmpProps中处理
|
||||
*/
|
||||
* 处理异步属性,异步属性会导致一些属性渲染错误,如defaultValue异步加载会导致渲染不出来,故而此处只处理options,treeData,同步属性在cmpProps中处理
|
||||
*/
|
||||
const asyncProps = asyncComputed(async () => {
|
||||
let { options, treeData } = props.schema.componentProps ?? {}
|
||||
if (options)
|
||||
|
@ -112,8 +112,8 @@ const asyncProps = asyncComputed(async () => {
|
|||
})
|
||||
|
||||
/**
|
||||
* 处理同步属性
|
||||
*/
|
||||
* 处理同步属性
|
||||
*/
|
||||
const cmpProps = computed(() => {
|
||||
const isCheck
|
||||
= props.schema && ['Switch', 'Checkbox', 'Radio'].includes(props.schema.component)
|
||||
|
|
|
@ -26,9 +26,9 @@ const state = reactive<{
|
|||
})
|
||||
|
||||
/**
|
||||
* 显示Json数据弹框
|
||||
* @param jsonData
|
||||
*/
|
||||
* 显示Json数据弹框
|
||||
* @param jsonData
|
||||
*/
|
||||
function showModal(jsonData: IFormConfig) {
|
||||
// console.log('showModal-', jsonData);
|
||||
formatRules(jsonData.schemas)
|
||||
|
@ -37,9 +37,9 @@ function showModal(jsonData: IFormConfig) {
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取表单数据
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
* 获取表单数据
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
function handleCancel() {
|
||||
state.open = false
|
||||
onCancel()
|
||||
|
|
|
@ -67,7 +67,7 @@ export function getType(value: any): string {
|
|||
|
||||
/**
|
||||
* 生成唯一guid
|
||||
* @returns {String} 唯一id标识符
|
||||
* @returns {string} 唯一id标识符
|
||||
*/
|
||||
export function randomUUID(): string {
|
||||
function S4() {
|
||||
|
|
|
@ -126,8 +126,10 @@ watch(
|
|||
|
||||
<template>
|
||||
<div ref="wrapperRef" :class="getClass">
|
||||
<PageHeader v-if="getShowHeader" v-bind="omit($attrs, 'class')" ref="headerRef" :style="getHeaderStyle"
|
||||
style="margin: 1rem; border-radius: 1rem;" :ghost="ghost" :title="title">
|
||||
<PageHeader
|
||||
v-if="getShowHeader" v-bind="omit($attrs, 'class')" ref="headerRef" :style="getHeaderStyle"
|
||||
style="margin: 1rem; border-radius: 1rem;" :ghost="ghost" :title="title"
|
||||
>
|
||||
<template #default>
|
||||
<template v-if="content">
|
||||
{{ content }}
|
||||
|
|
|
@ -94,11 +94,15 @@ function handleMenuClick(e: MenuInfo) {
|
|||
<template #overlay>
|
||||
<Menu @click="handleMenuClick">
|
||||
<MenuItem key="profile" :text="t('layout.header.accountCenter')" icon="ion:person-outline" />
|
||||
<MenuItem v-if="getShowDoc" key="doc" :text="t('layout.header.dropdownItemDoc')"
|
||||
icon="ion:document-text-outline" />
|
||||
<MenuItem
|
||||
v-if="getShowDoc" key="doc" :text="t('layout.header.dropdownItemDoc')"
|
||||
icon="ion:document-text-outline"
|
||||
/>
|
||||
<MenuDivider v-if="getShowDoc" />
|
||||
<MenuItem v-if="getUseLockPage" key="lock" :text="t('layout.header.tooltipLock')"
|
||||
icon="ion:lock-closed-outline" />
|
||||
<MenuItem
|
||||
v-if="getUseLockPage" key="lock" :text="t('layout.header.tooltipLock')"
|
||||
icon="ion:lock-closed-outline"
|
||||
/>
|
||||
<MenuItem key="logout" :text="t('layout.header.dropdownItemLoginOut')" icon="ion:power-outline" />
|
||||
</Menu>
|
||||
</template>
|
||||
|
|
|
@ -87,10 +87,14 @@ const getMenuMode = computed(() => {
|
|||
<!-- left start -->
|
||||
<div :class="`${prefixCls}-left`">
|
||||
<!-- logo -->
|
||||
<AppLogo v-if="getShowHeaderLogo || getIsMobile" :class="`${prefixCls}-logo`" :theme="getHeaderTheme"
|
||||
:style="getLogoWidth" />
|
||||
<LayoutTrigger v-if="(getShowContent && getShowHeaderTrigger && !getSplit && !getIsMixSidebar) || getIsMobile"
|
||||
:theme="getHeaderTheme" :sider="false" />
|
||||
<AppLogo
|
||||
v-if="getShowHeaderLogo || getIsMobile" :class="`${prefixCls}-logo`" :theme="getHeaderTheme"
|
||||
:style="getLogoWidth"
|
||||
/>
|
||||
<LayoutTrigger
|
||||
v-if="(getShowContent && getShowHeaderTrigger && !getSplit && !getIsMixSidebar) || getIsMobile"
|
||||
:theme="getHeaderTheme" :sider="false"
|
||||
/>
|
||||
<LayoutBreadcrumb v-if="getShowContent && getShowBread" :theme="getHeaderTheme" />
|
||||
</div>
|
||||
<!-- left end -->
|
||||
|
@ -113,8 +117,10 @@ const getMenuMode = computed(() => {
|
|||
|
||||
<AppSizePicker :show-text="false" :class="`${prefixCls}-action__item size-item`" />
|
||||
|
||||
<AppLocalePicker v-if="getShowLocalePicker" :reload="true" :show-text="false"
|
||||
:class="`${prefixCls}-action__item locale-item`" />
|
||||
<AppLocalePicker
|
||||
v-if="getShowLocalePicker" :reload="true" :show-text="false"
|
||||
:class="`${prefixCls}-action__item locale-item`"
|
||||
/>
|
||||
|
||||
<UserDropDown :theme="getHeaderTheme" />
|
||||
|
||||
|
|
|
@ -336,7 +336,8 @@ export const useMultipleTabStore = defineStore('app-multiple-tab', {
|
|||
},
|
||||
/**
|
||||
* replace tab's path
|
||||
* **/
|
||||
* *
|
||||
*/
|
||||
updateTabPath(fullPath: string, route: RouteLocationNormalized) {
|
||||
const findTab = this.getTabList.find(item => item === route)
|
||||
if (findTab) {
|
||||
|
|
|
@ -64,7 +64,7 @@ export type BuildPropReturn<T, D, R, V, C> = {
|
|||
type: String,
|
||||
values: ['light', 'dark'],
|
||||
} as const)
|
||||
* @example
|
||||
* @example
|
||||
// limited options and other types
|
||||
// the type will be PropType<'small' | 'medium' | number>
|
||||
buildProp({
|
||||
|
|
Loading…
Reference in New Issue