Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions template/nestJs/locales.json
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,7 @@
"menu.user.setting": "用户设置",
"userSetting.save": "保存",
"userSetting.cancel": "取消",
"userSetting.reset": "重置",
"userSetting.department": "所属部门:",
"userSetting.position": "职位:",
"userSetting.type": "招聘类型:",
Expand Down
1 change: 1 addition & 0 deletions template/springboot/src/main/resources/locales.json
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@
"menu.user.setting": "用户设置",
"userSetting.save": "保存",
"userSetting.cancel": "取消",
"userSetting.reset": "重置",
"userSetting.department": "所属部门:",
"userSetting.position": "职位:",
"userSetting.type": "招聘类型:",
Expand Down
7 changes: 4 additions & 3 deletions template/tinyvue/src/components/navbar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Form as TinyForm,
FormItem as TinyFormItem,
Input as TinyInput,
Layout as TinyLayout,
Modal as TinyModal,
Row as TinyRow,
UserHead as TinyUserHead,
Expand Down Expand Up @@ -240,11 +241,11 @@ async function handlePwdUpdateSubmit() {
</div>
<div v-if="state.isPwdUpdate">
<TinyModal
v-model="state.isPwdUpdate" :lock-scroll="true" show-header show-footer mask-closable="true"
v-model="state.isPwdUpdate" :lock-scroll="true" show-header show-footer :mask-closable="true"
height="auto" :width="modalSize" :title="$t('userInfo.modal.title.pwdUpdate')"
>
<template #default>
<tiny-layout>
<TinyLayout>
<TinyForm :model="state.pwdData" :rules="rules" label-width="120px" :label-align="true" label-position="left">
<TinyRow :flex="true">
<TinyCol :span="10" label-width="100px">
Expand Down Expand Up @@ -278,7 +279,7 @@ async function handlePwdUpdateSubmit() {
</TinyCol>
</TinyRow>
</TinyForm>
</tiny-layout>
</TinyLayout>
</template>
<template #footer>
<TinyButton type="primary" @click="handlePwdUpdateSubmit">
Expand Down
2 changes: 1 addition & 1 deletion template/tinyvue/src/layout/default-layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ watch(appStore.$state, (newValue) => {
</div>
<div v-if="disTheme">
<tiny-modal
v-model="disTheme" show-header show-footer :title="$t('theme.title.main')" mask-closable="true"
v-model="disTheme" show-header show-footer :title="$t('theme.title.main')" :mask-closable="true"
height="auto" :width="modalSize"
>
<template #default>
Expand Down
3 changes: 3 additions & 0 deletions template/tinyvue/src/locales.json
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@
"menuInfo.modal.title.info": "Menu Detail",
"menuInfo.modal.title.update": "Update Menu",
"menuInfo.modal.title.add": "Add Menu",
"menuInfo.modal.title.confirm": "Are you sure you want to delete this data?",
"menuInfo.modal.message.error": "ParentId is not as same as id",
"menuInfo.modal.message.notNull": "Not Null",
"menu.add.demo": "Menu Demo Page",
Expand Down Expand Up @@ -993,6 +994,7 @@
"menu.user.setting": "用户设置",
"userSetting.save": "保存",
"userSetting.cancel": "取消",
"userSetting.reset": "重置",
"userSetting.department": "所属部门:",
"userSetting.position": "职位:",
"userSetting.type": "招聘类型:",
Expand Down Expand Up @@ -1219,6 +1221,7 @@
"menuInfo.modal.title.info": "查看菜单",
"menuInfo.modal.title.update": "修改菜单",
"menuInfo.modal.title.add": "添加菜单",
"menuInfo.modal.title.confirm": "你确认要删除该数据吗?",
"menuInfo.modal.message.error": "parentId不能和id相同",
"menuInfo.modal.message.notNull": "不能为空",
"menu.add.demo": "菜单Demo页",
Expand Down
28 changes: 21 additions & 7 deletions template/tinyvue/src/views/board/home/components/curve.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const options = ref({
min: 0,
max: 50,
interval: 5,
boundaryGap: ['0%', '0%'],
axisLabel: {
formatter: '{value} s',
},
Expand All @@ -74,6 +75,7 @@ const options = ref({
min: 0,
max: 30,
interval: 5,
boundaryGap: ['0%', '0%'],
axisLabel: {
formatter: '{value}',
},
Expand All @@ -82,6 +84,22 @@ const options = ref({
})
const chartExtend = ref({
legend: getLegendConfig(),
xAxis: [
{
type: 'category',
boundaryGap: true,
},
],
yAxis: [
{
type: 'value',
boundaryGap: ['0%', '0%'],
},
{
type: 'value',
boundaryGap: ['0%', '0%'],
},
],
tooltip: {
trigger: 'axis',
axisPointer: {
Expand All @@ -101,7 +119,7 @@ const chartExtend = ref({
barWidth: 12,
itemStyle: {
color: '#4e85f4',
barBorderRadius: [5, 5, 0, 0],
borderRadius: [5, 5, 0, 0],
},
tooltip: {
valueFormatter(value: any) {
Expand Down Expand Up @@ -154,9 +172,7 @@ const chartExtend = ref({
showSymbol: false,
yAxisIndex: 1,
lineStyle: {
normal: {
color: '#5f45ff',
},
color: '#5f45ff',
},
// 区域填充样式
areaStyle: {
Expand Down Expand Up @@ -230,9 +246,7 @@ const chartExtend = ref({
showSymbol: false,
yAxisIndex: 1,
lineStyle: {
normal: {
color: '#ff9e03',
},
color: '#ff9e03',
},
areaStyle: {
color: {
Expand Down
11 changes: 8 additions & 3 deletions template/tinyvue/src/views/board/home/components/falls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const options = ref({
xAxis: {
type: 'value',
show: false,
boundaryGap: ['0%', '0%'],
},
yAxis: {
type: 'category',
Expand Down Expand Up @@ -101,6 +102,10 @@ const options = ref({
},
})
const chartExtend = ref({
xAxis: {
type: 'value',
boundaryGap: ['0%', '0%'],
},
tooltip: {
trigger: 'axis',
axisPointer: {
Expand Down Expand Up @@ -141,7 +146,7 @@ const chartExtend = ref({
stack: 'Total',
itemStyle: {
color: '#4e85f4',
barBorderRadius: [2, 2, 2, 2],
borderRadius: [2, 2, 2, 2],
},
label: {
show: false,
Expand All @@ -154,7 +159,7 @@ const chartExtend = ref({
stack: 'Total',
itemStyle: {
color: '#5f45ff',
barBorderRadius: [5, 5, 5, 5],
borderRadius: [5, 5, 5, 5],
},
label: {
show: false,
Expand All @@ -167,7 +172,7 @@ const chartExtend = ref({
stack: 'Total',
itemStyle: {
color: '#e2b525 ',
barBorderRadius: [5, 5, 5, 5],
borderRadius: [5, 5, 5, 5],
},
label: {
show: false,
Expand Down
12 changes: 5 additions & 7 deletions template/tinyvue/src/views/board/home/components/region.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,11 @@ const chartSettings = ref({
zoom: 1.2,
top: '30px',
itemStyle: {
normal: {
borderColor: 'skyblue',
borderWidth: 1,
shadowColor: '#ccc',
shadowBlur: 30,
opacity: 1,
},
borderColor: 'skyblue',
borderWidth: 1,
shadowColor: '#ccc',
shadowBlur: 30,
opacity: 1,
},
label: {
show: true,
Expand Down
6 changes: 4 additions & 2 deletions template/tinyvue/src/views/locale/components/add-locale.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ watch(open, (value) => {
}
})

const toolAbortController = new AbortController()

onMounted(async () => {
navigator.modelContext.registerTool({
name: 'add-i18n-entry',
Expand Down Expand Up @@ -166,12 +168,12 @@ onMounted(async () => {
}],
}
},
})
}, { signal: toolAbortController.signal })
})

// 页面卸载时取消注册,避免内存泄漏和消息串扰
onUnmounted(() => {
navigator.modelContext.unregisterTool('add-i18n-entry')
toolAbortController.abort()
})
</script>

Expand Down
10 changes: 6 additions & 4 deletions template/tinyvue/src/views/menu/info/components/info-tab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import UpdateForm from './update-form.vue'

const { modalSize } = useResponsiveSize()

const { t } = useI18n()
const { t, te } = useI18n()
const vLoading = Loading.directive
const rawMenuData = ref<ITreeNodeData[]>([])
const localeData = ref<{ value: string, label: string }[]>([])
Expand Down Expand Up @@ -221,7 +221,7 @@ function fetchLocalItems() {
localeData.value = data.items.map((item) => {
return {
value: item.key,
label: t(item.key),
label: te(item.key) ? t(item.key) : item.key,
}
})
})
Expand All @@ -233,6 +233,8 @@ watch(locale, () => {
})


const toolAbortController = new AbortController()

onMounted(async () => {
Promise.all([fetchMenu(), fetchLocalItems()]).finally(() => {
treeLoading.value = false
Expand Down Expand Up @@ -280,11 +282,11 @@ onMounted(async () => {
await onClickAdd()
return { content: [{ type: 'text', text: `收到: ${name}` }] }
},
})
}, { signal: toolAbortController.signal })
})

onUnmounted(() => {
navigator.modelContext.unregisterTool('add-menu')
toolAbortController.abort()
})
</script>

Expand Down
50 changes: 26 additions & 24 deletions template/tinyvue/src/views/menu/info/components/menu-tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ watch(
:title="$t('menuInfo.table.name')"
tree-node
>
<template #default="{ row }">
{{ $t(row.locale) }}
<template #default="{ row, skip }">
<span v-if="!skip">{{ $t(row.locale) }}</span>
</template>
</TinyGridColumn>
<TinyGridColumn field="id" title="ID" />
Expand All @@ -62,34 +62,36 @@ watch(
/>
<TinyGridColumn field="order" :title="$t('menuInfo.table.order')" />
<TinyGridColumn field="customIcon" :title="$t('menuInfo.table.icon')">
<template #default="{ row }">
{{ row.customIcon }}
<template #default="{ row, skip }">
<span v-if="!skip">{{ row.customIcon }}</span>
</template>
</TinyGridColumn>
<TinyGridColumn field="component" :title="$t('menuInfo.table.component')" />
<TinyGridColumn field="url" :title="$t('menuInfo.table.path')" />
<TinyGridColumn field="locale" :title="$t('menuInfo.table.locale')" />
<TinyGridColumn :title="$t('permissionInfo.table.operations')" width="200">
<template #default="{ row }">
<IconEdit class="del-icon" />
<a
v-permission="'menu::update'"
class="operation-update"
@click="emits('update', row)"
>
{{ $t('menuInfo.table.operations.update') }}
</a>
<TinyPopconfirm :title="$t('menuInfo.modal.title.confirm')" type="warning" trigger="click" @confirm="confirm(row)">
<template #reference>
<IconDel class="del-icon" />
<a
v-permission="'menu::remove'"
class="operation-update"
>
{{ $t('menuInfo.table.operations.delete') }}
</a>
</template>
</TinyPopconfirm>
<template #default="{ row, skip }">
<template v-if="!skip">
<IconEdit class="del-icon" />
<a
v-permission="'menu::update'"
class="operation-update"
@click="emits('update', row)"
>
{{ $t('menuInfo.table.operations.update') }}
</a>
<TinyPopconfirm :title="$t('menuInfo.modal.title.confirm')" type="warning" trigger="click" @confirm="confirm(row)">
<template #reference>
<IconDel class="del-icon" />
<a
v-permission="'menu::remove'"
class="operation-update"
>
{{ $t('menuInfo.table.operations.delete') }}
</a>
</template>
</TinyPopconfirm>
</template>
</template>
</TinyGridColumn>
</TinyGrid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ async function handlePermissionAddCancel() {
state.permissionAddData = {}
}

const toolAbortController = new AbortController()

onMounted(async () => {
navigator.modelContext.registerTool({
name: 'add-permission',
Expand All @@ -217,11 +219,11 @@ onMounted(async () => {
await handlePermissionAddSubmit()
return { content: [{ type: 'text', text: `收到: ${name}` }] }
},
})
}, { signal: toolAbortController.signal })
})

onUnmounted(() => {
navigator.modelContext.unregisterTool('add-permission')
toolAbortController.abort()
})
</script>

Expand Down Expand Up @@ -249,7 +251,7 @@ onUnmounted(() => {
>
<TinyGridColumn field="id" :title="$t('permissionInfo.table.id')" width="10%">
<template #default="data">
<span>{{ $t(`${data.row.id}`) }}</span>
<span>{{ data.row.id }}</span>
</template>
</TinyGridColumn>
<TinyGridColumn
Expand All @@ -259,7 +261,7 @@ onUnmounted(() => {
:editor="{ component: 'input', autoselect: true }"
>
<template #default="data">
<span>{{ $t(`${data.row.name}`) }}</span>
<span>{{ data.row.name }}</span>
</template>
</TinyGridColumn>
<TinyGridColumn
Expand All @@ -268,7 +270,7 @@ onUnmounted(() => {
:editor="{ component: 'input', autoselect: true }"
>
<template #default="data">
<span>{{ $t(`${data.row.desc}`) }}</span>
<span>{{ data.row.desc }}</span>
</template>
</TinyGridColumn>
<TinyGridColumn :title="$t('permissionInfo.table.operations')">
Expand Down
Loading
Loading