提交 c761e1cb authored 作者: JaxBBLL's avatar JaxBBLL

refactor: plugins refactor

上级 a4a4a49c
......@@ -17,6 +17,24 @@ img {
max-width: initial;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
input[type='number'] {
-moz-appearance: textfield;
}
button:focus {
outline: none;
}
html {
height: 100%;
box-sizing: border-box;
}
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
......@@ -30,11 +48,6 @@ label {
font-weight: 700;
}
html {
height: 100%;
box-sizing: border-box;
}
#app {
height: 100%;
}
......@@ -125,45 +138,6 @@ aside {
padding: 20px;
}
.components-container {
margin: 30px 50px;
position: relative;
}
.text-center {
text-align: center;
}
.sub-navbar {
height: 50px;
line-height: 50px;
position: relative;
width: 100%;
text-align: right;
padding-right: 20px;
transition: 600ms ease position;
background: linear-gradient(
90deg,
rgba(32, 182, 249, 1) 0%,
rgba(32, 182, 249, 1) 0%,
rgba(33, 120, 241, 1) 100%,
rgba(33, 120, 241, 1) 100%
);
.subtitle {
font-size: 20px;
color: #fff;
}
&.draft {
background: #d0d0d0;
}
&.deleted {
background: #d0d0d0;
}
}
.link-type,
.link-type:focus {
color: #337ab7;
......@@ -174,16 +148,6 @@ aside {
}
}
.filter-container {
padding-bottom: 10px;
.filter-item {
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
}
}
.top-right-btn {
position: relative;
float: right;
......
import './assets/styles/element-variables.scss';
import '@/assets/styles/index.scss'; // global css
import Vue from 'vue';
import Cookies from 'js-cookie';
import Element from 'element-ui';
// 引入tui的源码
import TyUI from '@taiyuan/ty-ui/packages/index';
import App from './App';
import store from './store';
import router from './router';
import directive from './directive'; // directive
import plugins from './plugins'; // plugins
import { download } from '@/utils/request';
import directive from './directive';
import './assets/icons'; // icon
import './permission'; // permission control
import { getDicts } from '@/api/system/dict/data';
import { getConfigKey } from '@/api/system/config';
import {
parseTime,
resetForm,
addDateRange,
selectDictLabel,
selectDictLabels,
handleTree
} from '@/utils/ruoyi';
// 分页组件
import Pagination from '@/components/Pagination';
// 自定义表格工具组件
import RightToolbar from '@/components/RightToolbar';
// 富文本组件
import Editor from '@/components/Editor';
// 文件上传组件
import FileUpload from '@/components/FileUpload';
// 图片上传组件
import ImageUpload from '@/components/ImageUpload';
// 图片预览组件
import ImagePreview from '@/components/ImagePreview';
// 字典标签组件
import DictTag from '@/components/DictTag';
// 头部标签组件
import VueMeta from 'vue-meta';
// 字典数据组件
import DictData from '@/components/DictData';
// 全局方法挂载
Vue.prototype.getDicts = getDicts;
Vue.prototype.getConfigKey = getConfigKey;
Vue.prototype.parseTime = parseTime;
Vue.prototype.resetForm = resetForm;
Vue.prototype.addDateRange = addDateRange;
Vue.prototype.selectDictLabel = selectDictLabel;
Vue.prototype.selectDictLabels = selectDictLabels;
Vue.prototype.download = download;
Vue.prototype.handleTree = handleTree;
// 全局组件挂载
Vue.component('DictTag', DictTag);
Vue.component('Pagination', Pagination);
Vue.component('RightToolbar', RightToolbar);
Vue.component('Editor', Editor);
Vue.component('FileUpload', FileUpload);
Vue.component('ImageUpload', ImageUpload);
Vue.component('ImagePreview', ImagePreview);
import './plugins';
Vue.use(directive);
Vue.use(plugins);
Vue.use(VueMeta);
DictData.install();
Vue.use(Element, {
size: Cookies.get('size') || 'small' // set element-ui default size
});
Vue.use(TyUI);
Vue.config.productionTip = false;
......
import Vue from 'vue';
// 分页组件
import Pagination from '@/components/Pagination';
// 自定义表格工具组件
import RightToolbar from '@/components/RightToolbar';
// 富文本组件
import Editor from '@/components/Editor';
// 文件上传组件
import FileUpload from '@/components/FileUpload';
// 图片上传组件
import ImageUpload from '@/components/ImageUpload';
// 图片预览组件
import ImagePreview from '@/components/ImagePreview';
// 字典标签组件
import DictTag from '@/components/DictTag';
// 字典数据组件
import DictData from '@/components/DictData';
// 全局组件挂载
Vue.component('DictTag', DictTag);
Vue.component('Pagination', Pagination);
Vue.component('RightToolbar', RightToolbar);
Vue.component('Editor', Editor);
Vue.component('FileUpload', FileUpload);
Vue.component('ImageUpload', ImageUpload);
Vue.component('ImagePreview', ImagePreview);
DictData.install();
import '@/assets/styles/element-variables.scss';
import '@/assets/styles/index.scss'; // global css
import Vue from 'vue';
import Element from 'element-ui';
import locale from 'element-ui/lib/locale/lang/zh-CN';
// Element.Dialog.props.closeOnClickModal.default = false;
// ty-ui需element的size为small
Vue.use(Element, { locale, size: 'small' });
import tab from './tab';
import auth from './auth';
import cache from './cache';
import modal from './modal';
import download from './download';
export default {
install(Vue) {
// 页签操作
Vue.prototype.$tab = tab;
// 认证对象
Vue.prototype.$auth = auth;
// 缓存对象
Vue.prototype.$cache = cache;
// 模态框对象
Vue.prototype.$modal = modal;
// 下载文件
Vue.prototype.$download = download;
}
};
import './vue-meta';
import './elment-ui';
import './ty-ui';
import './ruoyi';
import './methods';
import './components';
import Vue from 'vue';
import { download } from '@/utils/request';
import { getDicts } from '@/api/system/dict/data';
import { getConfigKey } from '@/api/system/config';
import {
parseTime,
resetForm,
addDateRange,
selectDictLabel,
selectDictLabels,
handleTree
} from '@/utils/ruoyi';
// 全局方法挂载
Vue.prototype.getDicts = getDicts;
Vue.prototype.getConfigKey = getConfigKey;
Vue.prototype.parseTime = parseTime;
Vue.prototype.resetForm = resetForm;
Vue.prototype.addDateRange = addDateRange;
Vue.prototype.selectDictLabel = selectDictLabel;
Vue.prototype.selectDictLabels = selectDictLabels;
Vue.prototype.download = download;
Vue.prototype.handleTree = handleTree;
import Vue from 'vue';
import tab from './tab';
import auth from './auth';
import cache from './cache';
import modal from './modal';
import download from './download';
// 页签操作
Vue.prototype.$tab = tab;
// 认证对象
Vue.prototype.$auth = auth;
// 缓存对象
Vue.prototype.$cache = cache;
// 模态框对象
Vue.prototype.$modal = modal;
// 下载文件
Vue.prototype.$download = download;
import Vue from 'vue';
// 引入tui的源码
import TyUI from '@taiyuan/ty-ui/packages/index';
Vue.use(TyUI);
import Vue from 'vue';
// 头部标签组件
import VueMeta from 'vue-meta';
Vue.use(VueMeta);
import auth from '@/plugins/auth';
import auth from '@/plugins/ruoyi/auth';
import router, { constantRoutes, dynamicRoutes } from '@/router';
import { getRouters } from '@/api/menu';
import Layout from '@/layout/index';
......
......@@ -4,7 +4,7 @@ import store from '@/store';
import { getToken } from '@/utils/auth';
import errorCode from '@/utils/errorCode';
import { tansParams, blobValidate } from '@/utils/ruoyi';
import cache from '@/plugins/cache';
import cache from '@/plugins/ruoyi/cache';
import { saveAs } from 'file-saver';
let downloadLoadingInstance;
......
......@@ -8,7 +8,12 @@
>文档</a
>
</div>
<el-button class="mb-10" type="primary">主要按钮</el-button>
<el-button
@click="$modal.msgSuccess('测试提示')"
class="mb-10"
type="primary"
>主要按钮</el-button
>
<ty-tabs
:tab-list="tabList"
:default-active-index="defaultActiveIndex"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论