Skip to content

Commit 92d436b

Browse files
style: 修改样式
1 parent 2772613 commit 92d436b

File tree

8 files changed

+26
-24
lines changed

8 files changed

+26
-24
lines changed

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"source.fixAll.eslint": true
66
},
77
"[vue]": {
8-
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
8+
"editor.defaultFormatter": "esbenp.prettier-vscode"
99
},
1010
"i18n-ally.localesPaths": ["src/locales"],
1111
"i18n-ally.keystyle": "nested",

src/views/Authorization/Department/Department.vue

+1-5
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,7 @@ const crudSchemas = reactive<CrudSchema[]>([
166166
hidden: true
167167
},
168168
form: {
169-
component: 'DatePicker',
170-
componentProps: {
171-
type: 'datetime',
172-
valueFormat: 'YYYY-MM-DD HH:mm:ss'
173-
}
169+
hidden: true
174170
}
175171
},
176172
{

src/views/Authorization/Department/components/Write.vue

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ const props = defineProps({
2020
2121
const rules = reactive({
2222
id: [required()],
23-
status: [required()],
24-
createTime: [required()],
25-
remark: [required()]
23+
status: [required()]
2624
})
2725
2826
const { formRegister, formMethods } = useForm()

src/views/Authorization/Role/Role.vue

-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ const tableColumns = reactive<TableColumn[]>([
3636
field: 'roleName',
3737
label: t('role.roleName')
3838
},
39-
{
40-
field: 'role',
41-
label: t('role.role')
42-
},
4339
{
4440
field: 'status',
4541
label: t('menu.status'),

src/views/Authorization/Role/components/Write.vue

-5
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ const formSchema = ref<FormSchema[]>([
2828
label: t('role.roleName'),
2929
component: 'Input'
3030
},
31-
{
32-
field: 'role',
33-
label: t('role.role'),
34-
component: 'Input'
35-
},
3631
{
3732
field: 'status',
3833
label: t('menu.status'),

src/views/Authorization/User/User.vue

+11-2
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ const save = async () => {
276276

277277
<template>
278278
<div class="flex w-100% h-100%">
279-
<ContentWrap class="flex-1">
279+
<ContentWrap class="w-250px">
280280
<div class="flex justify-center items-center">
281281
<div class="flex-1">{{ t('userDemo.departmentList') }}</div>
282282
<ElInput
@@ -299,7 +299,16 @@ const save = async () => {
299299
}"
300300
:filter-node-method="filterNode"
301301
@current-change="currentChange"
302-
/>
302+
>
303+
<template #default="{ data }">
304+
<div
305+
:title="data.departmentName"
306+
class="whitespace-nowrap overflow-ellipsis overflow-hidden"
307+
>
308+
{{ data.departmentName }}
309+
</div>
310+
</template>
311+
</ElTree>
303312
</ContentWrap>
304313
<ContentWrap class="flex-[3] ml-20px">
305314
<Search

src/views/Authorization/User/components/Write.vue

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ const props = defineProps({
2121
const rules = reactive({
2222
username: [required()],
2323
account: [required()],
24-
'department.id': [required()],
25-
role: [required()],
26-
email: [required()],
27-
createTime: [required()]
24+
'department.id': [required()]
2825
})
2926
3027
const { formRegister, formMethods } = useForm()

uno.config.ts

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ import transformerVariantGroup from '@unocss/transformer-variant-group'
44
export default defineConfig({
55
// ...UnoCSS options
66
rules: [
7+
[
8+
/^overflow-ellipsis$/,
9+
([], { rawSelector }) => {
10+
const selector = e(rawSelector)
11+
return `
12+
${selector} {
13+
text-overflow: ellipsis;
14+
}
15+
`
16+
}
17+
],
718
[
819
/^custom-hover$/,
920
([], { rawSelector }) => {

0 commit comments

Comments
 (0)