提交 f22c257f authored 作者: 龙菲's avatar 龙菲

优化新建文件、新建文件夹等弹窗样式

上级 b62a6c4d
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:title="isShowTemplateRatio ? '新建文档' : '新建模板'" :title="isShowTemplateRatio ? '新建文档' : '新建模板'"
:visible.sync="visible" :visible.sync="visible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="550px" width="520px"
@close="handleDialogClose" @close="handleDialogClose"
> >
<el-form <el-form
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
label-width="100px" label-width="100px"
label-position="top" label-position="top"
> >
<div class="file">
<svg-icon icon-class="file_word" style="font-size: 120px"></svg-icon>
</div>
<el-form-item <el-form-item
label="选择新建方式" label="选择新建方式"
prop="isTemplate" prop="isTemplate"
...@@ -45,15 +48,27 @@ ...@@ -45,15 +48,27 @@
}" }"
> >
<template slot-scope="{ node, data }"> <template slot-scope="{ node, data }">
<svg-icon style="margin-right:4px" icon-class="dir" v-if="data.isDir"></svg-icon> <svg-icon
<svg-icon style="margin-right:4px" icon-class="file_word" v-if="!data.isDir"></svg-icon> style="margin-right: 4px"
icon-class="dir"
v-if="data.isDir"
></svg-icon>
<svg-icon
style="margin-right: 4px"
icon-class="file_word"
v-if="!data.isDir"
></svg-icon>
<span>{{ data.label }}</span> <span>{{ data.label }}</span>
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
</template> </template>
</el-cascader> </el-cascader>
<div class="empty" v-else>暂无模板,如要添加请联系管理员</div> <div class="empty" v-else>暂无模板,如要添加请联系管理员</div>
</el-form-item> </el-form-item>
<el-form-item label="文件名称" prop="fileName" size="mini"> <el-form-item
:label="isShowTemplateRatio ? '文档名称' : '模板名称'"
prop="fileName"
size="mini"
>
<el-input <el-input
v-model="form.fileName" v-model="form.fileName"
placeholder="请输入文件名称" placeholder="请输入文件名称"
...@@ -146,7 +161,7 @@ export default { ...@@ -146,7 +161,7 @@ export default {
filePath, filePath,
fileName, fileName,
isTemplate, isTemplate,
templateId:templateId[0] || '', templateId: templateId[0] || "",
}; };
newfile(params) newfile(params)
.then((res) => { .then((res) => {
...@@ -236,4 +251,8 @@ export default { ...@@ -236,4 +251,8 @@ export default {
font-size: 14px; font-size: 14px;
color: #999; color: #999;
} }
.file{
display: flex;
justify-content: center;
}
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
title="新建文件夹" title="新建文件夹"
:visible.sync="visible" :visible.sync="visible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="580px" width="500px"
@close="handleDialogClose" @close="handleDialogClose"
> >
<el-form <el-form
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
label-width="100px" label-width="100px"
label-position="top" label-position="top"
> >
<div class="dir">
<svg-icon icon-class="dir" style="font-size: 160px"></svg-icon>
</div>
<el-form-item label="文件夹名称" prop="fileName"> <el-form-item label="文件夹名称" prop="fileName">
<el-input <el-input
v-model="form.fileName" v-model="form.fileName"
placeholder="请输入文件夹名称" placeholder="请输入文件夹名称"
type="textarea"
:autosize="{ minRows: 3, maxRows: 3 }"
maxlength="255"
show-word-limit show-word-limit
@keydown.enter.native.prevent @keydown.enter.native.prevent
></el-input> ></el-input>
...@@ -137,3 +137,9 @@ export default { ...@@ -137,3 +137,9 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped>
.dir{
display: flex;
justify-content: center;
}
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
title="重命名文件" title="重命名文件"
:visible.sync="visible" :visible.sync="visible"
:close-on-click-modal="false" :close-on-click-modal="false"
width="550px" width="520px"
@open="handleDialogOpen" @open="handleDialogOpen"
@close="handleDialogClose" @close="handleDialogClose"
> >
...@@ -20,9 +20,6 @@ ...@@ -20,9 +20,6 @@
<el-input <el-input
v-model="form.fileName" v-model="form.fileName"
placeholder="请输入文件名称" placeholder="请输入文件名称"
type="textarea"
autosize
maxlength="255"
show-word-limit show-word-limit
></el-input> ></el-input>
</el-form-item> </el-form-item>
......
...@@ -5,7 +5,7 @@ Vue.use(Router) ...@@ -5,7 +5,7 @@ Vue.use(Router)
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from '@/layout'
import { staticRouters } from './staticRoute' // import { staticRouters } from './staticRoute'
/** /**
* Note: 路由配置项 * Note: 路由配置项
...@@ -75,7 +75,7 @@ export const constantRoutes = [ ...@@ -75,7 +75,7 @@ export const constantRoutes = [
// } // }
// ] // ]
// }, // },
...staticRouters, // ...staticRouters,
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,
......
import Layout from '@/layout' import Layout from '@/layout'
export const staticRouters = [ export const staticRouters = [
{ {
path: '', path: '/',
component: Layout, component: Layout,
redirect: 'index', redirect: 'index',
children: [ children: [
...@@ -36,17 +36,6 @@ export const staticRouters = [ ...@@ -36,17 +36,6 @@ export const staticRouters = [
affix: false affix: false
} }
}, },
// {
// path: 'myTemplate',
// component: () => import('@/views/mine/myTemplate/index.vue'),
// name: 'MyTemplate',
// meta: {
// title: '我的模板',
// icon: 'dashboard',
// noCache: false,
// affix: false
// }
// },
{ {
path: 'myCollect', path: 'myCollect',
component: () => import('@/views/mine/myCollect/index.vue'), component: () => import('@/views/mine/myCollect/index.vue'),
......
...@@ -35,9 +35,9 @@ module.exports = { ...@@ -35,9 +35,9 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://222.85.214.245:9600`, target: `http://222.85.214.245:9600`,
// target: `http://222.85.214.245:9558`, // target: `http://222.85.214.245:9558`,
target: `http://172.24.100.246:9600`, // target: `http://172.24.100.246:9600`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论