Browse Source

!27 1.修复系统管理->角色管理->菜单权限。赋值菜单权限时,选择层级关联后,再选择菜单进行保存时值保存了一个“[1]" 2.修复暗黑模式样式问题

Merge pull request !27 from hetang/master
main
xingyu 2 years ago committed by Gitee
parent
commit
055d76407c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 3
      src/components/Tree/src/BasicTree.vue
  2. 19
      src/layouts/default/tabs/index.less
  3. 8
      src/views/base/login/LoginForm.vue
  4. 2
      src/views/system/role/RoleMenuModal.vue

3
src/components/Tree/src/BasicTree.vue

@ -85,7 +85,7 @@ export default defineComponent({
const rawVal = toRaw(state.checkedKeys) const rawVal = toRaw(state.checkedKeys)
emit('update:value', rawVal) emit('update:value', rawVal)
emit('check', rawVal, e) emit('check', state.checkStrictly ? rawVal.checked : rawVal, e)
}, },
onRightClick: handleRightClick onRightClick: handleRightClick
} }
@ -163,6 +163,7 @@ export default defineComponent({
function checkAll(checkAll: boolean) { function checkAll(checkAll: boolean) {
state.checkedKeys = checkAll ? getEnabledKeys() : ([] as KeyType[]) state.checkedKeys = checkAll ? getEnabledKeys() : ([] as KeyType[])
emit('check', state.checkedKeys, [])
} }
function expandAll(expandAll: boolean) { function expandAll(expandAll: boolean) {

19
src/layouts/default/tabs/index.less

@ -6,14 +6,26 @@ html[data-theme='dark'] {
border-bottom: none !important; border-bottom: none !important;
} }
} }
.ant-tabs-tab:not(.ant-tabs-tab-active) {
border: none !important;
&:hover {
color: inherit;
background-color: rgba(255, 255, 255, 0.5) !important;
}
}
} }
html[data-theme='light'] { html[data-theme='light'] {
.@{prefix-cls} { .@{prefix-cls} {
.ant-tabs-tab:not(.ant-tabs-tab-active) { .ant-tabs-tab:not(.ant-tabs-tab-active) {
border: none !important; border: none !important;
&:hover {
color: inherit;
background-color: #dee1e6;
}
} }
} }
} }
.@{prefix-cls} { .@{prefix-cls} {
@ -120,12 +132,7 @@ html[data-theme='light'] {
} }
} }
.ant-tabs-tab:not(.ant-tabs-tab-active) {
&:hover {
color: inherit;
background-color: #dee1e6;
}
}
.ant-tabs-tab-active { .ant-tabs-tab-active {
position: relative; position: relative;

8
src/views/base/login/LoginForm.vue

@ -14,7 +14,13 @@
<Input size="large" v-model:value="formData.username" :placeholder="t('sys.login.userName')" class="fix-auto-fill" /> <Input size="large" v-model:value="formData.username" :placeholder="t('sys.login.userName')" class="fix-auto-fill" />
</FormItem> </FormItem>
<FormItem name="password" class="enter-x"> <FormItem name="password" class="enter-x">
<InputPassword size="large" visibilityToggle v-model:value="formData.password" :placeholder="t('sys.login.password')" /> <InputPassword
size="large"
visibilityToggle
v-model:value="formData.password"
:placeholder="t('sys.login.password')"
class="fix-auto-fill"
/>
</FormItem> </FormItem>
<Row class="enter-x"> <Row class="enter-x">

2
src/views/system/role/RoleMenuModal.vue

@ -114,7 +114,7 @@ function menuCheck(checkedKeys: CheckKeys, event: CheckedEvent) {
// ID // ID
menuKeys.value = checkedKeys as number[] menuKeys.value = checkedKeys as number[]
// ID // ID
menuHalfKeys.value = event.halfCheckedKeys as number[] menuHalfKeys.value = (event.halfCheckedKeys as number[]) || []
} }
} }
</script> </script>