diff --git a/src/views/notice/Config/SyncUser/index.vue b/src/views/notice/Config/SyncUser/index.vue index 7fa34d68..e3790f98 100644 --- a/src/views/notice/Config/SyncUser/index.vue +++ b/src/views/notice/Config/SyncUser/index.vue @@ -46,8 +46,9 @@ total: dataSource.length, current: current, pageSize: pageSize, - pageSizeOptions: ['12', '24', '48', '96'], + pageSizeOptions: ['5', '10', '20', '50', '100'], showSizeChanger: true, + hideOnSinglePage: true, showTotal: (total: number, range: number) => `第 ${range[0]} - ${range[1]} 条/总共 ${total} 条`, }" @change="handleTableChange" @@ -384,7 +385,7 @@ const getTableData = () => { * 前端分页 */ const current = ref(1); -const pageSize = ref(12); +const pageSize = ref(5); const handleTableChange = (pagination: any) => { current.value = pagination.current; pageSize.value = pagination.pageSize; diff --git a/src/views/notice/Template/Detail/index.vue b/src/views/notice/Template/Detail/index.vue index f0697501..34780010 100644 --- a/src/views/notice/Template/Detail/index.vue +++ b/src/views/notice/Template/Detail/index.vue @@ -1012,7 +1012,10 @@ const { resetFields, validate, validateInfos, clearValidate } = useForm( watch( () => formData.value.template.markdown?.title, (val) => { - if (!val) return; + if (!val) { + formData.value.variableDefinitions = []; + return; + } variableReg(); }, { deep: true }, @@ -1021,7 +1024,10 @@ watch( watch( () => formData.value.template.link?.title, (val) => { - if (!val) return; + if (!val) { + formData.value.variableDefinitions = []; + return; + } variableReg(); }, { deep: true }, @@ -1030,7 +1036,10 @@ watch( watch( () => formData.value.template.subject, (val) => { - if (!val) return; + if (!val) { + formData.value.variableDefinitions = []; + return; + } variableReg(); }, { deep: true }, @@ -1040,7 +1049,10 @@ watch( watch( () => formData.value.template.message, (val) => { - if (!val) return; + if (!val) { + formData.value.variableDefinitions = []; + return; + } variableReg(); }, { deep: true }, @@ -1049,7 +1061,10 @@ watch( watch( () => formData.value.template.ttsmessage, (val) => { - if (!val) return; + if (!val) { + formData.value.variableDefinitions = []; + return; + } variableReg(); }, { deep: true }, @@ -1058,7 +1073,10 @@ watch( watch( () => formData.value.template.body, (val) => { - if (!val) return; + if (!val) { + formData.value.variableDefinitions = []; + return; + } variableReg(); }, { deep: true }, @@ -1162,7 +1180,10 @@ const getConfigList = async () => { { column: 'type$IN', value: formData.value.type }, { column: 'provider', value: formData.value.provider }, ]; - const { result } = await templateApi.getConfig({ terms }); + const { result } = await templateApi.getConfig({ + terms, + sorts: [{ name: 'createTime', order: 'desc' }], + }); configList.value = result; };