feat: 页面调整组件属性升级
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
:drag="true"
|
:drag="true"
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
:title="t('components.CronModal.title')"
|
:title="t('components.CronModal.title')"
|
||||||
:visible="props.visible"
|
:open="props.open"
|
||||||
:body-style="{ padding: '0 24px' }"
|
:body-style="{ padding: '0 24px' }"
|
||||||
@cancel="fnCronModal(false)"
|
@cancel="fnCronModal(false)"
|
||||||
@ok="fnCronModal(true)"
|
@ok="fnCronModal(true)"
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
</ProModal>
|
</ProModal>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { ProModal } from 'antdv-pro-modal';
|
||||||
import CronSecond from './components/Second.vue';
|
import CronSecond from './components/Second.vue';
|
||||||
import CronMinute from './components/Minute.vue';
|
import CronMinute from './components/Minute.vue';
|
||||||
import CronHour from './components/Hour.vue';
|
import CronHour from './components/Hour.vue';
|
||||||
@@ -44,9 +45,9 @@ import { reactive, computed, watch } from 'vue';
|
|||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const emit = defineEmits(['cancel', 'ok', 'update:visible']);
|
const emit = defineEmits(['cancel', 'ok', 'update:open']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
visible: {
|
open: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
@@ -75,7 +76,7 @@ const cronStr = computed(() => {
|
|||||||
|
|
||||||
/**监听是否显示,初始cron属性 */
|
/**监听是否显示,初始cron属性 */
|
||||||
watch(
|
watch(
|
||||||
() => props.visible,
|
() => props.open,
|
||||||
val => {
|
val => {
|
||||||
if (!val) return;
|
if (!val) return;
|
||||||
const arr = props.cron.split(' ');
|
const arr = props.cron.split(' ');
|
||||||
@@ -98,7 +99,7 @@ watch(
|
|||||||
* @param val modal触发事件
|
* @param val modal触发事件
|
||||||
*/
|
*/
|
||||||
function fnCronModal(val: boolean) {
|
function fnCronModal(val: boolean) {
|
||||||
emit('update:visible', false);
|
emit('update:open', false);
|
||||||
if (val) {
|
if (val) {
|
||||||
emit('ok', cronStr.value);
|
emit('ok', cronStr.value);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const router = useRouter();
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
/**显示遮罩 */
|
/**显示遮罩 */
|
||||||
const isVisible = computed(() => !['none', 'lock'].includes(maskStore.type));
|
const isOpen = computed(() => !['none', 'lock'].includes(maskStore.type));
|
||||||
|
|
||||||
// 用户无操作一段时间后进行锁屏
|
// 用户无操作一段时间后进行锁屏
|
||||||
function idleTimeout(time: number, callback: Function) {
|
function idleTimeout(time: number, callback: Function) {
|
||||||
@@ -67,7 +67,7 @@ onUnmounted(() => {});
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="isVisible"
|
v-model:open="isOpen"
|
||||||
get-container="#app"
|
get-container="#app"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
:zIndex="1008"
|
:zIndex="1008"
|
||||||
|
|||||||
@@ -142,4 +142,32 @@ onBeforeUnmount(() => {
|
|||||||
.iti .iti__country-container .iti__search-input {
|
.iti .iti__country-container .iti__search-input {
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.iti .ant-input {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
font-variant: tabular-nums;
|
||||||
|
list-style: none;
|
||||||
|
font-feature-settings: 'tnum';
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
padding: 4px 11px;
|
||||||
|
color: #000000d9;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.5715;
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid #424242;
|
||||||
|
border-radius: 6px;
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
.iti .ant-input:focus,
|
||||||
|
.iti .ant-input-focused {
|
||||||
|
border-color: var(--ant-primary-color-hover);
|
||||||
|
box-shadow: 0 0 0 2px var(--ant-primary-color-outline);
|
||||||
|
border-right-width: 1px !important;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
import { reactive, watch, onMounted, PropType, nextTick } from 'vue';
|
import { reactive, watch, onMounted, PropType, nextTick } from 'vue';
|
||||||
import { Container, Draggable } from 'vue3-smooth-dnd';
|
import { Container, Draggable } from 'vue3-smooth-dnd';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { type ColumnsType } from 'ant-design-vue/lib/table';
|
|
||||||
import { dbGetJSON, dbSetJSON } from '@/utils/cache-db-utils';
|
import { dbGetJSON, dbSetJSON } from '@/utils/cache-db-utils';
|
||||||
import { CACHE_DB_TABLE_DND } from '@/constants/cache-keys-constants';
|
import { CACHE_DB_TABLE_DND } from '@/constants/cache-keys-constants';
|
||||||
const { t, currentLocale } = useI18n();
|
const { t, currentLocale } = useI18n();
|
||||||
@@ -37,7 +36,7 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**表格字段列 */
|
/**表格字段列 */
|
||||||
const tableColumns = reactive<ColumnsType>(props.columns);
|
const tableColumns = reactive(props.columns);
|
||||||
|
|
||||||
/**表格字段列勾选状态 */
|
/**表格字段列勾选状态 */
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
@@ -56,7 +55,9 @@ const state = reactive<{
|
|||||||
function fnTableColumnsCheckAllChange(e: any) {
|
function fnTableColumnsCheckAllChange(e: any) {
|
||||||
const checked = e.target.checked;
|
const checked = e.target.checked;
|
||||||
state.indeterminate = false;
|
state.indeterminate = false;
|
||||||
state.columnsTitleList = checked ? tableColumns.map(s => `${s.title}`) : [];
|
state.columnsTitleList = checked
|
||||||
|
? tableColumns.map(s => `${s.title as string}`)
|
||||||
|
: [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**表格字段列拖拽操作 */
|
/**表格字段列拖拽操作 */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { message } from 'ant-design-vue/lib';
|
import { message } from 'ant-design-vue/es';
|
||||||
import { ref, reactive, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
import { ref, reactive, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||||
import { FitAddon } from '@xterm/addon-fit';
|
import { FitAddon } from '@xterm/addon-fit';
|
||||||
import { Terminal } from '@xterm/xterm';
|
import { Terminal } from '@xterm/xterm';
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { message } from 'ant-design-vue/lib';
|
import { message } from 'ant-design-vue/es';
|
||||||
import { FileType } from 'ant-design-vue/lib/upload/interface';
|
import { FileType } from 'ant-design-vue/es/upload/interface';
|
||||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
||||||
|
import { ProModal } from 'antdv-pro-modal';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const emit = defineEmits(['upload', 'close', 'update:visible']);
|
const emit = defineEmits(['upload', 'close', 'update:open']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
/**窗口标题 */
|
/**窗口标题 */
|
||||||
title: {
|
title: {
|
||||||
@@ -17,7 +18,7 @@ const props = defineProps({
|
|||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
/**是否弹出显示,必传 */
|
/**是否弹出显示,必传 */
|
||||||
visible: {
|
open: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
@@ -80,7 +81,7 @@ function fnUpload(up: UploadRequestOption) {
|
|||||||
:drag="true"
|
:drag="true"
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
:title="props.title"
|
:title="props.title"
|
||||||
:visible="props.visible"
|
:open="props.open"
|
||||||
:keyboard="false"
|
:keyboard="false"
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:confirm-loading="props.loading"
|
:confirm-loading="props.loading"
|
||||||
|
|||||||
Reference in New Issue
Block a user