mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
build(deps): 添加smooth-scroll插件、axios封装
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
import type { App } from 'vue';
|
||||
import 'element-plus/lib/theme-chalk/base.css';
|
||||
import lang from 'element-plus/lib/locale/lang/zh-cn';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import {
|
||||
// ElAlert,
|
||||
// ElAside,
|
||||
@ -26,7 +28,7 @@ import {
|
||||
ElCollapseTransition,
|
||||
// ElColorPicker,
|
||||
// ElContainer,
|
||||
// ElDatePicker,
|
||||
ElDatePicker,
|
||||
// ElDialog,
|
||||
// ElDivider,
|
||||
// ElDrawer,
|
||||
@ -81,10 +83,11 @@ import {
|
||||
// ElTree,
|
||||
// ElUpload,
|
||||
// ElInfiniteScroll,
|
||||
ElLoading
|
||||
ElLoading,
|
||||
// ElMessage
|
||||
// ElMessageBox,
|
||||
// ElNotification
|
||||
locale
|
||||
} from 'element-plus';
|
||||
|
||||
const components = [
|
||||
@ -113,7 +116,7 @@ const components = [
|
||||
ElCollapseTransition,
|
||||
// ElColorPicker,
|
||||
// ElContainer,
|
||||
// ElDatePicker,
|
||||
ElDatePicker,
|
||||
// ElDialog,
|
||||
// ElDivider,
|
||||
// ElDrawer,
|
||||
@ -179,6 +182,8 @@ const plugins = [
|
||||
|
||||
/** 引入element-plus UI组件 */
|
||||
export default function setupElementPlus(app: App<Element>) {
|
||||
/** 国际化 */
|
||||
locale(lang);
|
||||
components.forEach(component => {
|
||||
app.component(component.name, component);
|
||||
});
|
||||
|
@ -1,4 +1,5 @@
|
||||
import setupSmoothScroll from './smooth-scroll';
|
||||
import setupElementPlus from './element-plus';
|
||||
import NProgress from './nprogress';
|
||||
|
||||
export { setupElementPlus, NProgress };
|
||||
export { setupSmoothScroll, setupElementPlus, NProgress };
|
||||
|
6
src/plugins/smooth-scroll.ts
Normal file
6
src/plugins/smooth-scroll.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import smoothscroll from 'smoothscroll-polyfill';
|
||||
|
||||
/** 平滑滚动插件(兼容主流浏览器) */
|
||||
export default function setupSmoothScroll() {
|
||||
smoothscroll.polyfill();
|
||||
}
|
Reference in New Issue
Block a user