Commit f6c412f4 by chuzhixin

🎉代码规范强制使用单引号并取消行末分号

parent 17b70225
...@@ -3,24 +3,24 @@ module.exports = { ...@@ -3,24 +3,24 @@ module.exports = {
env: { env: {
node: true, node: true,
}, },
extends: ["plugin:vue/recommended", "@vue/prettier"], extends: ['plugin:vue/recommended', '@vue/prettier'],
rules: { rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
"vue/no-v-html": "off", 'vue/no-v-html': 'off',
}, },
parserOptions: { parserOptions: {
parser: "babel-eslint", parser: 'babel-eslint',
}, },
overrides: [ overrides: [
{ {
files: [ files: [
"**/__tests__/*.{j,t}s?(x)", '**/__tests__/*.{j,t}s?(x)',
"**/tests/unit/**/*.spec.{j,t}s?(x)", '**/tests/unit/**/*.spec.{j,t}s?(x)',
], ],
env: { env: {
jest: true, jest: true,
}, },
}, },
], ],
}; }
module.exports = { module.exports = {
extends: ["stylelint-config-recess-order", "stylelint-config-prettier"], extends: ['stylelint-config-recess-order', 'stylelint-config-prettier'],
}; }
module.exports = { module.exports = {
presets: ["@vue/cli-plugin-babel/preset"], presets: ['@vue/cli-plugin-babel/preset'],
}; }
const data = [ const data = [
{ {
title: "vue-admin-beautiful-pro 1.7版本已发布,点我提前体验", title: 'vue-admin-beautiful-pro 1.7版本已发布,点我提前体验',
url: "https://chu1204505056.gitee.io/vue-admin-beautiful-pro/#/index", url: 'https://chu1204505056.gitee.io/vue-admin-beautiful-pro/#/index',
}, },
{ {
title: "vue-admin-beautiful(antdv) vue3.0版本已发布,点我提前体验", title: 'vue-admin-beautiful(antdv) vue3.0版本已发布,点我提前体验',
url: "https://chu1204505056.gitee.io/vue-admin-beautiful-mini/#/index", url: 'https://chu1204505056.gitee.io/vue-admin-beautiful-mini/#/index',
}, },
]; ]
module.exports = [ module.exports = [
{ {
url: "/ad/getList", url: '/ad/getList',
type: "get", type: 'get',
response() { response() {
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
data, data,
}; }
}, },
}, },
]; ]
const data = [ const data = [
{ {
content: "在github上获得了第一个star,感恩一位名叫Bequiet2014的github用户", content: '在github上获得了第一个star,感恩一位名叫Bequiet2014的github用户',
timestamp: "2020-03-23", timestamp: '2020-03-23',
}, },
{ {
content: "增加更换主题功能", content: '增加更换主题功能',
timestamp: "2020-04-10", timestamp: '2020-04-10',
}, },
{ {
content: "大幅精简代码", content: '大幅精简代码',
timestamp: "2020-04-14", timestamp: '2020-04-14',
}, },
{ {
content: "修复群友反馈的bug", content: '修复群友反馈的bug',
timestamp: "2020-04-16", timestamp: '2020-04-16',
}, },
{ {
content: "剔除maptalks", content: '剔除maptalks',
timestamp: "2020-04-17", timestamp: '2020-04-17',
}, },
{ {
content: content:
"换行符统一修改为lf 支持苹果 linux windows协同开发 强制开启最严格eslint规则 不要哭 严格是有好处的", '换行符统一修改为lf 支持苹果 linux windows协同开发 强制开启最严格eslint规则 不要哭 严格是有好处的',
timestamp: "2020-04-17", timestamp: '2020-04-17',
}, },
{ {
content: "彻底完成手机端适配,记录这一天熬夜到了晚上三点", content: '彻底完成手机端适配,记录这一天熬夜到了晚上三点',
timestamp: "2020-04-18", timestamp: '2020-04-18',
}, },
{ {
content: content:
"删除babel-polyfill 提高打包速度 减少压缩体积(放弃ie是这个项目做出的最伟大的决定)", '删除babel-polyfill 提高打包速度 减少压缩体积(放弃ie是这个项目做出的最伟大的决定)',
timestamp: "2020-04-18", timestamp: '2020-04-18',
}, },
{ {
content: "源码精简至800k", content: '源码精简至800k',
timestamp: "2020-04-19", timestamp: '2020-04-19',
}, },
{ {
content: "添加视频播放器组件", content: '添加视频播放器组件',
timestamp: "2020-04-20", timestamp: '2020-04-20',
}, },
{ {
content: "修复路由懒加载 完善主题配色", content: '修复路由懒加载 完善主题配色',
timestamp: "2020-04-22", timestamp: '2020-04-22',
}, },
{ {
content: "修复全局axios拦截 加快动画展示效果 修改登录页样式", content: '修复全局axios拦截 加快动画展示效果 修改登录页样式',
timestamp: "2020-04-24", timestamp: '2020-04-24',
}, },
{ {
content: "简化权限与登录逻辑 更新mockServer", content: '简化权限与登录逻辑 更新mockServer',
timestamp: "2020-04-25", timestamp: '2020-04-25',
}, },
{ {
content: "优化登录退出逻辑 代码更清晰 退出不再重载网页 改为重载路由形式", content: '优化登录退出逻辑 代码更清晰 退出不再重载网页 改为重载路由形式',
timestamp: "2020-04-26", timestamp: '2020-04-26',
}, },
{ {
content: "无端的指责只会让我更加努力 修复sidebar 简化permission", content: '无端的指责只会让我更加努力 修复sidebar 简化permission',
timestamp: "2020-04-28", timestamp: '2020-04-28',
}, },
{ {
content: "又是一个深夜 实现了表格增删改查的一键生成", content: '又是一个深夜 实现了表格增删改查的一键生成',
timestamp: "2020-04-30", timestamp: '2020-04-30',
}, },
{ {
content: "大幅优化tagsview标签动画", content: '大幅优化tagsview标签动画',
timestamp: "2020-05-02", timestamp: '2020-05-02',
}, },
{ {
content: "三种图标组件实现mock模拟分页", content: '三种图标组件实现mock模拟分页',
timestamp: "2020-05-03", timestamp: '2020-05-03',
}, },
{ {
content: "添加了markdown编辑器组件", content: '添加了markdown编辑器组件',
timestamp: "2020-05-04", timestamp: '2020-05-04',
}, },
{ {
content: "添加stylelint-plus自动规整排序样式", content: '添加stylelint-plus自动规整排序样式',
timestamp: "2020-05-06", timestamp: '2020-05-06',
}, },
{ {
content: "添加商城模板", content: '添加商城模板',
timestamp: "2020-05-12", timestamp: '2020-05-12',
}, },
{ {
content: "github标星超过1000 感恩", content: 'github标星超过1000 感恩',
timestamp: "2020-05-13", timestamp: '2020-05-13',
}, },
{ {
content: "添加验证码组件", content: '添加验证码组件',
timestamp: "2020-05-14", timestamp: '2020-05-14',
}, },
{ {
content: "修复横向菜单bug", content: '修复横向菜单bug',
timestamp: "2020-05-16", timestamp: '2020-05-16',
}, },
{ {
content: "又被人骂了 挺好的 让我下定决心重写了tabsBar", content: '又被人骂了 挺好的 让我下定决心重写了tabsBar',
timestamp: "2020-05-20", timestamp: '2020-05-20',
}, },
{ {
content: "仿ant-design 添加雪花屏", content: '仿ant-design 添加雪花屏',
timestamp: "2020-05-26", timestamp: '2020-05-26',
}, },
{ {
content: "添加人员管理模块", content: '添加人员管理模块',
timestamp: "2020-06-02", timestamp: '2020-06-02',
}, },
{ {
content: "github标星超过2000 感恩", content: 'github标星超过2000 感恩',
timestamp: "2020-06-03", timestamp: '2020-06-03',
}, },
{ {
content: "添加炫酷地图组件", content: '添加炫酷地图组件',
timestamp: "2020-06-11", timestamp: '2020-06-11',
}, },
{ {
content: "抽离更多公共配置,框架使用更顺手", content: '抽离更多公共配置,框架使用更顺手',
timestamp: "2020-06-19", timestamp: '2020-06-19',
}, },
{ {
content: "彻底完成了tabsBar多标签页的重构", content: '彻底完成了tabsBar多标签页的重构',
timestamp: "2020-06-22", timestamp: '2020-06-22',
}, },
{ {
content: "感恩github标星过3.0K 祝大家端午节快乐", content: '感恩github标星过3.0K 祝大家端午节快乐',
timestamp: "2020-06-25", timestamp: '2020-06-25',
}, },
{ {
content: "彻底重构了SideBar与TopBar 大幅精简dom渲染逻辑 全球首发", content: '彻底重构了SideBar与TopBar 大幅精简dom渲染逻辑 全球首发',
timestamp: "2020-06-25", timestamp: '2020-06-25',
}, },
{ {
content: "添加菜单管理", content: '添加菜单管理',
timestamp: "2020-07-7", timestamp: '2020-07-7',
}, },
{ {
content: "首次采用sass-loader 9.0写法,感谢github用户 shaonialife", content: '首次采用sass-loader 9.0写法,感谢github用户 shaonialife',
timestamp: "2020-07-7", timestamp: '2020-07-7',
}, },
{ {
content: "添加vue-amap组件", content: '添加vue-amap组件',
timestamp: "2020-07-11", timestamp: '2020-07-11',
}, },
{ {
content: "修改zx-layouts引入方式", content: '修改zx-layouts引入方式',
timestamp: "2020-07-15", timestamp: '2020-07-15',
}, },
{ {
content: content:
"记录这一天vue-admin-beautiful在插件市场、百度已花费超过1万元广告费用,希望一切都值得", '记录这一天vue-admin-beautiful在插件市场、百度已花费超过1万元广告费用,希望一切都值得',
timestamp: "2020-07-18", timestamp: '2020-07-18',
}, },
{ {
content: "主题配置添加绿荫草场、荣耀典藏、暗黑之子模式", content: '主题配置添加绿荫草场、荣耀典藏、暗黑之子模式',
timestamp: "2020-07-18", timestamp: '2020-07-18',
}, },
{ {
content: "全局axios请求全面支持Status Code拦截处理", content: '全局axios请求全面支持Status Code拦截处理',
timestamp: "2020-07-29", timestamp: '2020-07-29',
}, },
{ {
content: "重构全局loadding加载代码", content: '重构全局loadding加载代码',
timestamp: "2020-07-31", timestamp: '2020-07-31',
}, },
{ {
content: "升级stylelint自动排序功能", content: '升级stylelint自动排序功能',
timestamp: "2020-08-25", timestamp: '2020-08-25',
}, },
{ {
content: "修复视频播放器组件重载路由失效的bug", content: '修复视频播放器组件重载路由失效的bug',
timestamp: "2020-09-03", timestamp: '2020-09-03',
}, },
{ {
content: "修复极个别情况image-loader打包报错", content: '修复极个别情况image-loader打包报错',
timestamp: "2020-09-18", timestamp: '2020-09-18',
}, },
{ {
content: "全网首个基于vue3.0开发的admin框架已发布,具体请访问github", content: '全网首个基于vue3.0开发的admin框架已发布,具体请访问github',
timestamp: "2020-09-22", timestamp: '2020-09-22',
}, },
{ {
content: "完善路由后端渲染方案,弃用之前写法", content: '完善路由后端渲染方案,弃用之前写法',
timestamp: "2020-09-30", timestamp: '2020-09-30',
}, },
{ {
content: "大版本迭代,请关注github tag", content: '大版本迭代,请关注github tag',
timestamp: "2020-09-30", timestamp: '2020-09-30',
}, },
/* { /* {
content: content:
...@@ -196,22 +196,22 @@ const data = [ ...@@ -196,22 +196,22 @@ const data = [
timestamp: "2020-10-01", timestamp: "2020-10-01",
}, */ }, */
{ {
content: "凌晨两点,我累了,移除无用组件,精简package", content: '凌晨两点,我累了,移除无用组件,精简package',
timestamp: "2020-10-02", timestamp: '2020-10-02',
}, },
]; ]
module.exports = [ module.exports = [
{ {
url: "/changeLog/getList", url: '/changeLog/getList',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: 999, totalCount: 999,
data: data, data: data,
}; }
}, },
}, },
]; ]
const data = [ const data = [
"alphabetical_sorting", 'alphabetical_sorting',
"alphabetical_sorting", 'alphabetical_sorting',
"alarm_clock", 'alarm_clock',
"area_chart", 'area_chart',
"approval", 'approval',
"answers", 'answers',
"approve", 'approve',
"assistant", 'assistant',
"automotive", 'automotive',
"automatic", 'automatic',
"bad_decision", 'bad_decision',
"bar_chart", 'bar_chart',
"bearish", 'bearish',
"biomass", 'biomass',
"biohazard", 'biohazard',
"binoculars", 'binoculars',
"bookmark", 'bookmark',
"briefcase", 'briefcase',
"biotech", 'biotech',
"broken_link", 'broken_link',
"business", 'business',
"bullish", 'bullish',
"business_contact", 'business_contact',
"businesswoman", 'businesswoman',
"cable_release", 'cable_release',
"calculator", 'calculator',
"businessman", 'businessman',
"calendar", 'calendar',
"butting_in", 'butting_in',
"call_transfer", 'call_transfer',
"callback", 'callback',
"camcorder", 'camcorder',
"camera", 'camera',
"camcorder_pro", 'camcorder_pro',
"cancel", 'cancel',
"camera_addon", 'camera_addon',
"camera_identificatio", 'camera_identificatio',
"capacitor", 'capacitor',
"candle_sticks", 'candle_sticks',
"checkmark", 'checkmark',
"circuit", 'circuit',
"charge_battery", 'charge_battery',
"clear_filters", 'clear_filters',
"clapperboard", 'clapperboard',
"clock", 'clock',
"close_up_mode", 'close_up_mode',
"collaboration", 'collaboration',
"cell_phone", 'cell_phone',
"collapse", 'collapse',
"collect", 'collect',
"cloth", 'cloth',
"combo_chart", 'combo_chart',
"comments", 'comments',
"conference_call", 'conference_call',
"compact_camera", 'compact_camera',
"contacts", 'contacts',
"copyleft", 'copyleft',
"copyright", 'copyright',
"crystal_oscillator", 'crystal_oscillator',
"cursor", 'cursor',
"currency_exchange", 'currency_exchange',
"customer_support", 'customer_support',
"dam", 'dam',
"data_backup", 'data_backup',
"data_configuration", 'data_configuration',
"data_encryption", 'data_encryption',
"data_protection", 'data_protection',
"data_recovery", 'data_recovery',
"database", 'database',
"data_sheet", 'data_sheet',
"debt", 'debt',
"decision", 'decision',
"delete_column", 'delete_column',
"delete_database", 'delete_database',
"department", 'department',
"delete_row", 'delete_row',
"deployment", 'deployment',
"dislike", 'dislike',
"disapprove", 'disapprove',
"disclaimer", 'disclaimer',
"display", 'display',
"document", 'document',
"do_not_insert", 'do_not_insert',
"do_not_mix", 'do_not_mix',
"do_not_inhale", 'do_not_inhale',
"donate", 'donate',
"down", 'down',
"doughnut_chart", 'doughnut_chart',
"down_left", 'down_left',
"down_right", 'down_right',
"download", 'download',
"edit_image", 'edit_image',
"electrical_sensor", 'electrical_sensor',
"electrical_threshold", 'electrical_threshold',
"electricity", 'electricity',
"electro_devices", 'electro_devices',
"electronics", 'electronics',
"empty_battery", 'empty_battery',
"empty_filter", 'empty_filter',
"empty_trash", 'empty_trash',
"end_call", 'end_call',
"engineering", 'engineering',
"entering_heaven_aliv", 'entering_heaven_aliv',
"expand", 'expand',
"export", 'export',
"expired", 'expired',
"factory", 'factory',
"factory_breakdown", 'factory_breakdown',
"external", 'external',
"faq", 'faq',
"feed_in", 'feed_in',
"file", 'file',
"feedback", 'feedback',
"film", 'film',
"filled_filter", 'filled_filter',
"filing_cabinet", 'filing_cabinet',
"film_reel", 'film_reel',
"flash_auto", 'flash_auto',
"fine_print", 'fine_print',
"flash_off", 'flash_off',
"flash_on", 'flash_on',
"flow_chart", 'flow_chart',
"folder", 'folder',
"frame", 'frame',
"full_battery", 'full_battery',
"full_trash", 'full_trash',
"gallery", 'gallery',
"generic_sorting_asc", 'generic_sorting_asc',
"generic_sorting_desc", 'generic_sorting_desc',
"genealogy", 'genealogy',
"globe", 'globe',
"good_decision", 'good_decision',
"headset", 'headset',
"grid", 'grid',
"graduation_cap", 'graduation_cap',
"heat_map", 'heat_map',
"high_priority", 'high_priority',
"high_battery", 'high_battery',
"image_file", 'image_file',
"home", 'home',
"idea", 'idea',
"import", 'import',
"in_transit", 'in_transit',
"integrated_webcam", 'integrated_webcam',
"inspection", 'inspection',
"invite", 'invite',
"internal", 'internal',
"ipad", 'ipad',
"info", 'info',
"iphone", 'iphone',
"kindle", 'kindle',
"key", 'key',
"landscape", 'landscape',
"left", 'left',
"left_down", 'left_down',
"left_up", 'left_up',
"leave", 'leave',
"like_placeholder", 'like_placeholder',
"light_at_the_end_of_", 'light_at_the_end_of_',
"library", 'library',
"line_chart", 'line_chart',
"link", 'link',
"like", 'like',
"lock", 'lock',
"list", 'list',
"lock_landscape", 'lock_landscape',
"low_battery", 'low_battery',
"lock_portrait", 'lock_portrait',
"low_priority", 'low_priority',
"make_decision", 'make_decision',
"medium_priority", 'medium_priority',
"manager", 'manager',
"menu", 'menu',
"middle_battery", 'middle_battery',
"minus", 'minus',
"missed_call", 'missed_call',
"mind_map", 'mind_map',
"mms", 'mms',
"multiple_cameras", 'multiple_cameras',
"money_transfer", 'money_transfer',
"music", 'music',
"multiple_devices", 'multiple_devices',
"multiple_smartphones", 'multiple_smartphones',
"multiple_inputs", 'multiple_inputs',
"negative_dynamic", 'negative_dynamic',
"neutral_decision", 'neutral_decision',
"night_landscape", 'night_landscape',
"news", 'news',
"neutral_trading", 'neutral_trading',
"night_portrait", 'night_portrait',
"no_idea", 'no_idea',
"next", 'next',
"no_video", 'no_video',
"nook", 'nook',
"ok", 'ok',
"org_unit", 'org_unit',
"opened_folder", 'opened_folder',
"old_time_camera", 'old_time_camera',
"online_support", 'online_support',
"organization", 'organization',
"package", 'package',
"paid", 'paid',
"parallel_tasks", 'parallel_tasks',
"overtime", 'overtime',
"panorama", 'panorama',
"phone", 'phone',
"phone_android", 'phone_android',
"photo_reel", 'photo_reel',
"pie_chart", 'pie_chart',
"picture", 'picture',
"planner", 'planner',
"plus", 'plus',
"podium_with_audience", 'podium_with_audience',
"podium_without_speak", 'podium_without_speak',
"podium_with_speaker", 'podium_with_speaker',
"previous", 'previous',
"portrait_mode", 'portrait_mode',
"positive_dynamic", 'positive_dynamic',
"privacy", 'privacy',
"process", 'process',
"puzzle", 'puzzle',
"questions", 'questions',
"print", 'print',
"radar_plot", 'radar_plot',
"rating", 'rating',
"ratings", 'ratings',
"reading", 'reading',
"redo", 'redo',
"reading_ebook", 'reading_ebook',
"refresh", 'refresh',
"registered_trademark", 'registered_trademark',
"right", 'right',
"reuse", 'reuse',
"remove_image", 'remove_image',
"right_down", 'right_down',
"right_up", 'right_up',
"rotate_to_portrait", 'rotate_to_portrait',
"rules", 'rules',
"rotate_camera", 'rotate_camera',
"rotate_to_landscape", 'rotate_to_landscape',
"ruler", 'ruler',
"scatter_plot", 'scatter_plot',
"search", 'search',
"safe", 'safe',
"self_service_kiosk", 'self_service_kiosk',
"selfie", 'selfie',
"serial_tasks", 'serial_tasks',
"sales_performance", 'sales_performance',
"settings", 'settings',
"services", 'services',
"share", 'share',
"shipped", 'shipped',
"sim_card", 'sim_card',
"shop", 'shop',
"service_mark", 'service_mark',
"sim_card_chip", 'sim_card_chip',
"signature", 'signature',
"smartphone_tablet", 'smartphone_tablet',
"sound_recording_copy", 'sound_recording_copy',
"sms", 'sms',
"speaker", 'speaker',
"slr_back_side", 'slr_back_side',
"start", 'start',
"stack_of_photos", 'stack_of_photos',
"statistics", 'statistics',
"sports_mode", 'sports_mode',
"support", 'support',
"synchronize", 'synchronize',
"switch_camera", 'switch_camera',
"survey", 'survey',
"tablet_android", 'tablet_android',
"template", 'template',
"trademark", 'trademark',
"todo_list", 'todo_list',
"touchscreen_smartpho", 'touchscreen_smartpho',
"timeline", 'timeline',
"tree_structure", 'tree_structure',
"undo", 'undo',
"up_left", 'up_left',
"two_smartphones", 'two_smartphones',
"unlock", 'unlock',
"up", 'up',
"up_right", 'up_right',
"upload", 'upload',
"video_call", 'video_call',
"video_file", 'video_file',
"view_details", 'view_details',
"video_projector", 'video_projector',
"vip", 'vip',
"voice_presentation", 'voice_presentation',
"webcam", 'webcam',
"voicemail", 'voicemail',
"workflow", 'workflow',
"about", 'about',
"accept_database", 'accept_database',
"add_image", 'add_image',
"add_column", 'add_column',
"add_database", 'add_database',
"add_row", 'add_row',
]; ]
module.exports = [ module.exports = [
{ {
url: "/colorfulIcon/getList", url: '/colorfulIcon/getList',
type: "post", type: 'post',
response(config) { response(config) {
const { title, pageNo = 1, pageSize = 72 } = config.body; const { title, pageNo = 1, pageSize = 72 } = config.body
let mockList = data.filter((item) => { let mockList = data.filter((item) => {
if (title && item.indexOf(title) < 0) return false; if (title && item.indexOf(title) < 0) return false
return true; return true
}); })
const pageList = mockList.filter( const pageList = mockList.filter(
(item, index) => (item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1) index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
); )
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: mockList.length, totalCount: mockList.length,
data: pageList, data: pageList,
}; }
}, },
}, },
]; ]
const { mock } = require("mockjs"); const { mock } = require('mockjs')
const List = []; const List = []
const count = 999; const count = 999
let num = 0; let num = 0
for (let i = 0; i < count; i++) { for (let i = 0; i < count; i++) {
List.push( List.push(
mock({ mock({
uuid: "@uuid", uuid: '@uuid',
image: `https://picsum.photos/300/600?random=${num++}`, image: `https://picsum.photos/300/600?random=${num++}`,
title: "@ctitle", title: '@ctitle',
description: "@csentence", description: '@csentence',
link: "https://www.baidu.com", link: 'https://www.baidu.com',
price: "@integer(100, 500)", price: '@integer(100, 500)',
"status|1": [1, 0], 'status|1': [1, 0],
"isRecommend|1": [1, 0], 'isRecommend|1': [1, 0],
}) })
); )
} }
module.exports = [ module.exports = [
{ {
url: "/goodsList/getList", url: '/goodsList/getList',
type: "post", type: 'post',
response(config) { response(config) {
const { title = "", pageNo = 1, pageSize = 20 } = config.body; const { title = '', pageNo = 1, pageSize = 20 } = config.body
let mockList = List.filter((item) => { let mockList = List.filter((item) => {
if (title && item.title.indexOf(title) < 0) return false; if (title && item.title.indexOf(title) < 0) return false
return true; return true
}); })
const pageList = mockList.filter( const pageList = mockList.filter(
(item, index) => (item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1) index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
); )
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: count, totalCount: count,
data: pageList, data: pageList,
}; }
}, },
}, },
]; ]
const data = [ const data = [
"air-freshener", 'air-freshener',
"align-center", 'align-center',
"align-justify", 'align-justify',
"align-left", 'align-left',
"align-right", 'align-right',
"allergies", 'allergies',
"ambulance", 'ambulance',
"american-sign-language-interpreting", 'american-sign-language-interpreting',
"anchor", 'anchor',
"angle-double-down", 'angle-double-down',
"angle-double-left", 'angle-double-left',
"angle-double-right", 'angle-double-right',
"angle-double-up", 'angle-double-up',
"angle-down", 'angle-down',
"angle-left", 'angle-left',
"angle-right", 'angle-right',
"angle-up", 'angle-up',
"angry", 'angry',
"ankh", 'ankh',
"apple-alt", 'apple-alt',
"archive", 'archive',
"archway", 'archway',
"arrow-alt-circle-down", 'arrow-alt-circle-down',
"arrow-alt-circle-left", 'arrow-alt-circle-left',
"arrow-alt-circle-right", 'arrow-alt-circle-right',
"arrow-alt-circle-up", 'arrow-alt-circle-up',
"arrow-circle-down", 'arrow-circle-down',
"arrow-circle-left", 'arrow-circle-left',
"arrow-circle-right", 'arrow-circle-right',
"arrow-circle-up", 'arrow-circle-up',
"arrow-down", 'arrow-down',
"arrow-left", 'arrow-left',
"arrow-right", 'arrow-right',
"arrow-up", 'arrow-up',
"arrows-alt", 'arrows-alt',
"arrows-alt-h", 'arrows-alt-h',
"arrows-alt-v", 'arrows-alt-v',
"assistive-listening-systems", 'assistive-listening-systems',
"asterisk", 'asterisk',
"at", 'at',
"atlas", 'atlas',
"atom", 'atom',
"audio-description", 'audio-description',
"award", 'award',
"baby", 'baby',
"baby-carriage", 'baby-carriage',
"backspace", 'backspace',
"backward", 'backward',
"bacon", 'bacon',
"bahai", 'bahai',
"balance-scale", 'balance-scale',
"balance-scale-left", 'balance-scale-left',
"balance-scale-right", 'balance-scale-right',
"ban", 'ban',
"band-aid", 'band-aid',
"barcode", 'barcode',
"bars", 'bars',
"baseball-ball", 'baseball-ball',
"basketball-ball", 'basketball-ball',
"bath", 'bath',
"battery-empty", 'battery-empty',
"battery-full", 'battery-full',
"battery-half", 'battery-half',
"battery-quarter", 'battery-quarter',
"battery-three-quarters", 'battery-three-quarters',
"bed", 'bed',
"beer", 'beer',
"bell", 'bell',
"bell-slash", 'bell-slash',
"bezier-curve", 'bezier-curve',
"bible", 'bible',
"bicycle", 'bicycle',
"biking", 'biking',
"binoculars", 'binoculars',
"biohazard", 'biohazard',
"birthday-cake", 'birthday-cake',
"blender", 'blender',
"blender-phone", 'blender-phone',
"blind", 'blind',
"blog", 'blog',
"bold", 'bold',
"bolt", 'bolt',
"bomb", 'bomb',
"bone", 'bone',
"bong", 'bong',
"book", 'book',
"book-dead", 'book-dead',
"book-medical", 'book-medical',
"book-open", 'book-open',
"book-reader", 'book-reader',
"bookmark", 'bookmark',
"border-all", 'border-all',
"border-none", 'border-none',
"border-style", 'border-style',
"bowling-ball", 'bowling-ball',
"box", 'box',
"box-open", 'box-open',
"boxes", 'boxes',
"braille", 'braille',
"brain", 'brain',
"bread-slice", 'bread-slice',
"briefcase", 'briefcase',
"briefcase-medical", 'briefcase-medical',
"broadcast-tower", 'broadcast-tower',
"broom", 'broom',
"brush", 'brush',
"bug", 'bug',
"building", 'building',
"bullhorn", 'bullhorn',
"bullseye", 'bullseye',
"burn", 'burn',
"bus", 'bus',
"bus-alt", 'bus-alt',
"business-time", 'business-time',
"calculator", 'calculator',
"calendar", 'calendar',
"calendar-alt", 'calendar-alt',
"calendar-check", 'calendar-check',
"calendar-day", 'calendar-day',
"calendar-minus", 'calendar-minus',
"calendar-plus", 'calendar-plus',
"calendar-times", 'calendar-times',
"calendar-week", 'calendar-week',
"camera", 'camera',
"camera-retro", 'camera-retro',
"campground", 'campground',
"candy-cane", 'candy-cane',
"cannabis", 'cannabis',
"capsules", 'capsules',
"car", 'car',
"car-alt", 'car-alt',
"car-battery", 'car-battery',
"car-crash", 'car-crash',
"car-side", 'car-side',
"caravan", 'caravan',
"caret-down", 'caret-down',
"caret-left", 'caret-left',
"caret-right", 'caret-right',
"caret-square-down", 'caret-square-down',
"caret-square-left", 'caret-square-left',
"caret-square-right", 'caret-square-right',
"caret-square-up", 'caret-square-up',
"caret-up", 'caret-up',
"carrot", 'carrot',
"cart-arrow-down", 'cart-arrow-down',
"cart-plus", 'cart-plus',
"cash-register", 'cash-register',
"cat", 'cat',
"certificate", 'certificate',
"chair", 'chair',
"chalkboard", 'chalkboard',
"chalkboard-teacher", 'chalkboard-teacher',
"charging-station", 'charging-station',
"chart-area", 'chart-area',
"chart-bar", 'chart-bar',
"chart-line", 'chart-line',
"chart-pie", 'chart-pie',
"check", 'check',
"check-circle", 'check-circle',
"check-double", 'check-double',
"check-square", 'check-square',
"cheese", 'cheese',
"chess", 'chess',
"chess-bishop", 'chess-bishop',
"chess-board", 'chess-board',
"chess-king", 'chess-king',
"chess-knight", 'chess-knight',
"chess-pawn", 'chess-pawn',
"chess-queen", 'chess-queen',
"chess-rook", 'chess-rook',
"chevron-circle-down", 'chevron-circle-down',
"chevron-circle-left", 'chevron-circle-left',
"chevron-circle-right", 'chevron-circle-right',
"chevron-circle-up", 'chevron-circle-up',
"chevron-down", 'chevron-down',
"chevron-left", 'chevron-left',
"chevron-right", 'chevron-right',
"chevron-up", 'chevron-up',
"child", 'child',
"church", 'church',
"circle", 'circle',
"circle-notch", 'circle-notch',
"city", 'city',
"clinic-medical", 'clinic-medical',
"clipboard", 'clipboard',
"clipboard-check", 'clipboard-check',
"clipboard-list", 'clipboard-list',
"clock", 'clock',
"clone", 'clone',
"closed-captioning", 'closed-captioning',
"cloud", 'cloud',
"cloud-download-alt", 'cloud-download-alt',
"cloud-meatball", 'cloud-meatball',
"cloud-moon", 'cloud-moon',
"cloud-moon-rain", 'cloud-moon-rain',
"cloud-rain", 'cloud-rain',
"cloud-showers-heavy", 'cloud-showers-heavy',
"cloud-sun", 'cloud-sun',
"cloud-sun-rain", 'cloud-sun-rain',
"cloud-upload-alt", 'cloud-upload-alt',
"cocktail", 'cocktail',
"code", 'code',
"code-branch", 'code-branch',
"coffee", 'coffee',
"cog", 'cog',
"cogs", 'cogs',
"coins", 'coins',
"columns", 'columns',
"comment", 'comment',
"comment-alt", 'comment-alt',
"comment-dollar", 'comment-dollar',
"comment-dots", 'comment-dots',
"comment-medical", 'comment-medical',
"comment-slash", 'comment-slash',
"comments", 'comments',
"comments-dollar", 'comments-dollar',
"compact-disc", 'compact-disc',
"compass", 'compass',
"compress", 'compress',
"compress-alt", 'compress-alt',
"compress-arrows-alt", 'compress-arrows-alt',
"concierge-bell", 'concierge-bell',
"cookie", 'cookie',
"cookie-bite", 'cookie-bite',
"copy", 'copy',
"copyright", 'copyright',
"couch", 'couch',
"credit-card", 'credit-card',
"crop", 'crop',
"crop-alt", 'crop-alt',
"cross", 'cross',
"crosshairs", 'crosshairs',
"crow", 'crow',
"crown", 'crown',
"crutch", 'crutch',
"cube", 'cube',
"cubes", 'cubes',
"cut", 'cut',
"database", 'database',
"deaf", 'deaf',
"democrat", 'democrat',
"desktop", 'desktop',
"dharmachakra", 'dharmachakra',
"diagnoses", 'diagnoses',
"dice", 'dice',
"dice-d20", 'dice-d20',
"dice-d6", 'dice-d6',
"dice-five", 'dice-five',
"dice-four", 'dice-four',
"dice-one", 'dice-one',
"dice-six", 'dice-six',
"dice-three", 'dice-three',
"dice-two", 'dice-two',
"digital-tachograph", 'digital-tachograph',
"directions", 'directions',
"divide", 'divide',
"dizzy", 'dizzy',
"dna", 'dna',
"dog", 'dog',
"dollar-sign", 'dollar-sign',
"dolly", 'dolly',
"dolly-flatbed", 'dolly-flatbed',
"donate", 'donate',
"door-closed", 'door-closed',
"door-open", 'door-open',
"dot-circle", 'dot-circle',
"dove", 'dove',
"download", 'download',
"drafting-compass", 'drafting-compass',
"dragon", 'dragon',
"draw-polygon", 'draw-polygon',
"drum", 'drum',
"drum-steelpan", 'drum-steelpan',
"drumstick-bite", 'drumstick-bite',
"dumbbell", 'dumbbell',
"dumpster", 'dumpster',
"dumpster-fire", 'dumpster-fire',
"dungeon", 'dungeon',
"edit", 'edit',
"egg", 'egg',
"eject", 'eject',
"ellipsis-h", 'ellipsis-h',
"ellipsis-v", 'ellipsis-v',
"envelope", 'envelope',
"envelope-open", 'envelope-open',
"envelope-open-text", 'envelope-open-text',
"envelope-square", 'envelope-square',
"equals", 'equals',
"eraser", 'eraser',
"ethernet", 'ethernet',
"euro-sign", 'euro-sign',
"exchange-alt", 'exchange-alt',
"exclamation", 'exclamation',
"exclamation-circle", 'exclamation-circle',
"exclamation-triangle", 'exclamation-triangle',
"expand", 'expand',
"expand-alt", 'expand-alt',
"expand-arrows-alt", 'expand-arrows-alt',
"external-link-alt", 'external-link-alt',
"external-link-square-alt", 'external-link-square-alt',
"eye", 'eye',
"eye-dropper", 'eye-dropper',
"eye-slash", 'eye-slash',
"fan", 'fan',
"fast-backward", 'fast-backward',
"fast-forward", 'fast-forward',
"fax", 'fax',
"feather", 'feather',
"feather-alt", 'feather-alt',
"female", 'female',
"fighter-jet", 'fighter-jet',
"file", 'file',
"file-alt", 'file-alt',
"file-archive", 'file-archive',
"file-audio", 'file-audio',
"file-code", 'file-code',
"file-contract", 'file-contract',
"file-csv", 'file-csv',
"file-download", 'file-download',
"file-excel", 'file-excel',
"file-export", 'file-export',
"file-image", 'file-image',
"file-import", 'file-import',
"file-invoice", 'file-invoice',
"file-invoice-dollar", 'file-invoice-dollar',
"file-medical", 'file-medical',
"file-medical-alt", 'file-medical-alt',
"file-pdf", 'file-pdf',
"file-powerpoint", 'file-powerpoint',
"file-prescription", 'file-prescription',
"file-signature", 'file-signature',
"file-upload", 'file-upload',
"file-video", 'file-video',
"file-word", 'file-word',
"fill", 'fill',
"fill-drip", 'fill-drip',
"film", 'film',
"filter", 'filter',
"fingerprint", 'fingerprint',
"fire", 'fire',
"fire-alt", 'fire-alt',
"fire-extinguisher", 'fire-extinguisher',
"first-aid", 'first-aid',
"fish", 'fish',
"fist-raised", 'fist-raised',
"flag", 'flag',
"flag-checkered", 'flag-checkered',
"flag-usa", 'flag-usa',
"flask", 'flask',
"flushed", 'flushed',
"folder", 'folder',
"folder-minus", 'folder-minus',
"folder-open", 'folder-open',
"folder-plus", 'folder-plus',
"font", 'font',
"football-ball", 'football-ball',
"forward", 'forward',
"frog", 'frog',
"frown", 'frown',
"frown-open", 'frown-open',
"funnel-dollar", 'funnel-dollar',
"futbol", 'futbol',
"gamepad", 'gamepad',
"gas-pump", 'gas-pump',
"gavel", 'gavel',
"gem", 'gem',
"genderless", 'genderless',
"ghost", 'ghost',
"gift", 'gift',
"gifts", 'gifts',
"glass-cheers", 'glass-cheers',
"glass-martini", 'glass-martini',
"glass-martini-alt", 'glass-martini-alt',
"glass-whiskey", 'glass-whiskey',
"glasses", 'glasses',
"globe", 'globe',
"globe-africa", 'globe-africa',
"globe-americas", 'globe-americas',
"globe-asia", 'globe-asia',
"globe-europe", 'globe-europe',
"golf-ball", 'golf-ball',
"gopuram", 'gopuram',
"graduation-cap", 'graduation-cap',
"greater-than", 'greater-than',
"greater-than-equal", 'greater-than-equal',
"grimace", 'grimace',
"grin", 'grin',
"grin-alt", 'grin-alt',
"grin-beam", 'grin-beam',
"grin-beam-sweat", 'grin-beam-sweat',
"grin-hearts", 'grin-hearts',
"grin-squint", 'grin-squint',
"grin-squint-tears", 'grin-squint-tears',
"grin-stars", 'grin-stars',
"grin-tears", 'grin-tears',
"grin-tongue", 'grin-tongue',
"grin-tongue-squint", 'grin-tongue-squint',
"grin-tongue-wink", 'grin-tongue-wink',
"grin-wink", 'grin-wink',
"grip-horizontal", 'grip-horizontal',
"grip-lines", 'grip-lines',
"grip-lines-vertical", 'grip-lines-vertical',
"grip-vertical", 'grip-vertical',
"guitar", 'guitar',
"h-square", 'h-square',
"hamburger", 'hamburger',
"hammer", 'hammer',
"hamsa", 'hamsa',
"hand-holding", 'hand-holding',
"hand-holding-heart", 'hand-holding-heart',
"hand-holding-usd", 'hand-holding-usd',
"hand-lizard", 'hand-lizard',
"hand-middle-finger", 'hand-middle-finger',
"hand-paper", 'hand-paper',
"hand-peace", 'hand-peace',
"hand-point-down", 'hand-point-down',
"hand-point-left", 'hand-point-left',
"hand-point-right", 'hand-point-right',
"hand-point-up", 'hand-point-up',
"hand-pointer", 'hand-pointer',
"hand-rock", 'hand-rock',
"hand-scissors", 'hand-scissors',
"hand-spock", 'hand-spock',
"hands", 'hands',
"hands-helping", 'hands-helping',
"handshake", 'handshake',
"hanukiah", 'hanukiah',
"hard-hat", 'hard-hat',
"hashtag", 'hashtag',
"hat-cowboy", 'hat-cowboy',
"hat-cowboy-side", 'hat-cowboy-side',
"hat-wizard", 'hat-wizard',
"hdd", 'hdd',
"heading", 'heading',
"headphones", 'headphones',
"headphones-alt", 'headphones-alt',
"headset", 'headset',
"heart", 'heart',
"heart-broken", 'heart-broken',
"heartbeat", 'heartbeat',
"helicopter", 'helicopter',
"highlighter", 'highlighter',
"hiking", 'hiking',
"hippo", 'hippo',
"history", 'history',
"hockey-puck", 'hockey-puck',
"holly-berry", 'holly-berry',
"home", 'home',
"horse", 'horse',
"horse-head", 'horse-head',
"hospital", 'hospital',
"hospital-alt", 'hospital-alt',
"hospital-symbol", 'hospital-symbol',
"hot-tub", 'hot-tub',
"hotdog", 'hotdog',
"hotel", 'hotel',
"hourglass", 'hourglass',
"hourglass-end", 'hourglass-end',
"hourglass-half", 'hourglass-half',
"hourglass-start", 'hourglass-start',
"house-damage", 'house-damage',
"hryvnia", 'hryvnia',
"i-cursor", 'i-cursor',
"ice-cream", 'ice-cream',
"icicles", 'icicles',
"icons", 'icons',
"id-badge", 'id-badge',
"id-card", 'id-card',
"id-card-alt", 'id-card-alt',
"igloo", 'igloo',
"image", 'image',
"images", 'images',
"inbox", 'inbox',
"indent", 'indent',
"industry", 'industry',
"infinity", 'infinity',
"info", 'info',
"info-circle", 'info-circle',
"italic", 'italic',
"jedi", 'jedi',
"joint", 'joint',
"journal-whills", 'journal-whills',
"kaaba", 'kaaba',
"key", 'key',
"keyboard", 'keyboard',
"khanda", 'khanda',
"kiss", 'kiss',
"kiss-beam", 'kiss-beam',
"kiss-wink-heart", 'kiss-wink-heart',
"kiwi-bird", 'kiwi-bird',
"landmark", 'landmark',
"language", 'language',
"laptop", 'laptop',
"laptop-code", 'laptop-code',
"laptop-medical", 'laptop-medical',
"laugh", 'laugh',
"laugh-beam", 'laugh-beam',
"laugh-squint", 'laugh-squint',
"laugh-wink", 'laugh-wink',
"layer-group", 'layer-group',
"leaf", 'leaf',
"lemon", 'lemon',
"less-than", 'less-than',
"less-than-equal", 'less-than-equal',
"level-down-alt", 'level-down-alt',
"level-up-alt", 'level-up-alt',
"life-ring", 'life-ring',
"lightbulb", 'lightbulb',
"link", 'link',
"lira-sign", 'lira-sign',
"list", 'list',
"list-alt", 'list-alt',
"list-ol", 'list-ol',
"list-ul", 'list-ul',
"location-arrow", 'location-arrow',
"lock", 'lock',
"lock-open", 'lock-open',
"long-arrow-alt-down", 'long-arrow-alt-down',
"long-arrow-alt-left", 'long-arrow-alt-left',
"long-arrow-alt-right", 'long-arrow-alt-right',
"long-arrow-alt-up", 'long-arrow-alt-up',
"low-vision", 'low-vision',
"luggage-cart", 'luggage-cart',
"magic", 'magic',
"magnet", 'magnet',
"mail-bulk", 'mail-bulk',
"male", 'male',
"map", 'map',
"map-marked", 'map-marked',
"map-marked-alt", 'map-marked-alt',
"map-marker", 'map-marker',
"map-marker-alt", 'map-marker-alt',
"map-pin", 'map-pin',
"map-signs", 'map-signs',
"marker", 'marker',
"mars", 'mars',
"mars-double", 'mars-double',
"mars-stroke", 'mars-stroke',
"mars-stroke-h", 'mars-stroke-h',
"mars-stroke-v", 'mars-stroke-v',
"mask", 'mask',
"medal", 'medal',
"medkit", 'medkit',
"meh", 'meh',
"meh-blank", 'meh-blank',
"meh-rolling-eyes", 'meh-rolling-eyes',
"memory", 'memory',
"menorah", 'menorah',
"mercury", 'mercury',
"meteor", 'meteor',
"microchip", 'microchip',
"microphone", 'microphone',
"microphone-alt", 'microphone-alt',
"microphone-alt-slash", 'microphone-alt-slash',
"microphone-slash", 'microphone-slash',
"microscope", 'microscope',
"minus", 'minus',
"minus-circle", 'minus-circle',
"minus-square", 'minus-square',
"mitten", 'mitten',
"mobile", 'mobile',
"mobile-alt", 'mobile-alt',
"money-bill", 'money-bill',
"money-bill-alt", 'money-bill-alt',
"money-bill-wave", 'money-bill-wave',
"money-bill-wave-alt", 'money-bill-wave-alt',
"money-check", 'money-check',
"money-check-alt", 'money-check-alt',
"monument", 'monument',
"moon", 'moon',
"mortar-pestle", 'mortar-pestle',
"mosque", 'mosque',
"motorcycle", 'motorcycle',
"mountain", 'mountain',
"mouse", 'mouse',
"mouse-pointer", 'mouse-pointer',
"mug-hot", 'mug-hot',
"music", 'music',
"network-wired", 'network-wired',
"neuter", 'neuter',
"newspaper", 'newspaper',
"not-equal", 'not-equal',
"notes-medical", 'notes-medical',
"object-group", 'object-group',
"object-ungroup", 'object-ungroup',
"oil-can", 'oil-can',
"om", 'om',
"otter", 'otter',
"outdent", 'outdent',
"pager", 'pager',
"paint-brush", 'paint-brush',
"paint-roller", 'paint-roller',
"palette", 'palette',
"pallet", 'pallet',
"paper-plane", 'paper-plane',
"paperclip", 'paperclip',
"parachute-box", 'parachute-box',
"paragraph", 'paragraph',
"parking", 'parking',
"passport", 'passport',
"pastafarianism", 'pastafarianism',
"paste", 'paste',
"pause", 'pause',
"pause-circle", 'pause-circle',
"paw", 'paw',
"peace", 'peace',
"pen", 'pen',
"pen-alt", 'pen-alt',
"pen-fancy", 'pen-fancy',
"pen-nib", 'pen-nib',
"pen-square", 'pen-square',
"pencil-alt", 'pencil-alt',
"pencil-ruler", 'pencil-ruler',
"people-carry", 'people-carry',
"pepper-hot", 'pepper-hot',
"percent", 'percent',
"percentage", 'percentage',
"person-booth", 'person-booth',
"phone", 'phone',
"phone-alt", 'phone-alt',
"phone-slash", 'phone-slash',
"phone-square", 'phone-square',
"phone-square-alt", 'phone-square-alt',
"phone-volume", 'phone-volume',
"photo-video", 'photo-video',
"piggy-bank", 'piggy-bank',
"pills", 'pills',
"pizza-slice", 'pizza-slice',
"place-of-worship", 'place-of-worship',
"plane", 'plane',
"plane-arrival", 'plane-arrival',
"plane-departure", 'plane-departure',
"play", 'play',
"play-circle", 'play-circle',
"plug", 'plug',
"plus", 'plus',
"plus-circle", 'plus-circle',
"plus-square", 'plus-square',
"podcast", 'podcast',
"poll", 'poll',
"poll-h", 'poll-h',
"poo", 'poo',
"poo-storm", 'poo-storm',
"poop", 'poop',
"portrait", 'portrait',
"pound-sign", 'pound-sign',
"power-off", 'power-off',
"pray", 'pray',
"praying-hands", 'praying-hands',
"prescription", 'prescription',
"prescription-bottle", 'prescription-bottle',
"prescription-bottle-alt", 'prescription-bottle-alt',
"print", 'print',
"procedures", 'procedures',
"project-diagram", 'project-diagram',
"puzzle-piece", 'puzzle-piece',
"qrcode", 'qrcode',
"question", 'question',
"question-circle", 'question-circle',
"quidditch", 'quidditch',
"quote-left", 'quote-left',
"quote-right", 'quote-right',
"quran", 'quran',
"radiation", 'radiation',
"radiation-alt", 'radiation-alt',
"rainbow", 'rainbow',
"random", 'random',
"receipt", 'receipt',
"record-vinyl", 'record-vinyl',
"recycle", 'recycle',
"redo", 'redo',
"redo-alt", 'redo-alt',
"registered", 'registered',
"remove-format", 'remove-format',
"reply", 'reply',
"reply-all", 'reply-all',
"republican", 'republican',
"restroom", 'restroom',
"retweet", 'retweet',
"ribbon", 'ribbon',
"ring", 'ring',
"road", 'road',
"robot", 'robot',
"rocket", 'rocket',
"route", 'route',
"rss", 'rss',
"rss-square", 'rss-square',
"ruble-sign", 'ruble-sign',
"ruler", 'ruler',
"ruler-combined", 'ruler-combined',
"ruler-horizontal", 'ruler-horizontal',
"ruler-vertical", 'ruler-vertical',
"running", 'running',
"rupee-sign", 'rupee-sign',
"sad-cry", 'sad-cry',
"sad-tear", 'sad-tear',
"satellite", 'satellite',
"satellite-dish", 'satellite-dish',
"save", 'save',
"school", 'school',
"screwdriver", 'screwdriver',
"scroll", 'scroll',
"sd-card", 'sd-card',
"search", 'search',
"search-dollar", 'search-dollar',
"search-location", 'search-location',
"search-minus", 'search-minus',
"search-plus", 'search-plus',
"seedling", 'seedling',
"server", 'server',
"shapes", 'shapes',
"share", 'share',
"share-alt", 'share-alt',
"share-alt-square", 'share-alt-square',
"share-square", 'share-square',
"shekel-sign", 'shekel-sign',
"shield-alt", 'shield-alt',
"ship", 'ship',
"shipping-fast", 'shipping-fast',
"shoe-prints", 'shoe-prints',
"shopping-bag", 'shopping-bag',
"shopping-basket", 'shopping-basket',
"shopping-cart", 'shopping-cart',
"shower", 'shower',
"shuttle-van", 'shuttle-van',
"sign", 'sign',
"sign-in-alt", 'sign-in-alt',
"sign-language", 'sign-language',
"sign-out-alt", 'sign-out-alt',
"signal", 'signal',
"signature", 'signature',
"sim-card", 'sim-card',
"sitemap", 'sitemap',
"skating", 'skating',
"skiing", 'skiing',
"skiing-nordic", 'skiing-nordic',
"skull", 'skull',
"skull-crossbones", 'skull-crossbones',
"slash", 'slash',
"sleigh", 'sleigh',
"sliders-h", 'sliders-h',
"smile", 'smile',
"smile-beam", 'smile-beam',
"smile-wink", 'smile-wink',
"smog", 'smog',
"smoking", 'smoking',
"smoking-ban", 'smoking-ban',
"sms", 'sms',
"snowboarding", 'snowboarding',
"snowflake", 'snowflake',
"snowman", 'snowman',
"snowplow", 'snowplow',
"socks", 'socks',
"solar-panel", 'solar-panel',
"sort", 'sort',
"sort-alpha-down", 'sort-alpha-down',
"sort-alpha-down-alt", 'sort-alpha-down-alt',
"sort-alpha-up", 'sort-alpha-up',
"sort-alpha-up-alt", 'sort-alpha-up-alt',
"sort-amount-down", 'sort-amount-down',
"sort-amount-down-alt", 'sort-amount-down-alt',
"sort-amount-up", 'sort-amount-up',
"sort-amount-up-alt", 'sort-amount-up-alt',
"sort-down", 'sort-down',
"sort-numeric-down", 'sort-numeric-down',
"sort-numeric-down-alt", 'sort-numeric-down-alt',
"sort-numeric-up", 'sort-numeric-up',
"sort-numeric-up-alt", 'sort-numeric-up-alt',
"sort-up", 'sort-up',
"spa", 'spa',
"space-shuttle", 'space-shuttle',
"spell-check", 'spell-check',
"spider", 'spider',
"spinner", 'spinner',
"splotch", 'splotch',
"spray-can", 'spray-can',
"square", 'square',
"square-full", 'square-full',
"square-root-alt", 'square-root-alt',
"stamp", 'stamp',
"star", 'star',
"star-and-crescent", 'star-and-crescent',
"star-half", 'star-half',
"star-half-alt", 'star-half-alt',
"star-of-david", 'star-of-david',
"star-of-life", 'star-of-life',
"step-backward", 'step-backward',
"step-forward", 'step-forward',
"stethoscope", 'stethoscope',
"sticky-note", 'sticky-note',
"stop", 'stop',
"stop-circle", 'stop-circle',
"stopwatch", 'stopwatch',
"store", 'store',
"store-alt", 'store-alt',
"stream", 'stream',
"street-view", 'street-view',
"strikethrough", 'strikethrough',
"stroopwafel", 'stroopwafel',
"subscript", 'subscript',
"subway", 'subway',
"suitcase", 'suitcase',
"suitcase-rolling", 'suitcase-rolling',
"sun", 'sun',
"superscript", 'superscript',
"surprise", 'surprise',
"swatchbook", 'swatchbook',
"swimmer", 'swimmer',
"swimming-pool", 'swimming-pool',
"synagogue", 'synagogue',
"sync", 'sync',
"sync-alt", 'sync-alt',
"syringe", 'syringe',
"table", 'table',
"table-tennis", 'table-tennis',
"tablet", 'tablet',
"tablet-alt", 'tablet-alt',
"tablets", 'tablets',
"tachometer-alt", 'tachometer-alt',
"tag", 'tag',
"tags", 'tags',
"tape", 'tape',
"tasks", 'tasks',
"taxi", 'taxi',
"teeth", 'teeth',
"teeth-open", 'teeth-open',
"temperature-high", 'temperature-high',
"temperature-low", 'temperature-low',
"tenge", 'tenge',
"terminal", 'terminal',
"text-height", 'text-height',
"text-width", 'text-width',
"th", 'th',
"th-large", 'th-large',
"th-list", 'th-list',
"theater-masks", 'theater-masks',
"thermometer", 'thermometer',
"thermometer-empty", 'thermometer-empty',
"thermometer-full", 'thermometer-full',
"thermometer-half", 'thermometer-half',
"thermometer-quarter", 'thermometer-quarter',
"thermometer-three-quarters", 'thermometer-three-quarters',
"thumbs-down", 'thumbs-down',
"thumbs-up", 'thumbs-up',
"thumbtack", 'thumbtack',
"ticket-alt", 'ticket-alt',
"times", 'times',
"times-circle", 'times-circle',
"tint", 'tint',
"tint-slash", 'tint-slash',
"tired", 'tired',
"toggle-off", 'toggle-off',
"toggle-on", 'toggle-on',
"toilet", 'toilet',
"toilet-paper", 'toilet-paper',
"toolbox", 'toolbox',
"tools", 'tools',
"tooth", 'tooth',
"torah", 'torah',
"torii-gate", 'torii-gate',
"tractor", 'tractor',
"trademark", 'trademark',
"traffic-light", 'traffic-light',
"trailer", 'trailer',
"train", 'train',
"tram", 'tram',
"transgender", 'transgender',
"transgender-alt", 'transgender-alt',
"trash", 'trash',
"trash-alt", 'trash-alt',
"trash-restore", 'trash-restore',
"trash-restore-alt", 'trash-restore-alt',
"tree", 'tree',
"trophy", 'trophy',
"truck", 'truck',
"truck-loading", 'truck-loading',
"truck-monster", 'truck-monster',
"truck-moving", 'truck-moving',
"truck-pickup", 'truck-pickup',
"tshirt", 'tshirt',
"tty", 'tty',
"tv", 'tv',
"umbrella", 'umbrella',
"umbrella-beach", 'umbrella-beach',
"underline", 'underline',
"undo", 'undo',
"undo-alt", 'undo-alt',
"universal-access", 'universal-access',
"university", 'university',
"unlink", 'unlink',
"unlock", 'unlock',
"unlock-alt", 'unlock-alt',
"upload", 'upload',
"user", 'user',
"user-alt", 'user-alt',
"user-alt-slash", 'user-alt-slash',
"user-astronaut", 'user-astronaut',
"user-check", 'user-check',
"user-circle", 'user-circle',
"user-clock", 'user-clock',
"user-cog", 'user-cog',
"user-edit", 'user-edit',
"user-friends", 'user-friends',
"user-graduate", 'user-graduate',
"user-injured", 'user-injured',
"user-lock", 'user-lock',
"user-md", 'user-md',
"user-minus", 'user-minus',
"user-ninja", 'user-ninja',
"user-nurse", 'user-nurse',
"user-plus", 'user-plus',
"user-secret", 'user-secret',
"user-shield", 'user-shield',
"user-slash", 'user-slash',
"user-tag", 'user-tag',
"user-tie", 'user-tie',
"user-times", 'user-times',
"users", 'users',
"users-cog", 'users-cog',
"utensil-spoon", 'utensil-spoon',
"utensils", 'utensils',
"vector-square", 'vector-square',
"venus", 'venus',
"venus-double", 'venus-double',
"venus-mars", 'venus-mars',
"vial", 'vial',
"vials", 'vials',
"video", 'video',
"video-slash", 'video-slash',
"vihara", 'vihara',
"voicemail", 'voicemail',
"volleyball-ball", 'volleyball-ball',
"volume-down", 'volume-down',
"volume-mute", 'volume-mute',
"volume-off", 'volume-off',
"volume-up", 'volume-up',
"vote-yea", 'vote-yea',
"vr-cardboard", 'vr-cardboard',
"walking", 'walking',
"wallet", 'wallet',
"warehouse", 'warehouse',
"water", 'water',
"wave-square", 'wave-square',
"weight", 'weight',
"weight-hanging", 'weight-hanging',
"wheelchair", 'wheelchair',
"wifi", 'wifi',
"wind", 'wind',
"window-close", 'window-close',
"window-maximize", 'window-maximize',
"window-minimize", 'window-minimize',
"window-restore", 'window-restore',
"wine-bottle", 'wine-bottle',
"wine-glass", 'wine-glass',
"wine-glass-alt", 'wine-glass-alt',
"won-sign", 'won-sign',
"wrench", 'wrench',
"x-ray", 'x-ray',
"yen-sign", 'yen-sign',
"yin-yang", 'yin-yang',
]; ]
module.exports = [ module.exports = [
{ {
url: "/icon/getList", url: '/icon/getList',
type: "post", type: 'post',
response(config) { response(config) {
const { title, pageNo = 1, pageSize = 72 } = config.body; const { title, pageNo = 1, pageSize = 72 } = config.body
let mockList = data.filter((item) => { let mockList = data.filter((item) => {
if (title && item.indexOf(title) < 0) return false; if (title && item.indexOf(title) < 0) return false
return true; return true
}); })
const pageList = mockList.filter( const pageList = mockList.filter(
(item, index) => (item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1) index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
); )
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: mockList.length, totalCount: mockList.length,
data: pageList, data: pageList,
}; }
}, },
}, },
]; ]
module.exports = [ module.exports = [
{ {
url: "/menuManagement/getTree", url: '/menuManagement/getTree',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: 999, totalCount: 999,
data: [ data: [
{ {
id: "root", id: 'root',
label: "全部角色", label: '全部角色',
children: [ children: [
{ {
id: "@id", id: '@id',
permission: "admin", permission: 'admin',
label: "admin角色", label: 'admin角色',
}, },
{ {
id: "@id", id: '@id',
permission: "editor", permission: 'editor',
label: "editor角色", label: 'editor角色',
}, },
], ],
}, },
], ],
}; }
}, },
}, },
{ {
url: "/menuManagement/doEdit", url: '/menuManagement/doEdit',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟保存成功", msg: '模拟保存成功',
}; }
}, },
}, },
{ {
url: "/menuManagement/doDelete", url: '/menuManagement/doDelete',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟删除成功", msg: '模拟删除成功',
}; }
}, },
}, },
]; ]
const data = [ const data = [
{ {
title: title:
"鸣谢:尤雨溪、蒋豪群、element-ui、唐金州、花裤衩、贤心、iView、uView的开源项目给我带来的很多的灵感,弱小的人才习惯嘲讽与否定,内心强大的人从不吝啬赞美与鼓励,人生在世,得到每个人的认可几乎是痴心妄想,我也只是一条略懂前端的咸鱼,可我仍一直怀揣着改变世界的梦想,希望我们每个人,不管过程怎样,结局都是美好的。", '鸣谢:尤雨溪、蒋豪群、element-ui、唐金州、花裤衩、贤心、iView、uView的开源项目给我带来的很多的灵感,弱小的人才习惯嘲讽与否定,内心强大的人从不吝啬赞美与鼓励,人生在世,得到每个人的认可几乎是痴心妄想,我也只是一条略懂前端的咸鱼,可我仍一直怀揣着改变世界的梦想,希望我们每个人,不管过程怎样,结局都是美好的。',
closable: false, closable: false,
type: "success", type: 'success',
}, },
{ {
title: title:
"作者寄语:感谢Star,感恩相遇,愿世间美好与我们环环相扣,加油!屏幕前的我们,打破桎梏,坚守初心。其实人生改变命运的机会并没有太多,我们并不是不优秀,我们也并不是一无是处,我们也希望驻足山巅被众人仰望,也许我们缺少的只是一个机会,缺少的只是生命中的导师,我希望这个框架帮助到更多的人,希望有一天,我们面试的时候不再胆怯,希望有一天别人看到的不仅仅是你的努力,还有你的功成名就,出人头地。", '作者寄语:感谢Star,感恩相遇,愿世间美好与我们环环相扣,加油!屏幕前的我们,打破桎梏,坚守初心。其实人生改变命运的机会并没有太多,我们并不是不优秀,我们也并不是一无是处,我们也希望驻足山巅被众人仰望,也许我们缺少的只是一个机会,缺少的只是生命中的导师,我希望这个框架帮助到更多的人,希望有一天,我们面试的时候不再胆怯,希望有一天别人看到的不仅仅是你的努力,还有你的功成名就,出人头地。',
closable: false, closable: false,
type: "warning", type: 'warning',
}, },
{ {
title: title:
"随笔:我一直在寻找开源的真谛,我一直再想什么是开源,我一开始觉得免费就是开源,好像又不是。我理解的开源是:你也开源,我也开源,大家一起贡献,相互帮助。我最担心的事情是:我一个小人物,去伺候一众的伸手党,我想,这不是开源该有的氛围。我还太年轻,不懂什么是格局,我只知道,无私的帮助他人,能给我带来快乐,却不能给我带来收入,当然,有时候,快乐对我来说就已经足够了。可惜我是一个人,没有精力帮助到每一个人,可惜这个世界需要赚钱,才能过上平凡的生活,可惜了我的梦想,这个物欲横流的时代,理想主义的我们,即使内心坚决如铁,也似乎寸步难行。", '随笔:我一直在寻找开源的真谛,我一直再想什么是开源,我一开始觉得免费就是开源,好像又不是。我理解的开源是:你也开源,我也开源,大家一起贡献,相互帮助。我最担心的事情是:我一个小人物,去伺候一众的伸手党,我想,这不是开源该有的氛围。我还太年轻,不懂什么是格局,我只知道,无私的帮助他人,能给我带来快乐,却不能给我带来收入,当然,有时候,快乐对我来说就已经足够了。可惜我是一个人,没有精力帮助到每一个人,可惜这个世界需要赚钱,才能过上平凡的生活,可惜了我的梦想,这个物欲横流的时代,理想主义的我们,即使内心坚决如铁,也似乎寸步难行。',
closable: false, closable: false,
type: "success", type: 'success',
}, },
]; ]
module.exports = [ module.exports = [
{ {
url: "/notice/getList", url: '/notice/getList',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
data, data,
}; }
}, },
}, },
]; ]
const { mock } = require("mockjs"); const { mock } = require('mockjs')
module.exports = [ module.exports = [
{ {
url: "/personalCenter/getList", url: '/personalCenter/getList',
type: "post", type: 'post',
response(config) { response(config) {
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: 999, totalCount: 999,
data: mock({ data: mock({
"data|10": [ 'data|10': [
{ {
id: "@id", id: '@id',
}, },
], ],
}).data, }).data,
}; }
}, },
}, },
{ {
url: "/personalCenter/doEdit", url: '/personalCenter/doEdit',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟保存成功", msg: '模拟保存成功',
}; }
}, },
}, },
{ {
url: "/personalCenter/doDelete", url: '/personalCenter/doDelete',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟删除成功", msg: '模拟删除成功',
}; }
}, },
}, },
]; ]
const data = [ const data = [
"24-hours-fill", '24-hours-fill',
"24-hours-line", '24-hours-line',
"4k-fill", '4k-fill',
"4k-line", '4k-line',
"a-b", 'a-b',
"account-box-fill", 'account-box-fill',
"account-box-line", 'account-box-line',
"account-circle-fill", 'account-circle-fill',
"account-circle-line", 'account-circle-line',
"account-pin-box-fill", 'account-pin-box-fill',
"account-pin-box-line", 'account-pin-box-line',
"account-pin-circle-fill", 'account-pin-circle-fill',
"account-pin-circle-line", 'account-pin-circle-line',
"add-box-fill", 'add-box-fill',
"add-box-line", 'add-box-line',
"add-circle-fill", 'add-circle-fill',
"add-circle-line", 'add-circle-line',
"add-fill", 'add-fill',
"add-line", 'add-line',
"admin-fill", 'admin-fill',
"admin-line", 'admin-line',
"airplay-fill", 'airplay-fill',
"airplay-line", 'airplay-line',
"alarm-fill", 'alarm-fill',
"alarm-line", 'alarm-line',
"alarm-warning-fill", 'alarm-warning-fill',
"alarm-warning-line", 'alarm-warning-line',
"album-fill", 'album-fill',
"album-line", 'album-line',
"alert-fill", 'alert-fill',
"alert-line", 'alert-line',
"aliens-fill", 'aliens-fill',
"aliens-line", 'aliens-line',
"align-bottom", 'align-bottom',
"align-center", 'align-center',
"align-justify", 'align-justify',
"align-left", 'align-left',
"align-right", 'align-right',
"align-top", 'align-top',
"align-vertically", 'align-vertically',
"alipay-fill", 'alipay-fill',
"alipay-line", 'alipay-line',
"amazon-fill", 'amazon-fill',
"amazon-line", 'amazon-line',
"anchor-fill", 'anchor-fill',
"anchor-line", 'anchor-line',
"ancient-gate-fill", 'ancient-gate-fill',
"ancient-gate-line", 'ancient-gate-line',
"ancient-pavilion-fill", 'ancient-pavilion-fill',
"ancient-pavilion-line", 'ancient-pavilion-line',
"android-fill", 'android-fill',
"android-line", 'android-line',
"angularjs-fill", 'angularjs-fill',
"angularjs-line", 'angularjs-line',
"anticlockwise-2-fill", 'anticlockwise-2-fill',
"anticlockwise-2-line", 'anticlockwise-2-line',
"anticlockwise-fill", 'anticlockwise-fill',
"anticlockwise-line", 'anticlockwise-line',
"app-store-fill", 'app-store-fill',
"app-store-line", 'app-store-line',
"apple-fill", 'apple-fill',
"apple-line", 'apple-line',
"apps-2-fill", 'apps-2-fill',
"apps-2-line", 'apps-2-line',
"apps-fill", 'apps-fill',
"apps-line", 'apps-line',
"archive-drawer-fill", 'archive-drawer-fill',
"archive-drawer-line", 'archive-drawer-line',
"archive-fill", 'archive-fill',
"archive-line", 'archive-line',
"arrow-down-circle-fill", 'arrow-down-circle-fill',
"arrow-down-circle-line", 'arrow-down-circle-line',
"arrow-down-fill", 'arrow-down-fill',
"arrow-down-line", 'arrow-down-line',
"arrow-down-s-fill", 'arrow-down-s-fill',
"arrow-down-s-line", 'arrow-down-s-line',
"arrow-drop-down-fill", 'arrow-drop-down-fill',
"arrow-drop-down-line", 'arrow-drop-down-line',
"arrow-drop-left-fill", 'arrow-drop-left-fill',
"arrow-drop-left-line", 'arrow-drop-left-line',
"arrow-drop-right-fill", 'arrow-drop-right-fill',
"arrow-drop-right-line", 'arrow-drop-right-line',
"arrow-drop-up-fill", 'arrow-drop-up-fill',
"arrow-drop-up-line", 'arrow-drop-up-line',
"arrow-go-back-fill", 'arrow-go-back-fill',
"arrow-go-back-line", 'arrow-go-back-line',
"arrow-go-forward-fill", 'arrow-go-forward-fill',
"arrow-go-forward-line", 'arrow-go-forward-line',
"arrow-left-circle-fill", 'arrow-left-circle-fill',
"arrow-left-circle-line", 'arrow-left-circle-line',
"arrow-left-down-fill", 'arrow-left-down-fill',
"arrow-left-down-line", 'arrow-left-down-line',
"arrow-left-fill", 'arrow-left-fill',
"arrow-left-line", 'arrow-left-line',
"arrow-left-right-fill", 'arrow-left-right-fill',
"arrow-left-right-line", 'arrow-left-right-line',
"arrow-left-s-fill", 'arrow-left-s-fill',
"arrow-left-s-line", 'arrow-left-s-line',
"arrow-left-up-fill", 'arrow-left-up-fill',
"arrow-left-up-line", 'arrow-left-up-line',
"arrow-right-circle-fill", 'arrow-right-circle-fill',
"arrow-right-circle-line", 'arrow-right-circle-line',
"arrow-right-down-fill", 'arrow-right-down-fill',
"arrow-right-down-line", 'arrow-right-down-line',
"arrow-right-fill", 'arrow-right-fill',
"arrow-right-line", 'arrow-right-line',
"arrow-right-s-fill", 'arrow-right-s-fill',
"arrow-right-s-line", 'arrow-right-s-line',
"arrow-right-up-fill", 'arrow-right-up-fill',
"arrow-right-up-line", 'arrow-right-up-line',
"arrow-up-circle-fill", 'arrow-up-circle-fill',
"arrow-up-circle-line", 'arrow-up-circle-line',
"arrow-up-down-fill", 'arrow-up-down-fill',
"arrow-up-down-line", 'arrow-up-down-line',
"arrow-up-fill", 'arrow-up-fill',
"arrow-up-line", 'arrow-up-line',
"arrow-up-s-fill", 'arrow-up-s-fill',
"arrow-up-s-line", 'arrow-up-s-line',
"artboard-2-fill", 'artboard-2-fill',
"artboard-2-line", 'artboard-2-line',
"artboard-fill", 'artboard-fill',
"artboard-line", 'artboard-line',
"article-fill", 'article-fill',
"article-line", 'article-line',
"aspect-ratio-fill", 'aspect-ratio-fill',
"aspect-ratio-line", 'aspect-ratio-line',
"asterisk", 'asterisk',
"at-fill", 'at-fill',
"at-line", 'at-line',
"attachment-2", 'attachment-2',
"attachment-fill", 'attachment-fill',
"attachment-line", 'attachment-line',
"auction-fill", 'auction-fill',
"auction-line", 'auction-line',
"award-fill", 'award-fill',
"award-line", 'award-line',
"baidu-fill", 'baidu-fill',
"baidu-line", 'baidu-line',
"ball-pen-fill", 'ball-pen-fill',
"ball-pen-line", 'ball-pen-line',
"bank-card-2-fill", 'bank-card-2-fill',
"bank-card-2-line", 'bank-card-2-line',
"bank-card-fill", 'bank-card-fill',
"bank-card-line", 'bank-card-line',
"bank-fill", 'bank-fill',
"bank-line", 'bank-line',
"bar-chart-2-fill", 'bar-chart-2-fill',
"bar-chart-2-line", 'bar-chart-2-line',
"bar-chart-box-fill", 'bar-chart-box-fill',
"bar-chart-box-line", 'bar-chart-box-line',
"bar-chart-fill", 'bar-chart-fill',
"bar-chart-grouped-fill", 'bar-chart-grouped-fill',
"bar-chart-grouped-line", 'bar-chart-grouped-line',
"bar-chart-horizontal-fill", 'bar-chart-horizontal-fill',
"bar-chart-horizontal-line", 'bar-chart-horizontal-line',
"bar-chart-line", 'bar-chart-line',
"barcode-box-fill", 'barcode-box-fill',
"barcode-box-line", 'barcode-box-line',
"barcode-fill", 'barcode-fill',
"barcode-line", 'barcode-line',
"barricade-fill", 'barricade-fill',
"barricade-line", 'barricade-line',
"base-station-fill", 'base-station-fill',
"base-station-line", 'base-station-line',
"basketball-fill", 'basketball-fill',
"basketball-line", 'basketball-line',
"battery-2-charge-fill", 'battery-2-charge-fill',
"battery-2-charge-line", 'battery-2-charge-line',
"battery-2-fill", 'battery-2-fill',
"battery-2-line", 'battery-2-line',
"battery-charge-fill", 'battery-charge-fill',
"battery-charge-line", 'battery-charge-line',
"battery-fill", 'battery-fill',
"battery-line", 'battery-line',
"battery-low-fill", 'battery-low-fill',
"battery-low-line", 'battery-low-line',
"battery-saver-fill", 'battery-saver-fill',
"battery-saver-line", 'battery-saver-line',
"battery-share-fill", 'battery-share-fill',
"battery-share-line", 'battery-share-line',
"bear-smile-fill", 'bear-smile-fill',
"bear-smile-line", 'bear-smile-line',
"behance-fill", 'behance-fill',
"behance-line", 'behance-line',
"bell-fill", 'bell-fill',
"bell-line", 'bell-line',
"bike-fill", 'bike-fill',
"bike-line", 'bike-line',
"bilibili-fill", 'bilibili-fill',
"bilibili-line", 'bilibili-line',
"bill-fill", 'bill-fill',
"bill-line", 'bill-line',
"billiards-fill", 'billiards-fill',
"billiards-line", 'billiards-line',
"bit-coin-fill", 'bit-coin-fill',
"bit-coin-line", 'bit-coin-line',
"blaze-fill", 'blaze-fill',
"blaze-line", 'blaze-line',
"bluetooth-connect-fill", 'bluetooth-connect-fill',
"bluetooth-connect-line", 'bluetooth-connect-line',
"bluetooth-fill", 'bluetooth-fill',
"bluetooth-line", 'bluetooth-line',
"blur-off-fill", 'blur-off-fill',
"blur-off-line", 'blur-off-line',
"body-scan-fill", 'body-scan-fill',
"body-scan-line", 'body-scan-line',
"bold", 'bold',
"book-2-fill", 'book-2-fill',
"book-2-line", 'book-2-line',
"book-3-fill", 'book-3-fill',
"book-3-line", 'book-3-line',
"book-fill", 'book-fill',
"book-line", 'book-line',
"book-mark-fill", 'book-mark-fill',
"book-mark-line", 'book-mark-line',
"book-open-fill", 'book-open-fill',
"book-open-line", 'book-open-line',
"book-read-fill", 'book-read-fill',
"book-read-line", 'book-read-line',
"booklet-fill", 'booklet-fill',
"booklet-line", 'booklet-line',
"bookmark-2-fill", 'bookmark-2-fill',
"bookmark-2-line", 'bookmark-2-line',
"bookmark-3-fill", 'bookmark-3-fill',
"bookmark-3-line", 'bookmark-3-line',
"bookmark-fill", 'bookmark-fill',
"bookmark-line", 'bookmark-line',
"boxing-fill", 'boxing-fill',
"boxing-line", 'boxing-line',
"braces-fill", 'braces-fill',
"braces-line", 'braces-line',
"brackets-fill", 'brackets-fill',
"brackets-line", 'brackets-line',
"briefcase-2-fill", 'briefcase-2-fill',
"briefcase-2-line", 'briefcase-2-line',
"briefcase-3-fill", 'briefcase-3-fill',
"briefcase-3-line", 'briefcase-3-line',
"briefcase-4-fill", 'briefcase-4-fill',
"briefcase-4-line", 'briefcase-4-line',
"briefcase-5-fill", 'briefcase-5-fill',
"briefcase-5-line", 'briefcase-5-line',
"briefcase-fill", 'briefcase-fill',
"briefcase-line", 'briefcase-line',
"bring-forward", 'bring-forward',
"bring-to-front", 'bring-to-front',
"broadcast-fill", 'broadcast-fill',
"broadcast-line", 'broadcast-line',
"brush-2-fill", 'brush-2-fill',
"brush-2-line", 'brush-2-line',
"brush-3-fill", 'brush-3-fill',
"brush-3-line", 'brush-3-line',
"brush-4-fill", 'brush-4-fill',
"brush-4-line", 'brush-4-line',
"brush-fill", 'brush-fill',
"brush-line", 'brush-line',
"bubble-chart-fill", 'bubble-chart-fill',
"bubble-chart-line", 'bubble-chart-line',
"bug-2-fill", 'bug-2-fill',
"bug-2-line", 'bug-2-line',
"bug-fill", 'bug-fill',
"bug-line", 'bug-line',
"building-2-fill", 'building-2-fill',
"building-2-line", 'building-2-line',
"building-3-fill", 'building-3-fill',
"building-3-line", 'building-3-line',
"building-4-fill", 'building-4-fill',
"building-4-line", 'building-4-line',
"building-fill", 'building-fill',
"building-line", 'building-line',
"bus-2-fill", 'bus-2-fill',
"bus-2-line", 'bus-2-line',
"bus-fill", 'bus-fill',
"bus-line", 'bus-line',
"bus-wifi-fill", 'bus-wifi-fill',
"bus-wifi-line", 'bus-wifi-line',
"cactus-fill", 'cactus-fill',
"cactus-line", 'cactus-line',
"cake-2-fill", 'cake-2-fill',
"cake-2-line", 'cake-2-line',
"cake-3-fill", 'cake-3-fill',
"cake-3-line", 'cake-3-line',
"cake-fill", 'cake-fill',
"cake-line", 'cake-line',
"calculator-fill", 'calculator-fill',
"calculator-line", 'calculator-line',
"calendar-2-fill", 'calendar-2-fill',
"calendar-2-line", 'calendar-2-line',
"calendar-check-fill", 'calendar-check-fill',
"calendar-check-line", 'calendar-check-line',
"calendar-event-fill", 'calendar-event-fill',
"calendar-event-line", 'calendar-event-line',
"calendar-fill", 'calendar-fill',
"calendar-line", 'calendar-line',
"calendar-todo-fill", 'calendar-todo-fill',
"calendar-todo-line", 'calendar-todo-line',
"camera-2-fill", 'camera-2-fill',
"camera-2-line", 'camera-2-line',
"camera-3-fill", 'camera-3-fill',
"camera-3-line", 'camera-3-line',
"camera-fill", 'camera-fill',
"camera-lens-fill", 'camera-lens-fill',
"camera-lens-line", 'camera-lens-line',
"camera-line", 'camera-line',
"camera-off-fill", 'camera-off-fill',
"camera-off-line", 'camera-off-line',
"camera-switch-fill", 'camera-switch-fill',
"camera-switch-line", 'camera-switch-line',
"capsule-fill", 'capsule-fill',
"capsule-line", 'capsule-line',
"car-fill", 'car-fill',
"car-line", 'car-line',
"car-washing-fill", 'car-washing-fill',
"car-washing-line", 'car-washing-line',
"caravan-fill", 'caravan-fill',
"caravan-line", 'caravan-line',
"cast-fill", 'cast-fill',
"cast-line", 'cast-line',
"cellphone-fill", 'cellphone-fill',
"cellphone-line", 'cellphone-line',
"celsius-fill", 'celsius-fill',
"celsius-line", 'celsius-line',
"centos-fill", 'centos-fill',
"centos-line", 'centos-line',
"character-recognition-fill", 'character-recognition-fill',
"character-recognition-line", 'character-recognition-line',
"charging-pile-2-fill", 'charging-pile-2-fill',
"charging-pile-2-line", 'charging-pile-2-line',
"charging-pile-fill", 'charging-pile-fill',
"charging-pile-line", 'charging-pile-line',
"chat-1-fill", 'chat-1-fill',
"chat-1-line", 'chat-1-line',
"chat-2-fill", 'chat-2-fill',
"chat-2-line", 'chat-2-line',
"chat-3-fill", 'chat-3-fill',
"chat-3-line", 'chat-3-line',
"chat-4-fill", 'chat-4-fill',
"chat-4-line", 'chat-4-line',
"chat-check-fill", 'chat-check-fill',
"chat-check-line", 'chat-check-line',
"chat-delete-fill", 'chat-delete-fill',
"chat-delete-line", 'chat-delete-line',
"chat-download-fill", 'chat-download-fill',
"chat-download-line", 'chat-download-line',
"chat-follow-up-fill", 'chat-follow-up-fill',
"chat-follow-up-line", 'chat-follow-up-line',
"chat-forward-fill", 'chat-forward-fill',
"chat-forward-line", 'chat-forward-line',
"chat-heart-fill", 'chat-heart-fill',
"chat-heart-line", 'chat-heart-line',
"chat-history-fill", 'chat-history-fill',
"chat-history-line", 'chat-history-line',
"chat-new-fill", 'chat-new-fill',
"chat-new-line", 'chat-new-line',
"chat-off-fill", 'chat-off-fill',
"chat-off-line", 'chat-off-line',
"chat-poll-fill", 'chat-poll-fill',
"chat-poll-line", 'chat-poll-line',
"chat-private-fill", 'chat-private-fill',
"chat-private-line", 'chat-private-line',
"chat-quote-fill", 'chat-quote-fill',
"chat-quote-line", 'chat-quote-line',
"chat-settings-fill", 'chat-settings-fill',
"chat-settings-line", 'chat-settings-line',
"chat-smile-2-fill", 'chat-smile-2-fill',
"chat-smile-2-line", 'chat-smile-2-line',
"chat-smile-3-fill", 'chat-smile-3-fill',
"chat-smile-3-line", 'chat-smile-3-line',
"chat-smile-fill", 'chat-smile-fill',
"chat-smile-line", 'chat-smile-line',
"chat-upload-fill", 'chat-upload-fill',
"chat-upload-line", 'chat-upload-line',
"chat-voice-fill", 'chat-voice-fill',
"chat-voice-line", 'chat-voice-line',
"check-double-fill", 'check-double-fill',
"check-double-line", 'check-double-line',
"check-fill", 'check-fill',
"check-line", 'check-line',
"checkbox-blank-circle-fill", 'checkbox-blank-circle-fill',
"checkbox-blank-circle-line", 'checkbox-blank-circle-line',
"checkbox-blank-fill", 'checkbox-blank-fill',
"checkbox-blank-line", 'checkbox-blank-line',
"checkbox-circle-fill", 'checkbox-circle-fill',
"checkbox-circle-line", 'checkbox-circle-line',
"checkbox-fill", 'checkbox-fill',
"checkbox-indeterminate-fill", 'checkbox-indeterminate-fill',
"checkbox-indeterminate-line", 'checkbox-indeterminate-line',
"checkbox-line", 'checkbox-line',
"checkbox-multiple-blank-fill", 'checkbox-multiple-blank-fill',
"checkbox-multiple-blank-line", 'checkbox-multiple-blank-line',
"checkbox-multiple-fill", 'checkbox-multiple-fill',
"checkbox-multiple-line", 'checkbox-multiple-line',
"china-railway-fill", 'china-railway-fill',
"china-railway-line", 'china-railway-line',
"chrome-fill", 'chrome-fill',
"chrome-line", 'chrome-line',
"clapperboard-fill", 'clapperboard-fill',
"clapperboard-line", 'clapperboard-line',
"clipboard-fill", 'clipboard-fill',
"clipboard-line", 'clipboard-line',
"clockwise-2-fill", 'clockwise-2-fill',
"clockwise-2-line", 'clockwise-2-line',
"clockwise-fill", 'clockwise-fill',
"clockwise-line", 'clockwise-line',
"close-circle-fill", 'close-circle-fill',
"close-circle-line", 'close-circle-line',
"close-fill", 'close-fill',
"close-line", 'close-line',
"closed-captioning-fill", 'closed-captioning-fill',
"closed-captioning-line", 'closed-captioning-line',
"cloud-fill", 'cloud-fill',
"cloud-line", 'cloud-line',
"cloud-off-fill", 'cloud-off-fill',
"cloud-off-line", 'cloud-off-line',
"cloud-windy-fill", 'cloud-windy-fill',
"cloud-windy-line", 'cloud-windy-line',
"cloudy-2-fill", 'cloudy-2-fill',
"cloudy-2-line", 'cloudy-2-line',
"cloudy-fill", 'cloudy-fill',
"cloudy-line", 'cloudy-line',
"code-box-fill", 'code-box-fill',
"code-box-line", 'code-box-line',
"code-fill", 'code-fill',
"code-line", 'code-line',
"code-s-fill", 'code-s-fill',
"code-s-line", 'code-s-line',
"code-s-slash-fill", 'code-s-slash-fill',
"code-s-slash-line", 'code-s-slash-line',
"code-view", 'code-view',
"codepen-fill", 'codepen-fill',
"codepen-line", 'codepen-line',
"coin-fill", 'coin-fill',
"coin-line", 'coin-line',
"coins-fill", 'coins-fill',
"coins-line", 'coins-line',
"collage-fill", 'collage-fill',
"collage-line", 'collage-line',
"command-fill", 'command-fill',
"command-line", 'command-line',
"community-fill", 'community-fill',
"community-line", 'community-line',
"compass-2-fill", 'compass-2-fill',
"compass-2-line", 'compass-2-line',
"compass-3-fill", 'compass-3-fill',
"compass-3-line", 'compass-3-line',
"compass-4-fill", 'compass-4-fill',
"compass-4-line", 'compass-4-line',
"compass-discover-fill", 'compass-discover-fill',
"compass-discover-line", 'compass-discover-line',
"compass-fill", 'compass-fill',
"compass-line", 'compass-line',
"compasses-2-fill", 'compasses-2-fill',
"compasses-2-line", 'compasses-2-line',
"compasses-fill", 'compasses-fill',
"compasses-line", 'compasses-line',
"computer-fill", 'computer-fill',
"computer-line", 'computer-line',
"contacts-book-2-fill", 'contacts-book-2-fill',
"contacts-book-2-line", 'contacts-book-2-line',
"contacts-book-fill", 'contacts-book-fill',
"contacts-book-line", 'contacts-book-line',
"contacts-book-upload-fill", 'contacts-book-upload-fill',
"contacts-book-upload-line", 'contacts-book-upload-line',
"contacts-fill", 'contacts-fill',
"contacts-line", 'contacts-line',
"contrast-2-fill", 'contrast-2-fill',
"contrast-2-line", 'contrast-2-line',
"contrast-drop-2-fill", 'contrast-drop-2-fill',
"contrast-drop-2-line", 'contrast-drop-2-line',
"contrast-drop-fill", 'contrast-drop-fill',
"contrast-drop-line", 'contrast-drop-line',
"contrast-fill", 'contrast-fill',
"contrast-line", 'contrast-line',
"copper-coin-fill", 'copper-coin-fill',
"copper-coin-line", 'copper-coin-line',
"copper-diamond-fill", 'copper-diamond-fill',
"copper-diamond-line", 'copper-diamond-line',
"copyleft-fill", 'copyleft-fill',
"copyleft-line", 'copyleft-line',
"copyright-fill", 'copyright-fill',
"copyright-line", 'copyright-line',
"coreos-fill", 'coreos-fill',
"coreos-line", 'coreos-line',
"coupon-2-fill", 'coupon-2-fill',
"coupon-2-line", 'coupon-2-line',
"coupon-3-fill", 'coupon-3-fill',
"coupon-3-line", 'coupon-3-line',
"coupon-4-fill", 'coupon-4-fill',
"coupon-4-line", 'coupon-4-line',
"coupon-5-fill", 'coupon-5-fill',
"coupon-5-line", 'coupon-5-line',
"coupon-fill", 'coupon-fill',
"coupon-line", 'coupon-line',
"cpu-fill", 'cpu-fill',
"cpu-line", 'cpu-line',
"creative-commons-by-fill", 'creative-commons-by-fill',
"creative-commons-by-line", 'creative-commons-by-line',
"creative-commons-fill", 'creative-commons-fill',
"creative-commons-line", 'creative-commons-line',
"creative-commons-nc-fill", 'creative-commons-nc-fill',
"creative-commons-nc-line", 'creative-commons-nc-line',
"creative-commons-nd-fill", 'creative-commons-nd-fill',
"creative-commons-nd-line", 'creative-commons-nd-line',
"creative-commons-sa-fill", 'creative-commons-sa-fill',
"creative-commons-sa-line", 'creative-commons-sa-line',
"creative-commons-zero-fill", 'creative-commons-zero-fill',
"creative-commons-zero-line", 'creative-commons-zero-line',
"criminal-fill", 'criminal-fill',
"criminal-line", 'criminal-line',
"crop-2-fill", 'crop-2-fill',
"crop-2-line", 'crop-2-line',
"crop-fill", 'crop-fill',
"crop-line", 'crop-line',
"css3-fill", 'css3-fill',
"css3-line", 'css3-line',
"cup-fill", 'cup-fill',
"cup-line", 'cup-line',
"currency-fill", 'currency-fill',
"currency-line", 'currency-line',
"cursor-fill", 'cursor-fill',
"cursor-line", 'cursor-line',
"customer-service-2-fill", 'customer-service-2-fill',
"customer-service-2-line", 'customer-service-2-line',
"customer-service-fill", 'customer-service-fill',
"customer-service-line", 'customer-service-line',
"dashboard-2-fill", 'dashboard-2-fill',
"dashboard-2-line", 'dashboard-2-line',
"dashboard-3-fill", 'dashboard-3-fill',
"dashboard-3-line", 'dashboard-3-line',
"dashboard-fill", 'dashboard-fill',
"dashboard-line", 'dashboard-line',
"database-2-fill", 'database-2-fill',
"database-2-line", 'database-2-line',
"database-fill", 'database-fill',
"database-line", 'database-line',
"delete-back-2-fill", 'delete-back-2-fill',
"delete-back-2-line", 'delete-back-2-line',
"delete-back-fill", 'delete-back-fill',
"delete-back-line", 'delete-back-line',
"delete-bin-2-fill", 'delete-bin-2-fill',
"delete-bin-2-line", 'delete-bin-2-line',
"delete-bin-3-fill", 'delete-bin-3-fill',
"delete-bin-3-line", 'delete-bin-3-line',
"delete-bin-4-fill", 'delete-bin-4-fill',
"delete-bin-4-line", 'delete-bin-4-line',
"delete-bin-5-fill", 'delete-bin-5-fill',
"delete-bin-5-line", 'delete-bin-5-line',
"delete-bin-6-fill", 'delete-bin-6-fill',
"delete-bin-6-line", 'delete-bin-6-line',
"delete-bin-7-fill", 'delete-bin-7-fill',
"delete-bin-7-line", 'delete-bin-7-line',
"delete-bin-fill", 'delete-bin-fill',
"delete-bin-line", 'delete-bin-line',
"delete-column", 'delete-column',
"delete-row", 'delete-row',
"device-fill", 'device-fill',
"device-line", 'device-line',
"device-recover-fill", 'device-recover-fill',
"device-recover-line", 'device-recover-line',
"dingding-fill", 'dingding-fill',
"dingding-line", 'dingding-line',
"direction-fill", 'direction-fill',
"direction-line", 'direction-line',
"disc-fill", 'disc-fill',
"disc-line", 'disc-line',
"discord-fill", 'discord-fill',
"discord-line", 'discord-line',
"discuss-fill", 'discuss-fill',
"discuss-line", 'discuss-line',
"dislike-fill", 'dislike-fill',
"dislike-line", 'dislike-line',
"disqus-fill", 'disqus-fill',
"disqus-line", 'disqus-line',
"divide-fill", 'divide-fill',
"divide-line", 'divide-line',
"donut-chart-fill", 'donut-chart-fill',
"donut-chart-line", 'donut-chart-line',
"door-closed-fill", 'door-closed-fill',
"door-closed-line", 'door-closed-line',
"door-fill", 'door-fill',
"door-line", 'door-line',
"door-lock-box-fill", 'door-lock-box-fill',
"door-lock-box-line", 'door-lock-box-line',
"door-lock-fill", 'door-lock-fill',
"door-lock-line", 'door-lock-line',
"door-open-fill", 'door-open-fill',
"door-open-line", 'door-open-line',
"dossier-fill", 'dossier-fill',
"dossier-line", 'dossier-line',
"douban-fill", 'douban-fill',
"douban-line", 'douban-line',
"double-quotes-l", 'double-quotes-l',
"double-quotes-r", 'double-quotes-r',
"download-2-fill", 'download-2-fill',
"download-2-line", 'download-2-line',
"download-cloud-2-fill", 'download-cloud-2-fill',
"download-cloud-2-line", 'download-cloud-2-line',
"download-cloud-fill", 'download-cloud-fill',
"download-cloud-line", 'download-cloud-line',
"download-fill", 'download-fill',
"download-line", 'download-line',
"draft-fill", 'draft-fill',
"draft-line", 'draft-line',
"drag-drop-fill", 'drag-drop-fill',
"drag-drop-line", 'drag-drop-line',
"drag-move-2-fill", 'drag-move-2-fill',
"drag-move-2-line", 'drag-move-2-line',
"drag-move-fill", 'drag-move-fill',
"drag-move-line", 'drag-move-line',
"dribbble-fill", 'dribbble-fill',
"dribbble-line", 'dribbble-line',
"drive-fill", 'drive-fill',
"drive-line", 'drive-line',
"drizzle-fill", 'drizzle-fill',
"drizzle-line", 'drizzle-line',
"drop-fill", 'drop-fill',
"drop-line", 'drop-line',
"dropbox-fill", 'dropbox-fill',
"dropbox-line", 'dropbox-line',
"dual-sim-1-fill", 'dual-sim-1-fill',
"dual-sim-1-line", 'dual-sim-1-line',
"dual-sim-2-fill", 'dual-sim-2-fill',
"dual-sim-2-line", 'dual-sim-2-line',
"dv-fill", 'dv-fill',
"dv-line", 'dv-line',
"dvd-fill", 'dvd-fill',
"dvd-line", 'dvd-line',
"e-bike-2-fill", 'e-bike-2-fill',
"e-bike-2-line", 'e-bike-2-line',
"e-bike-fill", 'e-bike-fill',
"e-bike-line", 'e-bike-line',
"earth-fill", 'earth-fill',
"earth-line", 'earth-line',
"earthquake-fill", 'earthquake-fill',
"earthquake-line", 'earthquake-line',
"edge-fill", 'edge-fill',
"edge-line", 'edge-line',
"edit-2-fill", 'edit-2-fill',
"edit-2-line", 'edit-2-line',
"edit-box-fill", 'edit-box-fill',
"edit-box-line", 'edit-box-line',
"edit-circle-fill", 'edit-circle-fill',
"edit-circle-line", 'edit-circle-line',
"edit-fill", 'edit-fill',
"edit-line", 'edit-line',
"eject-fill", 'eject-fill',
"eject-line", 'eject-line',
"emotion-2-fill", 'emotion-2-fill',
"emotion-2-line", 'emotion-2-line',
"emotion-fill", 'emotion-fill',
"emotion-happy-fill", 'emotion-happy-fill',
"emotion-happy-line", 'emotion-happy-line',
"emotion-laugh-fill", 'emotion-laugh-fill',
"emotion-laugh-line", 'emotion-laugh-line',
"emotion-line", 'emotion-line',
"emotion-normal-fill", 'emotion-normal-fill',
"emotion-normal-line", 'emotion-normal-line',
"emotion-sad-fill", 'emotion-sad-fill',
"emotion-sad-line", 'emotion-sad-line',
"emotion-unhappy-fill", 'emotion-unhappy-fill',
"emotion-unhappy-line", 'emotion-unhappy-line',
"empathize-fill", 'empathize-fill',
"empathize-line", 'empathize-line',
"emphasis-cn", 'emphasis-cn',
"emphasis", 'emphasis',
"english-input", 'english-input',
"equalizer-fill", 'equalizer-fill',
"equalizer-line", 'equalizer-line',
"eraser-fill", 'eraser-fill',
"eraser-line", 'eraser-line',
"error-warning-fill", 'error-warning-fill',
"error-warning-line", 'error-warning-line',
"evernote-fill", 'evernote-fill',
"evernote-line", 'evernote-line',
"exchange-box-fill", 'exchange-box-fill',
"exchange-box-line", 'exchange-box-line',
"exchange-cny-fill", 'exchange-cny-fill',
"exchange-cny-line", 'exchange-cny-line',
"exchange-dollar-fill", 'exchange-dollar-fill',
"exchange-dollar-line", 'exchange-dollar-line',
"exchange-fill", 'exchange-fill',
"exchange-funds-fill", 'exchange-funds-fill',
"exchange-funds-line", 'exchange-funds-line',
"exchange-line", 'exchange-line',
"external-link-fill", 'external-link-fill',
"external-link-line", 'external-link-line',
"eye-2-fill", 'eye-2-fill',
"eye-2-line", 'eye-2-line',
"eye-close-fill", 'eye-close-fill',
"eye-close-line", 'eye-close-line',
"eye-fill", 'eye-fill',
"eye-line", 'eye-line',
"eye-off-fill", 'eye-off-fill',
"eye-off-line", 'eye-off-line',
"facebook-box-fill", 'facebook-box-fill',
"facebook-box-line", 'facebook-box-line',
"facebook-circle-fill", 'facebook-circle-fill',
"facebook-circle-line", 'facebook-circle-line',
"facebook-fill", 'facebook-fill',
"facebook-line", 'facebook-line',
"fahrenheit-fill", 'fahrenheit-fill',
"fahrenheit-line", 'fahrenheit-line',
"feedback-fill", 'feedback-fill',
"feedback-line", 'feedback-line',
"file-2-fill", 'file-2-fill',
"file-2-line", 'file-2-line',
"file-3-fill", 'file-3-fill',
"file-3-line", 'file-3-line',
"file-4-fill", 'file-4-fill',
"file-4-line", 'file-4-line',
"file-add-fill", 'file-add-fill',
"file-add-line", 'file-add-line',
"file-chart-2-fill", 'file-chart-2-fill',
"file-chart-2-line", 'file-chart-2-line',
"file-chart-fill", 'file-chart-fill',
"file-chart-line", 'file-chart-line',
"file-cloud-fill", 'file-cloud-fill',
"file-cloud-line", 'file-cloud-line',
"file-code-fill", 'file-code-fill',
"file-code-line", 'file-code-line',
"file-copy-2-fill", 'file-copy-2-fill',
"file-copy-2-line", 'file-copy-2-line',
"file-copy-fill", 'file-copy-fill',
"file-copy-line", 'file-copy-line',
"file-damage-fill", 'file-damage-fill',
"file-damage-line", 'file-damage-line',
"file-download-fill", 'file-download-fill',
"file-download-line", 'file-download-line',
"file-edit-fill", 'file-edit-fill',
"file-edit-line", 'file-edit-line',
"file-excel-2-fill", 'file-excel-2-fill',
"file-excel-2-line", 'file-excel-2-line',
"file-excel-fill", 'file-excel-fill',
"file-excel-line", 'file-excel-line',
"file-fill", 'file-fill',
"file-forbid-fill", 'file-forbid-fill',
"file-forbid-line", 'file-forbid-line',
"file-gif-fill", 'file-gif-fill',
"file-gif-line", 'file-gif-line',
"file-history-fill", 'file-history-fill',
"file-history-line", 'file-history-line',
"file-hwp-fill", 'file-hwp-fill',
"file-hwp-line", 'file-hwp-line',
"file-info-fill", 'file-info-fill',
"file-info-line", 'file-info-line',
"file-line", 'file-line',
"file-list-2-fill", 'file-list-2-fill',
"file-list-2-line", 'file-list-2-line',
"file-list-3-fill", 'file-list-3-fill',
"file-list-3-line", 'file-list-3-line',
"file-list-fill", 'file-list-fill',
"file-list-line", 'file-list-line',
"file-lock-fill", 'file-lock-fill',
"file-lock-line", 'file-lock-line',
"file-mark-fill", 'file-mark-fill',
"file-mark-line", 'file-mark-line',
"file-music-fill", 'file-music-fill',
"file-music-line", 'file-music-line',
"file-paper-2-fill", 'file-paper-2-fill',
"file-paper-2-line", 'file-paper-2-line',
"file-paper-fill", 'file-paper-fill',
"file-paper-line", 'file-paper-line',
"file-pdf-fill", 'file-pdf-fill',
"file-pdf-line", 'file-pdf-line',
"file-ppt-2-fill", 'file-ppt-2-fill',
"file-ppt-2-line", 'file-ppt-2-line',
"file-ppt-fill", 'file-ppt-fill',
"file-ppt-line", 'file-ppt-line',
"file-reduce-fill", 'file-reduce-fill',
"file-reduce-line", 'file-reduce-line',
"file-search-fill", 'file-search-fill',
"file-search-line", 'file-search-line',
"file-settings-fill", 'file-settings-fill',
"file-settings-line", 'file-settings-line',
"file-shield-2-fill", 'file-shield-2-fill',
"file-shield-2-line", 'file-shield-2-line',
"file-shield-fill", 'file-shield-fill',
"file-shield-line", 'file-shield-line',
"file-shred-fill", 'file-shred-fill',
"file-shred-line", 'file-shred-line',
"file-text-fill", 'file-text-fill',
"file-text-line", 'file-text-line',
"file-transfer-fill", 'file-transfer-fill',
"file-transfer-line", 'file-transfer-line',
"file-unknow-fill", 'file-unknow-fill',
"file-unknow-line", 'file-unknow-line',
"file-upload-fill", 'file-upload-fill',
"file-upload-line", 'file-upload-line',
"file-user-fill", 'file-user-fill',
"file-user-line", 'file-user-line',
"file-warning-fill", 'file-warning-fill',
"file-warning-line", 'file-warning-line',
"file-word-2-fill", 'file-word-2-fill',
"file-word-2-line", 'file-word-2-line',
"file-word-fill", 'file-word-fill',
"file-word-line", 'file-word-line',
"file-zip-fill", 'file-zip-fill',
"file-zip-line", 'file-zip-line',
"film-fill", 'film-fill',
"film-line", 'film-line',
"filter-2-fill", 'filter-2-fill',
"filter-2-line", 'filter-2-line',
"filter-3-fill", 'filter-3-fill',
"filter-3-line", 'filter-3-line',
"filter-fill", 'filter-fill',
"filter-line", 'filter-line',
"filter-off-fill", 'filter-off-fill',
"filter-off-line", 'filter-off-line',
"find-replace-fill", 'find-replace-fill',
"find-replace-line", 'find-replace-line',
"finder-fill", 'finder-fill',
"finder-line", 'finder-line',
"fingerprint-2-fill", 'fingerprint-2-fill',
"fingerprint-2-line", 'fingerprint-2-line',
"fingerprint-fill", 'fingerprint-fill',
"fingerprint-line", 'fingerprint-line',
"fire-fill", 'fire-fill',
"fire-line", 'fire-line',
"firefox-fill", 'firefox-fill',
"firefox-line", 'firefox-line',
"first-aid-kit-fill", 'first-aid-kit-fill',
"first-aid-kit-line", 'first-aid-kit-line',
"flag-2-fill", 'flag-2-fill',
"flag-2-line", 'flag-2-line',
"flag-fill", 'flag-fill',
"flag-line", 'flag-line',
"flashlight-fill", 'flashlight-fill',
"flashlight-line", 'flashlight-line',
"flask-fill", 'flask-fill',
"flask-line", 'flask-line',
"flight-land-fill", 'flight-land-fill',
"flight-land-line", 'flight-land-line',
"flight-takeoff-fill", 'flight-takeoff-fill',
"flight-takeoff-line", 'flight-takeoff-line',
"flood-fill", 'flood-fill',
"flood-line", 'flood-line',
"flow-chart", 'flow-chart',
"flutter-fill", 'flutter-fill',
"flutter-line", 'flutter-line',
"focus-2-fill", 'focus-2-fill',
"focus-2-line", 'focus-2-line',
"focus-3-fill", 'focus-3-fill',
"focus-3-line", 'focus-3-line',
"focus-fill", 'focus-fill',
"focus-line", 'focus-line',
"foggy-fill", 'foggy-fill',
"foggy-line", 'foggy-line',
"folder-2-fill", 'folder-2-fill',
"folder-2-line", 'folder-2-line',
"folder-3-fill", 'folder-3-fill',
"folder-3-line", 'folder-3-line',
"folder-4-fill", 'folder-4-fill',
"folder-4-line", 'folder-4-line',
"folder-5-fill", 'folder-5-fill',
"folder-5-line", 'folder-5-line',
"folder-add-fill", 'folder-add-fill',
"folder-add-line", 'folder-add-line',
"folder-chart-2-fill", 'folder-chart-2-fill',
"folder-chart-2-line", 'folder-chart-2-line',
"folder-chart-fill", 'folder-chart-fill',
"folder-chart-line", 'folder-chart-line',
"folder-download-fill", 'folder-download-fill',
"folder-download-line", 'folder-download-line',
"folder-fill", 'folder-fill',
"folder-forbid-fill", 'folder-forbid-fill',
"folder-forbid-line", 'folder-forbid-line',
"folder-history-fill", 'folder-history-fill',
"folder-history-line", 'folder-history-line',
"folder-info-fill", 'folder-info-fill',
"folder-info-line", 'folder-info-line',
"folder-keyhole-fill", 'folder-keyhole-fill',
"folder-keyhole-line", 'folder-keyhole-line',
"folder-line", 'folder-line',
"folder-lock-fill", 'folder-lock-fill',
"folder-lock-line", 'folder-lock-line',
"folder-music-fill", 'folder-music-fill',
"folder-music-line", 'folder-music-line',
"folder-open-fill", 'folder-open-fill',
"folder-open-line", 'folder-open-line',
"folder-received-fill", 'folder-received-fill',
"folder-received-line", 'folder-received-line',
"folder-reduce-fill", 'folder-reduce-fill',
"folder-reduce-line", 'folder-reduce-line',
"folder-settings-fill", 'folder-settings-fill',
"folder-settings-line", 'folder-settings-line',
"folder-shared-fill", 'folder-shared-fill',
"folder-shared-line", 'folder-shared-line',
"folder-shield-2-fill", 'folder-shield-2-fill',
"folder-shield-2-line", 'folder-shield-2-line',
"folder-shield-fill", 'folder-shield-fill',
"folder-shield-line", 'folder-shield-line',
"folder-transfer-fill", 'folder-transfer-fill',
"folder-transfer-line", 'folder-transfer-line',
"folder-unknow-fill", 'folder-unknow-fill',
"folder-unknow-line", 'folder-unknow-line',
"folder-upload-fill", 'folder-upload-fill',
"folder-upload-line", 'folder-upload-line',
"folder-user-fill", 'folder-user-fill',
"folder-user-line", 'folder-user-line',
"folder-warning-fill", 'folder-warning-fill',
"folder-warning-line", 'folder-warning-line',
"folder-zip-fill", 'folder-zip-fill',
"folder-zip-line", 'folder-zip-line',
"folders-fill", 'folders-fill',
"folders-line", 'folders-line',
"font-color", 'font-color',
"font-size-2", 'font-size-2',
"font-size", 'font-size',
"football-fill", 'football-fill',
"football-line", 'football-line',
"footprint-fill", 'footprint-fill',
"footprint-line", 'footprint-line',
"forbid-2-fill", 'forbid-2-fill',
"forbid-2-line", 'forbid-2-line',
"forbid-fill", 'forbid-fill',
"forbid-line", 'forbid-line',
"format-clear", 'format-clear',
"fridge-fill", 'fridge-fill',
"fridge-line", 'fridge-line',
"fullscreen-exit-fill", 'fullscreen-exit-fill',
"fullscreen-exit-line", 'fullscreen-exit-line',
"fullscreen-fill", 'fullscreen-fill',
"fullscreen-line", 'fullscreen-line',
"function-fill", 'function-fill',
"function-line", 'function-line',
"functions", 'functions',
"funds-box-fill", 'funds-box-fill',
"funds-box-line", 'funds-box-line',
"funds-fill", 'funds-fill',
"funds-line", 'funds-line',
"gallery-fill", 'gallery-fill',
"gallery-line", 'gallery-line',
"gallery-upload-fill", 'gallery-upload-fill',
"gallery-upload-line", 'gallery-upload-line',
"game-fill", 'game-fill',
"game-line", 'game-line',
"gamepad-fill", 'gamepad-fill',
"gamepad-line", 'gamepad-line',
"gas-station-fill", 'gas-station-fill',
"gas-station-line", 'gas-station-line',
"gatsby-fill", 'gatsby-fill',
"gatsby-line", 'gatsby-line',
"genderless-fill", 'genderless-fill',
"genderless-line", 'genderless-line',
"ghost-2-fill", 'ghost-2-fill',
"ghost-2-line", 'ghost-2-line',
"ghost-fill", 'ghost-fill',
"ghost-line", 'ghost-line',
"ghost-smile-fill", 'ghost-smile-fill',
"ghost-smile-line", 'ghost-smile-line',
"gift-2-fill", 'gift-2-fill',
"gift-2-line", 'gift-2-line',
"gift-fill", 'gift-fill',
"gift-line", 'gift-line',
"git-branch-fill", 'git-branch-fill',
"git-branch-line", 'git-branch-line',
"git-commit-fill", 'git-commit-fill',
"git-commit-line", 'git-commit-line',
"git-merge-fill", 'git-merge-fill',
"git-merge-line", 'git-merge-line',
"git-pull-request-fill", 'git-pull-request-fill',
"git-pull-request-line", 'git-pull-request-line',
"git-repository-commits-fill", 'git-repository-commits-fill',
"git-repository-commits-line", 'git-repository-commits-line',
"git-repository-fill", 'git-repository-fill',
"git-repository-line", 'git-repository-line',
"git-repository-private-fill", 'git-repository-private-fill',
"git-repository-private-line", 'git-repository-private-line',
"github-fill", 'github-fill',
"github-line", 'github-line',
"gitlab-fill", 'gitlab-fill',
"gitlab-line", 'gitlab-line',
"global-fill", 'global-fill',
"global-line", 'global-line',
"globe-fill", 'globe-fill',
"globe-line", 'globe-line',
"goblet-fill", 'goblet-fill',
"goblet-line", 'goblet-line',
"google-fill", 'google-fill',
"google-line", 'google-line',
"google-play-fill", 'google-play-fill',
"google-play-line", 'google-play-line',
"government-fill", 'government-fill',
"government-line", 'government-line',
"gps-fill", 'gps-fill',
"gps-line", 'gps-line',
"gradienter-fill", 'gradienter-fill',
"gradienter-line", 'gradienter-line',
"grid-fill", 'grid-fill',
"grid-line", 'grid-line',
"group-2-fill", 'group-2-fill',
"group-2-line", 'group-2-line',
"group-fill", 'group-fill',
"group-line", 'group-line',
"guide-fill", 'guide-fill',
"guide-line", 'guide-line',
"h-1", 'h-1',
"h-2", 'h-2',
"h-3", 'h-3',
"h-4", 'h-4',
"h-5", 'h-5',
"h-6", 'h-6',
"hail-fill", 'hail-fill',
"hail-line", 'hail-line',
"hammer-fill", 'hammer-fill',
"hammer-line", 'hammer-line',
"hand-coin-fill", 'hand-coin-fill',
"hand-coin-line", 'hand-coin-line',
"hand-heart-fill", 'hand-heart-fill',
"hand-heart-line", 'hand-heart-line',
"hand-sanitizer-fill", 'hand-sanitizer-fill',
"hand-sanitizer-line", 'hand-sanitizer-line',
"handbag-fill", 'handbag-fill',
"handbag-line", 'handbag-line',
"hard-drive-2-fill", 'hard-drive-2-fill',
"hard-drive-2-line", 'hard-drive-2-line',
"hard-drive-fill", 'hard-drive-fill',
"hard-drive-line", 'hard-drive-line',
"hashtag", 'hashtag',
"haze-2-fill", 'haze-2-fill',
"haze-2-line", 'haze-2-line',
"haze-fill", 'haze-fill',
"haze-line", 'haze-line',
"hd-fill", 'hd-fill',
"hd-line", 'hd-line',
"heading", 'heading',
"headphone-fill", 'headphone-fill',
"headphone-line", 'headphone-line',
"health-book-fill", 'health-book-fill',
"health-book-line", 'health-book-line',
"heart-2-fill", 'heart-2-fill',
"heart-2-line", 'heart-2-line',
"heart-3-fill", 'heart-3-fill',
"heart-3-line", 'heart-3-line',
"heart-add-fill", 'heart-add-fill',
"heart-add-line", 'heart-add-line',
"heart-fill", 'heart-fill',
"heart-line", 'heart-line',
"heart-pulse-fill", 'heart-pulse-fill',
"heart-pulse-line", 'heart-pulse-line',
"hearts-fill", 'hearts-fill',
"hearts-line", 'hearts-line',
"heavy-showers-fill", 'heavy-showers-fill',
"heavy-showers-line", 'heavy-showers-line',
"history-fill", 'history-fill',
"history-line", 'history-line',
"home-2-fill", 'home-2-fill',
"home-2-line", 'home-2-line',
"home-3-fill", 'home-3-fill',
"home-3-line", 'home-3-line',
"home-4-fill", 'home-4-fill',
"home-4-line", 'home-4-line',
"home-5-fill", 'home-5-fill',
"home-5-line", 'home-5-line',
"home-6-fill", 'home-6-fill',
"home-6-line", 'home-6-line',
"home-7-fill", 'home-7-fill',
"home-7-line", 'home-7-line',
"home-8-fill", 'home-8-fill',
"home-8-line", 'home-8-line',
"home-fill", 'home-fill',
"home-gear-fill", 'home-gear-fill',
"home-gear-line", 'home-gear-line',
"home-heart-fill", 'home-heart-fill',
"home-heart-line", 'home-heart-line',
"home-line", 'home-line',
"home-smile-2-fill", 'home-smile-2-fill',
"home-smile-2-line", 'home-smile-2-line',
"home-smile-fill", 'home-smile-fill',
"home-smile-line", 'home-smile-line',
"home-wifi-fill", 'home-wifi-fill',
"home-wifi-line", 'home-wifi-line',
"honor-of-kings-fill", 'honor-of-kings-fill',
"honor-of-kings-line", 'honor-of-kings-line',
"honour-fill", 'honour-fill',
"honour-line", 'honour-line',
"hospital-fill", 'hospital-fill',
"hospital-line", 'hospital-line',
"hotel-bed-fill", 'hotel-bed-fill',
"hotel-bed-line", 'hotel-bed-line',
"hotel-fill", 'hotel-fill',
"hotel-line", 'hotel-line',
"hotspot-fill", 'hotspot-fill',
"hotspot-line", 'hotspot-line',
"hq-fill", 'hq-fill',
"hq-line", 'hq-line',
"html5-fill", 'html5-fill',
"html5-line", 'html5-line',
"ie-fill", 'ie-fill',
"ie-line", 'ie-line',
"image-2-fill", 'image-2-fill',
"image-2-line", 'image-2-line',
"image-add-fill", 'image-add-fill',
"image-add-line", 'image-add-line',
"image-edit-fill", 'image-edit-fill',
"image-edit-line", 'image-edit-line',
"image-fill", 'image-fill',
"image-line", 'image-line',
"inbox-archive-fill", 'inbox-archive-fill',
"inbox-archive-line", 'inbox-archive-line',
"inbox-fill", 'inbox-fill',
"inbox-line", 'inbox-line',
"inbox-unarchive-fill", 'inbox-unarchive-fill',
"inbox-unarchive-line", 'inbox-unarchive-line',
"increase-decrease-fill", 'increase-decrease-fill',
"increase-decrease-line", 'increase-decrease-line',
"indent-decrease", 'indent-decrease',
"indent-increase", 'indent-increase',
"indeterminate-circle-fill", 'indeterminate-circle-fill',
"indeterminate-circle-line", 'indeterminate-circle-line',
"information-fill", 'information-fill',
"information-line", 'information-line',
"infrared-thermometer-fill", 'infrared-thermometer-fill',
"infrared-thermometer-line", 'infrared-thermometer-line',
"ink-bottle-fill", 'ink-bottle-fill',
"ink-bottle-line", 'ink-bottle-line',
"input-cursor-move", 'input-cursor-move',
"input-method-fill", 'input-method-fill',
"input-method-line", 'input-method-line',
"insert-column-left", 'insert-column-left',
"insert-column-right", 'insert-column-right',
"insert-row-bottom", 'insert-row-bottom',
"insert-row-top", 'insert-row-top',
"instagram-fill", 'instagram-fill',
"instagram-line", 'instagram-line',
"install-fill", 'install-fill',
"install-line", 'install-line',
"invision-fill", 'invision-fill',
"invision-line", 'invision-line',
"italic", 'italic',
"kakao-talk-fill", 'kakao-talk-fill',
"kakao-talk-line", 'kakao-talk-line',
"key-2-fill", 'key-2-fill',
"key-2-line", 'key-2-line',
"key-fill", 'key-fill',
"key-line", 'key-line',
"keyboard-box-fill", 'keyboard-box-fill',
"keyboard-box-line", 'keyboard-box-line',
"keyboard-fill", 'keyboard-fill',
"keyboard-line", 'keyboard-line',
"keynote-fill", 'keynote-fill',
"keynote-line", 'keynote-line',
"knife-blood-fill", 'knife-blood-fill',
"knife-blood-line", 'knife-blood-line',
"knife-fill", 'knife-fill',
"knife-line", 'knife-line',
"landscape-fill", 'landscape-fill',
"landscape-line", 'landscape-line',
"layout-2-fill", 'layout-2-fill',
"layout-2-line", 'layout-2-line',
"layout-3-fill", 'layout-3-fill',
"layout-3-line", 'layout-3-line',
"layout-4-fill", 'layout-4-fill',
"layout-4-line", 'layout-4-line',
"layout-5-fill", 'layout-5-fill',
"layout-5-line", 'layout-5-line',
"layout-6-fill", 'layout-6-fill',
"layout-6-line", 'layout-6-line',
"layout-bottom-2-fill", 'layout-bottom-2-fill',
"layout-bottom-2-line", 'layout-bottom-2-line',
"layout-bottom-fill", 'layout-bottom-fill',
"layout-bottom-line", 'layout-bottom-line',
"layout-column-fill", 'layout-column-fill',
"layout-column-line", 'layout-column-line',
"layout-fill", 'layout-fill',
"layout-grid-fill", 'layout-grid-fill',
"layout-grid-line", 'layout-grid-line',
"layout-left-2-fill", 'layout-left-2-fill',
"layout-left-2-line", 'layout-left-2-line',
"layout-left-fill", 'layout-left-fill',
"layout-left-line", 'layout-left-line',
"layout-line", 'layout-line',
"layout-masonry-fill", 'layout-masonry-fill',
"layout-masonry-line", 'layout-masonry-line',
"layout-right-2-fill", 'layout-right-2-fill',
"layout-right-2-line", 'layout-right-2-line',
"layout-right-fill", 'layout-right-fill',
"layout-right-line", 'layout-right-line',
"layout-row-fill", 'layout-row-fill',
"layout-row-line", 'layout-row-line',
"layout-top-2-fill", 'layout-top-2-fill',
"layout-top-2-line", 'layout-top-2-line',
"layout-top-fill", 'layout-top-fill',
"layout-top-line", 'layout-top-line',
"leaf-fill", 'leaf-fill',
"leaf-line", 'leaf-line',
"lifebuoy-fill", 'lifebuoy-fill',
"lifebuoy-line", 'lifebuoy-line',
"lightbulb-fill", 'lightbulb-fill',
"lightbulb-flash-fill", 'lightbulb-flash-fill',
"lightbulb-flash-line", 'lightbulb-flash-line',
"lightbulb-line", 'lightbulb-line',
"line-chart-fill", 'line-chart-fill',
"line-chart-line", 'line-chart-line',
"line-fill", 'line-fill',
"line-height", 'line-height',
"line-line", 'line-line',
"link-m", 'link-m',
"link-unlink-m", 'link-unlink-m',
"link-unlink", 'link-unlink',
"link", 'link',
"linkedin-box-fill", 'linkedin-box-fill',
"linkedin-box-line", 'linkedin-box-line',
"linkedin-fill", 'linkedin-fill',
"linkedin-line", 'linkedin-line',
"links-fill", 'links-fill',
"links-line", 'links-line',
"list-check-2", 'list-check-2',
"list-check", 'list-check',
"list-ordered", 'list-ordered',
"list-settings-fill", 'list-settings-fill',
"list-settings-line", 'list-settings-line',
"list-unordered", 'list-unordered',
"live-fill", 'live-fill',
"live-line", 'live-line',
"loader-2-fill", 'loader-2-fill',
"loader-2-line", 'loader-2-line',
"loader-3-fill", 'loader-3-fill',
"loader-3-line", 'loader-3-line',
"loader-4-fill", 'loader-4-fill',
"loader-4-line", 'loader-4-line',
"loader-5-fill", 'loader-5-fill',
"loader-5-line", 'loader-5-line',
"loader-fill", 'loader-fill',
"loader-line", 'loader-line',
"lock-2-fill", 'lock-2-fill',
"lock-2-line", 'lock-2-line',
"lock-fill", 'lock-fill',
"lock-line", 'lock-line',
"lock-password-fill", 'lock-password-fill',
"lock-password-line", 'lock-password-line',
"lock-unlock-fill", 'lock-unlock-fill',
"lock-unlock-line", 'lock-unlock-line',
"login-box-fill", 'login-box-fill',
"login-box-line", 'login-box-line',
"login-circle-fill", 'login-circle-fill',
"login-circle-line", 'login-circle-line',
"logout-box-fill", 'logout-box-fill',
"logout-box-line", 'logout-box-line',
"logout-box-r-fill", 'logout-box-r-fill',
"logout-box-r-line", 'logout-box-r-line',
"logout-circle-fill", 'logout-circle-fill',
"logout-circle-line", 'logout-circle-line',
"logout-circle-r-fill", 'logout-circle-r-fill',
"logout-circle-r-line", 'logout-circle-r-line',
"luggage-cart-fill", 'luggage-cart-fill',
"luggage-cart-line", 'luggage-cart-line',
"luggage-deposit-fill", 'luggage-deposit-fill',
"luggage-deposit-line", 'luggage-deposit-line',
"lungs-fill", 'lungs-fill',
"lungs-line", 'lungs-line',
"mac-fill", 'mac-fill',
"mac-line", 'mac-line',
"macbook-fill", 'macbook-fill',
"macbook-line", 'macbook-line',
"magic-fill", 'magic-fill',
"magic-line", 'magic-line',
"mail-add-fill", 'mail-add-fill',
"mail-add-line", 'mail-add-line',
"mail-check-fill", 'mail-check-fill',
"mail-check-line", 'mail-check-line',
"mail-close-fill", 'mail-close-fill',
"mail-close-line", 'mail-close-line',
"mail-download-fill", 'mail-download-fill',
"mail-download-line", 'mail-download-line',
"mail-fill", 'mail-fill',
"mail-forbid-fill", 'mail-forbid-fill',
"mail-forbid-line", 'mail-forbid-line',
"mail-line", 'mail-line',
"mail-lock-fill", 'mail-lock-fill',
"mail-lock-line", 'mail-lock-line',
"mail-open-fill", 'mail-open-fill',
"mail-open-line", 'mail-open-line',
"mail-send-fill", 'mail-send-fill',
"mail-send-line", 'mail-send-line',
"mail-settings-fill", 'mail-settings-fill',
"mail-settings-line", 'mail-settings-line',
"mail-star-fill", 'mail-star-fill',
"mail-star-line", 'mail-star-line',
"mail-unread-fill", 'mail-unread-fill',
"mail-unread-line", 'mail-unread-line',
"mail-volume-fill", 'mail-volume-fill',
"mail-volume-line", 'mail-volume-line',
"map-2-fill", 'map-2-fill',
"map-2-line", 'map-2-line',
"map-fill", 'map-fill',
"map-line", 'map-line',
"map-pin-2-fill", 'map-pin-2-fill',
"map-pin-2-line", 'map-pin-2-line',
"map-pin-3-fill", 'map-pin-3-fill',
"map-pin-3-line", 'map-pin-3-line',
"map-pin-4-fill", 'map-pin-4-fill',
"map-pin-4-line", 'map-pin-4-line',
"map-pin-5-fill", 'map-pin-5-fill',
"map-pin-5-line", 'map-pin-5-line',
"map-pin-add-fill", 'map-pin-add-fill',
"map-pin-add-line", 'map-pin-add-line',
"map-pin-fill", 'map-pin-fill',
"map-pin-line", 'map-pin-line',
"map-pin-range-fill", 'map-pin-range-fill',
"map-pin-range-line", 'map-pin-range-line',
"map-pin-time-fill", 'map-pin-time-fill',
"map-pin-time-line", 'map-pin-time-line',
"map-pin-user-fill", 'map-pin-user-fill',
"map-pin-user-line", 'map-pin-user-line',
"mark-pen-fill", 'mark-pen-fill',
"mark-pen-line", 'mark-pen-line',
"markdown-fill", 'markdown-fill',
"markdown-line", 'markdown-line',
"markup-fill", 'markup-fill',
"markup-line", 'markup-line',
"mastercard-fill", 'mastercard-fill',
"mastercard-line", 'mastercard-line',
"mastodon-fill", 'mastodon-fill',
"mastodon-line", 'mastodon-line',
"medal-2-fill", 'medal-2-fill',
"medal-2-line", 'medal-2-line',
"medal-fill", 'medal-fill',
"medal-line", 'medal-line',
"medicine-bottle-fill", 'medicine-bottle-fill',
"medicine-bottle-line", 'medicine-bottle-line',
"medium-fill", 'medium-fill',
"medium-line", 'medium-line',
"men-fill", 'men-fill',
"men-line", 'men-line',
"mental-health-fill", 'mental-health-fill',
"mental-health-line", 'mental-health-line',
"menu-2-fill", 'menu-2-fill',
"menu-2-line", 'menu-2-line',
"menu-3-fill", 'menu-3-fill',
"menu-3-line", 'menu-3-line',
"menu-4-fill", 'menu-4-fill',
"menu-4-line", 'menu-4-line',
"menu-5-fill", 'menu-5-fill',
"menu-5-line", 'menu-5-line',
"menu-add-fill", 'menu-add-fill',
"menu-add-line", 'menu-add-line',
"menu-fill", 'menu-fill',
"menu-fold-fill", 'menu-fold-fill',
"menu-fold-line", 'menu-fold-line',
"menu-line", 'menu-line',
"menu-unfold-fill", 'menu-unfold-fill',
"menu-unfold-line", 'menu-unfold-line',
"merge-cells-horizontal", 'merge-cells-horizontal',
"merge-cells-vertical", 'merge-cells-vertical',
"message-2-fill", 'message-2-fill',
"message-2-line", 'message-2-line',
"message-3-fill", 'message-3-fill',
"message-3-line", 'message-3-line',
"message-fill", 'message-fill',
"message-line", 'message-line',
"messenger-fill", 'messenger-fill',
"messenger-line", 'messenger-line',
"meteor-fill", 'meteor-fill',
"meteor-line", 'meteor-line',
"mic-2-fill", 'mic-2-fill',
"mic-2-line", 'mic-2-line',
"mic-fill", 'mic-fill',
"mic-line", 'mic-line',
"mic-off-fill", 'mic-off-fill',
"mic-off-line", 'mic-off-line',
"mickey-fill", 'mickey-fill',
"mickey-line", 'mickey-line',
"microscope-fill", 'microscope-fill',
"microscope-line", 'microscope-line',
"microsoft-fill", 'microsoft-fill',
"microsoft-line", 'microsoft-line',
"mind-map", 'mind-map',
"mini-program-fill", 'mini-program-fill',
"mini-program-line", 'mini-program-line',
"mist-fill", 'mist-fill',
"mist-line", 'mist-line',
"money-cny-box-fill", 'money-cny-box-fill',
"money-cny-box-line", 'money-cny-box-line',
"money-cny-circle-fill", 'money-cny-circle-fill',
"money-cny-circle-line", 'money-cny-circle-line',
"money-dollar-box-fill", 'money-dollar-box-fill',
"money-dollar-box-line", 'money-dollar-box-line',
"money-dollar-circle-fill", 'money-dollar-circle-fill',
"money-dollar-circle-line", 'money-dollar-circle-line',
"money-euro-box-fill", 'money-euro-box-fill',
"money-euro-box-line", 'money-euro-box-line',
"money-euro-circle-fill", 'money-euro-circle-fill',
"money-euro-circle-line", 'money-euro-circle-line',
"money-pound-box-fill", 'money-pound-box-fill',
"money-pound-box-line", 'money-pound-box-line',
"money-pound-circle-fill", 'money-pound-circle-fill',
"money-pound-circle-line", 'money-pound-circle-line',
"moon-clear-fill", 'moon-clear-fill',
"moon-clear-line", 'moon-clear-line',
"moon-cloudy-fill", 'moon-cloudy-fill',
"moon-cloudy-line", 'moon-cloudy-line',
"moon-fill", 'moon-fill',
"moon-foggy-fill", 'moon-foggy-fill',
"moon-foggy-line", 'moon-foggy-line',
"moon-line", 'moon-line',
"more-2-fill", 'more-2-fill',
"more-2-line", 'more-2-line',
"more-fill", 'more-fill',
"more-line", 'more-line',
"motorbike-fill", 'motorbike-fill',
"motorbike-line", 'motorbike-line',
"mouse-fill", 'mouse-fill',
"mouse-line", 'mouse-line',
"movie-2-fill", 'movie-2-fill',
"movie-2-line", 'movie-2-line',
"movie-fill", 'movie-fill',
"movie-line", 'movie-line',
"music-2-fill", 'music-2-fill',
"music-2-line", 'music-2-line',
"music-fill", 'music-fill',
"music-line", 'music-line',
"mv-fill", 'mv-fill',
"mv-line", 'mv-line',
"navigation-fill", 'navigation-fill',
"navigation-line", 'navigation-line',
"netease-cloud-music-fill", 'netease-cloud-music-fill',
"netease-cloud-music-line", 'netease-cloud-music-line',
"netflix-fill", 'netflix-fill',
"netflix-line", 'netflix-line',
"newspaper-fill", 'newspaper-fill',
"newspaper-line", 'newspaper-line',
"node-tree", 'node-tree',
"notification-2-fill", 'notification-2-fill',
"notification-2-line", 'notification-2-line',
"notification-3-fill", 'notification-3-fill',
"notification-3-line", 'notification-3-line',
"notification-4-fill", 'notification-4-fill',
"notification-4-line", 'notification-4-line',
"notification-badge-fill", 'notification-badge-fill',
"notification-badge-line", 'notification-badge-line',
"notification-fill", 'notification-fill',
"notification-line", 'notification-line',
"notification-off-fill", 'notification-off-fill',
"notification-off-line", 'notification-off-line',
"npmjs-fill", 'npmjs-fill',
"npmjs-line", 'npmjs-line',
"number-0", 'number-0',
"number-1", 'number-1',
"number-2", 'number-2',
"number-3", 'number-3',
"number-4", 'number-4',
"number-5", 'number-5',
"number-6", 'number-6',
"number-7", 'number-7',
"number-8", 'number-8',
"number-9", 'number-9',
"numbers-fill", 'numbers-fill',
"numbers-line", 'numbers-line',
"nurse-fill", 'nurse-fill',
"nurse-line", 'nurse-line',
"oil-fill", 'oil-fill',
"oil-line", 'oil-line',
"omega", 'omega',
"open-arm-fill", 'open-arm-fill',
"open-arm-line", 'open-arm-line',
"open-source-fill", 'open-source-fill',
"open-source-line", 'open-source-line',
"opera-fill", 'opera-fill',
"opera-line", 'opera-line',
"order-play-fill", 'order-play-fill',
"order-play-line", 'order-play-line',
"organization-chart", 'organization-chart',
"outlet-2-fill", 'outlet-2-fill',
"outlet-2-line", 'outlet-2-line',
"outlet-fill", 'outlet-fill',
"outlet-line", 'outlet-line',
"page-separator", 'page-separator',
"pages-fill", 'pages-fill',
"pages-line", 'pages-line',
"paint-brush-fill", 'paint-brush-fill',
"paint-brush-line", 'paint-brush-line',
"paint-fill", 'paint-fill',
"paint-line", 'paint-line',
"palette-fill", 'palette-fill',
"palette-line", 'palette-line',
"pantone-fill", 'pantone-fill',
"pantone-line", 'pantone-line',
"paragraph", 'paragraph',
"parent-fill", 'parent-fill',
"parent-line", 'parent-line',
"parentheses-fill", 'parentheses-fill',
"parentheses-line", 'parentheses-line',
"parking-box-fill", 'parking-box-fill',
"parking-box-line", 'parking-box-line',
"parking-fill", 'parking-fill',
"parking-line", 'parking-line',
"passport-fill", 'passport-fill',
"passport-line", 'passport-line',
"patreon-fill", 'patreon-fill',
"patreon-line", 'patreon-line',
"pause-circle-fill", 'pause-circle-fill',
"pause-circle-line", 'pause-circle-line',
"pause-fill", 'pause-fill',
"pause-line", 'pause-line',
"pause-mini-fill", 'pause-mini-fill',
"pause-mini-line", 'pause-mini-line',
"paypal-fill", 'paypal-fill',
"paypal-line", 'paypal-line',
"pen-nib-fill", 'pen-nib-fill',
"pen-nib-line", 'pen-nib-line',
"pencil-fill", 'pencil-fill',
"pencil-line", 'pencil-line',
"pencil-ruler-2-fill", 'pencil-ruler-2-fill',
"pencil-ruler-2-line", 'pencil-ruler-2-line',
"pencil-ruler-fill", 'pencil-ruler-fill',
"pencil-ruler-line", 'pencil-ruler-line',
"percent-fill", 'percent-fill',
"percent-line", 'percent-line',
"phone-camera-fill", 'phone-camera-fill',
"phone-camera-line", 'phone-camera-line',
"phone-fill", 'phone-fill',
"phone-find-fill", 'phone-find-fill',
"phone-find-line", 'phone-find-line',
"phone-line", 'phone-line',
"phone-lock-fill", 'phone-lock-fill',
"phone-lock-line", 'phone-lock-line',
"picture-in-picture-2-fill", 'picture-in-picture-2-fill',
"picture-in-picture-2-line", 'picture-in-picture-2-line',
"picture-in-picture-exit-fill", 'picture-in-picture-exit-fill',
"picture-in-picture-exit-line", 'picture-in-picture-exit-line',
"picture-in-picture-fill", 'picture-in-picture-fill',
"picture-in-picture-line", 'picture-in-picture-line',
"pie-chart-2-fill", 'pie-chart-2-fill',
"pie-chart-2-line", 'pie-chart-2-line',
"pie-chart-box-fill", 'pie-chart-box-fill',
"pie-chart-box-line", 'pie-chart-box-line',
"pie-chart-fill", 'pie-chart-fill',
"pie-chart-line", 'pie-chart-line',
"pin-distance-fill", 'pin-distance-fill',
"pin-distance-line", 'pin-distance-line',
"ping-pong-fill", 'ping-pong-fill',
"ping-pong-line", 'ping-pong-line',
"pinterest-fill", 'pinterest-fill',
"pinterest-line", 'pinterest-line',
"pinyin-input", 'pinyin-input',
"pixelfed-fill", 'pixelfed-fill',
"pixelfed-line", 'pixelfed-line',
"plane-fill", 'plane-fill',
"plane-line", 'plane-line',
"plant-fill", 'plant-fill',
"plant-line", 'plant-line',
"play-circle-fill", 'play-circle-fill',
"play-circle-line", 'play-circle-line',
"play-fill", 'play-fill',
"play-line", 'play-line',
"play-list-2-fill", 'play-list-2-fill',
"play-list-2-line", 'play-list-2-line',
"play-list-add-fill", 'play-list-add-fill',
"play-list-add-line", 'play-list-add-line',
"play-list-fill", 'play-list-fill',
"play-list-line", 'play-list-line',
"play-mini-fill", 'play-mini-fill',
"play-mini-line", 'play-mini-line',
"playstation-fill", 'playstation-fill',
"playstation-line", 'playstation-line',
"plug-2-fill", 'plug-2-fill',
"plug-2-line", 'plug-2-line',
"plug-fill", 'plug-fill',
"plug-line", 'plug-line',
"polaroid-2-fill", 'polaroid-2-fill',
"polaroid-2-line", 'polaroid-2-line',
"polaroid-fill", 'polaroid-fill',
"polaroid-line", 'polaroid-line',
"police-car-fill", 'police-car-fill',
"police-car-line", 'police-car-line',
"price-tag-2-fill", 'price-tag-2-fill',
"price-tag-2-line", 'price-tag-2-line',
"price-tag-3-fill", 'price-tag-3-fill',
"price-tag-3-line", 'price-tag-3-line',
"price-tag-fill", 'price-tag-fill',
"price-tag-line", 'price-tag-line',
"printer-cloud-fill", 'printer-cloud-fill',
"printer-cloud-line", 'printer-cloud-line',
"printer-fill", 'printer-fill',
"printer-line", 'printer-line',
"product-hunt-fill", 'product-hunt-fill',
"product-hunt-line", 'product-hunt-line',
"profile-fill", 'profile-fill',
"profile-line", 'profile-line',
"projector-2-fill", 'projector-2-fill',
"projector-2-line", 'projector-2-line',
"projector-fill", 'projector-fill',
"projector-line", 'projector-line',
"psychotherapy-fill", 'psychotherapy-fill',
"psychotherapy-line", 'psychotherapy-line',
"pulse-fill", 'pulse-fill',
"pulse-line", 'pulse-line',
"pushpin-2-fill", 'pushpin-2-fill',
"pushpin-2-line", 'pushpin-2-line',
"pushpin-fill", 'pushpin-fill',
"pushpin-line", 'pushpin-line',
"qq-fill", 'qq-fill',
"qq-line", 'qq-line',
"qr-code-fill", 'qr-code-fill',
"qr-code-line", 'qr-code-line',
"qr-scan-2-fill", 'qr-scan-2-fill',
"qr-scan-2-line", 'qr-scan-2-line',
"qr-scan-fill", 'qr-scan-fill',
"qr-scan-line", 'qr-scan-line',
"question-answer-fill", 'question-answer-fill',
"question-answer-line", 'question-answer-line',
"question-fill", 'question-fill',
"question-line", 'question-line',
"question-mark", 'question-mark',
"questionnaire-fill", 'questionnaire-fill',
"questionnaire-line", 'questionnaire-line',
"quill-pen-fill", 'quill-pen-fill',
"quill-pen-line", 'quill-pen-line',
"radar-fill", 'radar-fill',
"radar-line", 'radar-line',
"radio-2-fill", 'radio-2-fill',
"radio-2-line", 'radio-2-line',
"radio-button-fill", 'radio-button-fill',
"radio-button-line", 'radio-button-line',
"radio-fill", 'radio-fill',
"radio-line", 'radio-line',
"rainbow-fill", 'rainbow-fill',
"rainbow-line", 'rainbow-line',
"rainy-fill", 'rainy-fill',
"rainy-line", 'rainy-line',
"reactjs-fill", 'reactjs-fill',
"reactjs-line", 'reactjs-line',
"record-circle-fill", 'record-circle-fill',
"record-circle-line", 'record-circle-line',
"record-mail-fill", 'record-mail-fill',
"record-mail-line", 'record-mail-line',
"recycle-fill", 'recycle-fill',
"recycle-line", 'recycle-line',
"red-packet-fill", 'red-packet-fill',
"red-packet-line", 'red-packet-line',
"reddit-fill", 'reddit-fill',
"reddit-line", 'reddit-line',
"refresh-fill", 'refresh-fill',
"refresh-line", 'refresh-line',
"refund-2-fill", 'refund-2-fill',
"refund-2-line", 'refund-2-line',
"refund-fill", 'refund-fill',
"refund-line", 'refund-line',
"registered-fill", 'registered-fill',
"registered-line", 'registered-line',
"remixicon-fill", 'remixicon-fill',
"remixicon-line", 'remixicon-line',
"remote-control-2-fill", 'remote-control-2-fill',
"remote-control-2-line", 'remote-control-2-line',
"remote-control-fill", 'remote-control-fill',
"remote-control-line", 'remote-control-line',
"repeat-2-fill", 'repeat-2-fill',
"repeat-2-line", 'repeat-2-line',
"repeat-fill", 'repeat-fill',
"repeat-line", 'repeat-line',
"repeat-one-fill", 'repeat-one-fill',
"repeat-one-line", 'repeat-one-line',
"reply-all-fill", 'reply-all-fill',
"reply-all-line", 'reply-all-line',
"reply-fill", 'reply-fill',
"reply-line", 'reply-line',
"reserved-fill", 'reserved-fill',
"reserved-line", 'reserved-line',
"rest-time-fill", 'rest-time-fill',
"rest-time-line", 'rest-time-line',
"restart-fill", 'restart-fill',
"restart-line", 'restart-line',
"restaurant-2-fill", 'restaurant-2-fill',
"restaurant-2-line", 'restaurant-2-line',
"restaurant-fill", 'restaurant-fill',
"restaurant-line", 'restaurant-line',
"rewind-fill", 'rewind-fill',
"rewind-line", 'rewind-line',
"rewind-mini-fill", 'rewind-mini-fill',
"rewind-mini-line", 'rewind-mini-line',
"rhythm-fill", 'rhythm-fill',
"rhythm-line", 'rhythm-line',
"riding-fill", 'riding-fill',
"riding-line", 'riding-line',
"road-map-fill", 'road-map-fill',
"road-map-line", 'road-map-line',
"roadster-fill", 'roadster-fill',
"roadster-line", 'roadster-line',
"robot-fill", 'robot-fill',
"robot-line", 'robot-line',
"rocket-2-fill", 'rocket-2-fill',
"rocket-2-line", 'rocket-2-line',
"rocket-fill", 'rocket-fill',
"rocket-line", 'rocket-line',
"rotate-lock-fill", 'rotate-lock-fill',
"rotate-lock-line", 'rotate-lock-line',
"rounded-corner", 'rounded-corner',
"route-fill", 'route-fill',
"route-line", 'route-line',
"router-fill", 'router-fill',
"router-line", 'router-line',
"rss-fill", 'rss-fill',
"rss-line", 'rss-line',
"ruler-2-fill", 'ruler-2-fill',
"ruler-2-line", 'ruler-2-line',
"ruler-fill", 'ruler-fill',
"ruler-line", 'ruler-line',
"run-fill", 'run-fill',
"run-line", 'run-line',
"safari-fill", 'safari-fill',
"safari-line", 'safari-line',
"safe-2-fill", 'safe-2-fill',
"safe-2-line", 'safe-2-line',
"safe-fill", 'safe-fill',
"safe-line", 'safe-line',
"sailboat-fill", 'sailboat-fill',
"sailboat-line", 'sailboat-line',
"save-2-fill", 'save-2-fill',
"save-2-line", 'save-2-line',
"save-3-fill", 'save-3-fill',
"save-3-line", 'save-3-line',
"save-fill", 'save-fill',
"save-line", 'save-line',
"scales-2-fill", 'scales-2-fill',
"scales-2-line", 'scales-2-line',
"scales-3-fill", 'scales-3-fill',
"scales-3-line", 'scales-3-line',
"scales-fill", 'scales-fill',
"scales-line", 'scales-line',
"scan-2-fill", 'scan-2-fill',
"scan-2-line", 'scan-2-line',
"scan-fill", 'scan-fill',
"scan-line", 'scan-line',
"scissors-2-fill", 'scissors-2-fill',
"scissors-2-line", 'scissors-2-line',
"scissors-cut-fill", 'scissors-cut-fill',
"scissors-cut-line", 'scissors-cut-line',
"scissors-fill", 'scissors-fill',
"scissors-line", 'scissors-line',
"screenshot-2-fill", 'screenshot-2-fill',
"screenshot-2-line", 'screenshot-2-line',
"screenshot-fill", 'screenshot-fill',
"screenshot-line", 'screenshot-line',
"sd-card-fill", 'sd-card-fill',
"sd-card-line", 'sd-card-line',
"sd-card-mini-fill", 'sd-card-mini-fill',
"sd-card-mini-line", 'sd-card-mini-line',
"search-2-fill", 'search-2-fill',
"search-2-line", 'search-2-line',
"search-eye-fill", 'search-eye-fill',
"search-eye-line", 'search-eye-line',
"search-fill", 'search-fill',
"search-line", 'search-line',
"secure-payment-fill", 'secure-payment-fill',
"secure-payment-line", 'secure-payment-line',
"seedling-fill", 'seedling-fill',
"seedling-line", 'seedling-line',
"send-backward", 'send-backward',
"send-plane-2-fill", 'send-plane-2-fill',
"send-plane-2-line", 'send-plane-2-line',
"send-plane-fill", 'send-plane-fill',
"send-plane-line", 'send-plane-line',
"send-to-back", 'send-to-back',
"sensor-fill", 'sensor-fill',
"sensor-line", 'sensor-line',
"separator", 'separator',
"server-fill", 'server-fill',
"server-line", 'server-line',
"service-fill", 'service-fill',
"service-line", 'service-line',
"settings-2-fill", 'settings-2-fill',
"settings-2-line", 'settings-2-line',
"settings-3-fill", 'settings-3-fill',
"settings-3-line", 'settings-3-line',
"settings-4-fill", 'settings-4-fill',
"settings-4-line", 'settings-4-line',
"settings-5-fill", 'settings-5-fill',
"settings-5-line", 'settings-5-line',
"settings-6-fill", 'settings-6-fill',
"settings-6-line", 'settings-6-line',
"settings-fill", 'settings-fill',
"settings-line", 'settings-line',
"shape-2-fill", 'shape-2-fill',
"shape-2-line", 'shape-2-line',
"shape-fill", 'shape-fill',
"shape-line", 'shape-line',
"share-box-fill", 'share-box-fill',
"share-box-line", 'share-box-line',
"share-circle-fill", 'share-circle-fill',
"share-circle-line", 'share-circle-line',
"share-fill", 'share-fill',
"share-forward-2-fill", 'share-forward-2-fill',
"share-forward-2-line", 'share-forward-2-line',
"share-forward-box-fill", 'share-forward-box-fill',
"share-forward-box-line", 'share-forward-box-line',
"share-forward-fill", 'share-forward-fill',
"share-forward-line", 'share-forward-line',
"share-line", 'share-line',
"shield-check-fill", 'shield-check-fill',
"shield-check-line", 'shield-check-line',
"shield-cross-fill", 'shield-cross-fill',
"shield-cross-line", 'shield-cross-line',
"shield-fill", 'shield-fill',
"shield-flash-fill", 'shield-flash-fill',
"shield-flash-line", 'shield-flash-line',
"shield-keyhole-fill", 'shield-keyhole-fill',
"shield-keyhole-line", 'shield-keyhole-line',
"shield-line", 'shield-line',
"shield-star-fill", 'shield-star-fill',
"shield-star-line", 'shield-star-line',
"shield-user-fill", 'shield-user-fill',
"shield-user-line", 'shield-user-line',
"ship-2-fill", 'ship-2-fill',
"ship-2-line", 'ship-2-line',
"ship-fill", 'ship-fill',
"ship-line", 'ship-line',
"shirt-fill", 'shirt-fill',
"shirt-line", 'shirt-line',
"shopping-bag-2-fill", 'shopping-bag-2-fill',
"shopping-bag-2-line", 'shopping-bag-2-line',
"shopping-bag-3-fill", 'shopping-bag-3-fill',
"shopping-bag-3-line", 'shopping-bag-3-line',
"shopping-bag-fill", 'shopping-bag-fill',
"shopping-bag-line", 'shopping-bag-line',
"shopping-basket-2-fill", 'shopping-basket-2-fill',
"shopping-basket-2-line", 'shopping-basket-2-line',
"shopping-basket-fill", 'shopping-basket-fill',
"shopping-basket-line", 'shopping-basket-line',
"shopping-cart-2-fill", 'shopping-cart-2-fill',
"shopping-cart-2-line", 'shopping-cart-2-line',
"shopping-cart-fill", 'shopping-cart-fill',
"shopping-cart-line", 'shopping-cart-line',
"showers-fill", 'showers-fill',
"showers-line", 'showers-line',
"shuffle-fill", 'shuffle-fill',
"shuffle-line", 'shuffle-line',
"shut-down-fill", 'shut-down-fill',
"shut-down-line", 'shut-down-line',
"side-bar-fill", 'side-bar-fill',
"side-bar-line", 'side-bar-line',
"signal-tower-fill", 'signal-tower-fill',
"signal-tower-line", 'signal-tower-line',
"signal-wifi-1-fill", 'signal-wifi-1-fill',
"signal-wifi-1-line", 'signal-wifi-1-line',
"signal-wifi-2-fill", 'signal-wifi-2-fill',
"signal-wifi-2-line", 'signal-wifi-2-line',
"signal-wifi-3-fill", 'signal-wifi-3-fill',
"signal-wifi-3-line", 'signal-wifi-3-line',
"signal-wifi-error-fill", 'signal-wifi-error-fill',
"signal-wifi-error-line", 'signal-wifi-error-line',
"signal-wifi-fill", 'signal-wifi-fill',
"signal-wifi-line", 'signal-wifi-line',
"signal-wifi-off-fill", 'signal-wifi-off-fill',
"signal-wifi-off-line", 'signal-wifi-off-line',
"sim-card-2-fill", 'sim-card-2-fill',
"sim-card-2-line", 'sim-card-2-line',
"sim-card-fill", 'sim-card-fill',
"sim-card-line", 'sim-card-line',
"single-quotes-l", 'single-quotes-l',
"single-quotes-r", 'single-quotes-r',
"sip-fill", 'sip-fill',
"sip-line", 'sip-line',
"skip-back-fill", 'skip-back-fill',
"skip-back-line", 'skip-back-line',
"skip-back-mini-fill", 'skip-back-mini-fill',
"skip-back-mini-line", 'skip-back-mini-line',
"skip-forward-fill", 'skip-forward-fill',
"skip-forward-line", 'skip-forward-line',
"skip-forward-mini-fill", 'skip-forward-mini-fill',
"skip-forward-mini-line", 'skip-forward-mini-line',
"skull-2-fill", 'skull-2-fill',
"skull-2-line", 'skull-2-line',
"skull-fill", 'skull-fill',
"skull-line", 'skull-line',
"skype-fill", 'skype-fill',
"skype-line", 'skype-line',
"slack-fill", 'slack-fill',
"slack-line", 'slack-line',
"slice-fill", 'slice-fill',
"slice-line", 'slice-line',
"slideshow-2-fill", 'slideshow-2-fill',
"slideshow-2-line", 'slideshow-2-line',
"slideshow-3-fill", 'slideshow-3-fill',
"slideshow-3-line", 'slideshow-3-line',
"slideshow-4-fill", 'slideshow-4-fill',
"slideshow-4-line", 'slideshow-4-line',
"slideshow-fill", 'slideshow-fill',
"slideshow-line", 'slideshow-line',
"smartphone-fill", 'smartphone-fill',
"smartphone-line", 'smartphone-line',
"snapchat-fill", 'snapchat-fill',
"snapchat-line", 'snapchat-line',
"snowy-fill", 'snowy-fill',
"snowy-line", 'snowy-line',
"sort-asc", 'sort-asc',
"sort-desc", 'sort-desc',
"sound-module-fill", 'sound-module-fill',
"sound-module-line", 'sound-module-line',
"soundcloud-fill", 'soundcloud-fill',
"soundcloud-line", 'soundcloud-line',
"space-ship-fill", 'space-ship-fill',
"space-ship-line", 'space-ship-line',
"space", 'space',
"spam-2-fill", 'spam-2-fill',
"spam-2-line", 'spam-2-line',
"spam-3-fill", 'spam-3-fill',
"spam-3-line", 'spam-3-line',
"spam-fill", 'spam-fill',
"spam-line", 'spam-line',
"speaker-2-fill", 'speaker-2-fill',
"speaker-2-line", 'speaker-2-line',
"speaker-3-fill", 'speaker-3-fill',
"speaker-3-line", 'speaker-3-line',
"speaker-fill", 'speaker-fill',
"speaker-line", 'speaker-line',
"spectrum-fill", 'spectrum-fill',
"spectrum-line", 'spectrum-line',
"speed-fill", 'speed-fill',
"speed-line", 'speed-line',
"speed-mini-fill", 'speed-mini-fill',
"speed-mini-line", 'speed-mini-line',
"split-cells-horizontal", 'split-cells-horizontal',
"split-cells-vertical", 'split-cells-vertical',
"spotify-fill", 'spotify-fill',
"spotify-line", 'spotify-line',
"spy-fill", 'spy-fill',
"spy-line", 'spy-line',
"stack-fill", 'stack-fill',
"stack-line", 'stack-line',
"stack-overflow-fill", 'stack-overflow-fill',
"stack-overflow-line", 'stack-overflow-line',
"stackshare-fill", 'stackshare-fill',
"stackshare-line", 'stackshare-line',
"star-fill", 'star-fill',
"star-half-fill", 'star-half-fill',
"star-half-line", 'star-half-line',
"star-half-s-fill", 'star-half-s-fill',
"star-half-s-line", 'star-half-s-line',
"star-line", 'star-line',
"star-s-fill", 'star-s-fill',
"star-s-line", 'star-s-line',
"star-smile-fill", 'star-smile-fill',
"star-smile-line", 'star-smile-line',
"steam-fill", 'steam-fill',
"steam-line", 'steam-line',
"steering-2-fill", 'steering-2-fill',
"steering-2-line", 'steering-2-line',
"steering-fill", 'steering-fill',
"steering-line", 'steering-line',
"stethoscope-fill", 'stethoscope-fill',
"stethoscope-line", 'stethoscope-line',
"sticky-note-2-fill", 'sticky-note-2-fill',
"sticky-note-2-line", 'sticky-note-2-line',
"sticky-note-fill", 'sticky-note-fill',
"sticky-note-line", 'sticky-note-line',
"stock-fill", 'stock-fill',
"stock-line", 'stock-line',
"stop-circle-fill", 'stop-circle-fill',
"stop-circle-line", 'stop-circle-line',
"stop-fill", 'stop-fill',
"stop-line", 'stop-line',
"stop-mini-fill", 'stop-mini-fill',
"stop-mini-line", 'stop-mini-line',
"store-2-fill", 'store-2-fill',
"store-2-line", 'store-2-line',
"store-3-fill", 'store-3-fill',
"store-3-line", 'store-3-line',
"store-fill", 'store-fill',
"store-line", 'store-line',
"strikethrough-2", 'strikethrough-2',
"strikethrough", 'strikethrough',
"subscript-2", 'subscript-2',
"subscript", 'subscript',
"subtract-fill", 'subtract-fill',
"subtract-line", 'subtract-line',
"subway-fill", 'subway-fill',
"subway-line", 'subway-line',
"subway-wifi-fill", 'subway-wifi-fill',
"subway-wifi-line", 'subway-wifi-line',
"suitcase-2-fill", 'suitcase-2-fill',
"suitcase-2-line", 'suitcase-2-line',
"suitcase-3-fill", 'suitcase-3-fill',
"suitcase-3-line", 'suitcase-3-line',
"suitcase-fill", 'suitcase-fill',
"suitcase-line", 'suitcase-line',
"sun-cloudy-fill", 'sun-cloudy-fill',
"sun-cloudy-line", 'sun-cloudy-line',
"sun-fill", 'sun-fill',
"sun-foggy-fill", 'sun-foggy-fill',
"sun-foggy-line", 'sun-foggy-line',
"sun-line", 'sun-line',
"superscript-2", 'superscript-2',
"superscript", 'superscript',
"surgical-mask-fill", 'surgical-mask-fill',
"surgical-mask-line", 'surgical-mask-line',
"surround-sound-fill", 'surround-sound-fill',
"surround-sound-line", 'surround-sound-line',
"survey-fill", 'survey-fill',
"survey-line", 'survey-line',
"swap-box-fill", 'swap-box-fill',
"swap-box-line", 'swap-box-line',
"swap-fill", 'swap-fill',
"swap-line", 'swap-line',
"switch-fill", 'switch-fill',
"switch-line", 'switch-line',
"sword-fill", 'sword-fill',
"sword-line", 'sword-line',
"syringe-fill", 'syringe-fill',
"syringe-line", 'syringe-line',
"t-box-fill", 't-box-fill',
"t-box-line", 't-box-line',
"t-shirt-2-fill", 't-shirt-2-fill',
"t-shirt-2-line", 't-shirt-2-line',
"t-shirt-air-fill", 't-shirt-air-fill',
"t-shirt-air-line", 't-shirt-air-line',
"t-shirt-fill", 't-shirt-fill',
"t-shirt-line", 't-shirt-line',
"table-2", 'table-2',
"table-alt-fill", 'table-alt-fill',
"table-alt-line", 'table-alt-line',
"table-fill", 'table-fill',
"table-line", 'table-line',
"tablet-fill", 'tablet-fill',
"tablet-line", 'tablet-line',
"takeaway-fill", 'takeaway-fill',
"takeaway-line", 'takeaway-line',
"taobao-fill", 'taobao-fill',
"taobao-line", 'taobao-line',
"tape-fill", 'tape-fill',
"tape-line", 'tape-line',
"task-fill", 'task-fill',
"task-line", 'task-line',
"taxi-fill", 'taxi-fill',
"taxi-line", 'taxi-line',
"taxi-wifi-fill", 'taxi-wifi-fill',
"taxi-wifi-line", 'taxi-wifi-line',
"team-fill", 'team-fill',
"team-line", 'team-line',
"telegram-fill", 'telegram-fill',
"telegram-line", 'telegram-line',
"temp-cold-fill", 'temp-cold-fill',
"temp-cold-line", 'temp-cold-line',
"temp-hot-fill", 'temp-hot-fill',
"temp-hot-line", 'temp-hot-line',
"terminal-box-fill", 'terminal-box-fill',
"terminal-box-line", 'terminal-box-line',
"terminal-fill", 'terminal-fill',
"terminal-line", 'terminal-line',
"terminal-window-fill", 'terminal-window-fill',
"terminal-window-line", 'terminal-window-line',
"test-tube-fill", 'test-tube-fill',
"test-tube-line", 'test-tube-line',
"text-direction-l", 'text-direction-l',
"text-direction-r", 'text-direction-r',
"text-spacing", 'text-spacing',
"text-wrap", 'text-wrap',
"text", 'text',
"thermometer-fill", 'thermometer-fill',
"thermometer-line", 'thermometer-line',
"thumb-down-fill", 'thumb-down-fill',
"thumb-down-line", 'thumb-down-line',
"thumb-up-fill", 'thumb-up-fill',
"thumb-up-line", 'thumb-up-line',
"thunderstorms-fill", 'thunderstorms-fill',
"thunderstorms-line", 'thunderstorms-line',
"ticket-2-fill", 'ticket-2-fill',
"ticket-2-line", 'ticket-2-line',
"ticket-fill", 'ticket-fill',
"ticket-line", 'ticket-line',
"time-fill", 'time-fill',
"time-line", 'time-line',
"timer-2-fill", 'timer-2-fill',
"timer-2-line", 'timer-2-line',
"timer-fill", 'timer-fill',
"timer-flash-fill", 'timer-flash-fill',
"timer-flash-line", 'timer-flash-line',
"timer-line", 'timer-line',
"todo-fill", 'todo-fill',
"todo-line", 'todo-line',
"toggle-fill", 'toggle-fill',
"toggle-line", 'toggle-line',
"tools-fill", 'tools-fill',
"tools-line", 'tools-line',
"tornado-fill", 'tornado-fill',
"tornado-line", 'tornado-line',
"trademark-fill", 'trademark-fill',
"trademark-line", 'trademark-line',
"traffic-light-fill", 'traffic-light-fill',
"traffic-light-line", 'traffic-light-line',
"train-fill", 'train-fill',
"train-line", 'train-line',
"train-wifi-fill", 'train-wifi-fill',
"train-wifi-line", 'train-wifi-line',
"translate-2", 'translate-2',
"translate", 'translate',
"travesti-fill", 'travesti-fill',
"travesti-line", 'travesti-line',
"treasure-map-fill", 'treasure-map-fill',
"treasure-map-line", 'treasure-map-line',
"trello-fill", 'trello-fill',
"trello-line", 'trello-line',
"trophy-fill", 'trophy-fill',
"trophy-line", 'trophy-line',
"truck-fill", 'truck-fill',
"truck-line", 'truck-line',
"tumblr-fill", 'tumblr-fill',
"tumblr-line", 'tumblr-line',
"tv-2-fill", 'tv-2-fill',
"tv-2-line", 'tv-2-line',
"tv-fill", 'tv-fill',
"tv-line", 'tv-line',
"twitch-fill", 'twitch-fill',
"twitch-line", 'twitch-line',
"twitter-fill", 'twitter-fill',
"twitter-line", 'twitter-line',
"typhoon-fill", 'typhoon-fill',
"typhoon-line", 'typhoon-line',
"u-disk-fill", 'u-disk-fill',
"u-disk-line", 'u-disk-line',
"ubuntu-fill", 'ubuntu-fill',
"ubuntu-line", 'ubuntu-line',
"umbrella-fill", 'umbrella-fill',
"umbrella-line", 'umbrella-line',
"underline", 'underline',
"uninstall-fill", 'uninstall-fill',
"uninstall-line", 'uninstall-line',
"unsplash-fill", 'unsplash-fill',
"unsplash-line", 'unsplash-line',
"upload-2-fill", 'upload-2-fill',
"upload-2-line", 'upload-2-line',
"upload-cloud-2-fill", 'upload-cloud-2-fill',
"upload-cloud-2-line", 'upload-cloud-2-line',
"upload-cloud-fill", 'upload-cloud-fill',
"upload-cloud-line", 'upload-cloud-line',
"upload-fill", 'upload-fill',
"upload-line", 'upload-line',
"usb-fill", 'usb-fill',
"usb-line", 'usb-line',
"user-2-fill", 'user-2-fill',
"user-2-line", 'user-2-line',
"user-3-fill", 'user-3-fill',
"user-3-line", 'user-3-line',
"user-4-fill", 'user-4-fill',
"user-4-line", 'user-4-line',
"user-5-fill", 'user-5-fill',
"user-5-line", 'user-5-line',
"user-6-fill", 'user-6-fill',
"user-6-line", 'user-6-line',
"user-add-fill", 'user-add-fill',
"user-add-line", 'user-add-line',
"user-fill", 'user-fill',
"user-follow-fill", 'user-follow-fill',
"user-follow-line", 'user-follow-line',
"user-heart-fill", 'user-heart-fill',
"user-heart-line", 'user-heart-line',
"user-line", 'user-line',
"user-location-fill", 'user-location-fill',
"user-location-line", 'user-location-line',
"user-received-2-fill", 'user-received-2-fill',
"user-received-2-line", 'user-received-2-line',
"user-received-fill", 'user-received-fill',
"user-received-line", 'user-received-line',
"user-search-fill", 'user-search-fill',
"user-search-line", 'user-search-line',
"user-settings-fill", 'user-settings-fill',
"user-settings-line", 'user-settings-line',
"user-shared-2-fill", 'user-shared-2-fill',
"user-shared-2-line", 'user-shared-2-line',
"user-shared-fill", 'user-shared-fill',
"user-shared-line", 'user-shared-line',
"user-smile-fill", 'user-smile-fill',
"user-smile-line", 'user-smile-line',
"user-star-fill", 'user-star-fill',
"user-star-line", 'user-star-line',
"user-unfollow-fill", 'user-unfollow-fill',
"user-unfollow-line", 'user-unfollow-line',
"user-voice-fill", 'user-voice-fill',
"user-voice-line", 'user-voice-line',
"video-add-fill", 'video-add-fill',
"video-add-line", 'video-add-line',
"video-chat-fill", 'video-chat-fill',
"video-chat-line", 'video-chat-line',
"video-download-fill", 'video-download-fill',
"video-download-line", 'video-download-line',
"video-fill", 'video-fill',
"video-line", 'video-line',
"video-upload-fill", 'video-upload-fill',
"video-upload-line", 'video-upload-line',
"vidicon-2-fill", 'vidicon-2-fill',
"vidicon-2-line", 'vidicon-2-line',
"vidicon-fill", 'vidicon-fill',
"vidicon-line", 'vidicon-line',
"vimeo-fill", 'vimeo-fill',
"vimeo-line", 'vimeo-line',
"vip-crown-2-fill", 'vip-crown-2-fill',
"vip-crown-2-line", 'vip-crown-2-line',
"vip-crown-fill", 'vip-crown-fill',
"vip-crown-line", 'vip-crown-line',
"vip-diamond-fill", 'vip-diamond-fill',
"vip-diamond-line", 'vip-diamond-line',
"vip-fill", 'vip-fill',
"vip-line", 'vip-line',
"virus-fill", 'virus-fill',
"virus-line", 'virus-line',
"visa-fill", 'visa-fill',
"visa-line", 'visa-line',
"voice-recognition-fill", 'voice-recognition-fill',
"voice-recognition-line", 'voice-recognition-line',
"voiceprint-fill", 'voiceprint-fill',
"voiceprint-line", 'voiceprint-line',
"volume-down-fill", 'volume-down-fill',
"volume-down-line", 'volume-down-line',
"volume-mute-fill", 'volume-mute-fill',
"volume-mute-line", 'volume-mute-line',
"volume-off-vibrate-fill", 'volume-off-vibrate-fill',
"volume-off-vibrate-line", 'volume-off-vibrate-line',
"volume-up-fill", 'volume-up-fill',
"volume-up-line", 'volume-up-line',
"volume-vibrate-fill", 'volume-vibrate-fill',
"volume-vibrate-line", 'volume-vibrate-line',
"vuejs-fill", 'vuejs-fill',
"vuejs-line", 'vuejs-line',
"walk-fill", 'walk-fill',
"walk-line", 'walk-line',
"wallet-2-fill", 'wallet-2-fill',
"wallet-2-line", 'wallet-2-line',
"wallet-3-fill", 'wallet-3-fill',
"wallet-3-line", 'wallet-3-line',
"wallet-fill", 'wallet-fill',
"wallet-line", 'wallet-line',
"water-flash-fill", 'water-flash-fill',
"water-flash-line", 'water-flash-line',
"webcam-fill", 'webcam-fill',
"webcam-line", 'webcam-line',
"wechat-2-fill", 'wechat-2-fill',
"wechat-2-line", 'wechat-2-line',
"wechat-fill", 'wechat-fill',
"wechat-line", 'wechat-line',
"wechat-pay-fill", 'wechat-pay-fill',
"wechat-pay-line", 'wechat-pay-line',
"weibo-fill", 'weibo-fill',
"weibo-line", 'weibo-line',
"whatsapp-fill", 'whatsapp-fill',
"whatsapp-line", 'whatsapp-line',
"wheelchair-fill", 'wheelchair-fill',
"wheelchair-line", 'wheelchair-line',
"wifi-fill", 'wifi-fill',
"wifi-line", 'wifi-line',
"wifi-off-fill", 'wifi-off-fill',
"wifi-off-line", 'wifi-off-line',
"window-2-fill", 'window-2-fill',
"window-2-line", 'window-2-line',
"window-fill", 'window-fill',
"window-line", 'window-line',
"windows-fill", 'windows-fill',
"windows-line", 'windows-line',
"windy-fill", 'windy-fill',
"windy-line", 'windy-line',
"wireless-charging-fill", 'wireless-charging-fill',
"wireless-charging-line", 'wireless-charging-line',
"women-fill", 'women-fill',
"women-line", 'women-line',
"wubi-input", 'wubi-input',
"xbox-fill", 'xbox-fill',
"xbox-line", 'xbox-line',
"xing-fill", 'xing-fill',
"xing-line", 'xing-line',
"youtube-fill", 'youtube-fill',
"youtube-line", 'youtube-line',
"zcool-fill", 'zcool-fill',
"zcool-line", 'zcool-line',
"zhihu-fill", 'zhihu-fill',
"zhihu-line", 'zhihu-line',
"zoom-in-fill", 'zoom-in-fill',
"zoom-in-line", 'zoom-in-line',
"zoom-out-fill", 'zoom-out-fill',
"zoom-out-line", 'zoom-out-line',
"zzz-fill", 'zzz-fill',
"zzz-line", 'zzz-line',
]; ]
module.exports = [ module.exports = [
{ {
url: "/remixIcon/getList", url: '/remixIcon/getList',
type: "post", type: 'post',
response(config) { response(config) {
const { title, pageNo = 1, pageSize = 72 } = config.body; const { title, pageNo = 1, pageSize = 72 } = config.body
let mockList = data.filter((item) => { let mockList = data.filter((item) => {
if (title && item.indexOf(title) < 0) return false; if (title && item.indexOf(title) < 0) return false
return true; return true
}); })
const pageList = mockList.filter( const pageList = mockList.filter(
(item, index) => (item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1) index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
); )
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: mockList.length, totalCount: mockList.length,
data: pageList, data: pageList,
}; }
}, },
}, },
]; ]
const totalCount = 2; const totalCount = 2
const List = [ const List = [
{ {
id: "@id", id: '@id',
permission: "admin", permission: 'admin',
}, },
{ {
id: "@id", id: '@id',
permission: "editor", permission: 'editor',
}, },
]; ]
module.exports = [ module.exports = [
{ {
url: "/roleManagement/getList", url: '/roleManagement/getList',
type: "post", type: 'post',
response(config) { response(config) {
const { title = "", pageNo = 1, pageSize = 20 } = config.body; const { title = '', pageNo = 1, pageSize = 20 } = config.body
let mockList = List.filter((item) => { let mockList = List.filter((item) => {
return !(title && item.title.indexOf(title) < 0); return !(title && item.title.indexOf(title) < 0)
}); })
const pageList = mockList.filter( const pageList = mockList.filter(
(item, index) => (item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1) index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
); )
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount, totalCount,
data: pageList, data: pageList,
}; }
}, },
}, },
{ {
url: "/roleManagement/doEdit", url: '/roleManagement/doEdit',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟保存成功", msg: '模拟保存成功',
}; }
}, },
}, },
{ {
url: "/roleManagement/doDelete", url: '/roleManagement/doDelete',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟删除成功", msg: '模拟删除成功',
}; }
}, },
}, },
]; ]
const data = [ const data = [
{ {
path: "/", path: '/',
component: "Layout", component: 'Layout',
redirect: "index", redirect: 'index',
children: [ children: [
{ {
path: "index", path: 'index',
name: "Index", name: 'Index',
component: "@/views/index/index", component: '@/views/index/index',
meta: { meta: {
title: "首页", title: '首页',
icon: "home", icon: 'home',
affix: true, affix: true,
}, },
}, },
], ],
}, },
{ {
path: "/personnelManagement", path: '/personnelManagement',
component: "Layout", component: 'Layout',
redirect: "noRedirect", redirect: 'noRedirect',
name: "PersonnelManagement", name: 'PersonnelManagement',
meta: { title: "人员", icon: "users-cog", permissions: ["admin"] }, meta: { title: '人员', icon: 'users-cog', permissions: ['admin'] },
children: [ children: [
{ {
path: "userManagement", path: 'userManagement',
name: "UserManagement", name: 'UserManagement',
component: "@/views/personnelManagement/userManagement/index", component: '@/views/personnelManagement/userManagement/index',
meta: { title: "用户管理" }, meta: { title: '用户管理' },
}, },
{ {
path: "roleManagement", path: 'roleManagement',
name: "RoleManagement", name: 'RoleManagement',
component: "@/views/personnelManagement/roleManagement/index", component: '@/views/personnelManagement/roleManagement/index',
meta: { title: "角色管理" }, meta: { title: '角色管理' },
}, },
{ {
path: "menuManagement", path: 'menuManagement',
name: "MenuManagement", name: 'MenuManagement',
component: "@/views/personnelManagement/menuManagement/index", component: '@/views/personnelManagement/menuManagement/index',
meta: { title: "菜单管理", badge: "New" }, meta: { title: '菜单管理', badge: 'New' },
}, },
], ],
}, },
{ {
path: "/vab", path: '/vab',
component: "Layout", component: 'Layout',
redirect: "noRedirect", redirect: 'noRedirect',
name: "Vab", name: 'Vab',
alwaysShow: true, alwaysShow: true,
meta: { title: "组件", icon: "cloud" }, meta: { title: '组件', icon: 'cloud' },
children: [ children: [
{ {
path: "permissions", path: 'permissions',
name: "Permission", name: 'Permission',
component: "@/views/vab/permissions/index", component: '@/views/vab/permissions/index',
meta: { meta: {
title: "权限控制", title: '权限控制',
permissions: ["admin", "editor"], permissions: ['admin', 'editor'],
badge: "New", badge: 'New',
}, },
}, },
{ {
path: "icon", path: 'icon',
component: "EmptyLayout", component: 'EmptyLayout',
redirect: "noRedirect", redirect: 'noRedirect',
name: "Icon", name: 'Icon',
meta: { meta: {
title: "图标", title: '图标',
permissions: ["admin"], permissions: ['admin'],
}, },
children: [ children: [
{ {
path: "awesomeIcon", path: 'awesomeIcon',
name: "AwesomeIcon", name: 'AwesomeIcon',
component: "@/views/vab/icon/index", component: '@/views/vab/icon/index',
meta: { title: "常规图标" }, meta: { title: '常规图标' },
}, },
{ {
path: "remixIcon", path: 'remixIcon',
name: "RemixIcon", name: 'RemixIcon',
component: "@/views/vab/icon/remixIcon", component: '@/views/vab/icon/remixIcon',
meta: { title: "小清新图标" }, meta: { title: '小清新图标' },
}, },
{ {
path: "colorfulIcon", path: 'colorfulIcon',
name: "ColorfulIcon", name: 'ColorfulIcon',
component: "@/views/vab/icon/colorfulIcon", component: '@/views/vab/icon/colorfulIcon',
meta: { title: "多彩图标" }, meta: { title: '多彩图标' },
}, },
], ],
}, },
{ {
path: "table", path: 'table',
component: "@/views/vab/table/index", component: '@/views/vab/table/index',
name: "Table", name: 'Table',
meta: { meta: {
title: "表格", title: '表格',
permissions: ["admin"], permissions: ['admin'],
}, },
}, },
{ {
path: "map", path: 'map',
name: "Map", name: 'Map',
component: "@/views/vab/map/index", component: '@/views/vab/map/index',
meta: { title: "地图", permissions: ["admin"], badge: "Pro" }, meta: { title: '地图', permissions: ['admin'], badge: 'Pro' },
}, },
{ {
path: "webSocket", path: 'webSocket',
name: "WebSocket", name: 'WebSocket',
component: "@/views/vab/webSocket/index", component: '@/views/vab/webSocket/index',
meta: { title: "webSocket", permissions: ["admin"] }, meta: { title: 'webSocket', permissions: ['admin'] },
}, },
{ {
path: "form", path: 'form',
name: "Form", name: 'Form',
component: "@/views/vab/form/index", component: '@/views/vab/form/index',
meta: { title: "表单", permissions: ["admin"] }, meta: { title: '表单', permissions: ['admin'] },
}, },
{ {
path: "element", path: 'element',
name: "Element", name: 'Element',
component: "@/views/vab/element/index", component: '@/views/vab/element/index',
meta: { title: "常用组件", permissions: ["admin"] }, meta: { title: '常用组件', permissions: ['admin'] },
}, },
{ {
path: "tree", path: 'tree',
name: "Tree", name: 'Tree',
component: "@/views/vab/tree/index", component: '@/views/vab/tree/index',
meta: { title: "树", permissions: ["admin"] }, meta: { title: '树', permissions: ['admin'] },
}, },
{ {
path: "card", path: 'card',
name: "Card", name: 'Card',
component: "@/views/vab/card/index", component: '@/views/vab/card/index',
meta: { title: "卡片", permissions: ["admin"] }, meta: { title: '卡片', permissions: ['admin'] },
}, },
{ {
path: "verify", path: 'verify',
name: "Verify", name: 'Verify',
component: "@/views/vab/verify/index", component: '@/views/vab/verify/index',
meta: { title: "验证码", permissions: ["admin"] }, meta: { title: '验证码', permissions: ['admin'] },
}, },
{ {
path: "menu1", path: 'menu1',
component: "@/views/vab/nested/menu1/index", component: '@/views/vab/nested/menu1/index',
name: "Menu1", name: 'Menu1',
alwaysShow: true, alwaysShow: true,
meta: { meta: {
title: "嵌套路由 1", title: '嵌套路由 1',
permissions: ["admin"], permissions: ['admin'],
}, },
children: [ children: [
{ {
path: "menu1-1", path: 'menu1-1',
name: "Menu1-1", name: 'Menu1-1',
alwaysShow: true, alwaysShow: true,
meta: { title: "嵌套路由 1-1" }, meta: { title: '嵌套路由 1-1' },
component: "@/views/vab/nested/menu1/menu1-1/index", component: '@/views/vab/nested/menu1/menu1-1/index',
children: [ children: [
{ {
path: "menu1-1-1", path: 'menu1-1-1',
name: "Menu1-1-1", name: 'Menu1-1-1',
meta: { title: "嵌套路由 1-1-1" }, meta: { title: '嵌套路由 1-1-1' },
component: "@/views/vab/nested/menu1/menu1-1/menu1-1-1/index", component: '@/views/vab/nested/menu1/menu1-1/menu1-1-1/index',
}, },
], ],
}, },
], ],
}, },
{ {
path: "magnifier", path: 'magnifier',
name: "Magnifier", name: 'Magnifier',
component: "@/views/vab/magnifier/index", component: '@/views/vab/magnifier/index',
meta: { title: "放大镜", permissions: ["admin"] }, meta: { title: '放大镜', permissions: ['admin'] },
}, },
{ {
path: "echarts", path: 'echarts',
name: "Echarts", name: 'Echarts',
component: "@/views/vab/echarts/index", component: '@/views/vab/echarts/index',
meta: { title: "图表", permissions: ["admin"] }, meta: { title: '图表', permissions: ['admin'] },
}, },
{ {
path: "loading", path: 'loading',
name: "Loading", name: 'Loading',
component: "@/views/vab/loading/index", component: '@/views/vab/loading/index',
meta: { title: "loading", permissions: ["admin"] }, meta: { title: 'loading', permissions: ['admin'] },
}, },
{ {
path: "player", path: 'player',
name: "Player", name: 'Player',
component: "@/views/vab/player/index", component: '@/views/vab/player/index',
meta: { title: "视频播放器", permissions: ["admin"] }, meta: { title: '视频播放器', permissions: ['admin'] },
}, },
{ {
path: "markdownEditor", path: 'markdownEditor',
name: "MarkdownEditor", name: 'MarkdownEditor',
component: "@/views/vab/markdownEditor/index", component: '@/views/vab/markdownEditor/index',
meta: { title: "markdown编辑器", permissions: ["admin"] }, meta: { title: 'markdown编辑器', permissions: ['admin'] },
}, },
{ {
path: "editor", path: 'editor',
name: "Editor", name: 'Editor',
component: "@/views/vab/editor/index", component: '@/views/vab/editor/index',
meta: { title: "富文本编辑器", permissions: ["admin"], badge: "New" }, meta: { title: '富文本编辑器', permissions: ['admin'], badge: 'New' },
}, },
{ {
path: "backToTop", path: 'backToTop',
name: "BackToTop", name: 'BackToTop',
component: "@/views/vab/backToTop/index", component: '@/views/vab/backToTop/index',
meta: { title: "返回顶部", permissions: ["admin"] }, meta: { title: '返回顶部', permissions: ['admin'] },
}, },
{ {
path: "lodash", path: 'lodash',
name: "Lodash", name: 'Lodash',
component: "@/views/vab/lodash/index", component: '@/views/vab/lodash/index',
meta: { title: "lodash", permissions: ["admin"] }, meta: { title: 'lodash', permissions: ['admin'] },
}, },
{ {
path: "imgComparison", path: 'imgComparison',
name: "ImgComparison", name: 'ImgComparison',
component: "@/views/vab/imgComparison/index", component: '@/views/vab/imgComparison/index',
meta: { title: "图像拖拽比对", permissions: ["admin"] }, meta: { title: '图像拖拽比对', permissions: ['admin'] },
}, },
{ {
path: "smallComponents", path: 'smallComponents',
name: "SmallComponents", name: 'SmallComponents',
component: "@/views/vab/smallComponents/index", component: '@/views/vab/smallComponents/index',
meta: { title: "小组件", permissions: ["admin"] }, meta: { title: '小组件', permissions: ['admin'] },
}, },
{ {
path: "upload", path: 'upload',
name: "Upload", name: 'Upload',
component: "@/views/vab/upload/index", component: '@/views/vab/upload/index',
meta: { title: "上传", permissions: ["admin"] }, meta: { title: '上传', permissions: ['admin'] },
}, },
{ {
path: "log", path: 'log',
name: "Log", name: 'Log',
component: "@/views/vab/errorLog/index", component: '@/views/vab/errorLog/index',
meta: { title: "错误日志模拟", permissions: ["admin"] }, meta: { title: '错误日志模拟', permissions: ['admin'] },
}, },
{ {
path: "more", path: 'more',
name: "More", name: 'More',
component: "@/views/vab/more/index", component: '@/views/vab/more/index',
meta: { title: "关于", permissions: ["admin"] }, meta: { title: '关于', permissions: ['admin'] },
}, },
], ],
}, },
{ {
path: "/mall", path: '/mall',
component: "Layout", component: 'Layout',
redirect: "noRedirect", redirect: 'noRedirect',
name: "Mall", name: 'Mall',
meta: { meta: {
title: "商城", title: '商城',
icon: "shopping-cart", icon: 'shopping-cart',
permissions: ["admin"], permissions: ['admin'],
}, },
children: [ children: [
{ {
path: "pay", path: 'pay',
name: "Pay", name: 'Pay',
component: "@/views/mall/pay/index", component: '@/views/mall/pay/index',
meta: { meta: {
title: "支付", title: '支付',
noKeepAlive: true, noKeepAlive: true,
}, },
children: null, children: null,
}, },
{ {
path: "goodsList", path: 'goodsList',
name: "GoodsList", name: 'GoodsList',
component: "@/views/mall/goodsList/index", component: '@/views/mall/goodsList/index',
meta: { meta: {
title: "商品列表", title: '商品列表',
}, },
}, },
], ],
}, },
{ {
path: "/error", path: '/error',
component: "EmptyLayout", component: 'EmptyLayout',
redirect: "noRedirect", redirect: 'noRedirect',
name: "Error", name: 'Error',
meta: { title: "错误页", icon: "bug" }, meta: { title: '错误页', icon: 'bug' },
children: [ children: [
{ {
path: "401", path: '401',
name: "Error401", name: 'Error401',
component: "@/views/401", component: '@/views/401',
meta: { title: "401" }, meta: { title: '401' },
}, },
{ {
path: "404", path: '404',
name: "Error404", name: 'Error404',
component: "@/views/404", component: '@/views/404',
meta: { title: "404" }, meta: { title: '404' },
}, },
], ],
}, },
]; ]
module.exports = [ module.exports = [
{ {
url: "/menu/navigate", url: '/menu/navigate',
type: "post", type: 'post',
response() { response() {
return { code: 200, msg: "success", data: data }; return { code: 200, msg: 'success', data: data }
}, },
}, },
]; ]
const { mock } = require("mockjs"); const { mock } = require('mockjs')
const { handleRandomImage } = require("../utils"); const { handleRandomImage } = require('../utils')
const List = []; const List = []
const count = 999; const count = 999
for (let i = 0; i < count; i++) { for (let i = 0; i < count; i++) {
List.push( List.push(
mock({ mock({
uuid: "@uuid", uuid: '@uuid',
id: "@id", id: '@id',
title: "@csentence(1, 2)", title: '@csentence(1, 2)',
"status|1": ["published", "draft", "deleted"], 'status|1': ['published', 'draft', 'deleted'],
author: "@cname", author: '@cname',
datetime: "@datetime", datetime: '@datetime',
pageViews: "@integer(300, 5000)", pageViews: '@integer(300, 5000)',
img: handleRandomImage(200, 200), img: handleRandomImage(200, 200),
smallImg: handleRandomImage(40, 40), smallImg: handleRandomImage(40, 40),
switch: "@boolean", switch: '@boolean',
percent: "@integer(80,99)", percent: '@integer(80,99)',
}) })
); )
} }
module.exports = [ module.exports = [
{ {
url: "/table/getList", url: '/table/getList',
type: "post", type: 'post',
response(config) { response(config) {
if (!config.body) { if (!config.body) {
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: count, totalCount: count,
data: mock({ data: mock({
"data|50": [ 'data|50': [
{ {
id: "@id", id: '@id',
title: "@csentence(1, 2)", title: '@csentence(1, 2)',
"status|1": ["published", "draft", "deleted"], 'status|1': ['published', 'draft', 'deleted'],
author: "@cname", author: '@cname',
datetime: "@datetime", datetime: '@datetime',
pageViews: "@integer(300, 5000)", pageViews: '@integer(300, 5000)',
img: handleRandomImage(200, 200), img: handleRandomImage(200, 200),
smallImg: handleRandomImage(40, 40), smallImg: handleRandomImage(40, 40),
switch: "@boolean", switch: '@boolean',
percent: "@integer(80,99)", percent: '@integer(80,99)',
}, },
], ],
}).data, }).data,
};
} }
const { title = "", pageNo = 1, pageSize = 20 } = config.body; }
const { title = '', pageNo = 1, pageSize = 20 } = config.body
let mockList = List.filter((item) => { let mockList = List.filter((item) => {
return !(title && item.title.indexOf(title) < 0); return !(title && item.title.indexOf(title) < 0)
}); })
const pageList = mockList.filter( const pageList = mockList.filter(
(item, index) => (item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1) index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
); )
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount: count, totalCount: count,
data: pageList, data: pageList,
}; }
}, },
}, },
{ {
url: "/table/doEdit", url: '/table/doEdit',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟保存成功", msg: '模拟保存成功',
}; }
}, },
}, },
{ {
url: "/table/doDelete", url: '/table/doDelete',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟删除成功", msg: '模拟删除成功',
}; }
}, },
}, },
]; ]
const data = [ const data = [
{ {
id: "1", id: '1',
parentId: "0", parentId: '0',
name: "root", name: 'root',
title: "root", title: 'root',
text: "root", text: 'root',
value: "1", value: '1',
rank: 1, rank: 1,
children: [ children: [
{ {
id: "32816b88ff72423f960e7d492a386131", id: '32816b88ff72423f960e7d492a386131',
parentId: "1", parentId: '1',
name: "一级", name: '一级',
title: "一级", title: '一级',
text: "一级", text: '一级',
value: "32816b88ff72423f960e7d492a386131", value: '32816b88ff72423f960e7d492a386131',
rank: 2, rank: 2,
children: [ children: [
{ {
id: "9e11afc35d55475fb0bd3164b9684cbe", id: '9e11afc35d55475fb0bd3164b9684cbe',
parentId: "32816b88ff72423f960e7d492a386131", parentId: '32816b88ff72423f960e7d492a386131',
name: "二级", name: '二级',
title: "二级", title: '二级',
text: "二级", text: '二级',
value: "9e11afc35d55475fb0bd3164b9684cbe", value: '9e11afc35d55475fb0bd3164b9684cbe',
rank: 3, rank: 3,
children: [ children: [
{ {
id: "4cc1b04635e4444292526c5391699077", id: '4cc1b04635e4444292526c5391699077',
parentId: "9e11afc35d55475fb0bd3164b9684cbe", parentId: '9e11afc35d55475fb0bd3164b9684cbe',
name: "三级", name: '三级',
title: "三级", title: '三级',
text: "三级", text: '三级',
value: "4cc1b04635e4444292526c5391699077", value: '4cc1b04635e4444292526c5391699077',
rank: 4, rank: 4,
children: [], children: [],
}, },
...@@ -42,13 +42,13 @@ const data = [ ...@@ -42,13 +42,13 @@ const data = [
}, },
], ],
}, },
]; ]
module.exports = [ module.exports = [
{ {
url: "/tree/list", url: '/tree/list',
type: "post", type: 'post',
response() { response() {
return { code: 200, msg: "success", data }; return { code: 200, msg: 'success', data }
}, },
}, },
]; ]
const accessTokens = { const accessTokens = {
admin: "admin-accessToken", admin: 'admin-accessToken',
editor: "editor-accessToken", editor: 'editor-accessToken',
test: "test-accessToken", test: 'test-accessToken',
}; }
module.exports = [ module.exports = [
{ {
url: "/publicKey", url: '/publicKey',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
data: { data: {
mockServer: true, mockServer: true,
publicKey: publicKey:
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBT2vr+dhZElF73FJ6xiP181txKWUSNLPQQlid6DUJhGAOZblluafIdLmnUyKE8mMHhT3R+Ib3ssZcJku6Hn72yHYj/qPkCGFv0eFo7G+GJfDIUeDyalBN0QsuiE/XzPHJBuJDfRArOiWvH0BXOv5kpeXSXM8yTt5Na1jAYSiQ/wIDAQAB", 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBT2vr+dhZElF73FJ6xiP181txKWUSNLPQQlid6DUJhGAOZblluafIdLmnUyKE8mMHhT3R+Ib3ssZcJku6Hn72yHYj/qPkCGFv0eFo7G+GJfDIUeDyalBN0QsuiE/XzPHJBuJDfRArOiWvH0BXOv5kpeXSXM8yTt5Na1jAYSiQ/wIDAQAB',
}, },
}; }
}, },
}, },
{ {
url: "/login", url: '/login',
type: "post", type: 'post',
response(config) { response(config) {
const { username } = config.body; const { username } = config.body
const accessToken = accessTokens[username]; const accessToken = accessTokens[username]
if (!accessToken) { if (!accessToken) {
return { return {
code: 500, code: 500,
msg: "帐户或密码不正确。", msg: '帐户或密码不正确。',
}; }
} }
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
data: { accessToken }, data: { accessToken },
}; }
}, },
}, },
{ {
url: "/register", url: '/register',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟注册成功", msg: '模拟注册成功',
}; }
}, },
}, },
{ {
url: "/userInfo", url: '/userInfo',
type: "post", type: 'post',
response(config) { response(config) {
const { accessToken } = config.body; const { accessToken } = config.body
let permissions = ["admin"]; let permissions = ['admin']
let username = "admin"; let username = 'admin'
if ("admin-accessToken" === accessToken) { if ('admin-accessToken' === accessToken) {
permissions = ["admin"]; permissions = ['admin']
username = "admin"; username = 'admin'
} }
if ("editor-accessToken" === accessToken) { if ('editor-accessToken' === accessToken) {
permissions = ["editor"]; permissions = ['editor']
username = "editor"; username = 'editor'
} }
if ("test-accessToken" === accessToken) { if ('test-accessToken' === accessToken) {
permissions = ["admin", "editor"]; permissions = ['admin', 'editor']
username = "test"; username = 'test'
} }
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
data: { data: {
permissions, permissions,
username, username,
"avatar|1": [ 'avatar|1': [
"https://i.gtimg.cn/club/item/face/img/2/15922_100.gif", 'https://i.gtimg.cn/club/item/face/img/2/15922_100.gif',
"https://i.gtimg.cn/club/item/face/img/8/15918_100.gif", 'https://i.gtimg.cn/club/item/face/img/8/15918_100.gif',
], ],
}, },
}; }
}, },
}, },
{ {
url: "/logout", url: '/logout',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
}; }
}, },
}, },
]; ]
const totalCount = 3; const totalCount = 3
const List = [ const List = [
{ {
id: "@id", id: '@id',
username: "admin", username: 'admin',
password: "admin", password: 'admin',
email: "@email", email: '@email',
permissions: ["admin"], permissions: ['admin'],
datatime: "@datetime", datatime: '@datetime',
}, },
{ {
id: "@id", id: '@id',
username: "editor", username: 'editor',
password: "editor", password: 'editor',
email: "@email", email: '@email',
permissions: ["editor"], permissions: ['editor'],
datatime: "@datetime", datatime: '@datetime',
}, },
{ {
id: "@id", id: '@id',
username: "test", username: 'test',
password: "test", password: 'test',
email: "@email", email: '@email',
permissions: ["admin", "editor"], permissions: ['admin', 'editor'],
datatime: "@datetime", datatime: '@datetime',
}, },
]; ]
module.exports = [ module.exports = [
{ {
url: "/userManagement/getList", url: '/userManagement/getList',
type: "post", type: 'post',
response(config) { response(config) {
const { title = "", pageNo = 1, pageSize = 20 } = config.body; const { title = '', pageNo = 1, pageSize = 20 } = config.body
let mockList = List.filter((item) => { let mockList = List.filter((item) => {
if (title && item.title.indexOf(title) < 0) return false; if (title && item.title.indexOf(title) < 0) return false
return true; return true
}); })
const pageList = mockList.filter( const pageList = mockList.filter(
(item, index) => (item, index) =>
index < pageSize * pageNo && index >= pageSize * (pageNo - 1) index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
); )
return { return {
code: 200, code: 200,
msg: "success", msg: 'success',
totalCount, totalCount,
data: pageList, data: pageList,
}; }
}, },
}, },
{ {
url: "/userManagement/doEdit", url: '/userManagement/doEdit',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟保存成功", msg: '模拟保存成功',
}; }
}, },
}, },
{ {
url: "/userManagement/doDelete", url: '/userManagement/doDelete',
type: "post", type: 'post',
response() { response() {
return { return {
code: 200, code: 200,
msg: "模拟删除成功", msg: '模拟删除成功',
}; }
}, },
}, },
]; ]
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
* @description 导入所有 controller 模块,npm run serve时在node环境中自动输出controller文件夹下Mock接口,请勿修改。 * @description 导入所有 controller 模块,npm run serve时在node环境中自动输出controller文件夹下Mock接口,请勿修改。
*/ */
const { handleMockArray } = require("./utils"); const { handleMockArray } = require('./utils')
const mocks = []; const mocks = []
const mockArray = handleMockArray(); const mockArray = handleMockArray()
mockArray.forEach((item) => { mockArray.forEach((item) => {
const obj = require(item); const obj = require(item)
mocks.push(...obj); mocks.push(...obj)
}); })
module.exports = { module.exports = {
mocks, mocks,
}; }
const chokidar = require("chokidar"); const chokidar = require('chokidar')
const bodyParser = require("body-parser"); const bodyParser = require('body-parser')
const chalk = require("chalk"); const chalk = require('chalk')
const path = require("path"); const path = require('path')
const Mock = require("mockjs"); const Mock = require('mockjs')
const { baseURL } = require("../src/config/settings"); const { baseURL } = require('../src/config/settings')
const mockDir = path.join(process.cwd(), "mock"); const mockDir = path.join(process.cwd(), 'mock')
/** /**
* *
...@@ -12,21 +12,21 @@ const mockDir = path.join(process.cwd(), "mock"); ...@@ -12,21 +12,21 @@ const mockDir = path.join(process.cwd(), "mock");
* @returns {{mockStartIndex: number, mockRoutesLength: number}} * @returns {{mockStartIndex: number, mockRoutesLength: number}}
*/ */
const registerRoutes = (app) => { const registerRoutes = (app) => {
let mockLastIndex; let mockLastIndex
const { mocks } = require("./index.js"); const { mocks } = require('./index.js')
const mocksForServer = mocks.map((route) => { const mocksForServer = mocks.map((route) => {
return responseFake(route.url, route.type, route.response); return responseFake(route.url, route.type, route.response)
}); })
for (const mock of mocksForServer) { for (const mock of mocksForServer) {
app[mock.type](mock.url, mock.response); app[mock.type](mock.url, mock.response)
mockLastIndex = app._router.stack.length; mockLastIndex = app._router.stack.length
} }
const mockRoutesLength = Object.keys(mocksForServer).length; const mockRoutesLength = Object.keys(mocksForServer).length
return { return {
mockRoutesLength: mockRoutesLength, mockRoutesLength: mockRoutesLength,
mockStartIndex: mockLastIndex - mockRoutesLength, mockStartIndex: mockLastIndex - mockRoutesLength,
}; }
}; }
/** /**
* *
...@@ -38,56 +38,56 @@ const registerRoutes = (app) => { ...@@ -38,56 +38,56 @@ const registerRoutes = (app) => {
const responseFake = (url, type, respond) => { const responseFake = (url, type, respond) => {
return { return {
url: new RegExp(`${baseURL}${url}`), url: new RegExp(`${baseURL}${url}`),
type: type || "get", type: type || 'get',
response(req, res) { response(req, res) {
res.status(200); res.status(200)
if (JSON.stringify(req.body) !== "{}") { if (JSON.stringify(req.body) !== '{}') {
console.log(chalk.green(`> 请求地址:${req.path}`)); console.log(chalk.green(`> 请求地址:${req.path}`))
console.log(chalk.green(`> 请求参数:${JSON.stringify(req.body)}\n`)); console.log(chalk.green(`> 请求参数:${JSON.stringify(req.body)}\n`))
} else { } else {
console.log(chalk.green(`> 请求地址:${req.path}\n`)); console.log(chalk.green(`> 请求地址:${req.path}\n`))
} }
res.json( res.json(
Mock.mock(respond instanceof Function ? respond(req, res) : respond) Mock.mock(respond instanceof Function ? respond(req, res) : respond)
); )
}, },
}; }
}; }
/** /**
* *
* @param app * @param app
*/ */
module.exports = (app) => { module.exports = (app) => {
app.use(bodyParser.json()); app.use(bodyParser.json())
app.use( app.use(
bodyParser.urlencoded({ bodyParser.urlencoded({
extended: true, extended: true,
}) })
); )
const mockRoutes = registerRoutes(app); const mockRoutes = registerRoutes(app)
let mockRoutesLength = mockRoutes.mockRoutesLength; let mockRoutesLength = mockRoutes.mockRoutesLength
let mockStartIndex = mockRoutes.mockStartIndex; let mockStartIndex = mockRoutes.mockStartIndex
chokidar chokidar
.watch(mockDir, { .watch(mockDir, {
ignoreInitial: true, ignoreInitial: true,
}) })
.on("all", (event) => { .on('all', (event) => {
if (event === "change" || event === "add") { if (event === 'change' || event === 'add') {
try { try {
app._router.stack.splice(mockStartIndex, mockRoutesLength); app._router.stack.splice(mockStartIndex, mockRoutesLength)
Object.keys(require.cache).forEach((item) => { Object.keys(require.cache).forEach((item) => {
if (item.includes(mockDir)) { if (item.includes(mockDir)) {
delete require.cache[require.resolve(item)]; delete require.cache[require.resolve(item)]
} }
}); })
const mockRoutes = registerRoutes(app); const mockRoutes = registerRoutes(app)
mockRoutesLength = mockRoutes.mockRoutesLength; mockRoutesLength = mockRoutes.mockRoutesLength
mockStartIndex = mockRoutes.mockStartIndex; mockStartIndex = mockRoutes.mockStartIndex
} catch (error) { } catch (error) {
console.log(chalk.red(error)); console.log(chalk.red(error))
} }
} }
}); })
}; }
const { Random } = require("mockjs"); const { Random } = require('mockjs')
const { join } = require("path"); const { join } = require('path')
const fs = require("fs"); const fs = require('fs')
/** /**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
...@@ -10,7 +10,7 @@ const fs = require("fs"); ...@@ -10,7 +10,7 @@ const fs = require("fs");
* @returns {string} * @returns {string}
*/ */
function handleRandomImage(width = 50, height = 50) { function handleRandomImage(width = 50, height = 50) {
return `https://picsum.photos/${width}/${height}?random=${Random.guid()}`; return `https://picsum.photos/${width}/${height}?random=${Random.guid()}`
} }
/** /**
...@@ -19,25 +19,25 @@ function handleRandomImage(width = 50, height = 50) { ...@@ -19,25 +19,25 @@ function handleRandomImage(width = 50, height = 50) {
* @returns {[]} * @returns {[]}
*/ */
function handleMockArray() { function handleMockArray() {
const mockArray = []; const mockArray = []
const getFiles = (jsonPath) => { const getFiles = (jsonPath) => {
const jsonFiles = []; const jsonFiles = []
const findJsonFile = (path) => { const findJsonFile = (path) => {
const files = fs.readdirSync(path); const files = fs.readdirSync(path)
files.forEach((item) => { files.forEach((item) => {
const fPath = join(path, item); const fPath = join(path, item)
const stat = fs.statSync(fPath); const stat = fs.statSync(fPath)
if (stat.isDirectory() === true) findJsonFile(item); if (stat.isDirectory() === true) findJsonFile(item)
if (stat.isFile() === true) jsonFiles.push(item); if (stat.isFile() === true) jsonFiles.push(item)
}); })
}; }
findJsonFile(jsonPath); findJsonFile(jsonPath)
jsonFiles.forEach((item) => mockArray.push(`./controller/${item}`)); jsonFiles.forEach((item) => mockArray.push(`./controller/${item}`))
}; }
getFiles("mock/controller"); getFiles('mock/controller')
return mockArray; return mockArray
} }
module.exports = { module.exports = {
handleRandomImage, handleRandomImage,
handleMockArray, handleMockArray,
}; }
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"lint:style": "stylelint-config-prettier-check", "lint:style": "stylelint-config-prettier-check",
"inspect": "vue-cli-service inspect", "inspect": "vue-cli-service inspect",
"template": "plop", "template": "plop",
"clear": "rimraf node_modules&&cnpm i", "clear": "rimraf node_modules&&npm install --registry=https://registry.npm.taobao.org&&cnpm i image-webpack-loader -D",
"use:npm": "nrm use npm", "use:npm": "nrm use npm",
"use:taobao": "nrm use taobao", "use:taobao": "nrm use taobao",
"update": "ncu -u&&cnpm i", "update": "ncu -u&&cnpm i",
......
const viewGenerator = require("zx-templates/view/prompt"); const viewGenerator = require('zx-templates/view/prompt')
const curdGenerator = require("zx-templates/curd/prompt"); const curdGenerator = require('zx-templates/curd/prompt')
const componentGenerator = require("zx-templates/component/prompt"); const componentGenerator = require('zx-templates/component/prompt')
const mockGenerator = require("zx-templates/mock/prompt"); const mockGenerator = require('zx-templates/mock/prompt')
const vuexGenerator = require("zx-templates/vuex/prompt"); const vuexGenerator = require('zx-templates/vuex/prompt')
module.exports = (plop) => { module.exports = (plop) => {
plop.setGenerator("view", viewGenerator); plop.setGenerator('view', viewGenerator)
plop.setGenerator("curd", curdGenerator); plop.setGenerator('curd', curdGenerator)
plop.setGenerator("component", componentGenerator); plop.setGenerator('component', componentGenerator)
plop.setGenerator("mock&api", mockGenerator); plop.setGenerator('mock&api', mockGenerator)
plop.setGenerator("vuex", vuexGenerator); plop.setGenerator('vuex', vuexGenerator)
}; }
...@@ -2,15 +2,15 @@ module.exports = { ...@@ -2,15 +2,15 @@ module.exports = {
printWidth: 80, printWidth: 80,
tabWidth: 2, tabWidth: 2,
useTabs: false, useTabs: false,
semi: true, semi: false,
singleQuote: false, singleQuote: true,
quoteProps: "as-needed", quoteProps: 'as-needed',
jsxSingleQuote: false, jsxSingleQuote: false,
trailingComma: "es5", trailingComma: 'es5',
bracketSpacing: true, bracketSpacing: true,
jsxBracketSameLine: false, jsxBracketSameLine: false,
arrowParens: "always", arrowParens: 'always',
htmlWhitespaceSensitivity: "ignore", htmlWhitespaceSensitivity: 'ignore',
vueIndentScriptAndStyle: true, vueIndentScriptAndStyle: true,
endOfLine: "lf", endOfLine: 'lf',
}; }
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
<meta name="author" content="<%= VUE_APP_AUTHOR %>" /> <meta name="author" content="<%= VUE_APP_AUTHOR %>" />
<link rel="stylesheet" href="<%= BASE_URL %>static/css/loading.css" /> <link rel="stylesheet" href="<%= BASE_URL %>static/css/loading.css" />
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || []
(function () { ;(function () {
var hm = document.createElement("script"); var hm = document.createElement('script')
hm.src = "https://hm.baidu.com/hm.js?7174bade1219f9cc272e7978f9523fc8"; hm.src = 'https://hm.baidu.com/hm.js?7174bade1219f9cc272e7978f9523fc8'
var s = document.getElementsByTagName("script")[0]; var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s)
})(); })()
</script> </script>
</head> </head>
<body> <body>
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
</div> </div>
</div> </div>
<script> <script>
/^http(s*):\/\//.test(location.href) || ;/^http(s*):\/\//.test(location.href) ||
alert("基于vue-admin-beautiful开发的项目需要部署到服务器下访问"); alert('基于vue-admin-beautiful开发的项目需要部署到服务器下访问')
</script> </script>
</body> </body>
</html> </html>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<script> <script>
export default { export default {
name: "App", name: 'App',
mounted() {}, mounted() {},
}; }
</script> </script>
import request from "@/utils/request"; import request from '@/utils/request'
export function getList(data) { export function getList(data) {
return request({ return request({
url: "/ad/getList", url: '/ad/getList',
method: "get", method: 'get',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getList(data) { export function getList(data) {
return request({ return request({
url: "/changeLog/getList", url: '/changeLog/getList',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getIconList(data) { export function getIconList(data) {
return request({ return request({
url: "/colorfulIcon/getList", url: '/colorfulIcon/getList',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "axios"; import request from 'axios'
export function getRepos(params) { export function getRepos(params) {
return request({ return request({
url: "https://api.github.com/repos/chuzhixin/vue-admin-beautiful", url: 'https://api.github.com/repos/chuzhixin/vue-admin-beautiful',
method: "get", method: 'get',
params, params,
timeout: 10000, timeout: 10000,
}); })
} }
export function getStargazers(params) { export function getStargazers(params) {
return request({ return request({
url: url:
"https://api.github.com/repos/chuzhixin/vue-admin-beautiful/stargazers", 'https://api.github.com/repos/chuzhixin/vue-admin-beautiful/stargazers',
method: "get", method: 'get',
params, params,
timeout: 10000, timeout: 10000,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getList(data) { export function getList(data) {
return request({ return request({
url: "/goodsList/getList", url: '/goodsList/getList',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getIconList(data) { export function getIconList(data) {
return request({ return request({
url: "/icon/getList", url: '/icon/getList',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "axios"; import request from 'axios'
export function getList() { export function getList() {
return request({ return request({
url: "https://cdn.jsdelivr.net/gh/prettier/prettier@master/docs/options.md", url: 'https://cdn.jsdelivr.net/gh/prettier/prettier@master/docs/options.md',
method: "get", method: 'get',
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getTree(data) { export function getTree(data) {
return request({ return request({
url: "/menuManagement/getTree", url: '/menuManagement/getTree',
method: "post", method: 'post',
data, data,
}); })
} }
export function doEdit(data) { export function doEdit(data) {
return request({ return request({
url: "/menuManagement/doEdit", url: '/menuManagement/doEdit',
method: "post", method: 'post',
data, data,
}); })
} }
export function doDelete(data) { export function doDelete(data) {
return request({ return request({
url: "/menuManagement/doDelete", url: '/menuManagement/doDelete',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getNoticeList() { export function getNoticeList() {
return request({ return request({
url: "/notice/getList", url: '/notice/getList',
method: "post", method: 'post',
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getList(data) { export function getList(data) {
return request({ return request({
url: "/personalCenter/getList", url: '/personalCenter/getList',
method: "post", method: 'post',
data, data,
}); })
} }
export function doEdit(data) { export function doEdit(data) {
return request({ return request({
url: "/personalCenter/doEdit", url: '/personalCenter/doEdit',
method: "post", method: 'post',
data, data,
}); })
} }
export function doDelete(data) { export function doDelete(data) {
return request({ return request({
url: "/personalCenter/doDelete", url: '/personalCenter/doDelete',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getPublicKey() { export function getPublicKey() {
return request({ return request({
url: "/publicKey", url: '/publicKey',
method: "post", method: 'post',
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getIconList(data) { export function getIconList(data) {
return request({ return request({
url: "/remixIcon/getList", url: '/remixIcon/getList',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getList(data) { export function getList(data) {
return request({ return request({
url: "/roleManagement/getList", url: '/roleManagement/getList',
method: "post", method: 'post',
data, data,
}); })
} }
export function doEdit(data) { export function doEdit(data) {
return request({ return request({
url: "/roleManagement/doEdit", url: '/roleManagement/doEdit',
method: "post", method: 'post',
data, data,
}); })
} }
export function doDelete(data) { export function doDelete(data) {
return request({ return request({
url: "/roleManagement/doDelete", url: '/roleManagement/doDelete',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getRouterList(data) { export function getRouterList(data) {
return request({ return request({
url: "/menu/navigate", url: '/menu/navigate',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getList(data) { export function getList(data) {
return request({ return request({
url: "/table/getList", url: '/table/getList',
method: "post", method: 'post',
data, data,
}); })
} }
export function doEdit(data) { export function doEdit(data) {
return request({ return request({
url: "/table/doEdit", url: '/table/doEdit',
method: "post", method: 'post',
data, data,
}); })
} }
export function doDelete(data) { export function doDelete(data) {
return request({ return request({
url: "/table/doDelete", url: '/table/doDelete',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getTreeList(data) { export function getTreeList(data) {
return request({ return request({
url: "/tree/list", url: '/tree/list',
method: "post", method: 'post',
data, data,
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
import { encryptedData } from "@/utils/encrypt"; import { encryptedData } from '@/utils/encrypt'
import { loginRSA, tokenName } from "@/config/settings"; import { loginRSA, tokenName } from '@/config/settings'
export async function login(data) { export async function login(data) {
if (loginRSA) { if (loginRSA) {
data = await encryptedData(data); data = await encryptedData(data)
} }
return request({ return request({
url: "/login", url: '/login',
method: "post", method: 'post',
data, data,
}); })
} }
export function getUserInfo(accessToken) { export function getUserInfo(accessToken) {
return request({ return request({
url: "/userInfo", url: '/userInfo',
method: "post", method: 'post',
data: { data: {
[tokenName]: accessToken, [tokenName]: accessToken,
}, },
}); })
} }
export function logout() { export function logout() {
return request({ return request({
url: "/logout", url: '/logout',
method: "post", method: 'post',
}); })
} }
export function register() { export function register() {
return request({ return request({
url: "/register", url: '/register',
method: "post", method: 'post',
}); })
} }
import request from "@/utils/request"; import request from '@/utils/request'
export function getList(data) { export function getList(data) {
return request({ return request({
url: "/userManagement/getList", url: '/userManagement/getList',
method: "post", method: 'post',
data, data,
}); })
} }
export function doEdit(data) { export function doEdit(data) {
return request({ return request({
url: "/userManagement/doEdit", url: '/userManagement/doEdit',
method: "post", method: 'post',
data, data,
}); })
} }
export function doDelete(data) { export function doDelete(data) {
return request({ return request({
url: "/userManagement/doDelete", url: '/userManagement/doDelete',
method: "post", method: 'post',
data, data,
}); })
} }
import Vue from "vue"; import Vue from 'vue'
import { ColorfullIcon } from "@/layouts/components"; import { ColorfullIcon } from '@/layouts/components'
Vue.component("VabColorfulIcon", ColorfullIcon); Vue.component('VabColorfulIcon', ColorfullIcon)
const req = require.context("./svg", false, /\.svg$/), const req = require.context('./svg', false, /\.svg$/),
requireAll = (requireContext) => { requireAll = (requireContext) => {
/*let a = requireContext.keys().map(requireContext); /*let a = requireContext.keys().map(requireContext);
let arr = []; let arr = [];
...@@ -12,6 +12,6 @@ const req = require.context("./svg", false, /\.svg$/), ...@@ -12,6 +12,6 @@ const req = require.context("./svg", false, /\.svg$/),
arr.push(icon); arr.push(icon);
} }
console.log(JSON.stringify(arr));*/ console.log(JSON.stringify(arr));*/
return requireContext.keys().map(requireContext); return requireContext.keys().map(requireContext)
}; }
requireAll(req); requireAll(req)
...@@ -32,132 +32,132 @@ ...@@ -32,132 +32,132 @@
<script> <script>
export default { export default {
name: "SelectTreeTemplate", name: 'SelectTreeTemplate',
props: { props: {
/* 树形结构数据 */ /* 树形结构数据 */
treeOptions: { treeOptions: {
type: Array, type: Array,
default: () => { default: () => {
return []; return []
}, },
}, },
/* 单选/多选 */ /* 单选/多选 */
selectType: { selectType: {
type: String, type: String,
default: () => { default: () => {
return "single"; return 'single'
}, },
}, },
/* 初始选中值key */ /* 初始选中值key */
selectedKey: { selectedKey: {
type: String, type: String,
default: () => { default: () => {
return ""; return ''
}, },
}, },
/* 初始选中值name */ /* 初始选中值name */
selectedValue: { selectedValue: {
type: String, type: String,
default: () => { default: () => {
return ""; return ''
}, },
}, },
/* 可做选择的层级 */ /* 可做选择的层级 */
selectLevel: { selectLevel: {
type: [String, Number], type: [String, Number],
default: () => { default: () => {
return ""; return ''
}, },
}, },
/* 可清空选项 */ /* 可清空选项 */
clearable: { clearable: {
type: Boolean, type: Boolean,
default: () => { default: () => {
return true; return true
}, },
}, },
}, },
data() { data() {
return { return {
defaultProps: { defaultProps: {
children: "children", children: 'children',
label: "name", label: 'name',
}, },
defaultSelectedKeys: [], //初始选中值数组 defaultSelectedKeys: [], //初始选中值数组
currentNodeKey: this.selectedKey, currentNodeKey: this.selectedKey,
selectValue: selectValue:
this.selectType == "multiple" this.selectType == 'multiple'
? this.selectedValue.split(",") ? this.selectedValue.split(',')
: this.selectedValue, //下拉框选中值label : this.selectedValue, //下拉框选中值label
selectKey: selectKey:
this.selectType == "multiple" this.selectType == 'multiple'
? this.selectedKey.split(",") ? this.selectedKey.split(',')
: this.selectedKey, //下拉框选中值value : this.selectedKey, //下拉框选中值value
}; }
}, },
mounted() { mounted() {
const that = this; const that = this
this.initTree(); this.initTree()
}, },
methods: { methods: {
// 初始化树的值 // 初始化树的值
initTree() { initTree() {
const that = this; const that = this
if (that.selectedKey) { if (that.selectedKey) {
that.defaultSelectedKeys = that.selectedKey.split(","); // 设置默认展开 that.defaultSelectedKeys = that.selectedKey.split(',') // 设置默认展开
if (that.selectType == "single") { if (that.selectType == 'single') {
that.$refs.treeOption.setCurrentKey(that.selectedKey); // 设置默认选中 that.$refs.treeOption.setCurrentKey(that.selectedKey) // 设置默认选中
} else { } else {
that.$refs.treeOption.setCheckedKeys(that.defaultSelectedKeys); that.$refs.treeOption.setCheckedKeys(that.defaultSelectedKeys)
} }
} }
}, },
// 清除选中 // 清除选中
clearHandle() { clearHandle() {
const that = this; const that = this
this.selectValue = ""; this.selectValue = ''
this.selectKey = ""; this.selectKey = ''
this.defaultSelectedKeys = []; this.defaultSelectedKeys = []
this.currentNodeKey = ""; this.currentNodeKey = ''
this.clearSelected(); this.clearSelected()
if (that.selectType == "single") { if (that.selectType == 'single') {
that.$refs.treeOption.setCurrentKey(""); // 设置默认选中 that.$refs.treeOption.setCurrentKey('') // 设置默认选中
} else { } else {
that.$refs.treeOption.setCheckedKeys([]); that.$refs.treeOption.setCheckedKeys([])
} }
}, },
/* 清空选中样式 */ /* 清空选中样式 */
clearSelected() { clearSelected() {
const allNode = document.querySelectorAll("#treeOption .el-tree-node"); const allNode = document.querySelectorAll('#treeOption .el-tree-node')
allNode.forEach((element) => element.classList.remove("is-current")); allNode.forEach((element) => element.classList.remove('is-current'))
}, },
// select多选时移除某项操作 // select多选时移除某项操作
removeTag(val) { removeTag(val) {
this.$refs.treeOption.setCheckedKeys([]); this.$refs.treeOption.setCheckedKeys([])
}, },
// 点击叶子节点 // 点击叶子节点
nodeClick(data, node, el) { nodeClick(data, node, el) {
if (data.rank >= this.selectLevel) { if (data.rank >= this.selectLevel) {
this.selectValue = data.name; this.selectValue = data.name
this.selectKey = data.id; this.selectKey = data.id
} }
}, },
// 节点选中操作 // 节点选中操作
checkNode(data, node, el) { checkNode(data, node, el) {
const checkedNodes = this.$refs.treeOption.getCheckedNodes(); const checkedNodes = this.$refs.treeOption.getCheckedNodes()
const keyArr = []; const keyArr = []
const valueArr = []; const valueArr = []
checkedNodes.forEach((item) => { checkedNodes.forEach((item) => {
if (item.rank >= this.selectLevel) { if (item.rank >= this.selectLevel) {
keyArr.push(item.id); keyArr.push(item.id)
valueArr.push(item.name); valueArr.push(item.name)
} }
}); })
this.selectValue = valueArr; this.selectValue = valueArr
this.selectKey = keyArr; this.selectKey = keyArr
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
<script> <script>
export default { export default {
name: "VabCharge", name: 'VabCharge',
props: { props: {
styleObj: { styleObj: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, },
}, },
startVal: { startVal: {
...@@ -44,16 +44,16 @@ ...@@ -44,16 +44,16 @@
data() { data() {
return { return {
decimals: 2, decimals: 2,
prefix: "", prefix: '',
suffix: "%", suffix: '%',
separator: ",", separator: ',',
duration: 3000, duration: 3000,
}; }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
left: 50%; left: 50%;
width: 200px; width: 200px;
height: 200px; height: 200px;
content: ""; content: '';
background-color: #00ff6f; background-color: #00ff6f;
border-radius: 42% 38% 62% 49% / 45%; border-radius: 42% 38% 62% 49% / 45%;
transform: translate(-50%, -50%) rotate(0); transform: translate(-50%, -50%) rotate(0);
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
z-index: 99; z-index: 99;
width: 176px; width: 176px;
height: 176px; height: 176px;
content: ""; content: '';
background-color: #000; background-color: #000;
border-radius: 50%; border-radius: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
......
...@@ -18,16 +18,16 @@ ...@@ -18,16 +18,16 @@
<script> <script>
export default { export default {
name: "VabImage", name: 'VabImage',
components: {}, components: {},
props: { props: {
bigSrc: { bigSrc: {
type: String, type: String,
default: "", default: '',
}, },
smallSrc: { smallSrc: {
type: String, type: String,
default: "", default: '',
}, },
percent: { percent: {
type: Number, type: Number,
...@@ -35,19 +35,19 @@ ...@@ -35,19 +35,19 @@
}, },
}, },
data() { data() {
return {}; return {}
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
clickBig() { clickBig() {
this.$emit("click-big"); this.$emit('click-big')
}, },
clickSmall() { clickSmall() {
this.$emit("click-small"); this.$emit('click-small')
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -26,40 +26,40 @@ ...@@ -26,40 +26,40 @@
<script> <script>
export default { export default {
name: "VabProfile", name: 'VabProfile',
props: { props: {
styleObj: { styleObj: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, },
}, },
username: { username: {
type: String, type: String,
default: "", default: '',
}, },
avatar: { avatar: {
type: String, type: String,
default: "", default: '',
}, },
iconArray: { iconArray: {
type: Array, type: Array,
default: () => { default: () => {
return [ return [
{ icon: "bell", url: "" }, { icon: 'bell', url: '' },
{ icon: "bookmark", url: "" }, { icon: 'bookmark', url: '' },
{ icon: "cloud-sun", url: "" }, { icon: 'cloud-sun', url: '' },
]; ]
}, },
}, },
}, },
data() { data() {
return {}; return {}
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
color: black; color: black;
content: ""; content: '';
background: #35b9f1; background: #35b9f1;
transform: scaleX(0); transform: scaleX(0);
transform-origin: left; transform-origin: left;
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
content: ""; content: '';
border-radius: inherit; border-radius: inherit;
transform: scale(0); transform: scale(0);
} }
......
...@@ -6,22 +6,22 @@ ...@@ -6,22 +6,22 @@
<script> <script>
export default { export default {
name: "VabSnow", name: 'VabSnow',
props: { props: {
styleObj: { styleObj: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, },
}, },
}, },
data() { data() {
return {}; return {}
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -75,19 +75,19 @@ ...@@ -75,19 +75,19 @@
</template> </template>
<script> <script>
import { baseURL, tokenName } from "@/config/settings"; import { baseURL, tokenName } from '@/config/settings'
export default { export default {
name: "VabUpload", name: 'VabUpload',
props: { props: {
url: { url: {
type: String, type: String,
default: "/upload", default: '/upload',
required: true, required: true,
}, },
name: { name: {
type: String, type: String,
default: "file", default: 'file',
required: true, required: true,
}, },
limit: { limit: {
...@@ -106,106 +106,106 @@ ...@@ -106,106 +106,106 @@
show: false, show: false,
loading: false, loading: false,
dialogVisible: false, dialogVisible: false,
dialogImageUrl: "", dialogImageUrl: '',
action: "https://vab-unicloud-3a9da9.service.tcloudbase.com/upload", action: 'https://vab-unicloud-3a9da9.service.tcloudbase.com/upload',
headers: {}, headers: {},
fileList: [], fileList: [],
picture: "picture", picture: 'picture',
imgNum: 0, imgNum: 0,
imgSuccessNum: 0, imgSuccessNum: 0,
imgErrorNum: 0, imgErrorNum: 0,
typeList: null, typeList: null,
title: "上传", title: '上传',
dialogFormVisible: false, dialogFormVisible: false,
data: {}, data: {},
}; }
}, },
computed: { computed: {
percentage() { percentage() {
if (this.allImgNum == 0) return 0; if (this.allImgNum == 0) return 0
return this.$baseLodash.round(this.imgNum / this.allImgNum, 2) * 100; return this.$baseLodash.round(this.imgNum / this.allImgNum, 2) * 100
}, },
}, },
methods: { methods: {
submitUpload() { submitUpload() {
this.$refs.upload.submit(); this.$refs.upload.submit()
}, },
handleProgress(event, file, fileList) { handleProgress(event, file, fileList) {
this.loading = true; this.loading = true
this.show = true; this.show = true
}, },
handleChange(file, fileList) { handleChange(file, fileList) {
if (file.size > 1048576 * this.size) { if (file.size > 1048576 * this.size) {
fileList.map((item, index) => { fileList.map((item, index) => {
if (item === file) { if (item === file) {
fileList.splice(index, 1); fileList.splice(index, 1)
} }
}); })
this.fileList = fileList; this.fileList = fileList
} else { } else {
this.allImgNum = fileList.length; this.allImgNum = fileList.length
} }
}, },
handleSuccess(response, file, fileList) { handleSuccess(response, file, fileList) {
this.imgNum = this.imgNum + 1; this.imgNum = this.imgNum + 1
this.imgSuccessNum = this.imgSuccessNum + 1; this.imgSuccessNum = this.imgSuccessNum + 1
if (fileList.length === this.imgNum) { if (fileList.length === this.imgNum) {
setTimeout(() => { setTimeout(() => {
this.$baseMessage( this.$baseMessage(
`上传完成! 共上传${fileList.length}张图片`, `上传完成! 共上传${fileList.length}张图片`,
"success" 'success'
); )
}, 1000); }, 1000)
} }
setTimeout(() => { setTimeout(() => {
this.loading = false; this.loading = false
this.show = false; this.show = false
}, 1000); }, 1000)
}, },
handleError(err, file, fileList) { handleError(err, file, fileList) {
this.imgNum = this.imgNum + 1; this.imgNum = this.imgNum + 1
this.imgErrorNum = this.imgErrorNum + 1; this.imgErrorNum = this.imgErrorNum + 1
this.$baseMessage( this.$baseMessage(
`文件[${file.raw.name}]上传失败,文件大小为${this.$baseLodash.round( `文件[${file.raw.name}]上传失败,文件大小为${this.$baseLodash.round(
file.raw.size / 1024, file.raw.size / 1024,
0 0
)}KB`, )}KB`,
"error" 'error'
); )
setTimeout(() => { setTimeout(() => {
this.loading = false; this.loading = false
this.show = false; this.show = false
}, 1000); }, 1000)
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.imgNum = this.imgNum - 1; this.imgNum = this.imgNum - 1
this.allNum = this.allNum - 1; this.allNum = this.allNum - 1
}, },
handlePreview(file) { handlePreview(file) {
this.dialogImageUrl = file.url; this.dialogImageUrl = file.url
this.dialogVisible = true; this.dialogVisible = true
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$baseMessage( this.$baseMessage(
`当前限制选择 ${this.limit} 个文件,本次选择了 `当前限制选择 ${this.limit} 个文件,本次选择了
${files.length} ${files.length}
个文件`, 个文件`,
"error" 'error'
); )
}, },
handleShow(data) { handleShow(data) {
this.title = "上传"; this.title = '上传'
this.data = data; this.data = data
this.dialogFormVisible = true; this.dialogFormVisible = true
}, },
handleClose() { handleClose() {
this.fileList = []; this.fileList = []
this.picture = "picture"; this.picture = 'picture'
this.allImgNum = 0; this.allImgNum = 0
this.imgNum = 0; this.imgNum = 0
this.imgSuccessNum = 0; this.imgSuccessNum = 0
this.imgErrorNum = 0; this.imgErrorNum = 0
/* if ("development" === process.env.NODE_ENV) { /* if ("development" === process.env.NODE_ENV) {
this.api = process.env.VUE_APP_BASE_API; this.api = process.env.VUE_APP_BASE_API;
} else { } else {
...@@ -213,10 +213,10 @@ ...@@ -213,10 +213,10 @@
} }
this.action = this.api + this.url; */ this.action = this.api + this.url; */
this.dialogFormVisible = false; this.dialogFormVisible = false
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
* @description 导出自定义配置 * @description 导出自定义配置
**/ **/
const config = { const config = {
layout: "vertical", layout: 'vertical',
}; }
module.exports = config; module.exports = config
/** /**
* @description 导出默认配置(通用配置|主题配置|网络配置) * @description 导出默认配置(通用配置|主题配置|网络配置)
**/ **/
const setting = require("./setting.config"); const setting = require('./setting.config')
const theme = require("./theme.config"); const theme = require('./theme.config')
const network = require("./net.config"); const network = require('./net.config')
module.exports = { setting, theme, network }; module.exports = { setting, theme, network }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
**/ **/
const network = { const network = {
//配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8 //配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
contentType: "application/json;charset=UTF-8", contentType: 'application/json;charset=UTF-8',
//消息框消失时间 //消息框消失时间
messageDuration: 3000, messageDuration: 3000,
//最长请求时间 //最长请求时间
...@@ -14,5 +14,5 @@ const network = { ...@@ -14,5 +14,5 @@ const network = {
invalidCode: 402, invalidCode: 402,
//无权限code //无权限code
noPermissionCode: 401, noPermissionCode: 401,
}; }
module.exports = network; module.exports = network
...@@ -3,26 +3,26 @@ ...@@ -3,26 +3,26 @@
*/ */
const setting = { const setting = {
// 开发以及部署时的URL // 开发以及部署时的URL
publicPath: "", publicPath: '',
// 生产环境构建文件的目录名 // 生产环境构建文件的目录名
outputDir: "dist", outputDir: 'dist',
// 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。 // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。
assetsDir: "static", assetsDir: 'static',
// 开发环境每次保存时是否输出为eslint编译警告 // 开发环境每次保存时是否输出为eslint编译警告
lintOnSave: true, lintOnSave: true,
// 进行编译的依赖 // 进行编译的依赖
transpileDependencies: ["vue-echarts", "resize-detector"], transpileDependencies: ['vue-echarts', 'resize-detector'],
// 默认的接口地址 如果是开发环境和生产环境走vab-mock-server,当然你也可以选择自己配置成需要的接口地址 // 默认的接口地址 如果是开发环境和生产环境走vab-mock-server,当然你也可以选择自己配置成需要的接口地址
baseURL: baseURL:
process.env.NODE_ENV === "development" process.env.NODE_ENV === 'development'
? "vab-mock-server" ? 'vab-mock-server'
: "vab-mock-server", : 'vab-mock-server',
//标题 (包括初次加载雪花屏的标题 页面的标题 浏览器的标题) //标题 (包括初次加载雪花屏的标题 页面的标题 浏览器的标题)
title: "vue-admin-beautiful", title: 'vue-admin-beautiful',
//简写 //简写
abbreviation: "vab", abbreviation: 'vab',
//开发环境端口号 //开发环境端口号
devPort: "80", devPort: '80',
//版本号 //版本号
version: process.env.VUE_APP_VERSION, version: process.env.VUE_APP_VERSION,
//烦请保留package.json作者信息 即可免费商用 //烦请保留package.json作者信息 即可免费商用
...@@ -34,42 +34,42 @@ const setting = { ...@@ -34,42 +34,42 @@ const setting = {
//缓存路由的最大数量 //缓存路由的最大数量
keepAliveMaxNum: 99, keepAliveMaxNum: 99,
// 路由模式,可选值为 history 或 hash // 路由模式,可选值为 history 或 hash
routerMode: "hash", routerMode: 'hash',
//不经过token校验的路由 //不经过token校验的路由
routesWhiteList: ["/login", "/register", "/404", "/401"], routesWhiteList: ['/login', '/register', '/404', '/401'],
//加载时显示文字 //加载时显示文字
loadingText: "正在加载中...", loadingText: '正在加载中...',
//token名称 //token名称
tokenName: "accessToken", tokenName: 'accessToken',
//token在localStorage、sessionStorage存储的key的名称 //token在localStorage、sessionStorage存储的key的名称
tokenTableName: "vue-admin-beautiful", tokenTableName: 'vue-admin-beautiful',
//token存储位置localStorage sessionStorage //token存储位置localStorage sessionStorage
storage: "localStorage", storage: 'localStorage',
//token失效回退到登录页时是否记录本次的路由 //token失效回退到登录页时是否记录本次的路由
recordRoute: true, recordRoute: true,
//是否显示logo,不显示时设置false,显示时请填写remixIcon图标名称,暂时只支持设置remixIcon //是否显示logo,不显示时设置false,显示时请填写remixIcon图标名称,暂时只支持设置remixIcon
logo: "vuejs-fill", logo: 'vuejs-fill',
//是否显示在页面高亮错误 //是否显示在页面高亮错误
errorLog: ["development"], errorLog: ['development'],
//是否开启登录拦截 //是否开启登录拦截
loginInterception: true, loginInterception: true,
//是否开启登录RSA加密 //是否开启登录RSA加密
loginRSA: false, loginRSA: false,
//intelligence和all两种方式,前者后端权限只控制permissions不控制view文件的import(前后端配合,减轻后端工作量),all方式完全交给后端前端只负责加载 //intelligence和all两种方式,前者后端权限只控制permissions不控制view文件的import(前后端配合,减轻后端工作量),all方式完全交给后端前端只负责加载
authentication: "intelligence", authentication: 'intelligence',
//vertical布局时是否只保持一个子菜单的展开 //vertical布局时是否只保持一个子菜单的展开
uniqueOpened: true, uniqueOpened: true,
//vertical布局时默认展开的菜单path,使用逗号隔开建议只展开一个 //vertical布局时默认展开的菜单path,使用逗号隔开建议只展开一个
defaultOopeneds: ["/vab"], defaultOopeneds: ['/vab'],
//需要加loading层的请求,防止重复提交 //需要加loading层的请求,防止重复提交
debounce: ["doEdit"], debounce: ['doEdit'],
//需要自动注入并加载的模块 //需要自动注入并加载的模块
providePlugin: { maptalks: "maptalks", "window.maptalks": "maptalks" }, providePlugin: { maptalks: 'maptalks', 'window.maptalks': 'maptalks' },
//npm run build时是否自动生成7z压缩包 //npm run build时是否自动生成7z压缩包
build7z: false, build7z: false,
//代码生成机生成在view下的文件夹名称 //代码生成机生成在view下的文件夹名称
templateFolder: "project", templateFolder: 'project',
//是否显示终端donation打印 //是否显示终端donation打印
donation: true, donation: true,
}; }
module.exports = setting; module.exports = setting
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
*/ */
const theme = { const theme = {
//是否国定头部 固定fixed 不固定noFixed //是否国定头部 固定fixed 不固定noFixed
header: "fixed", header: 'fixed',
//横纵布局 horizontal vertical //横纵布局 horizontal vertical
layout: "vertical", layout: 'vertical',
//是否开启主题配置按钮 //是否开启主题配置按钮
themeBar: true, themeBar: true,
//是否显示多标签页 //是否显示多标签页
tabsBar: true, tabsBar: true,
}; }
module.exports = theme; module.exports = theme
...@@ -2,84 +2,81 @@ ...@@ -2,84 +2,81 @@
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
* @description 路由守卫,目前两种模式:all模式与intelligence模式 * @description 路由守卫,目前两种模式:all模式与intelligence模式
*/ */
import router from "@/router"; import router from '@/router'
import store from "@/store"; import store from '@/store'
import VabProgress from "nprogress"; import VabProgress from 'nprogress'
import "nprogress/nprogress.css"; import 'nprogress/nprogress.css'
import getPageTitle from "@/utils/pageTitle"; import getPageTitle from '@/utils/pageTitle'
import { import {
authentication, authentication,
loginInterception, loginInterception,
progressBar, progressBar,
recordRoute, recordRoute,
routesWhiteList, routesWhiteList,
} from "./settings"; } from './settings'
VabProgress.configure({ VabProgress.configure({
easing: "ease", easing: 'ease',
speed: 500, speed: 500,
trickleSpeed: 200, trickleSpeed: 200,
showSpinner: false, showSpinner: false,
}); })
router.beforeResolve(async (to, from, next) => { router.beforeResolve(async (to, from, next) => {
if (progressBar) VabProgress.start(); if (progressBar) VabProgress.start()
let hasToken = store.getters["user/accessToken"]; let hasToken = store.getters['user/accessToken']
if (!loginInterception) hasToken = true; if (!loginInterception) hasToken = true
if (hasToken) { if (hasToken) {
if (to.path === "/login") { if (to.path === '/login') {
next({ path: "/" }); next({ path: '/' })
if (progressBar) VabProgress.done(); if (progressBar) VabProgress.done()
} else { } else {
const hasPermissions = const hasPermissions =
store.getters["user/permissions"] && store.getters['user/permissions'] &&
store.getters["user/permissions"].length > 0; store.getters['user/permissions'].length > 0
if (hasPermissions) { if (hasPermissions) {
next(); next()
} else { } else {
try { try {
let permissions; let permissions
if (!loginInterception) { if (!loginInterception) {
//settings.js loginInterception为false时,创建虚拟权限 //settings.js loginInterception为false时,创建虚拟权限
await store.dispatch("user/setPermissions", ["admin"]); await store.dispatch('user/setPermissions', ['admin'])
permissions = ["admin"]; permissions = ['admin']
} else { } else {
permissions = await store.dispatch("user/getUserInfo"); permissions = await store.dispatch('user/getUserInfo')
} }
let accessRoutes = []; let accessRoutes = []
if (authentication === "intelligence") { if (authentication === 'intelligence') {
accessRoutes = await store.dispatch( accessRoutes = await store.dispatch('routes/setRoutes', permissions)
"routes/setRoutes", } else if (authentication === 'all') {
permissions accessRoutes = await store.dispatch('routes/setAllRoutes')
);
} else if (authentication === "all") {
accessRoutes = await store.dispatch("routes/setAllRoutes");
} }
router.addRoutes(accessRoutes); router.addRoutes(accessRoutes)
next({ ...to, replace: true }); next({ ...to, replace: true })
} catch { } catch {
await store.dispatch("user/resetAccessToken"); await store.dispatch('user/resetAccessToken')
if (progressBar) VabProgress.done(); if (progressBar) VabProgress.done()
} }
} }
} }
} else { } else {
if (routesWhiteList.indexOf(to.path) !== -1) { if (routesWhiteList.indexOf(to.path) !== -1) {
next(); next()
} else { } else {
if (recordRoute) { if (recordRoute) {
next(`/login?redirect=${to.path}`); next(`/login?redirect=${to.path}`)
} else { } else {
next("/login"); next('/login')
} }
if (progressBar) VabProgress.done(); if (progressBar) VabProgress.done()
} }
} }
document.title = getPageTitle(to.meta.title); document.title = getPageTitle(to.meta.title)
}); })
router.afterEach(() => { router.afterEach(() => {
if (progressBar) VabProgress.done(); if (progressBar) VabProgress.done()
}); })
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @description 3个子配置,通用配置|主题配置|网络配置,建议在当前目录下修改config.js修改配置,会覆盖默认配置,也可以直接修改默认配置 * @description 3个子配置,通用配置|主题配置|网络配置,建议在当前目录下修改config.js修改配置,会覆盖默认配置,也可以直接修改默认配置
*/ */
//默认配置 //默认配置
const { setting, theme, network } = require("./default"); const { setting, theme, network } = require('./default')
//自定义配置 //自定义配置
const config = require("./config"); const config = require('./config')
//导出配置(以自定义配置为主) //导出配置(以自定义配置为主)
module.exports = Object.assign({}, setting, theme, network, config); module.exports = Object.assign({}, setting, theme, network, config)
...@@ -16,24 +16,24 @@ ...@@ -16,24 +16,24 @@
</div> </div>
</template> </template>
<script> <script>
import { getList } from "@/api/ad"; import { getList } from '@/api/ad'
export default { export default {
data() { data() {
return { return {
nodeEnv: process.env.NODE_ENV, nodeEnv: process.env.NODE_ENV,
adList: [], adList: [],
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
methods: { methods: {
async fetchData() { async fetchData() {
const { data } = await getList(); const { data } = await getList()
this.adList = data; this.adList = data
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.vab-ad { .vab-ad {
......
...@@ -14,16 +14,16 @@ ...@@ -14,16 +14,16 @@
</template> </template>
<script> <script>
import { mapActions, mapGetters } from "vuex"; import { mapActions, mapGetters } from 'vuex'
import { import {
copyright, copyright,
footerCopyright, footerCopyright,
keepAliveMaxNum, keepAliveMaxNum,
title, title,
} from "@/config/settings"; } from '@/config/settings'
export default { export default {
name: "AppMain", name: 'AppMain',
data() { data() {
return { return {
show: false, show: false,
...@@ -33,50 +33,50 @@ ...@@ -33,50 +33,50 @@
keepAliveMaxNum, keepAliveMaxNum,
routerView: true, routerView: true,
footerCopyright, footerCopyright,
}; }
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
visitedRoutes: "tabsBar/visitedRoutes", visitedRoutes: 'tabsBar/visitedRoutes',
device: "settings/device", device: 'settings/device',
}), }),
cachedRoutes() { cachedRoutes() {
const cachedRoutesArr = []; const cachedRoutesArr = []
this.visitedRoutes.forEach((item) => { this.visitedRoutes.forEach((item) => {
if (!item.meta.noKeepAlive) { if (!item.meta.noKeepAlive) {
cachedRoutesArr.push(item.name); cachedRoutesArr.push(item.name)
} }
}); })
return cachedRoutesArr; return cachedRoutesArr
}, },
key() { key() {
return this.$route.path; return this.$route.path
}, },
}, },
watch: { watch: {
$route: { $route: {
handler(route) { handler(route) {
if ("mobile" === this.device) this.foldSideBar(); if ('mobile' === this.device) this.foldSideBar()
}, },
immediate: true, immediate: true,
}, },
}, },
created() { created() {
//重载所有路由 //重载所有路由
this.$baseEventBus.$on("reload-routerview", () => { this.$baseEventBus.$on('reload-routerview', () => {
this.routerView = false; this.routerView = false
this.$nextTick(() => { this.$nextTick(() => {
this.routerView = true; this.routerView = true
}); })
}); })
}, },
mounted() {}, mounted() {},
methods: { methods: {
...mapActions({ ...mapActions({
foldSideBar: "settings/foldSideBar", foldSideBar: 'settings/foldSideBar',
}), }),
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -18,54 +18,54 @@ ...@@ -18,54 +18,54 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from 'vuex'
import { recordRoute } from "@/config/settings"; import { recordRoute } from '@/config/settings'
export default { export default {
name: "Avatar", name: 'Avatar',
computed: { computed: {
...mapGetters({ ...mapGetters({
avatar: "user/avatar", avatar: 'user/avatar',
username: "user/username", username: 'user/username',
}), }),
}, },
methods: { methods: {
handleCommand(command) { handleCommand(command) {
switch (command) { switch (command) {
case "logout": case 'logout':
this.logout(); this.logout()
break; break
case "personalCenter": case 'personalCenter':
this.personalCenter(); this.personalCenter()
break; break
case "github": case 'github':
window.open("https://github.com/chuzhixin/vue-admin-beautiful"); window.open('https://github.com/chuzhixin/vue-admin-beautiful')
break; break
case "gitee": case 'gitee':
window.open("https://gitee.com/chu1204505056/vue-admin-beautiful"); window.open('https://gitee.com/chu1204505056/vue-admin-beautiful')
break; break
} }
}, },
personalCenter() { personalCenter() {
this.$router.push("/personalCenter/personalCenter"); this.$router.push('/personalCenter/personalCenter')
}, },
logout() { logout() {
this.$baseConfirm( this.$baseConfirm(
"您确定要退出" + this.$baseTitle + "吗?", '您确定要退出' + this.$baseTitle + '吗?',
null, null,
async () => { async () => {
await this.$store.dispatch("user/logout"); await this.$store.dispatch('user/logout')
if (recordRoute) { if (recordRoute) {
const fullPath = this.$route.fullPath; const fullPath = this.$route.fullPath
this.$router.push(`/login?redirect=${fullPath}`); this.$router.push(`/login?redirect=${fullPath}`)
} else { } else {
this.$router.push("/login"); this.$router.push('/login')
} }
} }
); )
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.avatar-dropdown { .avatar-dropdown {
......
...@@ -8,25 +8,25 @@ ...@@ -8,25 +8,25 @@
<script> <script>
export default { export default {
name: "Breadcrumb", name: 'Breadcrumb',
data() { data() {
return { return {
list: this.getBreadcrumb(), list: this.getBreadcrumb(),
}; }
}, },
watch: { watch: {
$route() { $route() {
this.list = this.getBreadcrumb(); this.list = this.getBreadcrumb()
}, },
}, },
methods: { methods: {
getBreadcrumb() { getBreadcrumb() {
return this.$route.matched.filter( return this.$route.matched.filter(
(item) => item.name && item.meta.title (item) => item.name && item.meta.title
); )
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -14,23 +14,23 @@ ...@@ -14,23 +14,23 @@
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from 'vuex'
import { logo } from "@/config/settings"; import { logo } from '@/config/settings'
export default { export default {
name: "Logo", name: 'Logo',
data() { data() {
return { return {
title: this.$baseTitle, title: this.$baseTitle,
}; }
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
logo: "settings/logo", logo: 'settings/logo',
layout: "settings/layout", layout: 'settings/layout',
}), }),
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@mixin container { @mixin container {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</template> </template>
<script> <script>
import { mapActions, mapGetters } from "vuex"; import { mapActions, mapGetters } from 'vuex'
import { import {
Avatar, Avatar,
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
ErrorLog, ErrorLog,
FullScreenBar, FullScreenBar,
ThemeBar, ThemeBar,
} from "@/layouts/components"; } from '@/layouts/components'
export default { export default {
name: "NavBar", name: 'NavBar',
components: { components: {
Avatar, Avatar,
Breadcrumb, Breadcrumb,
...@@ -58,32 +58,32 @@ ...@@ -58,32 +58,32 @@
data() { data() {
return { return {
pulse: false, pulse: false,
}; }
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
collapse: "settings/collapse", collapse: 'settings/collapse',
visitedRoutes: "tabsBar/visitedRoutes", visitedRoutes: 'tabsBar/visitedRoutes',
device: "settings/device", device: 'settings/device',
routes: "routes/routes", routes: 'routes/routes',
}), }),
}, },
methods: { methods: {
...mapActions({ ...mapActions({
changeCollapse: "settings/changeCollapse", changeCollapse: 'settings/changeCollapse',
}), }),
handleCollapse() { handleCollapse() {
this.changeCollapse(); this.changeCollapse()
}, },
async refreshRoute() { async refreshRoute() {
this.$baseEventBus.$emit("reload-routerview"); this.$baseEventBus.$emit('reload-routerview')
this.pulse = true; this.pulse = true
setTimeout(() => { setTimeout(() => {
this.pulse = false; this.pulse = false
}, 1000); }, 1000)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -66,119 +66,119 @@ ...@@ -66,119 +66,119 @@
</template> </template>
<script> <script>
import variables from "@/styles/variables.scss"; import variables from '@/styles/variables.scss'
import { mapActions, mapGetters } from "vuex"; import { mapActions, mapGetters } from 'vuex'
import { layout as defaultLayout } from "@/config/settings"; import { layout as defaultLayout } from '@/config/settings'
export default { export default {
name: "ThemeBar", name: 'ThemeBar',
data() { data() {
return { return {
drawerVisible: false, drawerVisible: false,
theme: { theme: {
name: "default", name: 'default',
layout: "", layout: '',
header: "", header: '',
tabsBar: "", tabsBar: '',
}, },
}; }
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
layout: "settings/layout", layout: 'settings/layout',
header: "settings/header", header: 'settings/header',
tabsBar: "settings/tabsBar", tabsBar: 'settings/tabsBar',
themeBar: "settings/themeBar", themeBar: 'settings/themeBar',
}), }),
}, },
created() { created() {
this.$baseEventBus.$on("theme", () => { this.$baseEventBus.$on('theme', () => {
this.handleOpenThemeBar(); this.handleOpenThemeBar()
}); })
const theme = localStorage.getItem("vue-admin-beautiful-theme"); const theme = localStorage.getItem('vue-admin-beautiful-theme')
if (null !== theme) { if (null !== theme) {
this.theme = JSON.parse(theme); this.theme = JSON.parse(theme)
this.handleSetTheme(); this.handleSetTheme()
} else { } else {
this.theme.layout = this.layout; this.theme.layout = this.layout
this.theme.header = this.header; this.theme.header = this.header
this.theme.tabsBar = this.tabsBar; this.theme.tabsBar = this.tabsBar
} }
}, },
methods: { methods: {
...mapActions({ ...mapActions({
changeLayout: "settings/changeLayout", changeLayout: 'settings/changeLayout',
changeHeader: "settings/changeHeader", changeHeader: 'settings/changeHeader',
changeTabsBar: "settings/changeTabsBar", changeTabsBar: 'settings/changeTabsBar',
}), }),
handleIsMobile() { handleIsMobile() {
return document.body.getBoundingClientRect().width - 1 < 992; return document.body.getBoundingClientRect().width - 1 < 992
}, },
handleOpenThemeBar() { handleOpenThemeBar() {
this.drawerVisible = true; this.drawerVisible = true
}, },
handleSetTheme() { handleSetTheme() {
let { name, layout, header, tabsBar } = this.theme; let { name, layout, header, tabsBar } = this.theme
localStorage.setItem( localStorage.setItem(
"vue-admin-beautiful-theme", 'vue-admin-beautiful-theme',
`{ `{
"name":"${name}", "name":"${name}",
"layout":"${layout}", "layout":"${layout}",
"header":"${header}", "header":"${header}",
"tabsBar":"${tabsBar}" "tabsBar":"${tabsBar}"
}` }`
); )
if (!this.handleIsMobile()) this.changeLayout(layout); if (!this.handleIsMobile()) this.changeLayout(layout)
this.changeHeader(header); this.changeHeader(header)
this.changeTabsBar(tabsBar); this.changeTabsBar(tabsBar)
document.getElementsByTagName( document.getElementsByTagName(
"body" 'body'
)[0].className = `vue-admin-beautiful-theme-${name}`; )[0].className = `vue-admin-beautiful-theme-${name}`
this.drawerVisible = false; this.drawerVisible = false
}, },
handleSaveTheme() { handleSaveTheme() {
this.handleSetTheme(); this.handleSetTheme()
}, },
handleSetDfaultTheme() { handleSetDfaultTheme() {
let { name } = this.theme; let { name } = this.theme
document document
.getElementsByTagName("body")[0] .getElementsByTagName('body')[0]
.classList.remove(`vue-admin-beautiful-theme-${name}`); .classList.remove(`vue-admin-beautiful-theme-${name}`)
localStorage.removeItem("vue-admin-beautiful-theme"); localStorage.removeItem('vue-admin-beautiful-theme')
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data())
this.changeHeader(defaultLayout); this.changeHeader(defaultLayout)
this.theme.name = "default"; this.theme.name = 'default'
this.theme.layout = this.layout; this.theme.layout = this.layout
this.theme.header = this.header; this.theme.header = this.header
this.theme.tabsBar = this.tabsBar; this.theme.tabsBar = this.tabsBar
this.drawerVisible = false; this.drawerVisible = false
}, },
handleGetCode() { handleGetCode() {
const url = const url =
"https://github.com/chuzhixin/vue-admin-beautiful/tree/master/src/views"; 'https://github.com/chuzhixin/vue-admin-beautiful/tree/master/src/views'
let path = this.$route.path + "/index.vue"; let path = this.$route.path + '/index.vue'
if (path === "/vab/menu1/menu1-1/menu1-1-1/index.vue") { if (path === '/vab/menu1/menu1-1/menu1-1-1/index.vue') {
path = "/vab/nested/menu1/menu1-1/menu1-1-1/index.vue"; path = '/vab/nested/menu1/menu1-1/menu1-1-1/index.vue'
} }
if (path === "/vab/icon/awesomeIcon/index.vue") { if (path === '/vab/icon/awesomeIcon/index.vue') {
path = "/vab/icon/index.vue"; path = '/vab/icon/index.vue'
} }
if (path === "/vab/icon/remixIcon/index.vue") { if (path === '/vab/icon/remixIcon/index.vue') {
path = "/vab/icon/remixIcon.vue"; path = '/vab/icon/remixIcon.vue'
} }
if (path === "/vab/icon/colorfulIcon/index.vue") { if (path === '/vab/icon/colorfulIcon/index.vue') {
path = "/vab/icon/colorfulIcon.vue"; path = '/vab/icon/colorfulIcon.vue'
} }
if (path === "/vab/table/comprehensiveTable/index.vue") { if (path === '/vab/table/comprehensiveTable/index.vue') {
path = "/vab/table/index.vue"; path = '/vab/table/index.vue'
} }
if (path === "/vab/table/inlineEditTable/index.vue") { if (path === '/vab/table/inlineEditTable/index.vue') {
path = "/vab/table/inlineEditTable.vue"; path = '/vab/table/inlineEditTable.vue'
} }
window.open(url + path); window.open(url + path)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -4,27 +4,27 @@ ...@@ -4,27 +4,27 @@
* 当然也存在一定的弊端,给开发者自定义增加了一定的困难, * 当然也存在一定的弊端,给开发者自定义增加了一定的困难,
* 如果您一定要进行高度自定义,请仔细阅读讨论群文档,layouts本地化篇。 * 如果您一定要进行高度自定义,请仔细阅读讨论群文档,layouts本地化篇。
*/ */
export { default as ColorfullIcon } from "zx-layouts/ColorfullIcon"; export { default as ColorfullIcon } from 'zx-layouts/ColorfullIcon'
export { default as RemixIcon } from "zx-layouts/RemixIcon"; export { default as RemixIcon } from 'zx-layouts/RemixIcon'
export { default as VabDrag } from "zx-layouts/Drag"; export { default as VabDrag } from 'zx-layouts/Drag'
export { default as VabPermissions } from "zx-layouts/Permissions"; export { default as VabPermissions } from 'zx-layouts/Permissions'
export { default as VabQueryForm } from "zx-layouts/VabQueryForm/export"; export { default as VabQueryForm } from 'zx-layouts/VabQueryForm/export'
//本地化logo、默认使用svg,如需变更为png更改logo源码即可 //本地化logo、默认使用svg,如需变更为png更改logo源码即可
export { default as Logo } from "./Logo"; export { default as Logo } from './Logo'
//本地化头像组件 //本地化头像组件
export { default as Avatar } from "./Avatar"; export { default as Avatar } from './Avatar'
//本地化广告组件,如不需要全局搜索ad组件删掉即可 //本地化广告组件,如不需要全局搜索ad组件删掉即可
export { default as Ad } from "./Ad"; export { default as Ad } from './Ad'
//本地化AppMain组件 //本地化AppMain组件
export { default as AppMain } from "./AppMain"; export { default as AppMain } from './AppMain'
export { default as TabsBar } from "zx-layouts/TabsBar"; export { default as TabsBar } from 'zx-layouts/TabsBar'
export { default as SideBar } from "zx-layouts/SideBar"; export { default as SideBar } from 'zx-layouts/SideBar'
//本地化Breadcrumb组件 //本地化Breadcrumb组件
export { default as Breadcrumb } from "./Breadcrumb"; export { default as Breadcrumb } from './Breadcrumb'
export { default as FullScreenBar } from "zx-layouts/FullScreenBar"; export { default as FullScreenBar } from 'zx-layouts/FullScreenBar'
export { default as ErrorLog } from "zx-layouts/ErrorLog"; export { default as ErrorLog } from 'zx-layouts/ErrorLog'
//本地化ThemeBar组件 //本地化ThemeBar组件
export { default as ThemeBar } from "./ThemeBar"; export { default as ThemeBar } from './ThemeBar'
export { default as TopBar } from "zx-layouts/TopBar"; export { default as TopBar } from 'zx-layouts/TopBar'
//本地化NavBar组件 //本地化NavBar组件
export { default as NavBar } from "./NavBar"; export { default as NavBar } from './NavBar'
...@@ -52,11 +52,11 @@ ...@@ -52,11 +52,11 @@
</template> </template>
<script> <script>
import { Ad, AppMain, NavBar, SideBar, TabsBar, TopBar } from "./components"; import { Ad, AppMain, NavBar, SideBar, TabsBar, TopBar } from './components'
import { mapActions, mapGetters } from "vuex"; import { mapActions, mapGetters } from 'vuex'
import { tokenName } from "@/config/settings"; import { tokenName } from '@/config/settings'
export default { export default {
name: "Layout", name: 'Layout',
components: { components: {
Ad, Ad,
TopBar, TopBar,
...@@ -66,88 +66,88 @@ ...@@ -66,88 +66,88 @@
TabsBar, TabsBar,
}, },
data() { data() {
return { oldLayout: "" }; return { oldLayout: '' }
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
layout: "settings/layout", layout: 'settings/layout',
tabsBar: "settings/tabsBar", tabsBar: 'settings/tabsBar',
collapse: "settings/collapse", collapse: 'settings/collapse',
header: "settings/header", header: 'settings/header',
device: "settings/device", device: 'settings/device',
}), }),
classObj() { classObj() {
return { return {
mobile: this.device === "mobile", mobile: this.device === 'mobile',
}; }
}, },
}, },
beforeMount() { beforeMount() {
window.addEventListener("resize", this.handleResize); window.addEventListener('resize', this.handleResize)
}, },
beforeDestroy() { beforeDestroy() {
window.removeEventListener("resize", this.handleResize); window.removeEventListener('resize', this.handleResize)
}, },
mounted() { mounted() {
this.oldLayout = this.layout; this.oldLayout = this.layout
const userAgent = navigator.userAgent; const userAgent = navigator.userAgent
if (userAgent.includes("Juejin")) { if (userAgent.includes('Juejin')) {
this.$baseAlert( this.$baseAlert(
"vue-admin-beautiful不支持在掘金内置浏览器演示,请手动复制以下地址到浏览器中查看http://mpfhrd48.sanxing.uz7.cn/vue-admin-beautiful" 'vue-admin-beautiful不支持在掘金内置浏览器演示,请手动复制以下地址到浏览器中查看http://mpfhrd48.sanxing.uz7.cn/vue-admin-beautiful'
); )
} }
const isMobile = this.handleIsMobile(); const isMobile = this.handleIsMobile()
if (isMobile) { if (isMobile) {
if (isMobile) { if (isMobile) {
//横向布局时如果是手机端访问那么改成纵向版 //横向布局时如果是手机端访问那么改成纵向版
this.$store.dispatch("settings/changeLayout", "vertical"); this.$store.dispatch('settings/changeLayout', 'vertical')
} else { } else {
this.$store.dispatch("settings/changeLayout", this.oldLayout); this.$store.dispatch('settings/changeLayout', this.oldLayout)
} }
this.$store.dispatch("settings/toggleDevice", "mobile"); this.$store.dispatch('settings/toggleDevice', 'mobile')
setTimeout(() => { setTimeout(() => {
this.$store.dispatch("settings/foldSideBar"); this.$store.dispatch('settings/foldSideBar')
}, 2000); }, 2000)
} else { } else {
this.$store.dispatch("settings/openSideBar"); this.$store.dispatch('settings/openSideBar')
} }
this.$nextTick(() => { this.$nextTick(() => {
window.addEventListener( window.addEventListener(
"storage", 'storage',
(e) => { (e) => {
if (e.key === tokenName || e.key === null) window.location.reload(); if (e.key === tokenName || e.key === null) window.location.reload()
if (e.key === tokenName && e.value === null) if (e.key === tokenName && e.value === null)
window.location.reload(); window.location.reload()
}, },
false false
); )
}); })
}, },
methods: { methods: {
...mapActions({ ...mapActions({
handleFoldSideBar: "settings/foldSideBar", handleFoldSideBar: 'settings/foldSideBar',
}), }),
handleIsMobile() { handleIsMobile() {
return document.body.getBoundingClientRect().width - 1 < 992; return document.body.getBoundingClientRect().width - 1 < 992
}, },
handleResize() { handleResize() {
if (!document.hidden) { if (!document.hidden) {
const isMobile = this.handleIsMobile(); const isMobile = this.handleIsMobile()
if (isMobile) { if (isMobile) {
//横向布局时如果是手机端访问那么改成纵向版 //横向布局时如果是手机端访问那么改成纵向版
this.$store.dispatch("settings/changeLayout", "vertical"); this.$store.dispatch('settings/changeLayout', 'vertical')
} else { } else {
this.$store.dispatch("settings/changeLayout", this.oldLayout); this.$store.dispatch('settings/changeLayout', this.oldLayout)
} }
this.$store.dispatch( this.$store.dispatch(
"settings/toggleDevice", 'settings/toggleDevice',
isMobile ? "mobile" : "desktop" isMobile ? 'mobile' : 'desktop'
); )
} }
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
import Vue from "vue"; import Vue from 'vue'
import App from "./App"; import App from './App'
import store from "./store"; import store from './store'
import router from "./router"; import router from './router'
import "./plugins"; import './plugins'
/** /**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
* @description 生产环境默认都使用mock,如果正式用于生产环境时,记得去掉 * @description 生产环境默认都使用mock,如果正式用于生产环境时,记得去掉
*/ */
if (process.env.NODE_ENV === "production") { if (process.env.NODE_ENV === 'production') {
const { mockXHR } = require("@/utils/static"); const { mockXHR } = require('@/utils/static')
mockXHR(); mockXHR()
} }
Vue.config.productionTip = false; Vue.config.productionTip = false
new Vue({ new Vue({
el: "#vue-admin-beautiful", el: '#vue-admin-beautiful',
router, router,
store, store,
render: (h) => h(App), render: (h) => h(App),
}); })
import "echarts"; import 'echarts'
import "echarts/map/js/china"; import 'echarts/map/js/china'
import "echarts/map/js/world"; import 'echarts/map/js/world'
import "echarts-wordcloud"; import 'echarts-wordcloud'
import VabChart from "vue-echarts"; import VabChart from 'vue-echarts'
import theme from "./vab-echarts-theme.json"; import theme from './vab-echarts-theme.json'
VabChart.registerTheme("vab-echarts-theme", theme); VabChart.registerTheme('vab-echarts-theme', theme)
export default VabChart; export default VabChart
import Vue from "vue"; import Vue from 'vue'
import ElementUI from "element-ui"; import ElementUI from 'element-ui'
import "element-ui/lib/theme-chalk/display.css"; import 'element-ui/lib/theme-chalk/display.css'
import "@/styles/element-variables.scss"; import '@/styles/element-variables.scss'
Vue.use(ElementUI, { Vue.use(ElementUI, {
size: "small", size: 'small',
}); })
/* 公共引入,勿随意修改,修改时需经过确认 */ /* 公共引入,勿随意修改,修改时需经过确认 */
import Vue from "vue"; import Vue from 'vue'
import "./element"; import './element'
import "./support"; import './support'
import "@/styles/vab.scss"; import '@/styles/vab.scss'
import "@/remixIcon"; import '@/remixIcon'
import "@/colorfulIcon"; import '@/colorfulIcon'
import "@/config/permission"; import '@/config/permission'
import "@/utils/errorLog"; import '@/utils/errorLog'
import "./vabIcon"; import './vabIcon'
import Vab from "@/utils/vab"; import Vab from '@/utils/vab'
import { VabDrag, VabPermissions, VabQueryForm } from "@/layouts/components"; import { VabDrag, VabPermissions, VabQueryForm } from '@/layouts/components'
import VabCount from "zx-count"; import VabCount from 'zx-count'
Vue.use(Vab); Vue.use(Vab)
Vue.use(VabPermissions); Vue.use(VabPermissions)
Vue.use(VabDrag); Vue.use(VabDrag)
Vue.use(VabQueryForm); Vue.use(VabQueryForm)
Vue.use(VabCount); Vue.use(VabCount)
import { MessageBox } from "element-ui"; import { MessageBox } from 'element-ui'
import { donation } from "@/config/settings"; import { donation } from '@/config/settings'
import { dependencies, repository } from "../../package.json"; import { dependencies, repository } from '../../package.json'
if (!!window.ActiveXObject || "ActiveXObject" in window) { if (!!window.ActiveXObject || 'ActiveXObject' in window) {
MessageBox({ MessageBox({
title: "温馨提示", title: '温馨提示',
message: message:
'自2015年3月起,微软已宣布弃用IE,且不再对IE提供任何更新维护,请<a target="_blank" style="color:blue" href="https://www.microsoft.com/zh-cn/edge/">点击此处</a>访问微软官网更新浏览器,如果您使用的是双核浏览器,请您切换浏览器内核为极速模式', '自2015年3月起,微软已宣布弃用IE,且不再对IE提供任何更新维护,请<a target="_blank" style="color:blue" href="https://www.microsoft.com/zh-cn/edge/">点击此处</a>访问微软官网更新浏览器,如果您使用的是双核浏览器,请您切换浏览器内核为极速模式',
type: "warning", type: 'warning',
showClose: false, showClose: false,
showConfirmButton: false, showConfirmButton: false,
closeOnClickModal: false, closeOnClickModal: false,
closeOnPressEscape: false, closeOnPressEscape: false,
closeOnHashChange: false, closeOnHashChange: false,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
}); })
} }
if (!dependencies["zx-icon"] || !dependencies["zx-layouts"]) { if (!dependencies['zx-icon'] || !dependencies['zx-layouts']) {
document.body.innerHTML = ""; document.body.innerHTML = ''
} }
import VabComparison from "zx-comparison"; import VabComparison from 'zx-comparison'
export default VabComparison; export default VabComparison
import Vue from "vue"; import Vue from 'vue'
import VabIcon from "zx-icon"; import VabIcon from 'zx-icon'
Vue.component("VabIcon", VabIcon); Vue.component('VabIcon', VabIcon)
import VabMagnifier from "zx-magnifie"; import VabMagnifier from 'zx-magnifie'
export default VabMagnifier; export default VabMagnifier
import ZxMarkdownEditor from "zx-markdown-editor"; import ZxMarkdownEditor from 'zx-markdown-editor'
import "zx-markdown-editor/dist/zx-markdown-editor.css"; import 'zx-markdown-editor/dist/zx-markdown-editor.css'
const VabMarkdownEditor = ZxMarkdownEditor; const VabMarkdownEditor = ZxMarkdownEditor
export default VabMarkdownEditor; export default VabMarkdownEditor
import { Custom, Flv, Hls, Mp4 } from "zx-player"; import { Custom, Flv, Hls, Mp4 } from 'zx-player'
const VabPlayerMp4 = Mp4; const VabPlayerMp4 = Mp4
const VabPlayerHls = Hls; const VabPlayerHls = Hls
const VabPlayerFlv = Flv; const VabPlayerFlv = Flv
const VabPlayerCustom = Custom; const VabPlayerCustom = Custom
export { VabPlayerMp4, VabPlayerHls, VabPlayerFlv, VabPlayerCustom }; export { VabPlayerMp4, VabPlayerHls, VabPlayerFlv, VabPlayerCustom }
import "zx-quill/dist/zx-quill.css"; import 'zx-quill/dist/zx-quill.css'
import VabQuill from "zx-quill"; import VabQuill from 'zx-quill'
export default VabQuill; export default VabQuill
import VabVerify from "zx-verify"; import VabVerify from 'zx-verify'
import "zx-verify/dist/zx-verify.css"; import 'zx-verify/dist/zx-verify.css'
export default VabVerify; export default VabVerify
import Vue from "vue"; import Vue from 'vue'
import { RemixIcon } from "@/layouts/components"; import { RemixIcon } from '@/layouts/components'
Vue.component("VabRemixIcon", RemixIcon); Vue.component('VabRemixIcon', RemixIcon)
const req = require.context("./svg", false, /\.svg$/), const req = require.context('./svg', false, /\.svg$/),
requireAll = (requireContext) => { requireAll = (requireContext) => {
/*let a = requireContext.keys().map(requireContext); /*let a = requireContext.keys().map(requireContext);
let arr = []; let arr = [];
...@@ -12,6 +12,6 @@ const req = require.context("./svg", false, /\.svg$/), ...@@ -12,6 +12,6 @@ const req = require.context("./svg", false, /\.svg$/),
arr.push(icon); arr.push(icon);
} }
console.log(JSON.stringify(arr));*/ console.log(JSON.stringify(arr));*/
return requireContext.keys().map(requireContext); return requireContext.keys().map(requireContext)
}; }
requireAll(req); requireAll(req)
...@@ -3,51 +3,51 @@ ...@@ -3,51 +3,51 @@
* @description router全局配置,如有必要可分文件抽离,其中asyncRoutes只有在intelligence模式下才会用到,vip文档中已提供路由的基础图标与小清新图标的配置方案,请仔细阅读 * @description router全局配置,如有必要可分文件抽离,其中asyncRoutes只有在intelligence模式下才会用到,vip文档中已提供路由的基础图标与小清新图标的配置方案,请仔细阅读
*/ */
import Vue from "vue"; import Vue from 'vue'
import VueRouter from "vue-router"; import VueRouter from 'vue-router'
import Layout from "@/layouts"; import Layout from '@/layouts'
import EmptyLayout from "@/layouts/EmptyLayout"; import EmptyLayout from '@/layouts/EmptyLayout'
import { publicPath, routerMode } from "@/config/settings"; import { publicPath, routerMode } from '@/config/settings'
Vue.use(VueRouter); Vue.use(VueRouter)
export const constantRoutes = [ export const constantRoutes = [
{ {
path: "/login", path: '/login',
component: () => import("@/views/login/index"), component: () => import('@/views/login/index'),
hidden: true, hidden: true,
}, },
{ {
path: "/register", path: '/register',
component: () => import("@/views/register/index"), component: () => import('@/views/register/index'),
hidden: true, hidden: true,
}, },
{ {
path: "/401", path: '/401',
name: "401", name: '401',
component: () => import("@/views/401"), component: () => import('@/views/401'),
hidden: true, hidden: true,
}, },
{ {
path: "/404", path: '/404',
name: "404", name: '404',
component: () => import("@/views/404"), component: () => import('@/views/404'),
hidden: true, hidden: true,
}, },
]; ]
export const asyncRoutes = [ export const asyncRoutes = [
{ {
path: "/", path: '/',
component: Layout, component: Layout,
redirect: "index", redirect: 'index',
children: [ children: [
{ {
path: "index", path: 'index',
name: "Index", name: 'Index',
component: () => import("@/views/index/index"), component: () => import('@/views/index/index'),
meta: { meta: {
title: "首页", title: '首页',
icon: "home", icon: 'home',
affix: true, affix: true,
}, },
}, },
...@@ -72,322 +72,322 @@ export const asyncRoutes = [ ...@@ -72,322 +72,322 @@ export const asyncRoutes = [
}, */ }, */
{ {
path: "/vab", path: '/vab',
component: Layout, component: Layout,
redirect: "noRedirect", redirect: 'noRedirect',
name: "Vab", name: 'Vab',
alwaysShow: true, alwaysShow: true,
meta: { title: "组件", icon: "box-open" }, meta: { title: '组件', icon: 'box-open' },
children: [ children: [
{ {
path: "permissions", path: 'permissions',
name: "Permission", name: 'Permission',
component: () => import("@/views/vab/permissions/index"), component: () => import('@/views/vab/permissions/index'),
meta: { meta: {
title: "角色权限", title: '角色权限',
permissions: ["admin", "editor"], permissions: ['admin', 'editor'],
}, },
}, },
{ {
path: "icon", path: 'icon',
component: EmptyLayout, component: EmptyLayout,
redirect: "noRedirect", redirect: 'noRedirect',
name: "Icon", name: 'Icon',
meta: { meta: {
title: "图标", title: '图标',
permissions: ["admin"], permissions: ['admin'],
}, },
children: [ children: [
{ {
path: "awesomeIcon", path: 'awesomeIcon',
name: "AwesomeIcon", name: 'AwesomeIcon',
component: () => import("@/views/vab/icon/index"), component: () => import('@/views/vab/icon/index'),
meta: { title: "常规图标" }, meta: { title: '常规图标' },
}, },
{ {
path: "remixIcon", path: 'remixIcon',
name: "RemixIcon", name: 'RemixIcon',
component: () => import("@/views/vab/icon/remixIcon"), component: () => import('@/views/vab/icon/remixIcon'),
meta: { title: "小清新图标" }, meta: { title: '小清新图标' },
}, },
{ {
path: "colorfulIcon", path: 'colorfulIcon',
name: "ColorfulIcon", name: 'ColorfulIcon',
component: () => import("@/views/vab/icon/colorfulIcon"), component: () => import('@/views/vab/icon/colorfulIcon'),
meta: { title: "多彩图标" }, meta: { title: '多彩图标' },
}, },
], ],
}, },
{ {
path: "table", path: 'table',
component: () => import("@/views/vab/table/index"), component: () => import('@/views/vab/table/index'),
name: "Table", name: 'Table',
meta: { meta: {
title: "表格", title: '表格',
permissions: ["admin"], permissions: ['admin'],
}, },
}, },
{ {
path: "map", path: 'map',
component: () => import("@/views/vab/map/index"), component: () => import('@/views/vab/map/index'),
name: "Map", name: 'Map',
meta: { meta: {
title: "地图", title: '地图',
permissions: ["admin"], permissions: ['admin'],
}, },
}, },
{ {
path: "webSocket", path: 'webSocket',
name: "WebSocket", name: 'WebSocket',
component: () => import("@/views/vab/webSocket/index"), component: () => import('@/views/vab/webSocket/index'),
meta: { title: "webSocket", permissions: ["admin"] }, meta: { title: 'webSocket', permissions: ['admin'] },
}, },
{ {
path: "form", path: 'form',
name: "Form", name: 'Form',
component: () => import("@/views/vab/form/index"), component: () => import('@/views/vab/form/index'),
meta: { title: "表单", permissions: ["admin"] }, meta: { title: '表单', permissions: ['admin'] },
}, },
{ {
path: "element", path: 'element',
name: "Element", name: 'Element',
component: () => import("@/views/vab/element/index"), component: () => import('@/views/vab/element/index'),
meta: { title: "常用组件", permissions: ["admin"] }, meta: { title: '常用组件', permissions: ['admin'] },
}, },
{ {
path: "tree", path: 'tree',
name: "Tree", name: 'Tree',
component: () => import("@/views/vab/tree/index"), component: () => import('@/views/vab/tree/index'),
meta: { title: "树", permissions: ["admin"] }, meta: { title: '树', permissions: ['admin'] },
}, },
{ {
path: "card", path: 'card',
name: "Card", name: 'Card',
component: () => import("@/views/vab/card/index"), component: () => import('@/views/vab/card/index'),
meta: { title: "卡片", permissions: ["admin"] }, meta: { title: '卡片', permissions: ['admin'] },
}, },
{ {
path: "verify", path: 'verify',
name: "Verify", name: 'Verify',
component: () => import("@/views/vab/verify/index"), component: () => import('@/views/vab/verify/index'),
meta: { title: "验证码", permissions: ["admin"] }, meta: { title: '验证码', permissions: ['admin'] },
}, },
{ {
path: "menu1", path: 'menu1',
component: () => import("@/views/vab/nested/menu1/index"), component: () => import('@/views/vab/nested/menu1/index'),
name: "Menu1", name: 'Menu1',
alwaysShow: true, alwaysShow: true,
meta: { meta: {
title: "嵌套路由 1", title: '嵌套路由 1',
permissions: ["admin"], permissions: ['admin'],
}, },
children: [ children: [
{ {
path: "menu1-1", path: 'menu1-1',
name: "Menu1-1", name: 'Menu1-1',
alwaysShow: true, alwaysShow: true,
meta: { title: "嵌套路由 1-1" }, meta: { title: '嵌套路由 1-1' },
component: () => import("@/views/vab/nested/menu1/menu1-1/index"), component: () => import('@/views/vab/nested/menu1/menu1-1/index'),
children: [ children: [
{ {
path: "menu1-1-1", path: 'menu1-1-1',
name: "Menu1-1-1", name: 'Menu1-1-1',
meta: { title: "嵌套路由 1-1-1" }, meta: { title: '嵌套路由 1-1-1' },
component: () => component: () =>
import("@/views/vab/nested/menu1/menu1-1/menu1-1-1/index"), import('@/views/vab/nested/menu1/menu1-1/menu1-1-1/index'),
}, },
], ],
}, },
], ],
}, },
{ {
path: "magnifier", path: 'magnifier',
name: "Magnifier", name: 'Magnifier',
component: () => import("@/views/vab/magnifier/index"), component: () => import('@/views/vab/magnifier/index'),
meta: { title: "放大镜", permissions: ["admin"] }, meta: { title: '放大镜', permissions: ['admin'] },
}, },
{ {
path: "echarts", path: 'echarts',
name: "Echarts", name: 'Echarts',
component: () => import("@/views/vab/echarts/index"), component: () => import('@/views/vab/echarts/index'),
meta: { title: "图表", permissions: ["admin"] }, meta: { title: '图表', permissions: ['admin'] },
}, },
{ {
path: "loading", path: 'loading',
name: "Loading", name: 'Loading',
component: () => import("@/views/vab/loading/index"), component: () => import('@/views/vab/loading/index'),
meta: { title: "loading", permissions: ["admin"] }, meta: { title: 'loading', permissions: ['admin'] },
}, },
{ {
path: "player", path: 'player',
name: "Player", name: 'Player',
component: () => import("@/views/vab/player/index"), component: () => import('@/views/vab/player/index'),
meta: { title: "视频播放器", permissions: ["admin"] }, meta: { title: '视频播放器', permissions: ['admin'] },
}, },
{ {
path: "markdownEditor", path: 'markdownEditor',
name: "MarkdownEditor", name: 'MarkdownEditor',
component: () => import("@/views/vab/markdownEditor/index"), component: () => import('@/views/vab/markdownEditor/index'),
meta: { title: "markdown编辑器", permissions: ["admin"] }, meta: { title: 'markdown编辑器', permissions: ['admin'] },
}, },
{ {
path: "editor", path: 'editor',
name: "Editor", name: 'Editor',
component: () => import("@/views/vab/editor/index"), component: () => import('@/views/vab/editor/index'),
meta: { meta: {
title: "富文本编辑器", title: '富文本编辑器',
permissions: ["admin"], permissions: ['admin'],
badge: "New", badge: 'New',
}, },
}, },
{ {
path: "backToTop", path: 'backToTop',
name: "BackToTop", name: 'BackToTop',
component: () => import("@/views/vab/backToTop/index"), component: () => import('@/views/vab/backToTop/index'),
meta: { title: "返回顶部", permissions: ["admin"] }, meta: { title: '返回顶部', permissions: ['admin'] },
}, },
{ {
path: "lodash", path: 'lodash',
name: "Lodash", name: 'Lodash',
component: () => import("@/views/vab/lodash/index"), component: () => import('@/views/vab/lodash/index'),
meta: { title: "lodash", permissions: ["admin"] }, meta: { title: 'lodash', permissions: ['admin'] },
}, },
{ {
path: "imgComparison", path: 'imgComparison',
name: "ImgComparison", name: 'ImgComparison',
component: () => import("@/views/vab/imgComparison/index"), component: () => import('@/views/vab/imgComparison/index'),
meta: { title: "图像拖拽比对", permissions: ["admin"] }, meta: { title: '图像拖拽比对', permissions: ['admin'] },
}, },
{ {
path: "smallComponents", path: 'smallComponents',
name: "SmallComponents", name: 'SmallComponents',
component: () => import("@/views/vab/smallComponents/index"), component: () => import('@/views/vab/smallComponents/index'),
meta: { title: "小组件", permissions: ["admin"] }, meta: { title: '小组件', permissions: ['admin'] },
}, },
{ {
path: "upload", path: 'upload',
name: "Upload", name: 'Upload',
component: () => import("@/views/vab/upload/index"), component: () => import('@/views/vab/upload/index'),
meta: { title: "上传", permissions: ["admin"] }, meta: { title: '上传', permissions: ['admin'] },
}, },
{ {
path: "log", path: 'log',
name: "Log", name: 'Log',
component: () => import("@/views/vab/errorLog/index"), component: () => import('@/views/vab/errorLog/index'),
meta: { title: "错误日志模拟", permissions: ["admin"] }, meta: { title: '错误日志模拟', permissions: ['admin'] },
}, },
{ {
path: path:
"https://github.com/chuzhixin/vue-admin-beautiful?utm_source=gold_browser_extension", 'https://github.com/chuzhixin/vue-admin-beautiful?utm_source=gold_browser_extension',
name: "ExternalLink", name: 'ExternalLink',
meta: { meta: {
title: "外链", title: '外链',
target: "_blank", target: '_blank',
permissions: ["admin", "editor"], permissions: ['admin', 'editor'],
badge: "New", badge: 'New',
}, },
}, },
{ {
path: "more", path: 'more',
name: "More", name: 'More',
component: () => import("@/views/vab/more/index"), component: () => import('@/views/vab/more/index'),
meta: { title: "关于", permissions: ["admin"] }, meta: { title: '关于', permissions: ['admin'] },
}, },
], ],
}, },
{ {
path: "/personnelManagement", path: '/personnelManagement',
component: Layout, component: Layout,
redirect: "noRedirect", redirect: 'noRedirect',
name: "PersonnelManagement", name: 'PersonnelManagement',
meta: { title: "配置", icon: "users-cog", permissions: ["admin"] }, meta: { title: '配置', icon: 'users-cog', permissions: ['admin'] },
children: [ children: [
{ {
path: "userManagement", path: 'userManagement',
name: "UserManagement", name: 'UserManagement',
component: () => component: () =>
import("@/views/personnelManagement/userManagement/index"), import('@/views/personnelManagement/userManagement/index'),
meta: { title: "用户管理" }, meta: { title: '用户管理' },
}, },
{ {
path: "roleManagement", path: 'roleManagement',
name: "RoleManagement", name: 'RoleManagement',
component: () => component: () =>
import("@/views/personnelManagement/roleManagement/index"), import('@/views/personnelManagement/roleManagement/index'),
meta: { title: "角色管理" }, meta: { title: '角色管理' },
}, },
{ {
path: "menuManagement", path: 'menuManagement',
name: "MenuManagement", name: 'MenuManagement',
component: () => component: () =>
import("@/views/personnelManagement/menuManagement/index"), import('@/views/personnelManagement/menuManagement/index'),
meta: { title: "菜单管理", badge: "New" }, meta: { title: '菜单管理', badge: 'New' },
}, },
], ],
}, },
{ {
path: "/mall", path: '/mall',
component: Layout, component: Layout,
redirect: "noRedirect", redirect: 'noRedirect',
name: "Mall", name: 'Mall',
meta: { meta: {
title: "商城", title: '商城',
icon: "shopping-cart", icon: 'shopping-cart',
permissions: ["admin"], permissions: ['admin'],
}, },
children: [ children: [
{ {
path: "pay", path: 'pay',
name: "Pay", name: 'Pay',
component: () => import("@/views/mall/pay/index"), component: () => import('@/views/mall/pay/index'),
meta: { meta: {
title: "支付", title: '支付',
noKeepAlive: true, noKeepAlive: true,
}, },
children: null, children: null,
}, },
{ {
path: "goodsList", path: 'goodsList',
name: "GoodsList", name: 'GoodsList',
component: () => import("@/views/mall/goodsList/index"), component: () => import('@/views/mall/goodsList/index'),
meta: { meta: {
title: "商品列表", title: '商品列表',
}, },
}, },
], ],
}, },
{ {
path: "/error", path: '/error',
component: EmptyLayout, component: EmptyLayout,
redirect: "noRedirect", redirect: 'noRedirect',
name: "Error", name: 'Error',
meta: { title: "错误页", icon: "bug" }, meta: { title: '错误页', icon: 'bug' },
children: [ children: [
{ {
path: "401", path: '401',
name: "Error401", name: 'Error401',
component: () => import("@/views/401"), component: () => import('@/views/401'),
meta: { title: "401" }, meta: { title: '401' },
}, },
{ {
path: "404", path: '404',
name: "Error404", name: 'Error404',
component: () => import("@/views/404"), component: () => import('@/views/404'),
meta: { title: "404" }, meta: { title: '404' },
}, },
], ],
}, },
{ {
path: "*", path: '*',
redirect: "/404", redirect: '/404',
hidden: true, hidden: true,
}, },
]; ]
const router = new VueRouter({ const router = new VueRouter({
base: publicPath, base: publicPath,
...@@ -396,14 +396,14 @@ const router = new VueRouter({ ...@@ -396,14 +396,14 @@ const router = new VueRouter({
y: 0, y: 0,
}), }),
routes: constantRoutes, routes: constantRoutes,
}); })
//注释的地方是允许路由重复点击,如果你觉得框架路由跳转规范太过严格可选择放开 //注释的地方是允许路由重复点击,如果你觉得框架路由跳转规范太过严格可选择放开
const originalPush = VueRouter.prototype.push; const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location, onResolve, onReject) { VueRouter.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) if (onResolve || onReject)
return originalPush.call(this, location, onResolve, onReject); return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch((err) => err); return originalPush.call(this, location).catch((err) => err)
}; }
export function resetRouter() { export function resetRouter() {
router.matcher = new VueRouter({ router.matcher = new VueRouter({
...@@ -413,7 +413,7 @@ export function resetRouter() { ...@@ -413,7 +413,7 @@ export function resetRouter() {
y: 0, y: 0,
}), }),
routes: constantRoutes, routes: constantRoutes,
}).matcher; }).matcher
} }
export default router; export default router
...@@ -3,20 +3,20 @@ ...@@ -3,20 +3,20 @@
* @description 导入所有 vuex 模块,自动加入namespaced:true,用于解决vuex命名冲突,请勿修改。 * @description 导入所有 vuex 模块,自动加入namespaced:true,用于解决vuex命名冲突,请勿修改。
*/ */
import Vue from "vue"; import Vue from 'vue'
import Vuex from "vuex"; import Vuex from 'vuex'
Vue.use(Vuex); Vue.use(Vuex)
const files = require.context("./modules", false, /\.js$/); const files = require.context('./modules', false, /\.js$/)
const modules = {}; const modules = {}
files.keys().forEach((key) => { files.keys().forEach((key) => {
modules[key.replace(/(\.\/|\.js)/g, "")] = files(key).default; modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default
}); })
Object.keys(modules).forEach((key) => { Object.keys(modules).forEach((key) => {
modules[key]["namespaced"] = true; modules[key]['namespaced'] = true
}); })
const store = new Vuex.Store({ const store = new Vuex.Store({
modules, modules,
}); })
export default store; export default store
...@@ -3,24 +3,24 @@ ...@@ -3,24 +3,24 @@
* @description 异常捕获的状态拦截,请勿修改 * @description 异常捕获的状态拦截,请勿修改
*/ */
const state = { errorLogs: [] }; const state = { errorLogs: [] }
const getters = { const getters = {
errorLogs: (state) => state.errorLogs, errorLogs: (state) => state.errorLogs,
}; }
const mutations = { const mutations = {
addErrorLog(state, errorLog) { addErrorLog(state, errorLog) {
state.errorLogs.push(errorLog); state.errorLogs.push(errorLog)
}, },
clearErrorLog: (state) => { clearErrorLog: (state) => {
state.errorLogs.splice(0); state.errorLogs.splice(0)
}, },
}; }
const actions = { const actions = {
addErrorLog({ commit }, errorLog) { addErrorLog({ commit }, errorLog) {
commit("addErrorLog", errorLog); commit('addErrorLog', errorLog)
}, },
clearErrorLog({ commit }) { clearErrorLog({ commit }) {
commit("clearErrorLog"); commit('clearErrorLog')
}, },
}; }
export default { state, getters, mutations, actions }; export default { state, getters, mutations, actions }
...@@ -2,46 +2,46 @@ ...@@ -2,46 +2,46 @@
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
* @description 路由拦截状态管理,目前两种模式:all模式与intelligence模式,其中partialRoutes是菜单暂未使用 * @description 路由拦截状态管理,目前两种模式:all模式与intelligence模式,其中partialRoutes是菜单暂未使用
*/ */
import { asyncRoutes, constantRoutes } from "@/router"; import { asyncRoutes, constantRoutes } from '@/router'
import { getRouterList } from "@/api/router"; import { getRouterList } from '@/api/router'
import { convertRouter, filterAsyncRoutes } from "@/utils/handleRoutes"; import { convertRouter, filterAsyncRoutes } from '@/utils/handleRoutes'
const state = { routes: [], partialRoutes: [] }; const state = { routes: [], partialRoutes: [] }
const getters = { const getters = {
routes: (state) => state.routes, routes: (state) => state.routes,
partialRoutes: (state) => state.partialRoutes, partialRoutes: (state) => state.partialRoutes,
}; }
const mutations = { const mutations = {
setRoutes(state, routes) { setRoutes(state, routes) {
state.routes = constantRoutes.concat(routes); state.routes = constantRoutes.concat(routes)
}, },
setAllRoutes(state, routes) { setAllRoutes(state, routes) {
state.routes = constantRoutes.concat(routes); state.routes = constantRoutes.concat(routes)
}, },
setPartialRoutes(state, routes) { setPartialRoutes(state, routes) {
state.partialRoutes = constantRoutes.concat(routes); state.partialRoutes = constantRoutes.concat(routes)
}, },
}; }
const actions = { const actions = {
async setRoutes({ commit }, permissions) { async setRoutes({ commit }, permissions) {
//开源版只过滤动态路由permissions,admin不再默认拥有全部权限 //开源版只过滤动态路由permissions,admin不再默认拥有全部权限
const finallyAsyncRoutes = await filterAsyncRoutes( const finallyAsyncRoutes = await filterAsyncRoutes(
[...asyncRoutes], [...asyncRoutes],
permissions permissions
); )
commit("setRoutes", finallyAsyncRoutes); commit('setRoutes', finallyAsyncRoutes)
return finallyAsyncRoutes; return finallyAsyncRoutes
}, },
async setAllRoutes({ commit }) { async setAllRoutes({ commit }) {
let { data } = await getRouterList(); let { data } = await getRouterList()
data.push({ path: "*", redirect: "/404", hidden: true }); data.push({ path: '*', redirect: '/404', hidden: true })
let accessRoutes = convertRouter(data); let accessRoutes = convertRouter(data)
commit("setAllRoutes", accessRoutes); commit('setAllRoutes', accessRoutes)
return accessRoutes; return accessRoutes
}, },
setPartialRoutes({ commit }, accessRoutes) { setPartialRoutes({ commit }, accessRoutes) {
commit("setPartialRoutes", accessRoutes); commit('setPartialRoutes', accessRoutes)
return accessRoutes; return accessRoutes
}, },
}; }
export default { state, getters, mutations, actions }; export default { state, getters, mutations, actions }
...@@ -3,20 +3,20 @@ ...@@ -3,20 +3,20 @@
* @description 所有全局配置的状态管理,如无必要请勿修改 * @description 所有全局配置的状态管理,如无必要请勿修改
*/ */
import defaultSettings from "@/config/settings"; import defaultSettings from '@/config/settings'
const { tabsBar, logo, layout, header, themeBar } = defaultSettings; const { tabsBar, logo, layout, header, themeBar } = defaultSettings
const theme = const theme =
JSON.parse(localStorage.getItem("vue-admin-beautiful-theme")) || ""; JSON.parse(localStorage.getItem('vue-admin-beautiful-theme')) || ''
const state = { const state = {
tabsBar: theme.tabsBar || tabsBar, tabsBar: theme.tabsBar || tabsBar,
logo, logo,
collapse: false, collapse: false,
layout: theme.layout || layout, layout: theme.layout || layout,
header: theme.header || header, header: theme.header || header,
device: "desktop", device: 'desktop',
themeBar, themeBar,
}; }
const getters = { const getters = {
collapse: (state) => state.collapse, collapse: (state) => state.collapse,
device: (state) => state.device, device: (state) => state.device,
...@@ -25,51 +25,51 @@ const getters = { ...@@ -25,51 +25,51 @@ const getters = {
logo: (state) => state.logo, logo: (state) => state.logo,
tabsBar: (state) => state.tabsBar, tabsBar: (state) => state.tabsBar,
themeBar: (state) => state.themeBar, themeBar: (state) => state.themeBar,
}; }
const mutations = { const mutations = {
changeLayout: (state, layout) => { changeLayout: (state, layout) => {
if (layout) state.layout = layout; if (layout) state.layout = layout
}, },
changeHeader: (state, header) => { changeHeader: (state, header) => {
if (header) state.header = header; if (header) state.header = header
}, },
changeTabsBar: (state, tabsBar) => { changeTabsBar: (state, tabsBar) => {
if (tabsBar) state.tabsBar = tabsBar; if (tabsBar) state.tabsBar = tabsBar
}, },
changeCollapse: (state) => { changeCollapse: (state) => {
state.collapse = !state.collapse; state.collapse = !state.collapse
}, },
foldSideBar: (state) => { foldSideBar: (state) => {
state.collapse = true; state.collapse = true
}, },
openSideBar: (state) => { openSideBar: (state) => {
state.collapse = false; state.collapse = false
}, },
toggleDevice: (state, device) => { toggleDevice: (state, device) => {
state.device = device; state.device = device
}, },
}; }
const actions = { const actions = {
changeLayout({ commit }, layout) { changeLayout({ commit }, layout) {
commit("changeLayout", layout); commit('changeLayout', layout)
}, },
changeHeader({ commit }, header) { changeHeader({ commit }, header) {
commit("changeHeader", header); commit('changeHeader', header)
}, },
changeTabsBar({ commit }, tabsBar) { changeTabsBar({ commit }, tabsBar) {
commit("changeTabsBar", tabsBar); commit('changeTabsBar', tabsBar)
}, },
changeCollapse({ commit }) { changeCollapse({ commit }) {
commit("changeCollapse"); commit('changeCollapse')
}, },
foldSideBar({ commit }) { foldSideBar({ commit }) {
commit("foldSideBar"); commit('foldSideBar')
}, },
openSideBar({ commit }) { openSideBar({ commit }) {
commit("openSideBar"); commit('openSideBar')
}, },
toggleDevice({ commit }, device) { toggleDevice({ commit }, device) {
commit("toggleDevice", device); commit('toggleDevice', device)
}, },
}; }
export default { state, getters, mutations, actions }; export default { state, getters, mutations, actions }
...@@ -3,19 +3,19 @@ ...@@ -3,19 +3,19 @@
* @description 代码生成机状态管理 * @description 代码生成机状态管理
*/ */
const state = { srcCode: "" }; const state = { srcCode: '' }
const getters = { const getters = {
srcTableCode: (state) => state.srcCode, srcTableCode: (state) => state.srcCode,
}; }
const mutations = { const mutations = {
setTableCode(state, srcCode) { setTableCode(state, srcCode) {
state.srcCode = srcCode; state.srcCode = srcCode
}, },
}; }
const actions = { const actions = {
setTableCode({ commit }, srcCode) { setTableCode({ commit }, srcCode) {
commit("setTableCode", srcCode); commit('setTableCode', srcCode)
}, },
}; }
export default { state, getters, mutations, actions }; export default { state, getters, mutations, actions }
...@@ -5,108 +5,108 @@ ...@@ -5,108 +5,108 @@
const state = { const state = {
visitedRoutes: [], visitedRoutes: [],
}; }
const getters = { const getters = {
visitedRoutes: (state) => state.visitedRoutes, visitedRoutes: (state) => state.visitedRoutes,
}; }
const mutations = { const mutations = {
addVisitedRoute(state, route) { addVisitedRoute(state, route) {
let target = state.visitedRoutes.find((item) => item.path === route.path); let target = state.visitedRoutes.find((item) => item.path === route.path)
if (target) { if (target) {
if (route.fullPath !== target.fullPath) Object.assign(target, route); if (route.fullPath !== target.fullPath) Object.assign(target, route)
return; return
} }
state.visitedRoutes.push(Object.assign({}, route)); state.visitedRoutes.push(Object.assign({}, route))
}, },
delVisitedRoute(state, route) { delVisitedRoute(state, route) {
state.visitedRoutes.forEach((item, index) => { state.visitedRoutes.forEach((item, index) => {
if (item.path === route.path) state.visitedRoutes.splice(index, 1); if (item.path === route.path) state.visitedRoutes.splice(index, 1)
}); })
}, },
delOthersVisitedRoute(state, route) { delOthersVisitedRoute(state, route) {
state.visitedRoutes = state.visitedRoutes.filter( state.visitedRoutes = state.visitedRoutes.filter(
(item) => item.meta.affix || item.path === route.path (item) => item.meta.affix || item.path === route.path
); )
}, },
delLeftVisitedRoute(state, route) { delLeftVisitedRoute(state, route) {
let index = state.visitedRoutes.length; let index = state.visitedRoutes.length
state.visitedRoutes = state.visitedRoutes.filter((item) => { state.visitedRoutes = state.visitedRoutes.filter((item) => {
if (item.name === route.name) index = state.visitedRoutes.indexOf(item); if (item.name === route.name) index = state.visitedRoutes.indexOf(item)
return item.meta.affix || index <= state.visitedRoutes.indexOf(item); return item.meta.affix || index <= state.visitedRoutes.indexOf(item)
}); })
}, },
delRightVisitedRoute(state, route) { delRightVisitedRoute(state, route) {
let index = state.visitedRoutes.length; let index = state.visitedRoutes.length
state.visitedRoutes = state.visitedRoutes.filter((item) => { state.visitedRoutes = state.visitedRoutes.filter((item) => {
if (item.name === route.name) index = state.visitedRoutes.indexOf(item); if (item.name === route.name) index = state.visitedRoutes.indexOf(item)
return item.meta.affix || index >= state.visitedRoutes.indexOf(item); return item.meta.affix || index >= state.visitedRoutes.indexOf(item)
}); })
}, },
delAllVisitedRoutes(state) { delAllVisitedRoutes(state) {
state.visitedRoutes = state.visitedRoutes.filter((item) => item.meta.affix); state.visitedRoutes = state.visitedRoutes.filter((item) => item.meta.affix)
}, },
updateVisitedRoute(state, route) { updateVisitedRoute(state, route) {
state.visitedRoutes.forEach((item) => { state.visitedRoutes.forEach((item) => {
if (item.path === route.path) item = Object.assign(item, route); if (item.path === route.path) item = Object.assign(item, route)
}); })
}, },
}; }
const actions = { const actions = {
addVisitedRoute({ commit }, route) { addVisitedRoute({ commit }, route) {
commit("addVisitedRoute", route); commit('addVisitedRoute', route)
}, },
async delRoute({ dispatch, state }, route) { async delRoute({ dispatch, state }, route) {
await dispatch("delVisitedRoute", route); await dispatch('delVisitedRoute', route)
return { return {
visitedRoutes: [...state.visitedRoutes], visitedRoutes: [...state.visitedRoutes],
}; }
}, },
delVisitedRoute({ commit, state }, route) { delVisitedRoute({ commit, state }, route) {
commit("delVisitedRoute", route); commit('delVisitedRoute', route)
return [...state.visitedRoutes]; return [...state.visitedRoutes]
}, },
async delOthersRoutes({ dispatch, state }, route) { async delOthersRoutes({ dispatch, state }, route) {
await dispatch("delOthersVisitedRoute", route); await dispatch('delOthersVisitedRoute', route)
return { return {
visitedRoutes: [...state.visitedRoutes], visitedRoutes: [...state.visitedRoutes],
}; }
}, },
async delLeftRoutes({ dispatch, state }, route) { async delLeftRoutes({ dispatch, state }, route) {
await dispatch("delLeftVisitedRoute", route); await dispatch('delLeftVisitedRoute', route)
return { return {
visitedRoutes: [...state.visitedRoutes], visitedRoutes: [...state.visitedRoutes],
}; }
}, },
async delRightRoutes({ dispatch, state }, route) { async delRightRoutes({ dispatch, state }, route) {
await dispatch("delRightVisitedRoute", route); await dispatch('delRightVisitedRoute', route)
return { return {
visitedRoutes: [...state.visitedRoutes], visitedRoutes: [...state.visitedRoutes],
}; }
}, },
delOthersVisitedRoute({ commit, state }, route) { delOthersVisitedRoute({ commit, state }, route) {
commit("delOthersVisitedRoute", route); commit('delOthersVisitedRoute', route)
return [...state.visitedRoutes]; return [...state.visitedRoutes]
}, },
delLeftVisitedRoute({ commit, state }, route) { delLeftVisitedRoute({ commit, state }, route) {
commit("delLeftVisitedRoute", route); commit('delLeftVisitedRoute', route)
return [...state.visitedRoutes]; return [...state.visitedRoutes]
}, },
delRightVisitedRoute({ commit, state }, route) { delRightVisitedRoute({ commit, state }, route) {
commit("delRightVisitedRoute", route); commit('delRightVisitedRoute', route)
return [...state.visitedRoutes]; return [...state.visitedRoutes]
}, },
async delAllRoutes({ dispatch, state }, route) { async delAllRoutes({ dispatch, state }, route) {
await dispatch("delAllVisitedRoutes", route); await dispatch('delAllVisitedRoutes', route)
return { return {
visitedRoutes: [...state.visitedRoutes], visitedRoutes: [...state.visitedRoutes],
}; }
}, },
delAllVisitedRoutes({ commit, state }) { delAllVisitedRoutes({ commit, state }) {
commit("delAllVisitedRoutes"); commit('delAllVisitedRoutes')
return [...state.visitedRoutes]; return [...state.visitedRoutes]
}, },
updateVisitedRoute({ commit }, route) { updateVisitedRoute({ commit }, route) {
commit("updateVisitedRoute", route); commit('updateVisitedRoute', route)
}, },
}; }
export default { state, getters, mutations, actions }; export default { state, getters, mutations, actions }
...@@ -3,97 +3,97 @@ ...@@ -3,97 +3,97 @@
* @description 登录、获取用户信息、退出登录、清除accessToken逻辑,不建议修改 * @description 登录、获取用户信息、退出登录、清除accessToken逻辑,不建议修改
*/ */
import Vue from "vue"; import Vue from 'vue'
import { getUserInfo, login, logout } from "@/api/user"; import { getUserInfo, login, logout } from '@/api/user'
import { import {
getAccessToken, getAccessToken,
removeAccessToken, removeAccessToken,
setAccessToken, setAccessToken,
} from "@/utils/accessToken"; } from '@/utils/accessToken'
import { resetRouter } from "@/router"; import { resetRouter } from '@/router'
import { title, tokenName } from "@/config/settings"; import { title, tokenName } from '@/config/settings'
const state = { const state = {
accessToken: getAccessToken(), accessToken: getAccessToken(),
username: "", username: '',
avatar: "", avatar: '',
permissions: [], permissions: [],
}; }
const getters = { const getters = {
accessToken: (state) => state.accessToken, accessToken: (state) => state.accessToken,
username: (state) => state.username, username: (state) => state.username,
avatar: (state) => state.avatar, avatar: (state) => state.avatar,
permissions: (state) => state.permissions, permissions: (state) => state.permissions,
}; }
const mutations = { const mutations = {
setAccessToken(state, accessToken) { setAccessToken(state, accessToken) {
state.accessToken = accessToken; state.accessToken = accessToken
setAccessToken(accessToken); setAccessToken(accessToken)
}, },
setUsername(state, username) { setUsername(state, username) {
state.username = username; state.username = username
}, },
setAvatar(state, avatar) { setAvatar(state, avatar) {
state.avatar = avatar; state.avatar = avatar
}, },
setPermissions(state, permissions) { setPermissions(state, permissions) {
state.permissions = permissions; state.permissions = permissions
}, },
}; }
const actions = { const actions = {
setPermissions({ commit }, permissions) { setPermissions({ commit }, permissions) {
commit("setPermissions", permissions); commit('setPermissions', permissions)
}, },
async login({ commit }, userInfo) { async login({ commit }, userInfo) {
const { data } = await login(userInfo); const { data } = await login(userInfo)
const accessToken = data[tokenName]; const accessToken = data[tokenName]
if (accessToken) { if (accessToken) {
commit("setAccessToken", accessToken); commit('setAccessToken', accessToken)
const hour = new Date().getHours(); const hour = new Date().getHours()
const thisTime = const thisTime =
hour < 8 hour < 8
? "早上好" ? '早上好'
: hour <= 11 : hour <= 11
? "上午好" ? '上午好'
: hour <= 13 : hour <= 13
? "中午好" ? '中午好'
: hour < 18 : hour < 18
? "下午好" ? '下午好'
: "晚上好"; : '晚上好'
Vue.prototype.$baseNotify(`欢迎登录${title}`, `${thisTime}!`); Vue.prototype.$baseNotify(`欢迎登录${title}`, `${thisTime}!`)
} else { } else {
Vue.prototype.$baseMessage( Vue.prototype.$baseMessage(
`登录接口异常,未正确返回${tokenName}...`, `登录接口异常,未正确返回${tokenName}...`,
"error" 'error'
); )
} }
}, },
async getUserInfo({ commit, state }) { async getUserInfo({ commit, state }) {
const { data } = await getUserInfo(state.accessToken); const { data } = await getUserInfo(state.accessToken)
if (!data) { if (!data) {
Vue.prototype.$baseMessage("验证失败,请重新登录...", "error"); Vue.prototype.$baseMessage('验证失败,请重新登录...', 'error')
return false; return false
} }
let { permissions, username, avatar } = data; let { permissions, username, avatar } = data
if (permissions && username && Array.isArray(permissions)) { if (permissions && username && Array.isArray(permissions)) {
commit("setPermissions", permissions); commit('setPermissions', permissions)
commit("setUsername", username); commit('setUsername', username)
commit("setAvatar", avatar); commit('setAvatar', avatar)
return permissions; return permissions
} else { } else {
Vue.prototype.$baseMessage("用户信息接口异常", "error"); Vue.prototype.$baseMessage('用户信息接口异常', 'error')
return false; return false
} }
}, },
async logout({ dispatch }) { async logout({ dispatch }) {
await logout(state.accessToken); await logout(state.accessToken)
await dispatch("resetAccessToken"); await dispatch('resetAccessToken')
await resetRouter(); await resetRouter()
}, },
resetAccessToken({ commit }) { resetAccessToken({ commit }) {
commit("setPermissions", []); commit('setPermissions', [])
commit("setAccessToken", ""); commit('setAccessToken', '')
removeAccessToken(); removeAccessToken()
}, },
}; }
export default { state, getters, mutations, actions }; export default { state, getters, mutations, actions }
import { storage, tokenTableName } from "@/config/settings"; import { storage, tokenTableName } from '@/config/settings'
/** /**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
...@@ -7,15 +7,15 @@ import { storage, tokenTableName } from "@/config/settings"; ...@@ -7,15 +7,15 @@ import { storage, tokenTableName } from "@/config/settings";
*/ */
export function getAccessToken() { export function getAccessToken() {
if (storage) { if (storage) {
if ("localStorage" === storage) { if ('localStorage' === storage) {
return localStorage.getItem(tokenTableName); return localStorage.getItem(tokenTableName)
} else if ("sessionStorage" === storage) { } else if ('sessionStorage' === storage) {
return sessionStorage.getItem(tokenTableName); return sessionStorage.getItem(tokenTableName)
} else { } else {
return localStorage.getItem(tokenTableName); return localStorage.getItem(tokenTableName)
} }
} else { } else {
return localStorage.getItem(tokenTableName); return localStorage.getItem(tokenTableName)
} }
} }
...@@ -27,15 +27,15 @@ export function getAccessToken() { ...@@ -27,15 +27,15 @@ export function getAccessToken() {
*/ */
export function setAccessToken(accessToken) { export function setAccessToken(accessToken) {
if (storage) { if (storage) {
if ("localStorage" === storage) { if ('localStorage' === storage) {
return localStorage.setItem(tokenTableName, accessToken); return localStorage.setItem(tokenTableName, accessToken)
} else if ("sessionStorage" === storage) { } else if ('sessionStorage' === storage) {
return sessionStorage.setItem(tokenTableName, accessToken); return sessionStorage.setItem(tokenTableName, accessToken)
} else { } else {
return localStorage.setItem(tokenTableName, accessToken); return localStorage.setItem(tokenTableName, accessToken)
} }
} else { } else {
return localStorage.setItem(tokenTableName, accessToken); return localStorage.setItem(tokenTableName, accessToken)
} }
} }
...@@ -46,14 +46,14 @@ export function setAccessToken(accessToken) { ...@@ -46,14 +46,14 @@ export function setAccessToken(accessToken) {
*/ */
export function removeAccessToken() { export function removeAccessToken() {
if (storage) { if (storage) {
if ("localStorage" === storage) { if ('localStorage' === storage) {
return localStorage.removeItem(tokenTableName); return localStorage.removeItem(tokenTableName)
} else if ("sessionStorage" === storage) { } else if ('sessionStorage' === storage) {
return sessionStorage.clear(); return sessionStorage.clear()
} else { } else {
return localStorage.removeItem(tokenTableName); return localStorage.removeItem(tokenTableName)
} }
} else { } else {
return localStorage.removeItem(tokenTableName); return localStorage.removeItem(tokenTableName)
} }
} }
import Vue from "vue"; import Vue from 'vue'
import Clipboard from "clipboard"; import Clipboard from 'clipboard'
function clipboardSuccess() { function clipboardSuccess() {
Vue.prototype.$baseMessage("复制成功", "success"); Vue.prototype.$baseMessage('复制成功', 'success')
} }
function clipboardError() { function clipboardError() {
Vue.prototype.$baseMessage("复制失败", "error"); Vue.prototype.$baseMessage('复制失败', 'error')
} }
/** /**
...@@ -18,14 +18,14 @@ function clipboardError() { ...@@ -18,14 +18,14 @@ function clipboardError() {
export default function handleClipboard(text, event) { export default function handleClipboard(text, event) {
const clipboard = new Clipboard(event.target, { const clipboard = new Clipboard(event.target, {
text: () => text, text: () => text,
}); })
clipboard.on("success", () => { clipboard.on('success', () => {
clipboardSuccess(); clipboardSuccess()
clipboard.destroy(); clipboard.destroy()
}); })
clipboard.on("error", () => { clipboard.on('error', () => {
clipboardError(); clipboardError()
clipboard.destroy(); clipboard.destroy()
}); })
clipboard.onClick(event); clipboard.onClick(event)
} }
import { JSEncrypt } from "jsencrypt"; import { JSEncrypt } from 'jsencrypt'
import { getPublicKey } from "@/api/publicKey"; import { getPublicKey } from '@/api/publicKey'
const privateKey = const privateKey =
"MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMFPa+v52FkSUXvcUnrGI/XzW3EpZRI0s9BCWJ3oNQmEYA5luWW5p8h0uadTIoTyYweFPdH4hveyxlwmS7oefvbIdiP+o+QIYW/R4Wjsb4Yl8MhR4PJqUE3RCy6IT9fM8ckG4kN9ECs6Ja8fQFc6/mSl5dJczzJO3k1rWMBhKJD/AgMBAAECgYEAucMakH9dWeryhrYoRHcXo4giPVJsH9ypVt4KzmOQY/7jV7KFQK3x//27UoHfUCak51sxFw9ek7UmTPM4HjikA9LkYeE7S381b4QRvFuf3L6IbMP3ywJnJ8pPr2l5SqQ00W+oKv+w/VmEsyUHr+k4Z+4ik+FheTkVWp566WbqFsECQQDjYaMcaKw3j2Zecl8T6eUe7fdaRMIzp/gcpPMfT/9rDzIQk+7ORvm1NI9AUmFv/FAlfpuAMrdL2n7p9uznWb7RAkEA2aP934kbXg5bdV0R313MrL+7WTK/qdcYxATUbMsMuWWQBoS5irrt80WCZbG48hpocJavLNjbtrjmUX3CuJBmzwJAOJg8uP10n/+ZQzjEYXh+BszEHDuw+pp8LuT/fnOy5zrJA0dO0RjpXijO3vuiNPVgHXT9z1LQPJkNrb5ACPVVgQJBALPeb4uV0bNrJDUb5RB4ghZnIxv18CcaqNIft7vuGCcFBAIPIRTBprR+RuVq+xHDt3sNXdsvom4h49+Hky1b0ksCQBBwUtVaqH6ztCtwUF1j2c/Zcrt5P/uN7IHAd44K0gIJc1+Csr3qPG+G2yoqRM8KVqLI8Z2ZYn9c+AvEE+L9OQY="; 'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMFPa+v52FkSUXvcUnrGI/XzW3EpZRI0s9BCWJ3oNQmEYA5luWW5p8h0uadTIoTyYweFPdH4hveyxlwmS7oefvbIdiP+o+QIYW/R4Wjsb4Yl8MhR4PJqUE3RCy6IT9fM8ckG4kN9ECs6Ja8fQFc6/mSl5dJczzJO3k1rWMBhKJD/AgMBAAECgYEAucMakH9dWeryhrYoRHcXo4giPVJsH9ypVt4KzmOQY/7jV7KFQK3x//27UoHfUCak51sxFw9ek7UmTPM4HjikA9LkYeE7S381b4QRvFuf3L6IbMP3ywJnJ8pPr2l5SqQ00W+oKv+w/VmEsyUHr+k4Z+4ik+FheTkVWp566WbqFsECQQDjYaMcaKw3j2Zecl8T6eUe7fdaRMIzp/gcpPMfT/9rDzIQk+7ORvm1NI9AUmFv/FAlfpuAMrdL2n7p9uznWb7RAkEA2aP934kbXg5bdV0R313MrL+7WTK/qdcYxATUbMsMuWWQBoS5irrt80WCZbG48hpocJavLNjbtrjmUX3CuJBmzwJAOJg8uP10n/+ZQzjEYXh+BszEHDuw+pp8LuT/fnOy5zrJA0dO0RjpXijO3vuiNPVgHXT9z1LQPJkNrb5ACPVVgQJBALPeb4uV0bNrJDUb5RB4ghZnIxv18CcaqNIft7vuGCcFBAIPIRTBprR+RuVq+xHDt3sNXdsvom4h49+Hky1b0ksCQBBwUtVaqH6ztCtwUF1j2c/Zcrt5P/uN7IHAd44K0gIJc1+Csr3qPG+G2yoqRM8KVqLI8Z2ZYn9c+AvEE+L9OQY='
/** /**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
...@@ -11,23 +11,23 @@ const privateKey = ...@@ -11,23 +11,23 @@ const privateKey =
* @returns {Promise<{param: PromiseLike<ArrayBuffer>}|*>} * @returns {Promise<{param: PromiseLike<ArrayBuffer>}|*>}
*/ */
export async function encryptedData(data) { export async function encryptedData(data) {
let publicKey = ""; let publicKey = ''
const res = await getPublicKey(); const res = await getPublicKey()
publicKey = res.data.publicKey; publicKey = res.data.publicKey
if (res.data.mockServer) { if (res.data.mockServer) {
publicKey = ""; publicKey = ''
} }
if (publicKey == "") { if (publicKey == '') {
return data; return data
} }
const encrypt = new JSEncrypt(); const encrypt = new JSEncrypt()
encrypt.setPublicKey( encrypt.setPublicKey(
`-----BEGIN PUBLIC KEY-----${publicKey}-----END PUBLIC KEY-----` `-----BEGIN PUBLIC KEY-----${publicKey}-----END PUBLIC KEY-----`
); )
data = encrypt.encrypt(JSON.stringify(data)); data = encrypt.encrypt(JSON.stringify(data))
return { return {
param: data, param: data,
}; }
} }
/** /**
...@@ -37,10 +37,10 @@ export async function encryptedData(data) { ...@@ -37,10 +37,10 @@ export async function encryptedData(data) {
* @returns {PromiseLike<ArrayBuffer>} * @returns {PromiseLike<ArrayBuffer>}
*/ */
export function decryptedData(data) { export function decryptedData(data) {
const decrypt = new JSEncrypt(); const decrypt = new JSEncrypt()
decrypt.setPrivateKey( decrypt.setPrivateKey(
`-----BEGIN RSA PRIVATE KEY-----${privateKey}-----END RSA PRIVATE KEY-----` `-----BEGIN RSA PRIVATE KEY-----${privateKey}-----END RSA PRIVATE KEY-----`
); )
data = decrypt.decrypt(JSON.stringify(data)); data = decrypt.decrypt(JSON.stringify(data))
return data; return data
} }
import Vue from "vue"; import Vue from 'vue'
import store from "@/store"; import store from '@/store'
import { isArray, isString } from "@/utils/validate"; import { isArray, isString } from '@/utils/validate'
import { errorLog } from "@/config/settings"; import { errorLog } from '@/config/settings'
const needErrorLog = errorLog; const needErrorLog = errorLog
const checkNeed = () => { const checkNeed = () => {
const env = process.env.NODE_ENV; const env = process.env.NODE_ENV
if (isString(needErrorLog)) { if (isString(needErrorLog)) {
return env === needErrorLog; return env === needErrorLog
} }
if (isArray(needErrorLog)) { if (isArray(needErrorLog)) {
return needErrorLog.includes(env); return needErrorLog.includes(env)
} }
return false; return false
}; }
if (checkNeed()) { if (checkNeed()) {
Vue.config.errorHandler = (err, vm, info) => { Vue.config.errorHandler = (err, vm, info) => {
console.error("vue-admin-beautiful错误拦截:", err, vm, info); console.error('vue-admin-beautiful错误拦截:', err, vm, info)
const url = window.location.href; const url = window.location.href
Vue.nextTick(() => { Vue.nextTick(() => {
store.dispatch("errorLog/addErrorLog", { err, vm, info, url }); store.dispatch('errorLog/addErrorLog', { err, vm, info, url })
}); })
}; }
} }
...@@ -7,23 +7,23 @@ ...@@ -7,23 +7,23 @@
export function convertRouter(asyncRoutes) { export function convertRouter(asyncRoutes) {
return asyncRoutes.map((route) => { return asyncRoutes.map((route) => {
if (route.component) { if (route.component) {
if (route.component === "Layout") { if (route.component === 'Layout') {
route.component = (resolve) => require(["@/layouts"], resolve); route.component = (resolve) => require(['@/layouts'], resolve)
} else if (route.component === "EmptyLayout") { } else if (route.component === 'EmptyLayout') {
route.component = (resolve) => route.component = (resolve) =>
require(["@/layouts/EmptyLayout"], resolve); require(['@/layouts/EmptyLayout'], resolve)
} else { } else {
const index = route.component.indexOf("views"); const index = route.component.indexOf('views')
const path = const path =
index > 0 ? route.component.slice(index) : `views/${route.component}`; index > 0 ? route.component.slice(index) : `views/${route.component}`
route.component = (resolve) => require([`@/${path}`], resolve); route.component = (resolve) => require([`@/${path}`], resolve)
} }
} }
if (route.children && route.children.length) if (route.children && route.children.length)
route.children = convertRouter(route.children); route.children = convertRouter(route.children)
if (route.children && route.children.length === 0) delete route.children; if (route.children && route.children.length === 0) delete route.children
return route; return route
}); })
} }
/** /**
...@@ -35,9 +35,9 @@ export function convertRouter(asyncRoutes) { ...@@ -35,9 +35,9 @@ export function convertRouter(asyncRoutes) {
*/ */
function hasPermission(permissions, route) { function hasPermission(permissions, route) {
if (route.meta && route.meta.permissions) { if (route.meta && route.meta.permissions) {
return permissions.some((role) => route.meta.permissions.includes(role)); return permissions.some((role) => route.meta.permissions.includes(role))
} else { } else {
return true; return true
} }
} }
...@@ -49,15 +49,15 @@ function hasPermission(permissions, route) { ...@@ -49,15 +49,15 @@ function hasPermission(permissions, route) {
* @returns {[]} * @returns {[]}
*/ */
export function filterAsyncRoutes(routes, permissions) { export function filterAsyncRoutes(routes, permissions) {
const finallyRoutes = []; const finallyRoutes = []
routes.forEach((route) => { routes.forEach((route) => {
const item = { ...route }; const item = { ...route }
if (hasPermission(permissions, item)) { if (hasPermission(permissions, item)) {
if (item.children) { if (item.children) {
item.children = filterAsyncRoutes(item.children, permissions); item.children = filterAsyncRoutes(item.children, permissions)
} }
finallyRoutes.push(item); finallyRoutes.push(item)
} }
}); })
return finallyRoutes; return finallyRoutes
} }
...@@ -7,20 +7,20 @@ ...@@ -7,20 +7,20 @@
*/ */
export function parseTime(time, cFormat) { export function parseTime(time, cFormat) {
if (arguments.length === 0) { if (arguments.length === 0) {
return null; return null
} }
const format = cFormat || "{y}-{m}-{d} {h}:{i}:{s}"; const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date; let date
if (typeof time === "object") { if (typeof time === 'object') {
date = time; date = time
} else { } else {
if (typeof time === "string" && /^[0-9]+$/.test(time)) { if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
time = parseInt(time); time = parseInt(time)
} }
if (typeof time === "number" && time.toString().length === 10) { if (typeof time === 'number' && time.toString().length === 10) {
time = time * 1000; time = time * 1000
} }
date = new Date(time); date = new Date(time)
} }
const formatObj = { const formatObj = {
y: date.getFullYear(), y: date.getFullYear(),
...@@ -30,18 +30,18 @@ export function parseTime(time, cFormat) { ...@@ -30,18 +30,18 @@ export function parseTime(time, cFormat) {
i: date.getMinutes(), i: date.getMinutes(),
s: date.getSeconds(), s: date.getSeconds(),
a: date.getDay(), a: date.getDay(),
}; }
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]; let value = formatObj[key]
if (key === "a") { if (key === 'a') {
return ["日", "一", "二", "三", "四", "五", "六"][value]; return ['日', '一', '二', '三', '四', '五', '六'][value]
} }
if (result.length > 0 && value < 10) { if (result.length > 0 && value < 10) {
value = "0" + value; value = '0' + value
} }
return value || 0; return value || 0
}); })
return time_str; return time_str
} }
/** /**
...@@ -52,40 +52,40 @@ export function parseTime(time, cFormat) { ...@@ -52,40 +52,40 @@ export function parseTime(time, cFormat) {
* @returns {string} * @returns {string}
*/ */
export function formatTime(time, option) { export function formatTime(time, option) {
if (("" + time).length === 10) { if (('' + time).length === 10) {
time = parseInt(time) * 1000; time = parseInt(time) * 1000
} else { } else {
time = +time; time = +time
} }
const d = new Date(time); const d = new Date(time)
const now = Date.now(); const now = Date.now()
const diff = (now - d) / 1000; const diff = (now - d) / 1000
if (diff < 30) { if (diff < 30) {
return "刚刚"; return '刚刚'
} else if (diff < 3600) { } else if (diff < 3600) {
// less 1 hour // less 1 hour
return Math.ceil(diff / 60) + "分钟前"; return Math.ceil(diff / 60) + '分钟前'
} else if (diff < 3600 * 24) { } else if (diff < 3600 * 24) {
return Math.ceil(diff / 3600) + "小时前"; return Math.ceil(diff / 3600) + '小时前'
} else if (diff < 3600 * 24 * 2) { } else if (diff < 3600 * 24 * 2) {
return "1天前"; return '1天前'
} }
if (option) { if (option) {
return parseTime(time, option); return parseTime(time, option)
} else { } else {
return ( return (
d.getMonth() + d.getMonth() +
1 + 1 +
"月" + '月' +
d.getDate() + d.getDate() +
"日" + '日' +
d.getHours() + d.getHours() +
"时" + '时' +
d.getMinutes() + d.getMinutes() +
"分" '分'
); )
} }
} }
...@@ -96,9 +96,9 @@ export function formatTime(time, option) { ...@@ -96,9 +96,9 @@ export function formatTime(time, option) {
* @returns {{}|any} * @returns {{}|any}
*/ */
export function paramObj(url) { export function paramObj(url) {
const search = url.split("?")[1]; const search = url.split('?')[1]
if (!search) { if (!search) {
return {}; return {}
} }
return JSON.parse( return JSON.parse(
'{"' + '{"' +
...@@ -106,9 +106,9 @@ export function paramObj(url) { ...@@ -106,9 +106,9 @@ export function paramObj(url) {
.replace(/"/g, '\\"') .replace(/"/g, '\\"')
.replace(/&/g, '","') .replace(/&/g, '","')
.replace(/=/g, '":"') .replace(/=/g, '":"')
.replace(/\+/g, " ") + .replace(/\+/g, ' ') +
'"}' '"}'
); )
} }
/** /**
...@@ -119,27 +119,27 @@ export function paramObj(url) { ...@@ -119,27 +119,27 @@ export function paramObj(url) {
*/ */
export function translateDataToTree(data) { export function translateDataToTree(data) {
const parent = data.filter( const parent = data.filter(
(value) => value.parentId === "undefined" || value.parentId == null (value) => value.parentId === 'undefined' || value.parentId == null
); )
const children = data.filter( const children = data.filter(
(value) => value.parentId !== "undefined" && value.parentId != null (value) => value.parentId !== 'undefined' && value.parentId != null
); )
const translator = (parent, children) => { const translator = (parent, children) => {
parent.forEach((parent) => { parent.forEach((parent) => {
children.forEach((current, index) => { children.forEach((current, index) => {
if (current.parentId === parent.id) { if (current.parentId === parent.id) {
const temp = JSON.parse(JSON.stringify(children)); const temp = JSON.parse(JSON.stringify(children))
temp.splice(index, 1); temp.splice(index, 1)
translator([current], temp); translator([current], temp)
typeof parent.children !== "undefined" typeof parent.children !== 'undefined'
? parent.children.push(current) ? parent.children.push(current)
: (parent.children = [current]); : (parent.children = [current])
}
})
})
} }
}); translator(parent, children)
}); return parent
};
translator(parent, children);
return parent;
} }
/** /**
...@@ -149,24 +149,24 @@ export function translateDataToTree(data) { ...@@ -149,24 +149,24 @@ export function translateDataToTree(data) {
* @returns {[]} * @returns {[]}
*/ */
export function translateTreeToData(data) { export function translateTreeToData(data) {
const result = []; const result = []
data.forEach((item) => { data.forEach((item) => {
const loop = (data) => { const loop = (data) => {
result.push({ result.push({
id: data.id, id: data.id,
name: data.name, name: data.name,
parentId: data.parentId, parentId: data.parentId,
}); })
const child = data.children; const child = data.children
if (child) { if (child) {
for (let i = 0; i < child.length; i++) { for (let i = 0; i < child.length; i++) {
loop(child[i]); loop(child[i])
}
} }
} }
}; loop(item)
loop(item); })
}); return result
return result;
} }
/** /**
...@@ -176,19 +176,19 @@ export function translateTreeToData(data) { ...@@ -176,19 +176,19 @@ export function translateTreeToData(data) {
* @returns {string} * @returns {string}
*/ */
export function tenBitTimestamp(time) { export function tenBitTimestamp(time) {
const date = new Date(time * 1000); const date = new Date(time * 1000)
const y = date.getFullYear(); const y = date.getFullYear()
let m = date.getMonth() + 1; let m = date.getMonth() + 1
m = m < 10 ? "" + m : m; m = m < 10 ? '' + m : m
let d = date.getDate(); let d = date.getDate()
d = d < 10 ? "" + d : d; d = d < 10 ? '' + d : d
let h = date.getHours(); let h = date.getHours()
h = h < 10 ? "0" + h : h; h = h < 10 ? '0' + h : h
let minute = date.getMinutes(); let minute = date.getMinutes()
let second = date.getSeconds(); let second = date.getSeconds()
minute = minute < 10 ? "0" + minute : minute; minute = minute < 10 ? '0' + minute : minute
second = second < 10 ? "0" + second : second; second = second < 10 ? '0' + second : second
return y + "年" + m + "月" + d + "日 " + h + ":" + minute + ":" + second; //组合 return y + '年' + m + '月' + d + '日 ' + h + ':' + minute + ':' + second //组合
} }
/** /**
...@@ -198,19 +198,19 @@ export function tenBitTimestamp(time) { ...@@ -198,19 +198,19 @@ export function tenBitTimestamp(time) {
* @returns {string} * @returns {string}
*/ */
export function thirteenBitTimestamp(time) { export function thirteenBitTimestamp(time) {
const date = new Date(time / 1); const date = new Date(time / 1)
const y = date.getFullYear(); const y = date.getFullYear()
let m = date.getMonth() + 1; let m = date.getMonth() + 1
m = m < 10 ? "" + m : m; m = m < 10 ? '' + m : m
let d = date.getDate(); let d = date.getDate()
d = d < 10 ? "" + d : d; d = d < 10 ? '' + d : d
let h = date.getHours(); let h = date.getHours()
h = h < 10 ? "0" + h : h; h = h < 10 ? '0' + h : h
let minute = date.getMinutes(); let minute = date.getMinutes()
let second = date.getSeconds(); let second = date.getSeconds()
minute = minute < 10 ? "0" + minute : minute; minute = minute < 10 ? '0' + minute : minute
second = second < 10 ? "0" + second : second; second = second < 10 ? '0' + second : second
return y + "年" + m + "月" + d + "日 " + h + ":" + minute + ":" + second; //组合 return y + '年' + m + '月' + d + '日 ' + h + ':' + minute + ':' + second //组合
} }
/** /**
...@@ -220,12 +220,12 @@ export function thirteenBitTimestamp(time) { ...@@ -220,12 +220,12 @@ export function thirteenBitTimestamp(time) {
* @returns {string} * @returns {string}
*/ */
export function uuid(length = 32) { export function uuid(length = 32) {
const num = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; const num = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
let str = ""; let str = ''
for (let i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
str += num.charAt(Math.floor(Math.random() * num.length)); str += num.charAt(Math.floor(Math.random() * num.length))
} }
return str; return str
} }
/** /**
...@@ -236,7 +236,7 @@ export function uuid(length = 32) { ...@@ -236,7 +236,7 @@ export function uuid(length = 32) {
* @returns {number} * @returns {number}
*/ */
export function random(m, n) { export function random(m, n) {
return Math.floor(Math.random() * (m - n) + n); return Math.floor(Math.random() * (m - n) + n)
} }
/** /**
...@@ -247,10 +247,10 @@ export function random(m, n) { ...@@ -247,10 +247,10 @@ export function random(m, n) {
export const on = (function () { export const on = (function () {
return function (element, event, handler, useCapture = false) { return function (element, event, handler, useCapture = false) {
if (element && event && handler) { if (element && event && handler) {
element.addEventListener(event, handler, useCapture); element.addEventListener(event, handler, useCapture)
} }
}; }
})(); })()
/** /**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
...@@ -260,7 +260,7 @@ export const on = (function () { ...@@ -260,7 +260,7 @@ export const on = (function () {
export const off = (function () { export const off = (function () {
return function (element, event, handler, useCapture = false) { return function (element, event, handler, useCapture = false) {
if (element && event) { if (element && event) {
element.removeEventListener(event, handler, useCapture); element.removeEventListener(event, handler, useCapture)
}
} }
}; })()
})();
import { title } from "@/config/settings"; import { title } from '@/config/settings'
/** /**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
...@@ -8,7 +8,7 @@ import { title } from "@/config/settings"; ...@@ -8,7 +8,7 @@ import { title } from "@/config/settings";
*/ */
export default function getPageTitle(pageTitle) { export default function getPageTitle(pageTitle) {
if (pageTitle) { if (pageTitle) {
return `${pageTitle}-${title}`; return `${pageTitle}-${title}`
} }
return `${title}`; return `${title}`
} }
import store from "@/store"; import store from '@/store'
/** /**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
...@@ -8,13 +8,13 @@ import store from "@/store"; ...@@ -8,13 +8,13 @@ import store from "@/store";
*/ */
export default function checkPermission(value) { export default function checkPermission(value) {
if (value && value instanceof Array && value.length > 0) { if (value && value instanceof Array && value.length > 0) {
const permissions = store.getters["user/permissions"]; const permissions = store.getters['user/permissions']
const permissionPermissions = value; const permissionPermissions = value
return permissions.some((role) => { return permissions.some((role) => {
return permissionPermissions.includes(role); return permissionPermissions.includes(role)
}); })
} else { } else {
return false; return false
} }
} }
import Vue from "vue"; import Vue from 'vue'
import axios from "axios"; import axios from 'axios'
import { import {
baseURL, baseURL,
contentType, contentType,
...@@ -10,13 +10,13 @@ import { ...@@ -10,13 +10,13 @@ import {
successCode, successCode,
tokenName, tokenName,
loginInterception, loginInterception,
} from "@/config/settings"; } from '@/config/settings'
import store from "@/store"; import store from '@/store'
import qs from "qs"; import qs from 'qs'
import router from "@/router"; import router from '@/router'
import { isArray } from "@/utils/validate"; import { isArray } from '@/utils/validate'
let loadingInstance; let loadingInstance
/** /**
* @author chuzhixin 1204505056@qq.com (不想保留author可删除) * @author chuzhixin 1204505056@qq.com (不想保留author可删除)
...@@ -27,99 +27,99 @@ let loadingInstance; ...@@ -27,99 +27,99 @@ let loadingInstance;
const handleCode = (code, msg) => { const handleCode = (code, msg) => {
switch (code) { switch (code) {
case invalidCode: case invalidCode:
Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, "error"); Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, 'error')
store.dispatch("user/resetAccessToken").catch(() => {}); store.dispatch('user/resetAccessToken').catch(() => {})
if (loginInterception) { if (loginInterception) {
location.reload(); location.reload()
} }
break; break
case noPermissionCode: case noPermissionCode:
router.push({ path: "/401" }).catch(() => {}); router.push({ path: '/401' }).catch(() => {})
break; break
default: default:
Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, "error"); Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, 'error')
break; break
} }
}; }
const instance = axios.create({ const instance = axios.create({
baseURL, baseURL,
timeout: requestTimeout, timeout: requestTimeout,
headers: { headers: {
"Content-Type": contentType, 'Content-Type': contentType,
}, },
}); })
instance.interceptors.request.use( instance.interceptors.request.use(
(config) => { (config) => {
if (store.getters["user/accessToken"]) { if (store.getters['user/accessToken']) {
config.headers[tokenName] = store.getters["user/accessToken"]; config.headers[tokenName] = store.getters['user/accessToken']
} }
//这里会过滤所有为空、0、false的key,如果不需要请自行注释 //这里会过滤所有为空、0、false的key,如果不需要请自行注释
if (config.data) if (config.data)
config.data = Vue.prototype.$baseLodash.pickBy( config.data = Vue.prototype.$baseLodash.pickBy(
config.data, config.data,
Vue.prototype.$baseLodash.identity Vue.prototype.$baseLodash.identity
); )
if ( if (
config.data && config.data &&
config.headers["Content-Type"] === config.headers['Content-Type'] ===
"application/x-www-form-urlencoded;charset=UTF-8" 'application/x-www-form-urlencoded;charset=UTF-8'
) )
config.data = qs.stringify(config.data); config.data = qs.stringify(config.data)
if (debounce.some((item) => config.url.includes(item))) if (debounce.some((item) => config.url.includes(item)))
loadingInstance = Vue.prototype.$baseLoading(); loadingInstance = Vue.prototype.$baseLoading()
return config; return config
}, },
(error) => { (error) => {
return Promise.reject(error); return Promise.reject(error)
} }
); )
instance.interceptors.response.use( instance.interceptors.response.use(
(response) => { (response) => {
if (loadingInstance) loadingInstance.close(); if (loadingInstance) loadingInstance.close()
const { data, config } = response; const { data, config } = response
const { code, msg } = data; const { code, msg } = data
// 操作正常Code数组 // 操作正常Code数组
const codeVerificationArray = isArray(successCode) const codeVerificationArray = isArray(successCode)
? [...successCode] ? [...successCode]
: [...[successCode]]; : [...[successCode]]
// 是否操作正常 // 是否操作正常
if (codeVerificationArray.includes(code)) { if (codeVerificationArray.includes(code)) {
return data; return data
} else { } else {
handleCode(code, msg); handleCode(code, msg)
return Promise.reject( return Promise.reject(
"vue-admin-beautiful请求异常拦截:" + 'vue-admin-beautiful请求异常拦截:' +
JSON.stringify({ url: config.url, code, msg }) || "Error" JSON.stringify({ url: config.url, code, msg }) || 'Error'
); )
} }
}, },
(error) => { (error) => {
if (loadingInstance) loadingInstance.close(); if (loadingInstance) loadingInstance.close()
const { response, message } = error; const { response, message } = error
if (error.response && error.response.data) { if (error.response && error.response.data) {
const { status, data } = response; const { status, data } = response
handleCode(status, data.msg || message); handleCode(status, data.msg || message)
return Promise.reject(error); return Promise.reject(error)
} else { } else {
let { message } = error; let { message } = error
if (message === "Network Error") { if (message === 'Network Error') {
message = "后端接口连接异常"; message = '后端接口连接异常'
} }
if (message.includes("timeout")) { if (message.includes('timeout')) {
message = "后端接口请求超时"; message = '后端接口请求超时'
} }
if (message.includes("Request failed with status code")) { if (message.includes('Request failed with status code')) {
const code = message.substr(message.length - 3); const code = message.substr(message.length - 3)
message = "后端接口" + code + "异常"; message = '后端接口' + code + '异常'
} }
Vue.prototype.$baseMessage(message || `后端接口未知异常`, "error"); Vue.prototype.$baseMessage(message || `后端接口未知异常`, 'error')
return Promise.reject(error); return Promise.reject(error)
} }
} }
); )
export default instance; export default instance
...@@ -2,51 +2,51 @@ ...@@ -2,51 +2,51 @@
* @author chuzhixin 1204505056@qq.com * @author chuzhixin 1204505056@qq.com
* @description 导入所有 controller 模块,浏览器环境中自动输出controller文件夹下Mock接口,请勿修改。 * @description 导入所有 controller 模块,浏览器环境中自动输出controller文件夹下Mock接口,请勿修改。
*/ */
import Mock from "mockjs"; import Mock from 'mockjs'
import { paramObj } from "@/utils/index"; import { paramObj } from '@/utils/index'
const mocks = []; const mocks = []
const files = require.context("../../mock/controller", false, /\.js$/); const files = require.context('../../mock/controller', false, /\.js$/)
files.keys().forEach((key) => { files.keys().forEach((key) => {
mocks.push(...files(key)); mocks.push(...files(key))
}); })
export function mockXHR() { export function mockXHR() {
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send; Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
Mock.XHR.prototype.send = function () { Mock.XHR.prototype.send = function () {
if (this.custom.xhr) { if (this.custom.xhr) {
this.custom.xhr.withCredentials = this.withCredentials || false; this.custom.xhr.withCredentials = this.withCredentials || false
if (this.responseType) { if (this.responseType) {
this.custom.xhr.responseType = this.responseType; this.custom.xhr.responseType = this.responseType
} }
} }
this.proxy_send(...arguments); this.proxy_send(...arguments)
}; }
function XHRHttpRequst(respond) { function XHRHttpRequst(respond) {
return function (options) { return function (options) {
let result; let result
if (respond instanceof Function) { if (respond instanceof Function) {
const { body, type, url } = options; const { body, type, url } = options
result = respond({ result = respond({
method: type, method: type,
body: JSON.parse(body), body: JSON.parse(body),
query: paramObj(url), query: paramObj(url),
}); })
} else { } else {
result = respond; result = respond
}
return Mock.mock(result)
} }
return Mock.mock(result);
};
} }
mocks.forEach((item) => { mocks.forEach((item) => {
Mock.mock( Mock.mock(
new RegExp(item.url), new RegExp(item.url),
item.type || "get", item.type || 'get',
XHRHttpRequst(item.response) XHRHttpRequst(item.response)
); )
}); })
} }
import { loadingText, messageDuration, title } from "@/config/settings"; import { loadingText, messageDuration, title } from '@/config/settings'
import * as lodash from "lodash"; import * as lodash from 'lodash'
import { Loading, Message, MessageBox, Notification } from "element-ui"; import { Loading, Message, MessageBox, Notification } from 'element-ui'
import store from "@/store"; import store from '@/store'
import { getAccessToken } from "@/utils/accessToken"; import { getAccessToken } from '@/utils/accessToken'
const accessToken = store.getters["user/accessToken"]; const accessToken = store.getters['user/accessToken']
const layout = store.getters["settings/layout"]; const layout = store.getters['settings/layout']
const install = (Vue, opts = {}) => { const install = (Vue, opts = {}) => {
/* 全局accessToken */ /* 全局accessToken */
Vue.prototype.$baseAccessToken = () => { Vue.prototype.$baseAccessToken = () => {
return accessToken || getAccessToken(); return accessToken || getAccessToken()
}; }
/* 全局标题 */ /* 全局标题 */
Vue.prototype.$baseTitle = (() => { Vue.prototype.$baseTitle = (() => {
return title; return title
})(); })()
/* 全局加载层 */ /* 全局加载层 */
Vue.prototype.$baseLoading = (index, text) => { Vue.prototype.$baseLoading = (index, text) => {
let loading; let loading
if (!index) { if (!index) {
loading = Loading.service({ loading = Loading.service({
lock: true, lock: true,
text: text || loadingText, text: text || loadingText,
background: "hsla(0,0%,100%,.8)", background: 'hsla(0,0%,100%,.8)',
}); })
} else { } else {
loading = Loading.service({ loading = Loading.service({
lock: true, lock: true,
text: text || loadingText, text: text || loadingText,
spinner: "vab-loading-type" + index, spinner: 'vab-loading-type' + index,
background: "hsla(0,0%,100%,.8)", background: 'hsla(0,0%,100%,.8)',
}); })
}
return loading
} }
return loading;
};
/* 全局多彩加载层 */ /* 全局多彩加载层 */
Vue.prototype.$baseColorfullLoading = (index, text) => { Vue.prototype.$baseColorfullLoading = (index, text) => {
let loading; let loading
if (!index) { if (!index) {
loading = Loading.service({ loading = Loading.service({
lock: true, lock: true,
text: text || loadingText, text: text || loadingText,
spinner: "dots-loader", spinner: 'dots-loader',
background: "hsla(0,0%,100%,.8)", background: 'hsla(0,0%,100%,.8)',
}); })
} else { } else {
switch (index) { switch (index) {
case 1: case 1:
index = "dots"; index = 'dots'
break; break
case 2: case 2:
index = "gauge"; index = 'gauge'
break; break
case 3: case 3:
index = "inner-circles"; index = 'inner-circles'
break; break
case 4: case 4:
index = "plus"; index = 'plus'
break; break
} }
loading = Loading.service({ loading = Loading.service({
lock: true, lock: true,
text: text || loadingText, text: text || loadingText,
spinner: index + "-loader", spinner: index + '-loader',
background: "hsla(0,0%,100%,.8)", background: 'hsla(0,0%,100%,.8)',
}); })
}
return loading
} }
return loading;
};
/* 全局Message */ /* 全局Message */
Vue.prototype.$baseMessage = (message, type) => { Vue.prototype.$baseMessage = (message, type) => {
Message({ Message({
...@@ -78,103 +78,103 @@ const install = (Vue, opts = {}) => { ...@@ -78,103 +78,103 @@ const install = (Vue, opts = {}) => {
type: type, type: type,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
duration: messageDuration, duration: messageDuration,
}); })
}; }
/* 全局Alert */ /* 全局Alert */
Vue.prototype.$baseAlert = (content, title, callback) => { Vue.prototype.$baseAlert = (content, title, callback) => {
MessageBox.alert(content, title || "温馨提示", { MessageBox.alert(content, title || '温馨提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
callback: (action) => { callback: (action) => {
if (callback) { if (callback) {
callback(); callback()
} }
}, },
}); })
}; }
/* 全局Confirm */ /* 全局Confirm */
Vue.prototype.$baseConfirm = (content, title, callback1, callback2) => { Vue.prototype.$baseConfirm = (content, title, callback1, callback2) => {
MessageBox.confirm(content, title || "温馨提示", { MessageBox.confirm(content, title || '温馨提示', {
confirmButtonText: "确定", confirmButtonText: '确定',
cancelButtonText: "取消", cancelButtonText: '取消',
closeOnClickModal: false, closeOnClickModal: false,
type: "warning", type: 'warning',
}) })
.then(() => { .then(() => {
if (callback1) { if (callback1) {
callback1(); callback1()
} }
}) })
.catch(() => { .catch(() => {
if (callback2) { if (callback2) {
callback2(); callback2()
}
})
} }
});
};
/* 全局Notification */ /* 全局Notification */
Vue.prototype.$baseNotify = (message, title, type, position) => { Vue.prototype.$baseNotify = (message, title, type, position) => {
Notification({ Notification({
title: title, title: title,
message: message, message: message,
position: position || "top-right", position: position || 'top-right',
type: type || "success", type: type || 'success',
duration: messageDuration, duration: messageDuration,
}); })
}; }
/* 全局TableHeight */ /* 全局TableHeight */
Vue.prototype.$baseTableHeight = (formType) => { Vue.prototype.$baseTableHeight = (formType) => {
let height = window.innerHeight; let height = window.innerHeight
let paddingHeight = 400; let paddingHeight = 400
const formHeight = 50; const formHeight = 50
if (layout === "vertical") { if (layout === 'vertical') {
paddingHeight = 340; paddingHeight = 340
} }
if ("number" == typeof formType) { if ('number' == typeof formType) {
height = height - paddingHeight - formHeight * formType; height = height - paddingHeight - formHeight * formType
} else { } else {
height = height - paddingHeight; height = height - paddingHeight
}
return height
} }
return height;
};
/* 全局map图层 */ /* 全局map图层 */
Vue.prototype.$baseMap = () => { Vue.prototype.$baseMap = () => {
return new maptalks.Map("map", { return new maptalks.Map('map', {
center: [116.41348403785, 39.910843952376], center: [116.41348403785, 39.910843952376],
zoom: 12, zoom: 12,
minZoom: 1, minZoom: 1,
maxZoom: 19, maxZoom: 19,
spatialReference: { spatialReference: {
projection: "baidu", projection: 'baidu',
}, },
attribution: { attribution: {
content: "&copy; vue-admin-beautiful", content: '&copy; vue-admin-beautiful',
}, },
baseLayer: new maptalks.TileLayer("base", { baseLayer: new maptalks.TileLayer('base', {
cssFilter: "sepia(100%) invert(90%)", cssFilter: 'sepia(100%) invert(90%)',
urlTemplate: urlTemplate:
"http://online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1", 'http://online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1',
subdomains: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], subdomains: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
attribution: attribution:
'&copy; <a target="_blank" href="http://map.baidu.com">Baidu</a>', '&copy; <a target="_blank" href="http://map.baidu.com">Baidu</a>',
}), }),
}); })
}; }
/* 全局lodash */ /* 全局lodash */
Vue.prototype.$baseLodash = lodash; Vue.prototype.$baseLodash = lodash
/* 全局事件总线 */ /* 全局事件总线 */
Vue.prototype.$baseEventBus = new Vue(); Vue.prototype.$baseEventBus = new Vue()
}; }
if (typeof window !== "undefined" && window.Vue) { if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue); install(window.Vue)
} }
export default install; export default install
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* @returns {boolean} * @returns {boolean}
*/ */
export function isExternal(path) { export function isExternal(path) {
return /^(https?:|mailto:|tel:)/.test(path); return /^(https?:|mailto:|tel:)/.test(path)
} }
/** /**
...@@ -15,7 +15,7 @@ export function isExternal(path) { ...@@ -15,7 +15,7 @@ export function isExternal(path) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isPassword(str) { export function isPassword(str) {
return str.length >= 6; return str.length >= 6
} }
/** /**
...@@ -25,8 +25,8 @@ export function isPassword(str) { ...@@ -25,8 +25,8 @@ export function isPassword(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isNumber(value) { export function isNumber(value) {
const reg = /^[0-9]*$/; const reg = /^[0-9]*$/
return reg.test(value); return reg.test(value)
} }
/** /**
...@@ -36,8 +36,8 @@ export function isNumber(value) { ...@@ -36,8 +36,8 @@ export function isNumber(value) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isName(value) { export function isName(value) {
const reg = /^[\u4e00-\u9fa5a-zA-Z0-9]+$/; const reg = /^[\u4e00-\u9fa5a-zA-Z0-9]+$/
return reg.test(value); return reg.test(value)
} }
/** /**
...@@ -47,8 +47,8 @@ export function isName(value) { ...@@ -47,8 +47,8 @@ export function isName(value) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isIP(ip) { export function isIP(ip) {
const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/; const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
return reg.test(ip); return reg.test(ip)
} }
/** /**
...@@ -58,8 +58,8 @@ export function isIP(ip) { ...@@ -58,8 +58,8 @@ export function isIP(ip) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isUrl(url) { export function isUrl(url) {
const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/; const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
return reg.test(url); return reg.test(url)
} }
/** /**
...@@ -69,8 +69,8 @@ export function isUrl(url) { ...@@ -69,8 +69,8 @@ export function isUrl(url) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isLowerCase(str) { export function isLowerCase(str) {
const reg = /^[a-z]+$/; const reg = /^[a-z]+$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -80,8 +80,8 @@ export function isLowerCase(str) { ...@@ -80,8 +80,8 @@ export function isLowerCase(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isUpperCase(str) { export function isUpperCase(str) {
const reg = /^[A-Z]+$/; const reg = /^[A-Z]+$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -91,8 +91,8 @@ export function isUpperCase(str) { ...@@ -91,8 +91,8 @@ export function isUpperCase(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isAlphabets(str) { export function isAlphabets(str) {
const reg = /^[A-Za-z]+$/; const reg = /^[A-Za-z]+$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -102,7 +102,7 @@ export function isAlphabets(str) { ...@@ -102,7 +102,7 @@ export function isAlphabets(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isString(str) { export function isString(str) {
return typeof str === "string" || str instanceof String; return typeof str === 'string' || str instanceof String
} }
/** /**
...@@ -112,10 +112,10 @@ export function isString(str) { ...@@ -112,10 +112,10 @@ export function isString(str) {
* @returns {arg is any[]|boolean} * @returns {arg is any[]|boolean}
*/ */
export function isArray(arg) { export function isArray(arg) {
if (typeof Array.isArray === "undefined") { if (typeof Array.isArray === 'undefined') {
return Object.prototype.toString.call(arg) === "[object Array]"; return Object.prototype.toString.call(arg) === '[object Array]'
} }
return Array.isArray(arg); return Array.isArray(arg)
} }
/** /**
...@@ -125,8 +125,8 @@ export function isArray(arg) { ...@@ -125,8 +125,8 @@ export function isArray(arg) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isPort(str) { export function isPort(str) {
const reg = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/; const reg = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -136,8 +136,8 @@ export function isPort(str) { ...@@ -136,8 +136,8 @@ export function isPort(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isPhone(str) { export function isPhone(str) {
const reg = /^1\d{10}$/; const reg = /^1\d{10}$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -147,8 +147,8 @@ export function isPhone(str) { ...@@ -147,8 +147,8 @@ export function isPhone(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isIdCard(str) { export function isIdCard(str) {
const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; const reg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -158,8 +158,8 @@ export function isIdCard(str) { ...@@ -158,8 +158,8 @@ export function isIdCard(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isEmail(str) { export function isEmail(str) {
const reg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; const reg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -169,8 +169,8 @@ export function isEmail(str) { ...@@ -169,8 +169,8 @@ export function isEmail(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isChina(str) { export function isChina(str) {
const reg = /^[\u4E00-\u9FA5]{2,4}$/; const reg = /^[\u4E00-\u9FA5]{2,4}$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -183,10 +183,10 @@ export function isBlank(str) { ...@@ -183,10 +183,10 @@ export function isBlank(str) {
return ( return (
str == null || str == null ||
false || false ||
str === "" || str === '' ||
str.trim() === "" || str.trim() === '' ||
str.toLocaleLowerCase().trim() === "null" str.toLocaleLowerCase().trim() === 'null'
); )
} }
/** /**
...@@ -196,8 +196,8 @@ export function isBlank(str) { ...@@ -196,8 +196,8 @@ export function isBlank(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isTel(str) { export function isTel(str) {
const reg = /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})(-| )?)?([0-9]{7,8})((-| |转)*([0-9]{1,4}))?$/; const reg = /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})(-| )?)?([0-9]{7,8})((-| |转)*([0-9]{1,4}))?$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -207,8 +207,8 @@ export function isTel(str) { ...@@ -207,8 +207,8 @@ export function isTel(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isNum(str) { export function isNum(str) {
const reg = /^\d+(\.\d{1,2})?$/; const reg = /^\d+(\.\d{1,2})?$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -218,8 +218,8 @@ export function isNum(str) { ...@@ -218,8 +218,8 @@ export function isNum(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isLongitude(str) { export function isLongitude(str) {
const reg = /^[-|+]?(0?\d{1,2}\.\d{1,5}|1[0-7]?\d{1}\.\d{1,5}|180\.0{1,5})$/; const reg = /^[-|+]?(0?\d{1,2}\.\d{1,5}|1[0-7]?\d{1}\.\d{1,5}|180\.0{1,5})$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -229,8 +229,8 @@ export function isLongitude(str) { ...@@ -229,8 +229,8 @@ export function isLongitude(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isLatitude(str) { export function isLatitude(str) {
const reg = /^[-|+]?([0-8]?\d{1}\.\d{1,5}|90\.0{1,5})$/; const reg = /^[-|+]?([0-8]?\d{1}\.\d{1,5}|90\.0{1,5})$/
return reg.test(str); return reg.test(str)
} }
/** /**
...@@ -240,8 +240,8 @@ export function isLatitude(str) { ...@@ -240,8 +240,8 @@ export function isLatitude(str) {
* @returns {boolean} * @returns {boolean}
*/ */
export function isRTSP(str) { export function isRTSP(str) {
const reg = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/; const reg = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
const reg1 = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):[0-9]{1,5}/; const reg1 = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):[0-9]{1,5}/
const reg2 = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\//; const reg2 = /^rtsp:\/\/([a-z]{0,10}:.{0,10}@)?(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\//
return reg.test(str) || reg1.test(str) || reg2.test(str); return reg.test(str) || reg1.test(str) || reg2.test(str)
} }
...@@ -44,39 +44,39 @@ ...@@ -44,39 +44,39 @@
<script> <script>
export default { export default {
name: "Page401", name: 'Page401',
data() { data() {
return { return {
jumpTime: 5, jumpTime: 5,
oops: "抱歉!", oops: '抱歉!',
headline: "您没有操作权限...", headline: '您没有操作权限...',
info: "当前帐号没有操作权限,请联系管理员。", info: '当前帐号没有操作权限,请联系管理员。',
btn: "返回", btn: '返回',
timer: 0, timer: 0,
}; }
}, },
mounted() { mounted() {
this.timeChange(); this.timeChange()
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer)
}, },
methods: { methods: {
timeChange() { timeChange() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (this.jumpTime) { if (this.jumpTime) {
this.jumpTime--; this.jumpTime--
} else { } else {
this.$router.push({ path: "/" }); this.$router.push({ path: '/' })
this.$store.dispatch("tabsBar/delOthersRoutes", { this.$store.dispatch('tabsBar/delOthersRoutes', {
path: "/", path: '/',
}); })
clearInterval(this.timer); clearInterval(this.timer)
} }
}, 1000); }, 1000)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -44,39 +44,39 @@ ...@@ -44,39 +44,39 @@
<script> <script>
export default { export default {
name: "Page404", name: 'Page404',
data() { data() {
return { return {
jumpTime: 5, jumpTime: 5,
oops: "抱歉!", oops: '抱歉!',
headline: "当前页面不存在...", headline: '当前页面不存在...',
info: "请检查您输入的网址是否正确,或点击下面的按钮返回首页。", info: '请检查您输入的网址是否正确,或点击下面的按钮返回首页。',
btn: "返回首页", btn: '返回首页',
timer: 0, timer: 0,
}; }
}, },
mounted() { mounted() {
this.timeChange(); this.timeChange()
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer)
}, },
methods: { methods: {
timeChange() { timeChange() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (this.jumpTime) { if (this.jumpTime) {
this.jumpTime--; this.jumpTime--
} else { } else {
this.$router.push({ path: "/" }); this.$router.push({ path: '/' })
this.$store.dispatch("tabsBar/delOthersRoutes", { this.$store.dispatch('tabsBar/delOthersRoutes', {
path: "/", path: '/',
}); })
clearInterval(this.timer); clearInterval(this.timer)
} }
}, 1000); }, 1000)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -179,39 +179,39 @@ ...@@ -179,39 +179,39 @@
<table class="table"> <table class="table">
<tr> <tr>
<td>@vue/cli版本</td> <td>@vue/cli版本</td>
<td>{{ devDependencies["@vue/cli-service"] }}</td> <td>{{ devDependencies['@vue/cli-service'] }}</td>
<td>vue版本</td> <td>vue版本</td>
<td>{{ dependencies["vue"] }}</td> <td>{{ dependencies['vue'] }}</td>
</tr> </tr>
<tr> <tr>
<td>vuex版本</td> <td>vuex版本</td>
<td>{{ dependencies["vuex"] }}</td> <td>{{ dependencies['vuex'] }}</td>
<td>vue-router版本</td> <td>vue-router版本</td>
<td>{{ dependencies["vue-router"] }}</td> <td>{{ dependencies['vue-router'] }}</td>
</tr> </tr>
<tr> <tr>
<td>element-ui版本</td> <td>element-ui版本</td>
<td>{{ dependencies["element-ui"] }}</td> <td>{{ dependencies['element-ui'] }}</td>
<td>axios版本</td> <td>axios版本</td>
<td>{{ dependencies["axios"] }}</td> <td>{{ dependencies['axios'] }}</td>
</tr> </tr>
<tr> <tr>
<td>eslint版本</td> <td>eslint版本</td>
<td>{{ devDependencies["eslint"] }}</td> <td>{{ devDependencies['eslint'] }}</td>
<td>prettier版本</td> <td>prettier版本</td>
<td>{{ devDependencies["prettier"] }}</td> <td>{{ devDependencies['prettier'] }}</td>
</tr> </tr>
<tr> <tr>
<td>sass版本</td> <td>sass版本</td>
<td>{{ devDependencies["sass"] }}</td> <td>{{ devDependencies['sass'] }}</td>
<td>mockjs版本</td> <td>mockjs版本</td>
<td>{{ dependencies["mockjs"] }}</td> <td>{{ dependencies['mockjs'] }}</td>
</tr> </tr>
<tr> <tr>
<td>zx-layouts版本</td> <td>zx-layouts版本</td>
<td>{{ dependencies["zx-layouts"] }}</td> <td>{{ dependencies['zx-layouts'] }}</td>
<td>lodash版本</td> <td>lodash版本</td>
<td>{{ dependencies["lodash"] }}</td> <td>{{ dependencies['lodash'] }}</td>
</tr> </tr>
</table> </table>
</el-card> </el-card>
...@@ -270,13 +270,13 @@ ...@@ -270,13 +270,13 @@
</template> </template>
<script> <script>
import VabChart from "@/plugins/echarts"; import VabChart from '@/plugins/echarts'
import { dependencies, devDependencies } from "../../../package.json"; import { dependencies, devDependencies } from '../../../package.json'
import { getList } from "@/api/changeLog"; import { getList } from '@/api/changeLog'
import { getNoticeList } from "@/api/notice"; import { getNoticeList } from '@/api/notice'
import { getRepos, getStargazers } from "@/api/github"; import { getRepos, getStargazers } from '@/api/github'
export default { export default {
name: "Index", name: 'Index',
components: { components: {
VabChart, VabChart,
}, },
...@@ -291,42 +291,42 @@ ...@@ -291,42 +291,42 @@
startVal: 0, startVal: 0,
endVal: this.$baseLodash.random(20000, 60000), endVal: this.$baseLodash.random(20000, 60000),
decimals: 0, decimals: 0,
prefix: "", prefix: '',
suffix: "", suffix: '',
separator: ",", separator: ',',
duration: 8000, duration: 8000,
}, },
config2: { config2: {
startVal: 0, startVal: 0,
endVal: this.$baseLodash.random(1000, 20000), endVal: this.$baseLodash.random(1000, 20000),
decimals: 0, decimals: 0,
prefix: "", prefix: '',
suffix: "", suffix: '',
separator: ",", separator: ',',
duration: 8000, duration: 8000,
}, },
config3: { config3: {
startVal: 0, startVal: 0,
endVal: this.$baseLodash.random(1000, 20000), endVal: this.$baseLodash.random(1000, 20000),
decimals: 0, decimals: 0,
prefix: "", prefix: '',
suffix: "", suffix: '',
separator: ",", separator: ',',
duration: 8000, duration: 8000,
}, },
//访问量 //访问量
fwl: { fwl: {
grid: { grid: {
top: "4%", top: '4%',
left: "2%", left: '2%',
right: "4%", right: '4%',
bottom: "0%", bottom: '0%',
containLabel: true, containLabel: true,
}, },
xAxis: [ xAxis: [
{ {
type: "category", type: 'category',
boundaryGap: false, boundaryGap: false,
data: [], data: [],
axisTick: { axisTick: {
...@@ -336,13 +336,13 @@ ...@@ -336,13 +336,13 @@
], ],
yAxis: [ yAxis: [
{ {
type: "value", type: 'value',
}, },
], ],
series: [ series: [
{ {
name: "访问量", name: '访问量',
type: "line", type: 'line',
data: [], data: [],
smooth: true, smooth: true,
areaStyle: {}, areaStyle: {},
...@@ -352,17 +352,17 @@ ...@@ -352,17 +352,17 @@
//授权数 //授权数
sqs: { sqs: {
grid: { grid: {
top: "4%", top: '4%',
left: "2%", left: '2%',
right: "4%", right: '4%',
bottom: "0%", bottom: '0%',
containLabel: true, containLabel: true,
}, },
xAxis: [ xAxis: [
{ {
type: "category", type: 'category',
/*boundaryGap: false,*/ /*boundaryGap: false,*/
data: ["0时", "4时", "8时", "12时", "16时", "20时", "24时"], data: ['0时', '4时', '8时', '12时', '16时', '20时', '24时'],
axisTick: { axisTick: {
alignWithLabel: true, alignWithLabel: true,
}, },
...@@ -370,14 +370,14 @@ ...@@ -370,14 +370,14 @@
], ],
yAxis: [ yAxis: [
{ {
type: "value", type: 'value',
}, },
], ],
series: [ series: [
{ {
name: "授权数", name: '授权数',
type: "bar", type: 'bar',
barWidth: "60%", barWidth: '60%',
data: [10, 52, 20, 33, 39, 33, 22], data: [10, 52, 20, 33, 39, 33, 22],
}, },
], ],
...@@ -385,131 +385,131 @@ ...@@ -385,131 +385,131 @@
//词云 //词云
cy: { cy: {
grid: { grid: {
top: "4%", top: '4%',
left: "2%", left: '2%',
right: "4%", right: '4%',
bottom: "0%", bottom: '0%',
}, },
series: [ series: [
{ {
type: "wordCloud", type: 'wordCloud',
gridSize: 15, gridSize: 15,
sizeRange: [12, 40], sizeRange: [12, 40],
rotationRange: [0, 0], rotationRange: [0, 0],
width: "100%", width: '100%',
height: "100%", height: '100%',
textStyle: { textStyle: {
normal: { normal: {
color() { color() {
const arr = [ const arr = [
"#1890FF", '#1890FF',
"#36CBCB", '#36CBCB',
"#4ECB73", '#4ECB73',
"#FBD437", '#FBD437',
"#F2637B", '#F2637B',
"#975FE5", '#975FE5',
]; ]
let index = Math.floor(Math.random() * arr.length); let index = Math.floor(Math.random() * arr.length)
return arr[index]; return arr[index]
}, },
}, },
}, },
data: [ data: [
{ {
name: "vue-admin-beautiful", name: 'vue-admin-beautiful',
value: 15000, value: 15000,
}, },
{ {
name: "element", name: 'element',
value: 10081, value: 10081,
}, },
{ {
name: "beautiful", name: 'beautiful',
value: 9386, value: 9386,
}, },
{ {
name: "vue", name: 'vue',
value: 6500, value: 6500,
}, },
{ {
name: "chuzhixin", name: 'chuzhixin',
value: 6000, value: 6000,
}, },
{ {
name: "good", name: 'good',
value: 4500, value: 4500,
}, },
{ {
name: "success", name: 'success',
value: 3800, value: 3800,
}, },
{ {
name: "never", name: 'never',
value: 3000, value: 3000,
}, },
{ {
name: "boy", name: 'boy',
value: 2500, value: 2500,
}, },
{ {
name: "girl", name: 'girl',
value: 2300, value: 2300,
}, },
{ {
name: "github", name: 'github',
value: 2000, value: 2000,
}, },
{ {
name: "hbuilder", name: 'hbuilder',
value: 1900, value: 1900,
}, },
{ {
name: "dcloud", name: 'dcloud',
value: 1800, value: 1800,
}, },
{ {
name: "china", name: 'china',
value: 1700, value: 1700,
}, },
{ {
name: "1204505056", name: '1204505056',
value: 1600, value: 1600,
}, },
{ {
name: "972435319", name: '972435319',
value: 1500, value: 1500,
}, },
{ {
name: "young", name: 'young',
value: 1200, value: 1200,
}, },
{ {
name: "old", name: 'old',
value: 1100, value: 1100,
}, },
{ {
name: "vuex", name: 'vuex',
value: 900, value: 900,
}, },
{ {
name: "router", name: 'router',
value: 800, value: 800,
}, },
{ {
name: "money", name: 'money',
value: 700, value: 700,
}, },
{ {
name: "qingdao", name: 'qingdao',
value: 800, value: 800,
}, },
{ {
name: "yantai", name: 'yantai',
value: 9000, value: 9000,
}, },
{ {
name: "author is very cool", name: 'author is very cool',
value: 9200, value: 9200,
}, },
], ],
...@@ -519,30 +519,30 @@ ...@@ -519,30 +519,30 @@
//中国地图 //中国地图
zgdt: { zgdt: {
title: { title: {
text: "2099年全国GDP分布", text: '2099年全国GDP分布',
subtext: "数据来自vue-admin-beautiful杜撰", subtext: '数据来自vue-admin-beautiful杜撰',
}, },
tooltip: { tooltip: {
trigger: "item", trigger: 'item',
}, },
dataRange: { dataRange: {
orient: "horizontal", orient: 'horizontal',
min: 0, min: 0,
max: 55000, max: 55000,
text: ["高", "低"], text: ['高', '低'],
splitNumber: 0, splitNumber: 0,
}, },
series: [ series: [
{ {
name: "2099年全国GDP分布", name: '2099年全国GDP分布',
type: "map", type: 'map',
roam: false, roam: false,
zoom: 1.25, zoom: 1.25,
mapType: "china", mapType: 'china',
mapLocation: { mapLocation: {
x: "center", x: 'center',
}, },
selectedMode: "multiple", selectedMode: 'multiple',
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
...@@ -556,37 +556,37 @@ ...@@ -556,37 +556,37 @@
}, },
}, },
data: [ data: [
{ name: "西藏", value: 605.83 }, { name: '西藏', value: 605.83 },
{ name: "青海", value: 1670.44 }, { name: '青海', value: 1670.44 },
{ name: "宁夏", value: 2102.21 }, { name: '宁夏', value: 2102.21 },
{ name: "海南", value: 2522.66 }, { name: '海南', value: 2522.66 },
{ name: "甘肃", value: 5020.37 }, { name: '甘肃', value: 5020.37 },
{ name: "贵州", value: 5701.84 }, { name: '贵州', value: 5701.84 },
{ name: "新疆", value: 6610.05 }, { name: '新疆', value: 6610.05 },
{ name: "云南", value: 8893.12 }, { name: '云南', value: 8893.12 },
{ name: "重庆", value: 10011.37 }, { name: '重庆', value: 10011.37 },
{ name: "吉林", value: 10568.83 }, { name: '吉林', value: 10568.83 },
{ name: "山西", value: 11237.55 }, { name: '山西', value: 11237.55 },
{ name: "天津", value: 11307.28 }, { name: '天津', value: 11307.28 },
{ name: "江西", value: 11702.82 }, { name: '江西', value: 11702.82 },
{ name: "广西", value: 11720.87 }, { name: '广西', value: 11720.87 },
{ name: "陕西", value: 12512.3 }, { name: '陕西', value: 12512.3 },
{ name: "黑龙江", value: 12582 }, { name: '黑龙江', value: 12582 },
{ name: "内蒙古", value: 14359.88 }, { name: '内蒙古', value: 14359.88 },
{ name: "安徽", value: 15300.65 }, { name: '安徽', value: 15300.65 },
{ name: "北京", value: 16251.93 }, { name: '北京', value: 16251.93 },
{ name: "福建", value: 17560.18 }, { name: '福建', value: 17560.18 },
{ name: "上海", value: 19195.69 }, { name: '上海', value: 19195.69 },
{ name: "湖北", value: 19632.26 }, { name: '湖北', value: 19632.26 },
{ name: "湖南", value: 19669.56 }, { name: '湖南', value: 19669.56 },
{ name: "四川", value: 21026.68 }, { name: '四川', value: 21026.68 },
{ name: "辽宁", value: 22226.7 }, { name: '辽宁', value: 22226.7 },
{ name: "河北", value: 24515.76 }, { name: '河北', value: 24515.76 },
{ name: "河南", value: 26931.03 }, { name: '河南', value: 26931.03 },
{ name: "浙江", value: 32318.85 }, { name: '浙江', value: 32318.85 },
{ name: "山东", value: 45361.85, selected: true }, { name: '山东', value: 45361.85, selected: true },
{ name: "江苏", value: 49110.27 }, { name: '江苏', value: 49110.27 },
{ name: "广东", value: 53210.28 }, { name: '广东', value: 53210.28 },
], ],
}, },
], ],
...@@ -601,114 +601,114 @@ ...@@ -601,114 +601,114 @@
//卡片图标 //卡片图标
iconList: [ iconList: [
{ {
icon: "video", icon: 'video',
title: "视频播放器", title: '视频播放器',
link: "/vab/player", link: '/vab/player',
color: "#ffc069", color: '#ffc069',
}, },
{ {
icon: "table", icon: 'table',
title: "表格", title: '表格',
link: "/vab/table/comprehensiveTable", link: '/vab/table/comprehensiveTable',
color: "#5cdbd3", color: '#5cdbd3',
}, },
{ {
icon: "laptop-code", icon: 'laptop-code',
title: "源码", title: '源码',
link: "https://github.com/chuzhixin/vue-admin-beautiful", link: 'https://github.com/chuzhixin/vue-admin-beautiful',
color: "#b37feb", color: '#b37feb',
}, },
{ {
icon: "book", icon: 'book',
title: "书籍", title: '书籍',
link: "", link: '',
color: "#69c0ff", color: '#69c0ff',
}, },
{ {
icon: "bullhorn", icon: 'bullhorn',
title: "公告", title: '公告',
link: "", link: '',
color: "#ff85c0", color: '#ff85c0',
}, },
{ {
icon: "gift", icon: 'gift',
title: "礼物", title: '礼物',
link: "", link: '',
color: "#ffd666", color: '#ffd666',
}, },
{ {
icon: "balance-scale-left", icon: 'balance-scale-left',
title: "公平的世界", title: '公平的世界',
link: "", link: '',
color: "#ff9c6e", color: '#ff9c6e',
}, },
{ {
icon: "coffee", icon: 'coffee',
title: "休息一下", title: '休息一下',
link: "", link: '',
color: "#95de64", color: '#95de64',
}, },
], ],
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer)
}, },
mounted() { mounted() {
let base = +new Date(2020, 1, 1); let base = +new Date(2020, 1, 1)
let oneDay = 24 * 3600 * 1000; let oneDay = 24 * 3600 * 1000
let date = []; let date = []
let data = [Math.random() * 1500]; let data = [Math.random() * 1500]
let now = new Date(base); let now = new Date(base)
const addData = (shift) => { const addData = (shift) => {
now = [now.getFullYear(), now.getMonth() + 1, now.getDate()].join("/"); now = [now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/')
date.push(now); date.push(now)
data.push(this.$baseLodash.random(20000, 60000)); data.push(this.$baseLodash.random(20000, 60000))
if (shift) { if (shift) {
date.shift(); date.shift()
data.shift(); data.shift()
} }
now = new Date(+new Date(now) + oneDay); now = new Date(+new Date(now) + oneDay)
}; }
for (let i = 1; i < 6; i++) { for (let i = 1; i < 6; i++) {
addData(); addData()
} }
addData(true); addData(true)
this.fwl.xAxis[0].data = date; this.fwl.xAxis[0].data = date
this.fwl.series[0].data = data; this.fwl.series[0].data = data
this.timer = setInterval(() => { this.timer = setInterval(() => {
addData(true); addData(true)
this.fwl.xAxis[0].data = date; this.fwl.xAxis[0].data = date
this.fwl.series[0].data = data; this.fwl.series[0].data = data
}, 3000); }, 3000)
}, },
methods: { methods: {
handleClick(e) { handleClick(e) {
this.$baseMessage(`点击了${e.name},这里可以写跳转`); this.$baseMessage(`点击了${e.name},这里可以写跳转`)
}, },
handleZrClick(e) {}, handleZrClick(e) {},
handleChangeTheme() { handleChangeTheme() {
this.$baseEventBus.$emit("theme"); this.$baseEventBus.$emit('theme')
}, },
async fetchData() { async fetchData() {
const { data } = await getList(); const { data } = await getList()
data.map((item, index) => { data.map((item, index) => {
if (index === data.length - 1) { if (index === data.length - 1) {
item.color = "#0bbd87"; item.color = '#0bbd87'
} }
}); })
this.activities = data; this.activities = data
const res = await getNoticeList(); const res = await getNoticeList()
this.noticeList = res.data; this.noticeList = res.data
/* getRepos({ /* getRepos({
token: "1061286824f978ea3cf98b7b8ea26fe27ba7cea1", token: "1061286824f978ea3cf98b7b8ea26fe27ba7cea1",
}).then((res) => { }).then((res) => {
...@@ -724,7 +724,7 @@ ...@@ -724,7 +724,7 @@
}); */ }); */
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.index-container { .index-container {
......
...@@ -74,120 +74,120 @@ ...@@ -74,120 +74,120 @@
</template> </template>
<script> <script>
import { isPassword } from "@/utils/validate"; import { isPassword } from '@/utils/validate'
export default { export default {
name: "Login", name: 'Login',
directives: { directives: {
focus: { focus: {
inserted(el) { inserted(el) {
el.querySelector("input").focus(); el.querySelector('input').focus()
}, },
}, },
}, },
data() { data() {
const validateusername = (rule, value, callback) => { const validateusername = (rule, value, callback) => {
if ("" == value) { if ('' == value) {
callback(new Error("用户名不能为空")); callback(new Error('用户名不能为空'))
} else { } else {
callback(); callback()
}
} }
};
const validatePassword = (rule, value, callback) => { const validatePassword = (rule, value, callback) => {
if (!isPassword(value)) { if (!isPassword(value)) {
callback(new Error("密码不能少于6位")); callback(new Error('密码不能少于6位'))
} else { } else {
callback(); callback()
}
} }
};
return { return {
nodeEnv: process.env.NODE_ENV, nodeEnv: process.env.NODE_ENV,
title: this.$baseTitle, title: this.$baseTitle,
form: { form: {
username: "", username: '',
password: "", password: '',
}, },
rules: { rules: {
username: [ username: [
{ {
required: true, required: true,
trigger: "blur", trigger: 'blur',
validator: validateusername, validator: validateusername,
}, },
], ],
password: [ password: [
{ {
required: true, required: true,
trigger: "blur", trigger: 'blur',
validator: validatePassword, validator: validatePassword,
}, },
], ],
}, },
loading: false, loading: false,
passwordType: "password", passwordType: 'password',
redirect: undefined, redirect: undefined,
}; }
}, },
watch: { watch: {
$route: { $route: {
handler(route) { handler(route) {
this.redirect = (route.query && route.query.redirect) || "/"; this.redirect = (route.query && route.query.redirect) || '/'
}, },
immediate: true, immediate: true,
}, },
}, },
created() { created() {
document.body.style.overflow = "hidden"; document.body.style.overflow = 'hidden'
}, },
beforeDestroy() { beforeDestroy() {
document.body.style.overflow = "auto"; document.body.style.overflow = 'auto'
}, },
mounted() { mounted() {
this.form.username = "admin"; this.form.username = 'admin'
this.form.password = "123456"; this.form.password = '123456'
setTimeout(() => { setTimeout(() => {
this.handleLogin(); this.handleLogin()
}, 3000); }, 3000)
}, },
methods: { methods: {
handlePassword() { handlePassword() {
this.passwordType === "password" this.passwordType === 'password'
? (this.passwordType = "") ? (this.passwordType = '')
: (this.passwordType = "password"); : (this.passwordType = 'password')
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.password.focus(); this.$refs.password.focus()
}); })
}, },
handleLogin() { handleLogin() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true
this.$store this.$store
.dispatch("user/login", this.form) .dispatch('user/login', this.form)
.then(() => { .then(() => {
const routerPath = const routerPath =
this.redirect === "/404" || this.redirect === "/401" this.redirect === '/404' || this.redirect === '/401'
? "/" ? '/'
: this.redirect; : this.redirect
this.$router.push(routerPath).catch(() => {}); this.$router.push(routerPath).catch(() => {})
this.loading = false; this.loading = false
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false
}); })
} else { } else {
return false; return false
} }
}); })
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.login-container { .login-container {
height: 100vh; height: 100vh;
background: url("~@/assets/login_images/background.jpg") center center fixed background: url('~@/assets/login_images/background.jpg') center center fixed
no-repeat; no-repeat;
background-size: cover; background-size: cover;
......
...@@ -65,49 +65,49 @@ ...@@ -65,49 +65,49 @@
</template> </template>
<script> <script>
import { getList } from "@/api/goodsList"; import { getList } from '@/api/goodsList'
export default { export default {
name: "Goods", name: 'Goods',
components: {}, components: {},
data() { data() {
return { return {
queryForm: { queryForm: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 20,
title: "", title: '',
}, },
list: null, list: null,
listLoading: true, listLoading: true,
layout: "total, sizes, prev, pager, next, jumper", layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.queryForm.pageSize = val; this.queryForm.pageSize = val
this.fetchData(); this.fetchData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.pageNo = val; this.queryForm.pageNo = val
this.fetchData(); this.fetchData()
}, },
handleQuery() { handleQuery() {
this.queryForm.pageNo = 1; this.queryForm.pageNo = 1
this.fetchData(); this.fetchData()
}, },
async fetchData() { async fetchData() {
this.listLoading = true; this.listLoading = true
const { data, totalCount } = await getList(this.queryForm); const { data, totalCount } = await getList(this.queryForm)
this.list = data; this.list = data
this.total = totalCount; this.total = totalCount
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.goods-list-container { .goods-list-container {
......
...@@ -27,39 +27,39 @@ ...@@ -27,39 +27,39 @@
data() { data() {
return { return {
form: { form: {
payAccount: "XXXXXXXXXXXXXXXX", payAccount: 'XXXXXXXXXXXXXXXX',
gatheringAccount: "1204505056@qq.com", gatheringAccount: '1204505056@qq.com',
gatheringName: "chuzhixin", gatheringName: 'chuzhixin',
price: "100", price: '100',
}, },
rules: { rules: {
payAccount: [ payAccount: [
{ required: true, message: "请选择付款账户", trigger: "blur" }, { required: true, message: '请选择付款账户', trigger: 'blur' },
], ],
gatheringAccount: [ gatheringAccount: [
{ required: true, message: "请输入收款账户", trigger: "blur" }, { required: true, message: '请输入收款账户', trigger: 'blur' },
{ type: "email", message: "账户名应为邮箱格式", trigger: "blur" }, { type: 'email', message: '账户名应为邮箱格式', trigger: 'blur' },
], ],
gatheringName: [ gatheringName: [
{ required: true, message: "请输入收款人姓名", trigger: "blur" }, { required: true, message: '请输入收款人姓名', trigger: 'blur' },
], ],
price: [ price: [
{ required: true, message: "请输入转账金额", trigger: "blur" }, { required: true, message: '请输入转账金额', trigger: 'blur' },
{ pattern: /^(\d+)((?:\.\d+)?)$/, message: "请输入合法金额数字" }, { pattern: /^(\d+)((?:\.\d+)?)$/, message: '请输入合法金额数字' },
], ],
}, },
}; }
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.$emit("change-step", 2, this.form); this.$emit('change-step', 2, this.form)
} }
}); })
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pay-button-group { .pay-button-group {
......
...@@ -38,42 +38,42 @@ ...@@ -38,42 +38,42 @@
infoData: { infoData: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, },
}, },
}, },
data() { data() {
return { return {
form: { form: {
password: "123456", password: '123456',
}, },
rules: { rules: {
password: [ password: [
{ required: true, message: "请输入支付密码", trigger: "blur" }, { required: true, message: '请输入支付密码', trigger: 'blur' },
], ],
}, },
loading: false, loading: false,
}; }
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true
setTimeout(() => { setTimeout(() => {
this.$emit("change-step", 3); this.$emit('change-step', 3)
this.loading = false; this.loading = false
}, 2000); }, 2000)
} else { } else {
this.loading = false; this.loading = false
} }
}); })
}, },
handlePrev() { handlePrev() {
this.$emit("change-step", 1); this.$emit('change-step', 1)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pay-button-group { .pay-button-group {
......
...@@ -37,42 +37,42 @@ ...@@ -37,42 +37,42 @@
infoData: { infoData: {
type: Object, type: Object,
default: () => { default: () => {
return {}; return {}
}, },
}, },
}, },
data() { data() {
return { return {
form: { form: {
password: "123456", password: '123456',
}, },
rules: { rules: {
password: [ password: [
{ required: true, message: "请输入支付密码", trigger: "blur" }, { required: true, message: '请输入支付密码', trigger: 'blur' },
], ],
}, },
loading: false, loading: false,
}; }
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true
setTimeout(() => { setTimeout(() => {
this.$emit("change-step", 3); this.$emit('change-step', 3)
this.loading = false; this.loading = false
}, 2000); }, 2000)
} else { } else {
this.loading = false; this.loading = false
} }
}); })
}, },
handlePrev() { handlePrev() {
this.$emit("change-step", 1); this.$emit('change-step', 1)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pay-top-content { .pay-top-content {
......
...@@ -30,25 +30,25 @@ ...@@ -30,25 +30,25 @@
</template> </template>
<script> <script>
import Step1 from "./components/Step1"; import Step1 from './components/Step1'
import Step2 from "./components/Step2"; import Step2 from './components/Step2'
import Step3 from "./components/Step3"; import Step3 from './components/Step3'
export default { export default {
name: "Pay", name: 'Pay',
components: { Step1, Step2, Step3 }, components: { Step1, Step2, Step3 },
data() { data() {
return { return {
active: 1, active: 1,
form: {}, form: {},
}; }
}, },
methods: { methods: {
handleSetStep(active, form) { handleSetStep(active, form) {
this.active = active; this.active = active
if (form) this.form = Object.assign(this.form, form); if (form) this.form = Object.assign(this.form, form)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pay-container { .pay-container {
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
<script> <script>
export default { export default {
name: "PersonalCenter", name: 'PersonalCenter',
data() { data() {
return { return {
tabPosition: "left", tabPosition: 'left',
}; }
}, },
created() {}, created() {},
methods: {}, methods: {},
}; }
</script> </script>
...@@ -24,48 +24,48 @@ ...@@ -24,48 +24,48 @@
</template> </template>
<script> <script>
import { doEdit } from "@/api/menuManagement"; import { doEdit } from '@/api/menuManagement'
export default { export default {
name: "MenuManagementEdit", name: 'MenuManagementEdit',
data() { data() {
return { return {
form: {}, form: {},
rules: { rules: {
id: [{ required: true, trigger: "blur", message: "请输入路径" }], id: [{ required: true, trigger: 'blur', message: '请输入路径' }],
}, },
title: "", title: '',
dialogFormVisible: false, dialogFormVisible: false,
}; }
}, },
created() {}, created() {},
methods: { methods: {
showEdit(row) { showEdit(row) {
if (!row) { if (!row) {
this.title = "添加"; this.title = '添加'
} else { } else {
this.title = "编辑"; this.title = '编辑'
this.form = Object.assign({}, row); this.form = Object.assign({}, row)
} }
this.dialogFormVisible = true; this.dialogFormVisible = true
}, },
close() { close() {
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
this.form = this.$options.data().form; this.form = this.$options.data().form
this.dialogFormVisible = false; this.dialogFormVisible = false
}, },
save() { save() {
this.$refs["form"].validate(async (valid) => { this.$refs['form'].validate(async (valid) => {
if (valid) { if (valid) {
const { msg } = await doEdit(this.form); const { msg } = await doEdit(this.form)
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.$emit("fetch-data"); this.$emit('fetch-data')
this.close(); this.close()
} else { } else {
return false; return false
} }
}); })
}, },
}, },
}; }
</script> </script>
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
<el-table-column show-overflow-tooltip label="是否隐藏"> <el-table-column show-overflow-tooltip label="是否隐藏">
<template #default="{ row }"> <template #default="{ row }">
<span> <span>
{{ row.hidden ? "是" : "否" }} {{ row.hidden ? '是' : '否' }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip label="是否一直显示当前节点"> <el-table-column show-overflow-tooltip label="是否一直显示当前节点">
<template #default="{ row }"> <template #default="{ row }">
<span> <span>
{{ row.alwaysShow ? "是" : "否" }} {{ row.alwaysShow ? '是' : '否' }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -82,14 +82,14 @@ ...@@ -82,14 +82,14 @@
<el-table-column show-overflow-tooltip label="是否固定"> <el-table-column show-overflow-tooltip label="是否固定">
<template #default="{ row }"> <template #default="{ row }">
<span v-if="row.meta"> <span v-if="row.meta">
{{ row.meta.affix ? "是" : "否" }} {{ row.meta.affix ? '是' : '否' }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip label="是否无缓存"> <el-table-column show-overflow-tooltip label="是否无缓存">
<template #default="{ row }"> <template #default="{ row }">
<span v-if="row.meta"> <span v-if="row.meta">
{{ row.meta.noKeepAlive ? "是" : "否" }} {{ row.meta.noKeepAlive ? '是' : '否' }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -115,59 +115,59 @@ ...@@ -115,59 +115,59 @@
</template> </template>
<script> <script>
import { getRouterList as getList } from "@/api/router"; import { getRouterList as getList } from '@/api/router'
import { getTree, doDelete } from "@/api/menuManagement"; import { getTree, doDelete } from '@/api/menuManagement'
import Edit from "./components/MenuManagementEdit"; import Edit from './components/MenuManagementEdit'
export default { export default {
name: "MenuManagement", name: 'MenuManagement',
components: { Edit }, components: { Edit },
data() { data() {
return { return {
data: [], data: [],
defaultProps: { defaultProps: {
children: "children", children: 'children',
label: "label", label: 'label',
}, },
list: [], list: [],
listLoading: true, listLoading: true,
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
}; }
}, },
async created() { async created() {
const roleData = await getTree(); const roleData = await getTree()
this.data = roleData.data; this.data = roleData.data
this.fetchData(); this.fetchData()
}, },
methods: { methods: {
handleEdit(row) { handleEdit(row) {
if (row.path) { if (row.path) {
this.$refs["edit"].showEdit(row); this.$refs['edit'].showEdit(row)
} else { } else {
this.$refs["edit"].showEdit(); this.$refs['edit'].showEdit()
} }
}, },
handleDelete(row) { handleDelete(row) {
if (row.id) { if (row.id) {
this.$baseConfirm("你确定要删除当前项吗", null, async () => { this.$baseConfirm('你确定要删除当前项吗', null, async () => {
const { msg } = await doDelete({ ids: row.id }); const { msg } = await doDelete({ ids: row.id })
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.fetchData(); this.fetchData()
}); })
} }
}, },
async fetchData() { async fetchData() {
this.listLoading = true; this.listLoading = true
const { data } = await getList(); const { data } = await getList()
this.list = data; this.list = data
setTimeout(() => { setTimeout(() => {
this.listLoading = false; this.listLoading = false
}, 300); }, 300)
}, },
handleNodeClick(data) { handleNodeClick(data) {
this.fetchData(); this.fetchData()
}, },
}, },
}; }
</script> </script>
...@@ -18,52 +18,52 @@ ...@@ -18,52 +18,52 @@
</template> </template>
<script> <script>
import { doEdit } from "@/api/roleManagement"; import { doEdit } from '@/api/roleManagement'
export default { export default {
name: "RoleManagementEdit", name: 'RoleManagementEdit',
data() { data() {
return { return {
form: { form: {
id: "", id: '',
}, },
rules: { rules: {
permission: [ permission: [
{ required: true, trigger: "blur", message: "请输入权限码" }, { required: true, trigger: 'blur', message: '请输入权限码' },
], ],
}, },
title: "", title: '',
dialogFormVisible: false, dialogFormVisible: false,
}; }
}, },
created() {}, created() {},
methods: { methods: {
showEdit(row) { showEdit(row) {
if (!row) { if (!row) {
this.title = "添加"; this.title = '添加'
} else { } else {
this.title = "编辑"; this.title = '编辑'
this.form = Object.assign({}, row); this.form = Object.assign({}, row)
} }
this.dialogFormVisible = true; this.dialogFormVisible = true
}, },
close() { close() {
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
this.form = this.$options.data().form; this.form = this.$options.data().form
this.dialogFormVisible = false; this.dialogFormVisible = false
}, },
save() { save() {
this.$refs["form"].validate(async (valid) => { this.$refs['form'].validate(async (valid) => {
if (valid) { if (valid) {
const { msg } = await doEdit(this.form); const { msg } = await doEdit(this.form)
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.$emit("fetch-data"); this.$emit('fetch-data')
this.close(); this.close()
} else { } else {
return false; return false
} }
}); })
}, },
}, },
}; }
</script> </script>
...@@ -68,83 +68,83 @@ ...@@ -68,83 +68,83 @@
</template> </template>
<script> <script>
import { getList, doDelete } from "@/api/roleManagement"; import { getList, doDelete } from '@/api/roleManagement'
import Edit from "./components/RoleManagementEdit"; import Edit from './components/RoleManagementEdit'
export default { export default {
name: "RoleManagement", name: 'RoleManagement',
components: { Edit }, components: { Edit },
data() { data() {
return { return {
list: null, list: null,
listLoading: true, listLoading: true,
layout: "total, sizes, prev, pager, next, jumper", layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
selectRows: "", selectRows: '',
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
queryForm: { queryForm: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
permission: "", permission: '',
}, },
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
methods: { methods: {
setSelectRows(val) { setSelectRows(val) {
this.selectRows = val; this.selectRows = val
}, },
handleEdit(row) { handleEdit(row) {
if (row.id) { if (row.id) {
this.$refs["edit"].showEdit(row); this.$refs['edit'].showEdit(row)
} else { } else {
this.$refs["edit"].showEdit(); this.$refs['edit'].showEdit()
} }
}, },
handleDelete(row) { handleDelete(row) {
if (row.id) { if (row.id) {
this.$baseConfirm("你确定要删除当前项吗", null, async () => { this.$baseConfirm('你确定要删除当前项吗', null, async () => {
const { msg } = await doDelete({ ids: row.id }); const { msg } = await doDelete({ ids: row.id })
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.fetchData(); this.fetchData()
}); })
} else { } else {
if (this.selectRows.length > 0) { if (this.selectRows.length > 0) {
const ids = this.selectRows.map((item) => item.id).join(); const ids = this.selectRows.map((item) => item.id).join()
this.$baseConfirm("你确定要删除选中项吗", null, async () => { this.$baseConfirm('你确定要删除选中项吗', null, async () => {
const { msg } = await doDelete({ ids }); const { msg } = await doDelete({ ids })
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.fetchData(); this.fetchData()
}); })
} else { } else {
this.$baseMessage("未选中任何行", "error"); this.$baseMessage('未选中任何行', 'error')
return false; return false
} }
} }
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.queryForm.pageSize = val; this.queryForm.pageSize = val
this.fetchData(); this.fetchData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.pageNo = val; this.queryForm.pageNo = val
this.fetchData(); this.fetchData()
}, },
queryData() { queryData() {
this.queryForm.pageNo = 1; this.queryForm.pageNo = 1
this.fetchData(); this.fetchData()
}, },
async fetchData() { async fetchData() {
this.listLoading = true; this.listLoading = true
const { data, totalCount } = await getList(this.queryForm); const { data, totalCount } = await getList(this.queryForm)
this.list = data; this.list = data
this.total = totalCount; this.total = totalCount
setTimeout(() => { setTimeout(() => {
this.listLoading = false; this.listLoading = false
}, 300); }, 300)
}, },
}, },
}; }
</script> </script>
...@@ -34,62 +34,62 @@ ...@@ -34,62 +34,62 @@
</template> </template>
<script> <script>
import { doEdit } from "@/api/userManagement"; import { doEdit } from '@/api/userManagement'
export default { export default {
name: "UserManagementEdit", name: 'UserManagementEdit',
data() { data() {
return { return {
form: { form: {
username: "", username: '',
password: "", password: '',
email: "", email: '',
permissions: [], permissions: [],
}, },
rules: { rules: {
username: [ username: [
{ required: true, trigger: "blur", message: "请输入用户名" }, { required: true, trigger: 'blur', message: '请输入用户名' },
], ],
password: [ password: [
{ required: true, trigger: "blur", message: "请输入密码" }, { required: true, trigger: 'blur', message: '请输入密码' },
], ],
email: [{ required: true, trigger: "blur", message: "请输入邮箱" }], email: [{ required: true, trigger: 'blur', message: '请输入邮箱' }],
permissions: [ permissions: [
{ required: true, trigger: "blur", message: "请选择权限" }, { required: true, trigger: 'blur', message: '请选择权限' },
], ],
}, },
title: "", title: '',
dialogFormVisible: false, dialogFormVisible: false,
}; }
}, },
created() {}, created() {},
methods: { methods: {
showEdit(row) { showEdit(row) {
if (!row) { if (!row) {
this.title = "添加"; this.title = '添加'
} else { } else {
this.title = "编辑"; this.title = '编辑'
this.form = Object.assign({}, row); this.form = Object.assign({}, row)
} }
this.dialogFormVisible = true; this.dialogFormVisible = true
}, },
close() { close() {
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
this.form = this.$options.data().form; this.form = this.$options.data().form
this.dialogFormVisible = false; this.dialogFormVisible = false
}, },
save() { save() {
this.$refs["form"].validate(async (valid) => { this.$refs['form'].validate(async (valid) => {
if (valid) { if (valid) {
const { msg } = await doEdit(this.form); const { msg } = await doEdit(this.form)
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.$emit("fetch-data"); this.$emit('fetch-data')
this.close(); this.close()
} else { } else {
return false; return false
} }
}); })
}, },
}, },
}; }
</script> </script>
...@@ -84,83 +84,83 @@ ...@@ -84,83 +84,83 @@
</template> </template>
<script> <script>
import { getList, doDelete } from "@/api/userManagement"; import { getList, doDelete } from '@/api/userManagement'
import Edit from "./components/UserManagementEdit"; import Edit from './components/UserManagementEdit'
export default { export default {
name: "UserManagement", name: 'UserManagement',
components: { Edit }, components: { Edit },
data() { data() {
return { return {
list: null, list: null,
listLoading: true, listLoading: true,
layout: "total, sizes, prev, pager, next, jumper", layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
selectRows: "", selectRows: '',
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
queryForm: { queryForm: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
username: "", username: '',
}, },
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
methods: { methods: {
setSelectRows(val) { setSelectRows(val) {
this.selectRows = val; this.selectRows = val
}, },
handleEdit(row) { handleEdit(row) {
if (row.id) { if (row.id) {
this.$refs["edit"].showEdit(row); this.$refs['edit'].showEdit(row)
} else { } else {
this.$refs["edit"].showEdit(); this.$refs['edit'].showEdit()
} }
}, },
handleDelete(row) { handleDelete(row) {
if (row.id) { if (row.id) {
this.$baseConfirm("你确定要删除当前项吗", null, async () => { this.$baseConfirm('你确定要删除当前项吗', null, async () => {
const { msg } = await doDelete({ ids: row.id }); const { msg } = await doDelete({ ids: row.id })
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.fetchData(); this.fetchData()
}); })
} else { } else {
if (this.selectRows.length > 0) { if (this.selectRows.length > 0) {
const ids = this.selectRows.map((item) => item.id).join(); const ids = this.selectRows.map((item) => item.id).join()
this.$baseConfirm("你确定要删除选中项吗", null, async () => { this.$baseConfirm('你确定要删除选中项吗', null, async () => {
const { msg } = await doDelete({ ids }); const { msg } = await doDelete({ ids })
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.fetchData(); this.fetchData()
}); })
} else { } else {
this.$baseMessage("未选中任何行", "error"); this.$baseMessage('未选中任何行', 'error')
return false; return false
} }
} }
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.queryForm.pageSize = val; this.queryForm.pageSize = val
this.fetchData(); this.fetchData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.pageNo = val; this.queryForm.pageNo = val
this.fetchData(); this.fetchData()
}, },
queryData() { queryData() {
this.queryForm.pageNo = 1; this.queryForm.pageNo = 1
this.fetchData(); this.fetchData()
}, },
async fetchData() { async fetchData() {
this.listLoading = true; this.listLoading = true
const { data, totalCount } = await getList(this.queryForm); const { data, totalCount } = await getList(this.queryForm)
this.list = data; this.list = data
this.total = totalCount; this.total = totalCount
setTimeout(() => { setTimeout(() => {
this.listLoading = false; this.listLoading = false
}, 300); }, 300)
}, },
}, },
}; }
</script> </script>
...@@ -91,114 +91,114 @@ ...@@ -91,114 +91,114 @@
</div> </div>
</template> </template>
<script> <script>
import { isPassword, isPhone } from "@/utils/validate"; import { isPassword, isPhone } from '@/utils/validate'
import { register } from "@/api/user"; import { register } from '@/api/user'
export default { export default {
username: "Register", username: 'Register',
directives: { directives: {
focus: { focus: {
inserted(el) { inserted(el) {
el.querySelector("input").focus(); el.querySelector('input').focus()
}, },
}, },
}, },
data() { data() {
const validateusername = (rule, value, callback) => { const validateusername = (rule, value, callback) => {
if ("" == value) { if ('' == value) {
callback(new Error("用户名不能为空")); callback(new Error('用户名不能为空'))
} else { } else {
callback(); callback()
}
} }
};
const validatePassword = (rule, value, callback) => { const validatePassword = (rule, value, callback) => {
if (!isPassword(value)) { if (!isPassword(value)) {
callback(new Error("密码不能少于6位")); callback(new Error('密码不能少于6位'))
} else { } else {
callback(); callback()
}
} }
};
const validatePhone = (rule, value, callback) => { const validatePhone = (rule, value, callback) => {
if (!isPhone(value)) { if (!isPhone(value)) {
callback(new Error("请输入正确的手机号")); callback(new Error('请输入正确的手机号'))
} else { } else {
callback(); callback()
}
} }
};
return { return {
isGetphone: false, isGetphone: false,
getPhoneIntval: null, getPhoneIntval: null,
phoneCode: "获取验证码", phoneCode: '获取验证码',
showRegister: false, showRegister: false,
nodeEnv: process.env.NODE_ENV, nodeEnv: process.env.NODE_ENV,
title: this.$baseTitle, title: this.$baseTitle,
form: {}, form: {},
registerRules: { registerRules: {
username: [ username: [
{ required: true, trigger: "blur", message: "请输入用户名" }, { required: true, trigger: 'blur', message: '请输入用户名' },
{ max: 20, trigger: "blur", message: "最多不能超过20个字" }, { max: 20, trigger: 'blur', message: '最多不能超过20个字' },
{ validator: validateusername, trigger: "blur" }, { validator: validateusername, trigger: 'blur' },
], ],
phone: [ phone: [
{ required: true, trigger: "blur", message: "请输入手机号码" }, { required: true, trigger: 'blur', message: '请输入手机号码' },
{ validator: validatePhone, trigger: "blur" }, { validator: validatePhone, trigger: 'blur' },
], ],
password: [ password: [
{ required: true, trigger: "blur", message: "请输入密码" }, { required: true, trigger: 'blur', message: '请输入密码' },
{ validator: validatePassword, trigger: "blur" }, { validator: validatePassword, trigger: 'blur' },
], ],
phoneCode: [ phoneCode: [
{ required: true, trigger: "blur", message: "请输入手机验证码" }, { required: true, trigger: 'blur', message: '请输入手机验证码' },
], ],
}, },
loading: false, loading: false,
passwordType: "password", passwordType: 'password',
}; }
}, },
created() { created() {
document.body.style.overflow = "hidden"; document.body.style.overflow = 'hidden'
}, },
beforeDestroy() { beforeDestroy() {
document.body.style.overflow = "auto"; document.body.style.overflow = 'auto'
this.getPhoneIntval = null; this.getPhoneIntval = null
clearInterval(this.getPhoneIntval); clearInterval(this.getPhoneIntval)
}, },
methods: { methods: {
getPhoneCode() { getPhoneCode() {
this.isGetphone = true; this.isGetphone = true
let n = 60; let n = 60
this.getPhoneIntval = setInterval(() => { this.getPhoneIntval = setInterval(() => {
if (n > 0) { if (n > 0) {
n--; n--
this.phoneCode = "重新获取(" + n + "s)"; this.phoneCode = '重新获取(' + n + 's)'
} else { } else {
this.getPhoneIntval = null; this.getPhoneIntval = null
clearInterval(this.getPhoneIntval); clearInterval(this.getPhoneIntval)
this.phoneCode = "获取验证码"; this.phoneCode = '获取验证码'
this.isGetphone = false; this.isGetphone = false
} }
}, 1000); }, 1000)
}, },
handleReister() { handleReister() {
this.$refs["registerForm"].validate(async (valid) => { this.$refs['registerForm'].validate(async (valid) => {
if (valid) { if (valid) {
const param = { const param = {
username: this.form.username, username: this.form.username,
phone: this.form.phone, phone: this.form.phone,
password: this.form.password, password: this.form.password,
phoneCode: this.form.phoneCode, phoneCode: this.form.phoneCode,
};
const { msg } = await register(param);
this.$baseMessage(msg, "success");
} }
}); const { msg } = await register(param)
this.$baseMessage(msg, 'success')
}
})
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.register-container { .register-container {
height: 100vh; height: 100vh;
background: url("~@/assets/login_images/background.jpg") center center fixed background: url('~@/assets/login_images/background.jpg') center center fixed
no-repeat; no-repeat;
background-size: cover; background-size: cover;
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
</template> </template>
<script> <script>
export default { export default {
name: "Test", name: 'Test',
data() { data() {
return { show: true }; return { show: true }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
<script> <script>
export default { export default {
name: "BackToTop", name: 'BackToTop',
data() { data() {
return {}; return {}
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.placeholder-container div { .placeholder-container div {
......
...@@ -39,11 +39,11 @@ ...@@ -39,11 +39,11 @@
</template> </template>
<script> <script>
import { getList } from "@/api/table"; import { getList } from '@/api/table'
import VabImage from "@/components/VabImage"; import VabImage from '@/components/VabImage'
export default { export default {
name: "Card", name: 'Card',
components: { components: {
VabImage, VabImage,
}, },
...@@ -55,45 +55,45 @@ ...@@ -55,45 +55,45 @@
listLoading: true, listLoading: true,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
layout: "total, sizes, prev, pager, next, jumper", layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
background: true, background: true,
height: 0, height: 0,
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
dialogFormVisible: false, dialogFormVisible: false,
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
this.height = this.$baseTableHeight(1); this.height = this.$baseTableHeight(1)
}, },
methods: { methods: {
bigClick(val) { bigClick(val) {
this.$baseAlert("点击了大图"); this.$baseAlert('点击了大图')
}, },
smallClick(val) { smallClick(val) {
this.$baseAlert("点击了小图"); this.$baseAlert('点击了小图')
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val; this.pageSize = val
this.fetchData(); this.fetchData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNo = val; this.pageNo = val
this.fetchData(); this.fetchData()
}, },
async fetchData() { async fetchData() {
this.listLoading = true; this.listLoading = true
const { data, totalCount } = await getList({ const { data, totalCount } = await getList({
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
}); })
this.list = data; this.list = data
this.total = totalCount; this.total = totalCount
setTimeout(() => { setTimeout(() => {
this.listLoading = false; this.listLoading = false
}, 300); }, 300)
}, },
}, },
}; }
</script> </script>
...@@ -65,11 +65,11 @@ ...@@ -65,11 +65,11 @@
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from 'echarts'
import VabChart from "@/plugins/echarts"; import VabChart from '@/plugins/echarts'
export default { export default {
name: "Echarts", name: 'Echarts',
components: { components: {
VabChart, VabChart,
}, },
...@@ -77,31 +77,31 @@ ...@@ -77,31 +77,31 @@
return { return {
chart1: { chart1: {
grid: { grid: {
top: "25%", top: '25%',
bottom: "10%", bottom: '10%',
}, },
tooltip: { tooltip: {
trigger: "axis", trigger: 'axis',
axisPointer: { axisPointer: {
type: "shadow", type: 'shadow',
label: { label: {
show: true, show: true,
}, },
}, },
}, },
legend: { legend: {
data: ["销售水量", "主营业务"], data: ['销售水量', '主营业务'],
}, },
xAxis: { xAxis: {
data: [ data: [
"当年完成水量", '当年完成水量',
"去年同期水量", '去年同期水量',
"滚动目标值水量", '滚动目标值水量',
"全年目标值水量", '全年目标值水量',
"当年完成金额", '当年完成金额',
"去年同期金额", '去年同期金额',
"滚动目标金额", '滚动目标金额',
"全年目标值", '全年目标值',
], ],
axisLine: { axisLine: {
show: true, //隐藏X轴轴线 show: true, //隐藏X轴轴线
...@@ -115,8 +115,8 @@ ...@@ -115,8 +115,8 @@
}, },
yAxis: [ yAxis: [
{ {
type: "value", type: 'value',
name: "亿元", name: '亿元',
splitLine: { splitLine: {
show: false, show: false,
}, },
...@@ -131,9 +131,9 @@ ...@@ -131,9 +131,9 @@
}, },
}, },
{ {
type: "value", type: 'value',
name: "同比", name: '同比',
position: "right", position: 'right',
splitLine: { splitLine: {
show: false, show: false,
}, },
...@@ -145,11 +145,11 @@ ...@@ -145,11 +145,11 @@
}, },
axisLabel: { axisLabel: {
show: true, show: true,
formatter: "{value} %", //右侧Y轴文字显示 formatter: '{value} %', //右侧Y轴文字显示
}, },
}, },
{ {
type: "value", type: 'value',
gridIndex: 0, gridIndex: 0,
min: 50, min: 50,
max: 100, max: 100,
...@@ -169,38 +169,38 @@ ...@@ -169,38 +169,38 @@
splitArea: { splitArea: {
show: true, show: true,
areaStyle: { areaStyle: {
color: ["rgba(250,250,250,0.0)", "rgba(250,250,250,0.05)"], color: ['rgba(250,250,250,0.0)', 'rgba(250,250,250,0.05)'],
}, },
}, },
}, },
], ],
series: [ series: [
{ {
name: "销售水量", name: '销售水量',
type: "line", type: 'line',
smooth: true, //平滑曲线显示 smooth: true, //平滑曲线显示
itemStyle: { itemStyle: {
color: "#058cff", color: '#058cff',
}, },
areaStyle: { areaStyle: {
color: "rgba(5,140,255, 0.2)", color: 'rgba(5,140,255, 0.2)',
}, },
data: [4.2, 3.8, 4.8, 3.5, 2.9, 2.8, 3, 5], data: [4.2, 3.8, 4.8, 3.5, 2.9, 2.8, 3, 5],
}, },
{ {
name: "主营业务", name: '主营业务',
type: "bar", type: 'bar',
barWidth: 15, barWidth: 15,
itemStyle: { itemStyle: {
normal: { normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ {
offset: 0, offset: 0,
color: "#00FFE3", color: '#00FFE3',
}, },
{ {
offset: 1, offset: 1,
color: "#4693EC", color: '#4693EC',
}, },
]), ]),
}, },
...@@ -212,43 +212,43 @@ ...@@ -212,43 +212,43 @@
chart2: { chart2: {
tooltip: { tooltip: {
show: true, show: true,
formatter: "{b} : {c}", formatter: '{b} : {c}',
}, },
legend: { legend: {
show: true, show: true,
icon: "circle", icon: 'circle',
top: "10%", top: '10%',
left: "10%", left: '10%',
width: 50, width: 50,
padding: [0, 5], padding: [0, 5],
itemGap: 25, itemGap: 25,
data: ["已婚已育", "已婚未育", "未婚", "学生"], data: ['已婚已育', '已婚未育', '未婚', '学生'],
selectedMode: true, selectedMode: true,
orient: "vertical", orient: 'vertical',
}, },
series: [ series: [
{ {
name: "Line 4", name: 'Line 4',
type: "pie", type: 'pie',
clockWise: true, clockWise: true,
hoverAnimation: false, hoverAnimation: false,
radius: ["65%", "75%"], radius: ['65%', '75%'],
data: [ data: [
{ {
value: 7645434, value: 7645434,
name: "已婚已育", name: '已婚已育',
}, },
{ {
value: 3612343, value: 3612343,
name: "总数", name: '总数',
tooltip: { tooltip: {
show: false, show: false,
}, },
itemStyle: { itemStyle: {
normal: { normal: {
color: "rgba(0,0,0,0)", color: 'rgba(0,0,0,0)',
label: { label: {
show: false, show: false,
}, },
...@@ -257,17 +257,17 @@ ...@@ -257,17 +257,17 @@
}, },
}, },
emphasis: { emphasis: {
color: "rgba(0,0,0,0)", color: 'rgba(0,0,0,0)',
}, },
}, },
}, },
], ],
}, },
{ {
name: "Line 3", name: 'Line 3',
type: "pie", type: 'pie',
clockWise: true, clockWise: true,
radius: ["50%", "60%"], radius: ['50%', '60%'],
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
...@@ -285,17 +285,17 @@ ...@@ -285,17 +285,17 @@
data: [ data: [
{ {
value: 2632321, value: 2632321,
name: "已婚未育", name: '已婚未育',
}, },
{ {
value: 2212343, value: 2212343,
name: "总数", name: '总数',
tooltip: { tooltip: {
show: false, show: false,
}, },
itemStyle: { itemStyle: {
normal: { normal: {
color: "rgba(0,0,0,0)", color: 'rgba(0,0,0,0)',
label: { label: {
show: false, show: false,
}, },
...@@ -304,18 +304,18 @@ ...@@ -304,18 +304,18 @@
}, },
}, },
emphasis: { emphasis: {
color: "rgba(0,0,0,0)", color: 'rgba(0,0,0,0)',
}, },
}, },
}, },
], ],
}, },
{ {
name: "Line 2", name: 'Line 2',
type: "pie", type: 'pie',
clockWise: true, clockWise: true,
hoverAnimation: false, hoverAnimation: false,
radius: ["35%", "45%"], radius: ['35%', '45%'],
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
...@@ -332,17 +332,17 @@ ...@@ -332,17 +332,17 @@
data: [ data: [
{ {
value: 1823323, value: 1823323,
name: "未婚", name: '未婚',
}, },
{ {
value: 1812343, value: 1812343,
name: "总数", name: '总数',
tooltip: { tooltip: {
show: false, show: false,
}, },
itemStyle: { itemStyle: {
normal: { normal: {
color: "rgba(0,0,0,0)", color: 'rgba(0,0,0,0)',
label: { label: {
show: false, show: false,
}, },
...@@ -351,18 +351,18 @@ ...@@ -351,18 +351,18 @@
}, },
}, },
emphasis: { emphasis: {
color: "rgba(0,0,0,0)", color: 'rgba(0,0,0,0)',
}, },
}, },
}, },
], ],
}, },
{ {
name: "Line 1", name: 'Line 1',
type: "pie", type: 'pie',
clockWise: true, clockWise: true,
radius: ["20%", "30%"], radius: ['20%', '30%'],
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
...@@ -380,17 +380,17 @@ ...@@ -380,17 +380,17 @@
data: [ data: [
{ {
value: 1342221, value: 1342221,
name: "学生", name: '学生',
}, },
{ {
value: 1912343, value: 1912343,
name: "总数", name: '总数',
tooltip: { tooltip: {
show: false, show: false,
}, },
itemStyle: { itemStyle: {
normal: { normal: {
color: "rgba(0,0,0,0)", color: 'rgba(0,0,0,0)',
label: { label: {
show: false, show: false,
}, },
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
}, },
}, },
emphasis: { emphasis: {
color: "rgba(0,0,0,0)", color: 'rgba(0,0,0,0)',
}, },
}, },
}, },
...@@ -410,27 +410,27 @@ ...@@ -410,27 +410,27 @@
chart3: { chart3: {
series: [ series: [
{ {
type: "graph", type: 'graph',
layout: "force", layout: 'force',
symbolSize: 58, symbolSize: 58,
draggable: true, draggable: true,
roam: true, roam: true,
focusNodeAdjacency: true, focusNodeAdjacency: true,
categories: [ categories: [
{ {
name: "公司", name: '公司',
itemStyle: { itemStyle: {
color: "#006acc", color: '#006acc',
}, },
}, },
{ {
name: "董事", name: '董事',
itemStyle: { itemStyle: {
color: "#ff7d18", color: '#ff7d18',
}, },
}, },
], ],
edgeSymbol: ["", "arrow"], edgeSymbol: ['', 'arrow'],
edgeLabel: { edgeLabel: {
normal: { normal: {
show: true, show: true,
...@@ -438,7 +438,7 @@ ...@@ -438,7 +438,7 @@
fontSize: 20, fontSize: 20,
}, },
formatter(x) { formatter(x) {
return x.data.name; return x.data.name
}, },
}, },
}, },
...@@ -451,78 +451,78 @@ ...@@ -451,78 +451,78 @@
}, },
data: [ data: [
{ {
name: "操作系统集团", name: '操作系统集团',
}, },
{ {
name: "浏览器有限公司", name: '浏览器有限公司',
}, },
{ {
name: "HTML科技", name: 'HTML科技',
}, },
{ {
name: "JavaScript科技", name: 'JavaScript科技',
}, },
{ {
name: "CSS科技", name: 'CSS科技',
}, },
{ {
name: "Chrome", name: 'Chrome',
}, },
{ {
name: "IE", name: 'IE',
}, },
{ {
name: "Firefox", name: 'Firefox',
}, },
{ {
name: "Safari", name: 'Safari',
}, },
], ],
links: [ links: [
{ {
source: "浏览器有限公司", source: '浏览器有限公司',
target: "操作系统集团", target: '操作系统集团',
name: "参股", name: '参股',
}, },
{ {
source: "HTML科技", source: 'HTML科技',
target: "浏览器有限公司", target: '浏览器有限公司',
name: "参股", name: '参股',
}, },
{ {
source: "CSS科技", source: 'CSS科技',
target: "浏览器有限公司", target: '浏览器有限公司',
name: "参股", name: '参股',
}, },
{ {
source: "JavaScript科技", source: 'JavaScript科技',
target: "浏览器有限公司", target: '浏览器有限公司',
name: "参股", name: '参股',
}, },
{ {
source: "Chrome", source: 'Chrome',
target: "浏览器有限公司", target: '浏览器有限公司',
name: "董事", name: '董事',
}, },
{ {
source: "IE", source: 'IE',
target: "浏览器有限公司", target: '浏览器有限公司',
name: "董事", name: '董事',
}, },
{ {
source: "Firefox", source: 'Firefox',
target: "浏览器有限公司", target: '浏览器有限公司',
name: "董事", name: '董事',
}, },
{ {
source: "Safari", source: 'Safari',
target: "浏览器有限公司", target: '浏览器有限公司',
name: "董事", name: '董事',
}, },
{ {
source: "Chrome", source: 'Chrome',
target: "JavaScript科技", target: 'JavaScript科技',
name: "法人", name: '法人',
}, },
], ],
}, },
...@@ -531,29 +531,29 @@ ...@@ -531,29 +531,29 @@
//中国地图 //中国地图
zgdt: { zgdt: {
title: { title: {
text: "2099年全国GDP分布", text: '2099年全国GDP分布',
subtext: "数据来自vue-admin-beautiful杜撰", subtext: '数据来自vue-admin-beautiful杜撰',
}, },
tooltip: { tooltip: {
trigger: "item", trigger: 'item',
}, },
dataRange: { dataRange: {
orient: "horizontal", orient: 'horizontal',
min: 0, min: 0,
max: 55000, max: 55000,
text: ["高", "低"], text: ['高', '低'],
splitNumber: 0, splitNumber: 0,
}, },
series: [ series: [
{ {
name: "2099年全国GDP分布", name: '2099年全国GDP分布',
type: "map", type: 'map',
roam: false, roam: false,
mapType: "china", mapType: 'china',
mapLocation: { mapLocation: {
x: "center", x: 'center',
}, },
selectedMode: "multiple", selectedMode: 'multiple',
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
...@@ -567,37 +567,37 @@ ...@@ -567,37 +567,37 @@
}, },
}, },
data: [ data: [
{ name: "西藏", value: 605.83 }, { name: '西藏', value: 605.83 },
{ name: "青海", value: 1670.44 }, { name: '青海', value: 1670.44 },
{ name: "宁夏", value: 2102.21 }, { name: '宁夏', value: 2102.21 },
{ name: "海南", value: 2522.66 }, { name: '海南', value: 2522.66 },
{ name: "甘肃", value: 5020.37 }, { name: '甘肃', value: 5020.37 },
{ name: "贵州", value: 5701.84 }, { name: '贵州', value: 5701.84 },
{ name: "新疆", value: 6610.05 }, { name: '新疆', value: 6610.05 },
{ name: "云南", value: 8893.12 }, { name: '云南', value: 8893.12 },
{ name: "重庆", value: 10011.37 }, { name: '重庆', value: 10011.37 },
{ name: "吉林", value: 10568.83 }, { name: '吉林', value: 10568.83 },
{ name: "山西", value: 11237.55 }, { name: '山西', value: 11237.55 },
{ name: "天津", value: 11307.28 }, { name: '天津', value: 11307.28 },
{ name: "江西", value: 11702.82 }, { name: '江西', value: 11702.82 },
{ name: "广西", value: 11720.87 }, { name: '广西', value: 11720.87 },
{ name: "陕西", value: 12512.3 }, { name: '陕西', value: 12512.3 },
{ name: "黑龙江", value: 12582 }, { name: '黑龙江', value: 12582 },
{ name: "内蒙古", value: 14359.88 }, { name: '内蒙古', value: 14359.88 },
{ name: "安徽", value: 15300.65 }, { name: '安徽', value: 15300.65 },
{ name: "北京", value: 16251.93 }, { name: '北京', value: 16251.93 },
{ name: "福建", value: 17560.18 }, { name: '福建', value: 17560.18 },
{ name: "上海", value: 19195.69 }, { name: '上海', value: 19195.69 },
{ name: "湖北", value: 19632.26 }, { name: '湖北', value: 19632.26 },
{ name: "湖南", value: 19669.56 }, { name: '湖南', value: 19669.56 },
{ name: "四川", value: 21026.68 }, { name: '四川', value: 21026.68 },
{ name: "辽宁", value: 22226.7 }, { name: '辽宁', value: 22226.7 },
{ name: "河北", value: 24515.76 }, { name: '河北', value: 24515.76 },
{ name: "河南", value: 26931.03 }, { name: '河南', value: 26931.03 },
{ name: "浙江", value: 32318.85 }, { name: '浙江', value: 32318.85 },
{ name: "山东", value: 45361.85, selected: true }, { name: '山东', value: 45361.85, selected: true },
{ name: "江苏", value: 49110.27 }, { name: '江苏', value: 49110.27 },
{ name: "广东", value: 53210.28 }, { name: '广东', value: 53210.28 },
], ],
}, },
], ],
...@@ -605,26 +605,26 @@ ...@@ -605,26 +605,26 @@
//世界地图 //世界地图
sjdt: { sjdt: {
title: { title: {
text: "2099年世界GDP(亿元)", text: '2099年世界GDP(亿元)',
subtext: "数据来自vue-admin-beautiful杜撰", subtext: '数据来自vue-admin-beautiful杜撰',
}, },
dataRange: { dataRange: {
orient: "horizontal", orient: 'horizontal',
min: 0, min: 0,
max: 55000, max: 55000,
text: ["高", "低"], text: ['高', '低'],
splitNumber: 0, splitNumber: 0,
}, },
tooltip: { tooltip: {
trigger: "item", trigger: 'item',
formatter: "{b}", formatter: '{b}',
}, },
series: [ series: [
{ {
name: "2099年世界GDP(亿元)", name: '2099年世界GDP(亿元)',
type: "map", type: 'map',
mapType: "world", mapType: 'world',
selectedMode: "multiple", selectedMode: 'multiple',
roam: false, roam: false,
label: { label: {
normal: { normal: {
...@@ -634,15 +634,15 @@ ...@@ -634,15 +634,15 @@
show: true, show: true,
}, },
}, },
data: [{ name: "China", value: 99999, selected: true }], data: [{ name: 'China', value: 99999, selected: true }],
}, },
], ],
}, },
}; }
}, },
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -28,72 +28,72 @@ ...@@ -28,72 +28,72 @@
</template> </template>
<script> <script>
import vabQuill from "@/plugins/vabQuill"; import vabQuill from '@/plugins/vabQuill'
export default { export default {
name: "Editor", name: 'Editor',
components: { vabQuill }, components: { vabQuill },
data() { data() {
return { return {
borderColor: "#dcdfe6", borderColor: '#dcdfe6',
dialogTableVisible: false, dialogTableVisible: false,
form: { form: {
title: "", title: '',
module: "", module: '',
content: "", content: '',
}, },
rules: { rules: {
title: [ title: [
{ {
required: true, required: true,
message: "请输入标题", message: '请输入标题',
trigger: "blur", trigger: 'blur',
}, },
], ],
module: [ module: [
{ {
required: true, required: true,
message: "请选择模块", message: '请选择模块',
trigger: "change", trigger: 'change',
}, },
], ],
content: [ content: [
{ {
required: true, required: true,
message: "请输入内容", message: '请输入内容',
trigger: "blur", trigger: 'blur',
}, },
], ],
}, },
}; }
}, },
methods: { methods: {
handleSee() { handleSee() {
this.$refs["form"].validate((valid) => { this.$refs['form'].validate((valid) => {
this.$refs.form.validateField("content", (errorMsg) => {}); this.$refs.form.validateField('content', (errorMsg) => {})
if (valid) { if (valid) {
this.dialogTableVisible = true; this.dialogTableVisible = true
} else { } else {
return false; return false
} }
}); })
}, },
handleSave() { handleSave() {
this.$refs["form"].validate((valid) => { this.$refs['form'].validate((valid) => {
this.$refs.form.validateField("content", (errorMsg) => { this.$refs.form.validateField('content', (errorMsg) => {
this.borderColor = "#dcdfe6"; this.borderColor = '#dcdfe6'
if (errorMsg) { if (errorMsg) {
this.borderColor = "#F56C6C"; this.borderColor = '#F56C6C'
} }
}); })
if (valid) { if (valid) {
this.$baseMessage("submit!", "success"); this.$baseMessage('submit!', 'success')
} else { } else {
return false; return false
} }
}); })
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.editor-container { .editor-container {
......
...@@ -206,17 +206,17 @@ ...@@ -206,17 +206,17 @@
<script> <script>
export default { export default {
name: "Element", name: 'Element',
components: {}, components: {},
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
}; }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<script> <script>
export default { export default {
name: "ErrorTest", name: 'ErrorTest',
data() { data() {
return {}; return {}
}, },
}; }
</script> </script>
...@@ -11,18 +11,18 @@ ...@@ -11,18 +11,18 @@
</template> </template>
<script> <script>
import ErrorTest from "./components/ErrorTest"; import ErrorTest from './components/ErrorTest'
export default { export default {
name: "ErrorLog", name: 'ErrorLog',
components: { ErrorTest }, components: { ErrorTest },
data() { data() {
return { show: false }; return { show: false }
}, },
methods: { methods: {
handleError() { handleError() {
this.show = true; this.show = true
}, },
}, },
}; }
</script> </script>
...@@ -52,60 +52,60 @@ ...@@ -52,60 +52,60 @@
<script> <script>
export default { export default {
name: "Form", name: 'Form',
data() { data() {
return { return {
ruleForm: { ruleForm: {
name: "", name: '',
region: "", region: '',
delivery: false, delivery: false,
type: [], type: [],
resource: "", resource: '',
desc: "", desc: '',
}, },
rules: { rules: {
name: [ name: [
{ required: true, message: "请输入活动名称", trigger: "blur" }, { required: true, message: '请输入活动名称', trigger: 'blur' },
{ {
min: 3, min: 3,
max: 5, max: 5,
message: "长度在 3 到 5 个字符", message: '长度在 3 到 5 个字符',
trigger: "blur", trigger: 'blur',
}, },
], ],
region: [ region: [
{ required: true, message: "请选择活动区域", trigger: "change" }, { required: true, message: '请选择活动区域', trigger: 'change' },
], ],
type: [ type: [
{ {
type: "array", type: 'array',
required: true, required: true,
message: "请至少选择一个活动性质", message: '请至少选择一个活动性质',
trigger: "change", trigger: 'change',
}, },
], ],
resource: [ resource: [
{ required: true, message: "请选择活动资源", trigger: "change" }, { required: true, message: '请选择活动资源', trigger: 'change' },
], ],
desc: [ desc: [
{ required: true, message: "请填写活动形式", trigger: "blur" }, { required: true, message: '请填写活动形式', trigger: 'blur' },
], ],
}, },
}; }
}, },
methods: { methods: {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); alert('submit!')
} else { } else {
return false; return false
} }
}); })
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields()
}, },
}, },
}; }
</script> </script>
...@@ -60,58 +60,58 @@ ...@@ -60,58 +60,58 @@
</template> </template>
<script> <script>
import { getIconList } from "@/api/colorfulIcon"; import { getIconList } from '@/api/colorfulIcon'
import clip from "@/utils/clipboard"; import clip from '@/utils/clipboard'
export default { export default {
name: "ColorfulIcon", name: 'ColorfulIcon',
data() { data() {
return { return {
copyText: "", copyText: '',
layout: "total, sizes, prev, pager, next, jumper", layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
background: true, background: true,
height: 0, height: 0,
selectRows: "", selectRows: '',
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
queryIcon: [], queryIcon: [],
queryForm: { queryForm: {
pageNo: 1, pageNo: 1,
pageSize: 72, pageSize: 72,
title: "", title: '',
}, },
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.queryForm.pageSize = val; this.queryForm.pageSize = val
this.fetchData(); this.fetchData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.pageNo = val; this.queryForm.pageNo = val
this.fetchData(); this.fetchData()
}, },
queryData() { queryData() {
this.queryForm.pageNo = 1; this.queryForm.pageNo = 1
this.fetchData(); this.fetchData()
}, },
async fetchData() { async fetchData() {
const { data, totalCount } = await getIconList(this.queryForm); const { data, totalCount } = await getIconList(this.queryForm)
this.queryIcon = data; this.queryIcon = data
this.allIcon = data; this.allIcon = data
this.total = totalCount; this.total = totalCount
}, },
handleCopyIcon(index, event) { handleCopyIcon(index, event) {
//const copyText = `<vab-colorful-icon icon-class="https://cdn.jsdelivr.net/gh/chuzhixin/zx-colorful-icon@master/${this.queryIcon[index]}.svg" />`; //const copyText = `<vab-colorful-icon icon-class="https://cdn.jsdelivr.net/gh/chuzhixin/zx-colorful-icon@master/${this.queryIcon[index]}.svg" />`;
const copyText = `<vab-colorful-icon icon-class="${this.queryIcon[index]}" />`; const copyText = `<vab-colorful-icon icon-class="${this.queryIcon[index]}" />`
this.copyText = copyText; this.copyText = copyText
clip(copyText, event); clip(copyText, event)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -52,57 +52,57 @@ ...@@ -52,57 +52,57 @@
</template> </template>
<script> <script>
import clip from "@/utils/clipboard"; import clip from '@/utils/clipboard'
import { getIconList } from "@/api/icon"; import { getIconList } from '@/api/icon'
export default { export default {
name: "AwesomeIcon", name: 'AwesomeIcon',
data() { data() {
return { return {
copyText: "", copyText: '',
layout: "total, sizes, prev, pager, next, jumper", layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
background: true, background: true,
height: 0, height: 0,
selectRows: "", selectRows: '',
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
queryIcon: [], queryIcon: [],
queryForm: { queryForm: {
pageNo: 1, pageNo: 1,
pageSize: 72, pageSize: 72,
title: "", title: '',
}, },
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.queryForm.pageSize = val; this.queryForm.pageSize = val
this.fetchData(); this.fetchData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.pageNo = val; this.queryForm.pageNo = val
this.fetchData(); this.fetchData()
}, },
queryData() { queryData() {
this.queryForm.pageNo = 1; this.queryForm.pageNo = 1
this.fetchData(); this.fetchData()
}, },
async fetchData() { async fetchData() {
const { data, totalCount } = await getIconList(this.queryForm); const { data, totalCount } = await getIconList(this.queryForm)
this.queryIcon = data; this.queryIcon = data
this.allIcon = data; this.allIcon = data
this.total = totalCount; this.total = totalCount
}, },
handleCopyIcon(index, event) { handleCopyIcon(index, event) {
const copyText = `<vab-icon :icon="['fas', '${this.queryIcon[index]}']"></vab-icon>`; const copyText = `<vab-icon :icon="['fas', '${this.queryIcon[index]}']"></vab-icon>`
this.copyText = copyText; this.copyText = copyText
clip(copyText, event); clip(copyText, event)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -62,58 +62,58 @@ ...@@ -62,58 +62,58 @@
</template> </template>
<script> <script>
import { getIconList } from "@/api/remixIcon"; import { getIconList } from '@/api/remixIcon'
import clip from "@/utils/clipboard"; import clip from '@/utils/clipboard'
export default { export default {
name: "RemixIcon", name: 'RemixIcon',
data() { data() {
return { return {
copyText: "", copyText: '',
layout: "total, sizes, prev, pager, next, jumper", layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
background: true, background: true,
height: 0, height: 0,
selectRows: "", selectRows: '',
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
queryIcon: [], queryIcon: [],
queryForm: { queryForm: {
pageNo: 1, pageNo: 1,
pageSize: 72, pageSize: 72,
title: "", title: '',
}, },
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {
this.queryForm.pageSize = val; this.queryForm.pageSize = val
this.fetchData(); this.fetchData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.pageNo = val; this.queryForm.pageNo = val
this.fetchData(); this.fetchData()
}, },
queryData() { queryData() {
this.queryForm.pageNo = 1; this.queryForm.pageNo = 1
this.fetchData(); this.fetchData()
}, },
async fetchData() { async fetchData() {
const { data, totalCount } = await getIconList(this.queryForm); const { data, totalCount } = await getIconList(this.queryForm)
this.queryIcon = data; this.queryIcon = data
this.allIcon = data; this.allIcon = data
this.total = totalCount; this.total = totalCount
}, },
handleCopyIcon(index, event) { handleCopyIcon(index, event) {
//const copyText = `<vab-remix-icon icon-class="https://cdn.jsdelivr.net/gh/chuzhixin/zx-remixicon@master/src/icons/svg/${this.queryIcon[index]}.svg" />`; //const copyText = `<vab-remix-icon icon-class="https://cdn.jsdelivr.net/gh/chuzhixin/zx-remixicon@master/src/icons/svg/${this.queryIcon[index]}.svg" />`;
const copyText = `<vab-remix-icon icon-class="${this.queryIcon[index]}" />`; const copyText = `<vab-remix-icon icon-class="${this.queryIcon[index]}" />`
this.copyText = copyText; this.copyText = copyText
clip(copyText, event); clip(copyText, event)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -25,29 +25,29 @@ ...@@ -25,29 +25,29 @@
</template> </template>
<script> <script>
import VabComparison from "@/plugins/vabComparison"; import VabComparison from '@/plugins/vabComparison'
import { random } from "@/utils"; import { random } from '@/utils'
export default { export default {
name: "ImgComparison", name: 'ImgComparison',
components: { VabComparison }, components: { VabComparison },
data() { data() {
return { return {
comparison: { comparison: {
width: "100%", width: '100%',
height: "auto", height: 'auto',
src1: require("@/assets/comparison/left.jpg"), src1: require('@/assets/comparison/left.jpg'),
src2: require("@/assets/comparison/right.jpg"), src2: require('@/assets/comparison/right.jpg'),
start: random(0, 100), start: random(0, 100),
}, },
}; }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
random(m, n) { random(m, n) {
return random(m, n).toString(); return random(m, n).toString()
}, },
}, },
}; }
</script> </script>
...@@ -32,25 +32,25 @@ ...@@ -32,25 +32,25 @@
<script> <script>
export default { export default {
name: "Loading", name: 'Loading',
data() { data() {
return {}; return {}
}, },
methods: { methods: {
handleLoading(index) { handleLoading(index) {
const Loading = this.$baseLoading(index); const Loading = this.$baseLoading(index)
setTimeout(() => { setTimeout(() => {
Loading.close(); Loading.close()
}, 3000); }, 3000)
}, },
handleColorfullLoading(index) { handleColorfullLoading(index) {
const Loading = this.$baseColorfullLoading(index); const Loading = this.$baseColorfullLoading(index)
setTimeout(() => { setTimeout(() => {
Loading.close(); Loading.close()
}, 3000); }, 3000)
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -189,14 +189,14 @@ ...@@ -189,14 +189,14 @@
<script> <script>
export default { export default {
name: "Lodash", name: 'Lodash',
data() { data() {
return {}; return {}
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.lodash-container { .lodash-container {
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
</template> </template>
<script> <script>
import VabMagnifier from "@/plugins/vabMagnifier.js"; import VabMagnifier from '@/plugins/vabMagnifier.js'
export default { export default {
name: "Magnifier", name: 'Magnifier',
components: { components: {
VabMagnifier, VabMagnifier,
}, },
}; }
</script> </script>
...@@ -5,83 +5,83 @@ ...@@ -5,83 +5,83 @@
</template> </template>
<script> <script>
import axios from "axios"; import axios from 'axios'
import * as mapv from "mapv"; import * as mapv from 'mapv'
export default { export default {
name: "Map", name: 'Map',
components: {}, components: {},
data() { data() {
return {}; return {}
}, },
created() {}, created() {},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
const map = this.$baseMap(); const map = this.$baseMap()
axios axios
.get( .get(
"https://cdn.jsdelivr.net/npm/mapv@2.0.12/examples/data/od-xierqi.txt" 'https://cdn.jsdelivr.net/npm/mapv@2.0.12/examples/data/od-xierqi.txt'
) )
.then((rs) => { .then((rs) => {
let data = []; let data = []
let timeData = []; let timeData = []
rs = rs.data.split("\n"); rs = rs.data.split('\n')
let maxLength = 0; let maxLength = 0
for (let i = 0; i < rs.length; i++) { for (let i = 0; i < rs.length; i++) {
let item = rs[i].split(","); let item = rs[i].split(',')
let coordinates = []; let coordinates = []
if (item.length > maxLength) { if (item.length > maxLength) {
maxLength = item.length; maxLength = item.length
} }
for (let j = 0; j < item.length; j += 2) { for (let j = 0; j < item.length; j += 2) {
let x = (Number(item[j]) / 20037508.34) * 180; let x = (Number(item[j]) / 20037508.34) * 180
let y = (Number(item[j + 1]) / 20037508.34) * 180; let y = (Number(item[j + 1]) / 20037508.34) * 180
y = y =
(180 / Math.PI) * (180 / Math.PI) *
(2 * Math.atan(Math.exp((y * Math.PI) / 180)) - Math.PI / 2); (2 * Math.atan(Math.exp((y * Math.PI) / 180)) - Math.PI / 2)
if (x == 0 || y == NaN) { if (x == 0 || y == NaN) {
continue; continue
} }
coordinates.push([x, y]); coordinates.push([x, y])
timeData.push({ timeData.push({
geometry: { geometry: {
type: "Point", type: 'Point',
coordinates: [x, y], coordinates: [x, y],
}, },
count: 1, count: 1,
time: j, time: j,
}); })
} }
data.push({ data.push({
geometry: { geometry: {
type: "LineString", type: 'LineString',
coordinates: coordinates, coordinates: coordinates,
}, },
}); })
} }
let dataSet = new mapv.DataSet(data); let dataSet = new mapv.DataSet(data)
let options = { let options = {
strokeStyle: "rgba(53,57,255,0.5)", strokeStyle: 'rgba(53,57,255,0.5)',
// globalCompositeOperation: 'lighter', // globalCompositeOperation: 'lighter',
shadowColor: "rgba(53,57,255,0.2)", shadowColor: 'rgba(53,57,255,0.2)',
shadowBlur: 3, shadowBlur: 3,
lineWidth: 3.0, lineWidth: 3.0,
draw: "simple", draw: 'simple',
}; }
let mapvLayer = new mapv.MaptalksLayer( let mapvLayer = new mapv.MaptalksLayer(
"mapv1", 'mapv1',
dataSet, dataSet,
options options
).addTo(map); ).addTo(map)
let dataSet2 = new mapv.DataSet(timeData); let dataSet2 = new mapv.DataSet(timeData)
let options2 = { let options2 = {
fillStyle: "rgba(255, 250, 250, 0.2)", fillStyle: 'rgba(255, 250, 250, 0.2)',
globalCompositeOperation: "lighter", globalCompositeOperation: 'lighter',
size: 1.5, size: 1.5,
animation: { animation: {
stepsRange: { stepsRange: {
...@@ -91,19 +91,19 @@ ...@@ -91,19 +91,19 @@
trails: 3, trails: 3,
duration: 5, duration: 5,
}, },
draw: "simple", draw: 'simple',
}; }
let mapvLayer2 = new mapv.MaptalksLayer( let mapvLayer2 = new mapv.MaptalksLayer(
"mapv2", 'mapv2',
dataSet2, dataSet2,
options2 options2
).addTo(map); ).addTo(map)
}); })
}); })
}, },
methods: {}, methods: {},
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.map-container { .map-container {
......
...@@ -23,29 +23,29 @@ ...@@ -23,29 +23,29 @@
</template> </template>
<script> <script>
import VabMarkdownEditor from "@/plugins/vabMarkdownEditor"; import VabMarkdownEditor from '@/plugins/vabMarkdownEditor'
export default { export default {
name: "MarkdownEditor", name: 'MarkdownEditor',
components: { VabMarkdownEditor }, components: { VabMarkdownEditor },
data() { data() {
return { return {
value: "# vue-admin-beautiful", value: '# vue-admin-beautiful',
html: '<h1 id="vue-admin-beautiful">vue-admin-beautiful</h1>', html: '<h1 id="vue-admin-beautiful">vue-admin-beautiful</h1>',
}; }
}, },
methods: { methods: {
handleAddText() { handleAddText() {
this.$refs.mde.add("\n### 新增加的内容"); this.$refs.mde.add('\n### 新增加的内容')
}, },
handleAddImg() { handleAddImg() {
this.$refs.mde.add( this.$refs.mde.add(
"\n![](https://chu1204505056.gitee.io/byui-bookmarks/img/ewm.png)" '\n![](https://chu1204505056.gitee.io/byui-bookmarks/img/ewm.png)'
); )
}, },
handleShowHtml(html) { handleShowHtml(html) {
this.html = html; this.html = html
}, },
}, },
}; }
</script> </script>
...@@ -89,15 +89,15 @@ ...@@ -89,15 +89,15 @@
<script> <script>
export default { export default {
name: "More", name: 'More',
components: {}, components: {},
data() { data() {
return { nodeEnv: process.env.NODE_ENV }; return { nodeEnv: process.env.NODE_ENV }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.more-container { .more-container {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
[class*="-container"] { [class*='-container'] {
padding: 15px; padding: 15px;
background: $base-color-white; background: $base-color-white;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
[class*="-container"] { [class*='-container'] {
padding: 15px; padding: 15px;
background: $base-color-white; background: $base-color-white;
} }
......
...@@ -114,46 +114,43 @@ ...@@ -114,46 +114,43 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from 'vuex'
import { tokenTableName } from "@/config/settings"; import { tokenTableName } from '@/config/settings'
import { getRouterList } from "@/api/router"; import { getRouterList } from '@/api/router'
export default { export default {
name: "Permissions", name: 'Permissions',
data() { data() {
return { return {
form: { form: {
account: "", account: '',
}, },
tableData: [], tableData: [],
res: [], res: [],
}; }
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
username: "user/username", username: 'user/username',
permissions: "user/permissions", permissions: 'user/permissions',
}), }),
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
mounted() { mounted() {
this.form.account = this.username; this.form.account = this.username
}, },
methods: { methods: {
handleChangePermission() { handleChangePermission() {
localStorage.setItem( localStorage.setItem(tokenTableName, `${this.form.account}-accessToken`)
tokenTableName, location.reload()
`${this.form.account}-accessToken`
);
location.reload();
}, },
async fetchData() { async fetchData() {
const res = await getRouterList(); const res = await getRouterList()
this.tableData = res.data; this.tableData = res.data
this.res = res; this.res = res
}, },
}, },
}; }
</script> </script>
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
</template> </template>
<script> <script>
import { VabPlayerMp4, VabPlayerHls } from "@/plugins/vabPlayer.js"; import { VabPlayerMp4, VabPlayerHls } from '@/plugins/vabPlayer.js'
export default { export default {
name: "Player", name: 'Player',
components: { components: {
VabPlayerMp4, VabPlayerMp4,
VabPlayerHls, VabPlayerHls,
...@@ -44,30 +44,30 @@ ...@@ -44,30 +44,30 @@
data() { data() {
return { return {
config1: { config1: {
id: "mse1", id: 'mse1',
url: "https://cdn.jsdelivr.net/gh/chuzhixin/videos@master/video.mp4", url: 'https://cdn.jsdelivr.net/gh/chuzhixin/videos@master/video.mp4',
volume: 1, volume: 1,
autoplay: false, autoplay: false,
}, },
Player1: null, Player1: null,
config2: { config2: {
id: "mse2", id: 'mse2',
url: "https://cdn.jsdelivr.net/gh/chuzhixin/videos@master/video.m3u8", url: 'https://cdn.jsdelivr.net/gh/chuzhixin/videos@master/video.m3u8',
volume: 1, volume: 1,
autoplay: false, autoplay: false,
}, },
Player2: null, Player2: null,
config3: { config3: {
id: "mse3", id: 'mse3',
url: "https://cdn.jsdelivr.net/gh/chuzhixin/videos@master/video.flv", url: 'https://cdn.jsdelivr.net/gh/chuzhixin/videos@master/video.flv',
volume: 1, volume: 1,
autoplay: false, autoplay: false,
}, },
Player3: null, Player3: null,
}; }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {},
}; }
</script> </script>
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
</template> </template>
<script> <script>
import VabSnow from "@/components/VabSnow"; import VabSnow from '@/components/VabSnow'
import VabProfile from "@/components/VabProfile"; import VabProfile from '@/components/VabProfile'
import VabCharge from "@/components/VabCharge"; import VabCharge from '@/components/VabCharge'
export default { export default {
name: "Sticky", name: 'Sticky',
components: { components: {
VabSnow, VabSnow,
VabProfile, VabProfile,
...@@ -63,38 +63,38 @@ ...@@ -63,38 +63,38 @@
startVal: 0, startVal: 0,
endVal: 20, endVal: 20,
timeInterval: null, timeInterval: null,
}; }
}, },
mounted() { mounted() {
this.handleProfile(); this.handleProfile()
this.handleSolidText(); this.handleSolidText()
this.timeInterval = setInterval(() => { this.timeInterval = setInterval(() => {
if (this.endVal < 100) { if (this.endVal < 100) {
this.startVal = this.endVal; this.startVal = this.endVal
this.endVal++; this.endVal++
} }
}, 5000); }, 5000)
}, },
beforeDestroy() { beforeDestroy() {
if (this.clearInterval) { if (this.clearInterval) {
clearInterval(this.timeInterval); clearInterval(this.timeInterval)
} }
}, },
methods: { methods: {
handleProfile() { handleProfile() {
this.profileShow = false; this.profileShow = false
setTimeout(() => { setTimeout(() => {
this.profileShow = true; this.profileShow = true
}); })
}, },
handleSolidText() { handleSolidText() {
this.solidTextShow = false; this.solidTextShow = false
setTimeout(() => { setTimeout(() => {
this.solidTextShow = true; this.solidTextShow = true
}); })
}, },
}, },
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.small-components-container { .small-components-container {
......
...@@ -21,55 +21,55 @@ ...@@ -21,55 +21,55 @@
</template> </template>
<script> <script>
import { doEdit } from "@/api/table"; import { doEdit } from '@/api/table'
export default { export default {
name: "TableEdit", name: 'TableEdit',
data() { data() {
return { return {
form: { form: {
title: "", title: '',
author: "", author: '',
}, },
rules: { rules: {
title: [{ required: true, trigger: "blur", message: "请输入标题" }], title: [{ required: true, trigger: 'blur', message: '请输入标题' }],
author: [{ required: true, trigger: "blur", message: "请输入作者" }], author: [{ required: true, trigger: 'blur', message: '请输入作者' }],
}, },
title: "", title: '',
dialogFormVisible: false, dialogFormVisible: false,
}; }
}, },
created() {}, created() {},
methods: { methods: {
showEdit(row) { showEdit(row) {
if (!row) { if (!row) {
this.title = "添加"; this.title = '添加'
} else { } else {
this.title = "编辑"; this.title = '编辑'
this.form = Object.assign({}, row); this.form = Object.assign({}, row)
} }
this.dialogFormVisible = true; this.dialogFormVisible = true
}, },
close() { close() {
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
this.form = this.$options.data().form; this.form = this.$options.data().form
this.dialogFormVisible = false; this.dialogFormVisible = false
this.$emit("fetch-data"); this.$emit('fetch-data')
}, },
save() { save() {
this.$refs["form"].validate(async (valid) => { this.$refs['form'].validate(async (valid) => {
if (valid) { if (valid) {
const { msg } = await doEdit(this.form); const { msg } = await doEdit(this.form)
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.$refs["form"].resetFields(); this.$refs['form'].resetFields()
this.dialogFormVisible = false; this.dialogFormVisible = false
this.$emit("fetch-data"); this.$emit('fetch-data')
this.form = this.$options.data().form; this.form = this.$options.data().form
} else { } else {
return false; return false
} }
}); })
}, },
}, },
}; }
</script> </script>
...@@ -121,21 +121,21 @@ ...@@ -121,21 +121,21 @@
</template> </template>
<script> <script>
import { getList, doDelete } from "@/api/table"; import { getList, doDelete } from '@/api/table'
import TableEdit from "./components/TableEdit"; import TableEdit from './components/TableEdit'
export default { export default {
name: "ComprehensiveTable", name: 'ComprehensiveTable',
components: { components: {
TableEdit, TableEdit,
}, },
filters: { filters: {
statusFilter(status) { statusFilter(status) {
const statusMap = { const statusMap = {
published: "success", published: 'success',
draft: "gray", draft: 'gray',
deleted: "danger", deleted: 'danger',
}; }
return statusMap[status]; return statusMap[status]
}, },
}, },
data() { data() {
...@@ -144,102 +144,102 @@ ...@@ -144,102 +144,102 @@
list: [], list: [],
imageList: [], imageList: [],
listLoading: true, listLoading: true,
layout: "total, sizes, prev, pager, next, jumper", layout: 'total, sizes, prev, pager, next, jumper',
total: 0, total: 0,
background: true, background: true,
selectRows: "", selectRows: '',
elementLoadingText: "正在加载...", elementLoadingText: '正在加载...',
queryForm: { queryForm: {
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 20,
title: "", title: '',
}, },
}; }
}, },
created() { created() {
this.fetchData(); this.fetchData()
}, },
beforeDestroy() {}, beforeDestroy() {},
mounted() {}, mounted() {},
methods: { methods: {
tableSortChange() { tableSortChange() {
const imageList = []; const imageList = []
this.$refs.tableSort.tableData.forEach((item, index) => { this.$refs.tableSort.tableData.forEach((item, index) => {
imageList.push(item.img); imageList.push(item.img)
}); })
this.imageList = imageList; this.imageList = imageList
}, },
setSelectRows(val) { setSelectRows(val) {
this.selectRows = val; this.selectRows = val
}, },
handleAdd() { handleAdd() {
this.$refs["edit"].showEdit(); this.$refs['edit'].showEdit()
}, },
handleEdit(row) { handleEdit(row) {
this.$refs["edit"].showEdit(row); this.$refs['edit'].showEdit(row)
}, },
handleDelete(row) { handleDelete(row) {
if (row.id) { if (row.id) {
this.$baseConfirm("你确定要删除当前项吗", null, async () => { this.$baseConfirm('你确定要删除当前项吗', null, async () => {
const { msg } = await doDelete({ ids: row.id }); const { msg } = await doDelete({ ids: row.id })
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.fetchData(); this.fetchData()
}); })
} else { } else {
if (this.selectRows.length > 0) { if (this.selectRows.length > 0) {
const ids = this.selectRows.map((item) => item.id).join(); const ids = this.selectRows.map((item) => item.id).join()
this.$baseConfirm("你确定要删除选中项吗", null, async () => { this.$baseConfirm('你确定要删除选中项吗', null, async () => {
const { msg } = await doDelete({ ids: ids }); const { msg } = await doDelete({ ids: ids })
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.fetchData(); this.fetchData()
}); })
} else { } else {
this.$baseMessage("未选中任何行", "error"); this.$baseMessage('未选中任何行', 'error')
return false; return false
} }
} }
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.queryForm.pageSize = val; this.queryForm.pageSize = val
this.fetchData(); this.fetchData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.queryForm.pageNo = val; this.queryForm.pageNo = val
this.fetchData(); this.fetchData()
}, },
handleQuery() { handleQuery() {
this.queryForm.pageNo = 1; this.queryForm.pageNo = 1
this.fetchData(); this.fetchData()
}, },
async fetchData() { async fetchData() {
this.listLoading = true; this.listLoading = true
const { data, totalCount } = await getList(this.queryForm); const { data, totalCount } = await getList(this.queryForm)
this.list = data; this.list = data
const imageList = []; const imageList = []
data.forEach((item, index) => { data.forEach((item, index) => {
imageList.push(item.img); imageList.push(item.img)
}); })
this.imageList = imageList; this.imageList = imageList
this.total = totalCount; this.total = totalCount
setTimeout(() => { setTimeout(() => {
this.listLoading = false; this.listLoading = false
}, 500); }, 500)
}, },
testMessage() { testMessage() {
this.$baseMessage("test1", "success"); this.$baseMessage('test1', 'success')
}, },
testALert() { testALert() {
this.$baseAlert("11"); this.$baseAlert('11')
this.$baseAlert("11", "自定义标题", () => { this.$baseAlert('11', '自定义标题', () => {
/* 可以写回调; */ /* 可以写回调; */
}); })
this.$baseAlert("11", null, () => { this.$baseAlert('11', null, () => {
/* 可以写回调; */ /* 可以写回调; */
}); })
}, },
testConfirm() { testConfirm() {
this.$baseConfirm( this.$baseConfirm(
"你确定要执行该操作?", '你确定要执行该操作?',
null, null,
() => { () => {
/* 可以写回调; */ /* 可以写回调; */
...@@ -247,11 +247,11 @@ ...@@ -247,11 +247,11 @@
() => { () => {
/* 可以写回调; */ /* 可以写回调; */
} }
); )
}, },
testNotify() { testNotify() {
this.$baseNotify("测试消息提示", "test", "success", "bottom-right"); this.$baseNotify('测试消息提示', 'test', 'success', 'bottom-right')
}, },
}, },
}; }
</script> </script>
...@@ -221,62 +221,62 @@ ...@@ -221,62 +221,62 @@
</template> </template>
<script> <script>
import { getTreeList } from "@/api/tree"; import { getTreeList } from '@/api/tree'
export default { export default {
name: "Tree", name: 'Tree',
data() { data() {
return { return {
dialogTitle: "添加节点", dialogTitle: '添加节点',
treeFlag: 0, treeFlag: 0,
treeDialogVisible: false, treeDialogVisible: false,
treeForm: { treeForm: {
id: "", id: '',
name: "", name: '',
}, },
checkNodeKeys: [], checkNodeKeys: [],
filterText: "", filterText: '',
data2: [], data2: [],
defaultProps: { defaultProps: {
children: "children", children: 'children',
label: "name", label: 'name',
}, },
defaultExpendedKeys: [], defaultExpendedKeys: [],
defaultCheckedKeys: [], defaultCheckedKeys: [],
loading: true, loading: true,
keyW: "", keyW: '',
filterDevLlist: [], filterDevLlist: [],
isShow: false, isShow: false,
updateTree: true, updateTree: true,
/* 单选树-多选树---------开始 */ /* 单选树-多选树---------开始 */
selectLevel: 4, // 树可选叶子level等级 selectLevel: 4, // 树可选叶子level等级
singleSelectTreeVal: "", //单选树默认label值 singleSelectTreeVal: '', //单选树默认label值
singleSelectTreeKey: "", //单选树默认key值 singleSelectTreeKey: '', //单选树默认key值
selectTreeData: [], //单选树的值 selectTreeData: [], //单选树的值
selectTreeDefaultSelectedKeys: [], //单选树默认展开的key值数组 selectTreeDefaultSelectedKeys: [], //单选树默认展开的key值数组
selectTreeDefaultProps: { selectTreeDefaultProps: {
children: "children", children: 'children',
label: "name", label: 'name',
}, },
multipleSelectTreeVal: [], //多选树默认label值 multipleSelectTreeVal: [], //多选树默认label值
multipleSelectTreeKey: "", //多选树默认key值 multipleSelectTreeKey: '', //多选树默认key值
/* 单选树-多选树---------结束 */ /* 单选树-多选树---------结束 */
}; }
}, },
watch: { watch: {
filterText(val) { filterText(val) {
this.$refs.demoTree.filter(val); this.$refs.demoTree.filter(val)
}, },
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.getTreeListFuc(1); this.getTreeListFuc(1)
this.setCheckedKeys(); this.setCheckedKeys()
// 初始化单选树 // 初始化单选树
this.initSingleTree("single"); this.initSingleTree('single')
// 初始化多选树 // 初始化多选树
this.initSingleTree("multiple"); this.initSingleTree('multiple')
}); })
}, },
methods: { methods: {
// 树level小于n级展开方法 // 树level小于n级展开方法
...@@ -284,168 +284,168 @@ ...@@ -284,168 +284,168 @@
const each = (data) => { const each = (data) => {
data.forEach((e) => { data.forEach((e) => {
if (e.rank <= n) { if (e.rank <= n) {
this.defaultExpendedKeys.push(e.id); this.defaultExpendedKeys.push(e.id)
} }
if (e.children.length > 0) { if (e.children.length > 0) {
each(e.children); each(e.children)
}
})
} }
});
};
each(treeData); each(treeData)
}, },
// 获取tree数据 // 获取tree数据
async getTreeListFuc(flag) { async getTreeListFuc(flag) {
const { data } = await getTreeList(); const { data } = await getTreeList()
this.data2 = data; this.data2 = data
if (flag) { if (flag) {
this.openTree(this.data2, 2); this.openTree(this.data2, 2)
} }
}, },
// 节点过滤操作 // 节点过滤操作
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true
return data.name.indexOf(value) !== -1; return data.name.indexOf(value) !== -1
}, },
// 添加节点操作 // 添加节点操作
append(node, data, flag) { append(node, data, flag) {
this.treeFlag = flag; this.treeFlag = flag
this.dialogTitle = "添加节点"; this.dialogTitle = '添加节点'
this.treeForm = { this.treeForm = {
id: "", id: '',
name: "", name: '',
}; }
this.treeDialogVisible = true; this.treeDialogVisible = true
}, },
// 编辑节点操作 // 编辑节点操作
edit(node, data, flag) { edit(node, data, flag) {
this.treeFlag = flag; this.treeFlag = flag
this.dialogTitle = "编辑节点"; this.dialogTitle = '编辑节点'
this.treeForm = { this.treeForm = {
id: data.id, id: data.id,
name: data.name, name: data.name,
}; }
this.treeDialogVisible = true; this.treeDialogVisible = true
}, },
// 删除节点操作 // 删除节点操作
remove(node, data) { remove(node, data) {
this.$baseConfirm("你确定要删除该节点?", null, async () => { this.$baseConfirm('你确定要删除该节点?', null, async () => {
const { msg } = getTreeList(); const { msg } = getTreeList()
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.getTreeListFuc(0); this.getTreeListFuc(0)
}); })
}, },
// 保存添加和编辑 // 保存添加和编辑
saveTree() { saveTree() {
this.$refs.treeForm.validate(async (valid) => { this.$refs.treeForm.validate(async (valid) => {
if (valid) { if (valid) {
const { msg } = await getTreeList(); const { msg } = await getTreeList()
this.$baseMessage(msg, "success"); this.$baseMessage(msg, 'success')
this.treeDialogVisible = false; this.treeDialogVisible = false
this.getTreeListFuc(0); this.getTreeListFuc(0)
} }
}); })
}, },
// 设置节点选中 // 设置节点选中
setCheckedKeys() { setCheckedKeys() {
this.$refs.demoTree.setCheckedKeys([1]); this.$refs.demoTree.setCheckedKeys([1])
}, },
// 点击叶子节点 // 点击叶子节点
nodeClick(data, node, el) {}, nodeClick(data, node, el) {},
// 节点选中操作 // 节点选中操作
checkNode(data, node, el) { checkNode(data, node, el) {
this.checkNodeKeys = node.checkedKeys; this.checkNodeKeys = node.checkedKeys
}, },
// 节点展开操作 // 节点展开操作
nodeExpand(data, node, el) { nodeExpand(data, node, el) {
this.defaultExpendedKeys.push(data.id); this.defaultExpendedKeys.push(data.id)
}, },
// 节点关闭操作 // 节点关闭操作
nodeCollapse(data, node, el) { nodeCollapse(data, node, el) {
this.defaultExpendedKeys.splice( this.defaultExpendedKeys.splice(
this.defaultExpendedKeys.findIndex((item) => item.id === data.id), this.defaultExpendedKeys.findIndex((item) => item.id === data.id),
1 1
); )
}, },
async loadNode(node, resolve) { async loadNode(node, resolve) {
if (node.level === 0) { if (node.level === 0) {
const { data } = await getTreeList(); const { data } = await getTreeList()
this.loading = false; this.loading = false
return resolve(data); return resolve(data)
} else { } else {
const { data } = await getTreeList(); const { data } = await getTreeList()
return resolve(res.data); return resolve(res.data)
} }
}, },
//懒加载树输入框筛选方法 //懒加载树输入框筛选方法
async showTreeList(value) { async showTreeList(value) {
if (typeof value === "string") { if (typeof value === 'string') {
this.keyW = value.trim(); this.keyW = value.trim()
} }
if (this.keyW.length !== 0) { if (this.keyW.length !== 0) {
// 请求后台返回查询结果 // 请求后台返回查询结果
let treeOption = {}; let treeOption = {}
treeOption = { treeOption = {
keyWord: this.keyW, keyWord: this.keyW,
}; }
const { data } = await getTreeList(); const { data } = await getTreeList()
this.filterDevLlist = data; this.filterDevLlist = data
this.isShow = true; this.isShow = true
} else { } else {
this.isShow = false; this.isShow = false
} }
}, },
/* 单选/多选树方法-------------------开始 */ /* 单选/多选树方法-------------------开始 */
// 初始化单选树的值 // 初始化单选树的值
async initSingleTree(treeType) { async initSingleTree(treeType) {
const { data } = await getTreeList(); const { data } = await getTreeList()
this.selectTreeData = data; this.selectTreeData = data
this.$nextTick(() => { this.$nextTick(() => {
this.selectTreeDefaultSelectedKeys = this.singleSelectTreeKey.split( this.selectTreeDefaultSelectedKeys = this.singleSelectTreeKey.split(
"," ','
); // 设置默认展开 ) // 设置默认展开
if (treeType == "single") { if (treeType == 'single') {
//单选树 //单选树
this.$refs.singleSelectTree.setCurrentKey(this.singleSelectTreeKey); // 设置默认选中 this.$refs.singleSelectTree.setCurrentKey(this.singleSelectTreeKey) // 设置默认选中
} else { } else {
// 多选树 // 多选树
this.$refs.multipleSelectTree.setCheckedKeys( this.$refs.multipleSelectTree.setCheckedKeys(
this.selectTreeDefaultSelectedKeys this.selectTreeDefaultSelectedKeys
); )
} }
}); })
}, },
// 清除单选树选中 // 清除单选树选中
selectTreeClearHandle(type) { selectTreeClearHandle(type) {
this.selectTreeDefaultSelectedKeys = []; this.selectTreeDefaultSelectedKeys = []
this.clearSelected(); this.clearSelected()
if (type == "single") { if (type == 'single') {
this.singleSelectTreeVal = ""; this.singleSelectTreeVal = ''
this.singleSelectTreeKey = ""; this.singleSelectTreeKey = ''
this.$refs.singleSelectTree.setCurrentKey(""); // 设置默认选中 this.$refs.singleSelectTree.setCurrentKey('') // 设置默认选中
} else { } else {
this.multipleSelectTreeVal = []; this.multipleSelectTreeVal = []
this.multipleSelectTreeKey = ""; this.multipleSelectTreeKey = ''
this.$refs.multipleSelectTree.setCheckedKeys([]); this.$refs.multipleSelectTree.setCheckedKeys([])
} }
}, },
/* 清空选中样式 */ /* 清空选中样式 */
clearSelected() { clearSelected() {
const allNode = document.querySelectorAll( const allNode = document.querySelectorAll(
"#singleSelectTree .el-tree-node" '#singleSelectTree .el-tree-node'
); )
allNode.forEach((element) => element.classList.remove("is-current")); allNode.forEach((element) => element.classList.remove('is-current'))
}, },
// select多选时移除某项操作 // select多选时移除某项操作
removeSelectTreeTag(val) { removeSelectTreeTag(val) {
const stack = JSON.parse(JSON.stringify(this.selectTreeData)); const stack = JSON.parse(JSON.stringify(this.selectTreeData))
while (stack.length) { while (stack.length) {
const curr = stack.shift(); const curr = stack.shift()
if (curr.name == val) { if (curr.name == val) {
return this.$refs.multipleSelectTree.setChecked(curr.id, false); return this.$refs.multipleSelectTree.setChecked(curr.id, false)
} }
if (curr.children && curr.children.length) { if (curr.children && curr.children.length) {
stack.unshift(...curr.children); stack.unshift(...curr.children)
} }
} }
}, },
...@@ -453,26 +453,26 @@ ...@@ -453,26 +453,26 @@
// 点击叶子节点 // 点击叶子节点
selectTreeNodeClick(data, node, el) { selectTreeNodeClick(data, node, el) {
if (data.rank >= this.selectLevel) { if (data.rank >= this.selectLevel) {
this.singleSelectTreeVal = data.name; this.singleSelectTreeVal = data.name
this.singleSelectTreeKey = data.id; this.singleSelectTreeKey = data.id
this.$refs.singleTree.blur(); this.$refs.singleTree.blur()
} }
}, },
// 节点选中操作 // 节点选中操作
multipleSelectTreeCheckNode(data, node, el) { multipleSelectTreeCheckNode(data, node, el) {
const checkedNodes = this.$refs.multipleSelectTree.getCheckedNodes(); const checkedNodes = this.$refs.multipleSelectTree.getCheckedNodes()
const keyArr = []; const keyArr = []
const valueArr = []; const valueArr = []
checkedNodes.forEach((item) => { checkedNodes.forEach((item) => {
if (item.rank >= this.selectLevel) { if (item.rank >= this.selectLevel) {
keyArr.push(item.id); keyArr.push(item.id)
valueArr.push(item.name); valueArr.push(item.name)
} }
}); })
this.multipleSelectTreeVal = valueArr; this.multipleSelectTreeVal = valueArr
this.multipleSelectTreeKey = keyArr.join(","); this.multipleSelectTreeKey = keyArr.join(',')
}, },
/* 单选/多选树方法-------------------结束 */ /* 单选/多选树方法-------------------结束 */
}, },
}; }
</script> </script>
...@@ -15,20 +15,20 @@ ...@@ -15,20 +15,20 @@
</template> </template>
<script> <script>
import VabUpload from "@/components/VabUpload"; import VabUpload from '@/components/VabUpload'
export default { export default {
name: "Upload", name: 'Upload',
components: { components: {
VabUpload, VabUpload,
}, },
data() { data() {
return {}; return {}
}, },
methods: { methods: {
handleShow(data) { handleShow(data) {
this.$refs["vabUpload"].handleShow(data); this.$refs['vabUpload'].handleShow(data)
}, },
}, },
}; }
</script> </script>
...@@ -12,24 +12,24 @@ ...@@ -12,24 +12,24 @@
</template> </template>
<script> <script>
import VabVerify from "@/plugins/vabVerify"; import VabVerify from '@/plugins/vabVerify'
export default { export default {
name: "Verify", name: 'Verify',
components: { VabVerify }, components: { VabVerify },
data() { data() {
return { return {
text: "向右滑动", text: '向右滑动',
}; }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
handleSuccess() { handleSuccess() {
this.$baseMessage("校验成功", "success"); this.$baseMessage('校验成功', 'success')
}, },
handleError() { handleError() {
this.$baseMessage("校验失败", "error"); this.$baseMessage('校验失败', 'error')
}, },
}, },
}; }
</script> </script>
...@@ -27,61 +27,61 @@ ...@@ -27,61 +27,61 @@
<script> <script>
export default { export default {
name: "WebSocket", name: 'WebSocket',
components: {}, components: {},
data() { data() {
return { return {
url: "ws://123.207.136.134:9010/ajaxchattest", url: 'ws://123.207.136.134:9010/ajaxchattest',
webSocket: null, webSocket: null,
data: [], data: [],
status: "", status: '',
form: { message: null }, form: { message: null },
rules: { rules: {
message: [{ required: true, message: "请输入消息", trigger: "blur" }], message: [{ required: true, message: '请输入消息', trigger: 'blur' }],
}, },
}; }
}, },
created() { created() {
this.init(); this.init()
}, },
destroyed() { destroyed() {
this.webSocket.close(); this.webSocket.close()
}, },
methods: { methods: {
submit() { submit() {
this.$refs["form"].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.send(this.form.message); this.send(this.form.message)
} else { } else {
return false; return false
} }
}); })
}, },
init() { init() {
const wsuri = this.url; const wsuri = this.url
this.webSocket = new WebSocket(wsuri); this.webSocket = new WebSocket(wsuri)
this.webSocket.onmessage = this.onmessage; this.webSocket.onmessage = this.onmessage
this.webSocket.onopen = this.onopen; this.webSocket.onopen = this.onopen
this.webSocket.onerror = this.onerror; this.webSocket.onerror = this.onerror
this.webSocket.onclose = this.onclose; this.webSocket.onclose = this.onclose
}, },
onopen() { onopen() {
this.status = "成功"; this.status = '成功'
}, },
onerror() { onerror() {
this.status = "失败"; this.status = '失败'
this.initWebSocket(); this.initWebSocket()
}, },
onmessage({ data }) { onmessage({ data }) {
//截掉测试webSocket地址广告 //截掉测试webSocket地址广告
this.data.push(data.substring(0, data.length - 66)); this.data.push(data.substring(0, data.length - 66))
}, },
send(Data) { send(Data) {
this.webSocket.send(Data); this.webSocket.send(Data)
}, },
onclose(e) { onclose(e) {
this.status = "断开"; this.status = '断开'
}, },
}, },
}; }
</script> </script>
const path = require("path"); const path = require('path')
const { const {
publicPath, publicPath,
assetsDir, assetsDir,
...@@ -11,33 +11,29 @@ const { ...@@ -11,33 +11,29 @@ const {
providePlugin, providePlugin,
build7z, build7z,
donation, donation,
} = require("./src/config/settings"); } = require('./src/config/settings')
const { const { webpackBarName, webpackBanner, donationConsole } = require('zx-layouts')
webpackBarName,
webpackBanner,
donationConsole,
} = require("zx-layouts");
if (donation) donationConsole(); if (donation) donationConsole()
const { version, author } = require("./package.json"); const { version, author } = require('./package.json')
const Webpack = require("webpack"); const Webpack = require('webpack')
const WebpackBar = require("webpackbar"); const WebpackBar = require('webpackbar')
const FileManagerPlugin = require("filemanager-webpack-plugin"); const FileManagerPlugin = require('filemanager-webpack-plugin')
const dayjs = require("dayjs"); const dayjs = require('dayjs')
const date = dayjs().format("YYYY_M_D"); const date = dayjs().format('YYYY_M_D')
const time = dayjs().format("YYYY-M-D HH:mm:ss"); const time = dayjs().format('YYYY-M-D HH:mm:ss')
const productionGzipExtensions = ["html", "js", "css", "svg"]; const productionGzipExtensions = ['html', 'js', 'css', 'svg']
process.env.VUE_APP_TITLE = title || "vue-admin-beautiful"; process.env.VUE_APP_TITLE = title || 'vue-admin-beautiful'
process.env.VUE_APP_AUTHOR = author || "chuzhixin 1204505056@qq.com"; process.env.VUE_APP_AUTHOR = author || 'chuzhixin 1204505056@qq.com'
process.env.VUE_APP_UPDATE_TIME = time; process.env.VUE_APP_UPDATE_TIME = time
process.env.VUE_APP_VERSION = version; process.env.VUE_APP_VERSION = version
const resolve = (dir) => path.join(__dirname, dir); const resolve = (dir) => path.join(__dirname, dir)
const mockServer = () => { const mockServer = () => {
if (process.env.NODE_ENV === "development") if (process.env.NODE_ENV === 'development')
return require("./mock/mockServer.js"); return require('./mock/mockServer.js')
else return ""; else return ''
}; }
module.exports = { module.exports = {
publicPath, publicPath,
...@@ -60,7 +56,7 @@ module.exports = { ...@@ -60,7 +56,7 @@ module.exports = {
return { return {
resolve: { resolve: {
alias: { alias: {
"@": resolve("src"), '@': resolve('src'),
}, },
}, },
plugins: [ plugins: [
...@@ -69,82 +65,82 @@ module.exports = { ...@@ -69,82 +65,82 @@ module.exports = {
name: webpackBarName, name: webpackBarName,
}), }),
], ],
}; }
}, },
chainWebpack(config) { chainWebpack(config) {
config.plugins.delete("preload"); config.plugins.delete('preload')
config.plugins.delete("prefetch"); config.plugins.delete('prefetch')
config.module config.module
.rule("svg") .rule('svg')
.exclude.add(resolve("src/remixIcon")) .exclude.add(resolve('src/remixIcon'))
.add(resolve("src/colorfulIcon")) .add(resolve('src/colorfulIcon'))
.end(); .end()
config.module config.module
.rule("remixIcon") .rule('remixIcon')
.test(/\.svg$/) .test(/\.svg$/)
.include.add(resolve("src/remixIcon")) .include.add(resolve('src/remixIcon'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({ symbolId: 'remix-icon-[name]' })
.end() .end()
.use("svg-sprite-loader")
.loader("svg-sprite-loader")
.options({ symbolId: "remix-icon-[name]" })
.end();
config.module config.module
.rule("colorfulIcon") .rule('colorfulIcon')
.test(/\.svg$/) .test(/\.svg$/)
.include.add(resolve("src/colorfulIcon")) .include.add(resolve('src/colorfulIcon'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({ symbolId: 'colorful-icon-[name]' })
.end() .end()
.use("svg-sprite-loader")
.loader("svg-sprite-loader")
.options({ symbolId: "colorful-icon-[name]" })
.end();
/* config.when(process.env.NODE_ENV === "development", (config) => { /* config.when(process.env.NODE_ENV === "development", (config) => {
config.devtool("source-map"); config.devtool("source-map");
}); */ }); */
config.when(process.env.NODE_ENV !== "development", (config) => { config.when(process.env.NODE_ENV !== 'development', (config) => {
config.performance.set("hints", false); config.performance.set('hints', false)
config.devtool("none"); config.devtool('none')
config.optimization.splitChunks({ config.optimization.splitChunks({
chunks: "all", chunks: 'all',
cacheGroups: { cacheGroups: {
libs: { libs: {
name: "chunk-libs", name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
priority: 10, priority: 10,
chunks: "initial", chunks: 'initial',
}, },
elementUI: { elementUI: {
name: "chunk-elementUI", name: 'chunk-elementUI',
priority: 20, priority: 20,
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, test: /[\\/]node_modules[\\/]_?element-ui(.*)/,
}, },
fortawesome: { fortawesome: {
name: "chunk-fortawesome", name: 'chunk-fortawesome',
priority: 20, priority: 20,
test: /[\\/]node_modules[\\/]_?@fortawesome(.*)/, test: /[\\/]node_modules[\\/]_?@fortawesome(.*)/,
}, },
}, },
}); })
config config
.plugin("banner") .plugin('banner')
.use(Webpack.BannerPlugin, [`${webpackBanner}${time}`]) .use(Webpack.BannerPlugin, [`${webpackBanner}${time}`])
.end(); .end()
config.module config.module
.rule("images") .rule('images')
.use("image-webpack-loader") .use('image-webpack-loader')
.loader("image-webpack-loader") .loader('image-webpack-loader')
.options({ .options({
bypassOnDebug: true, bypassOnDebug: true,
}) })
.end(); .end()
}); })
if (build7z) { if (build7z) {
config.when(process.env.NODE_ENV === "production", (config) => { config.when(process.env.NODE_ENV === 'production', (config) => {
config config
.plugin("fileManager") .plugin('fileManager')
.use(FileManagerPlugin, [ .use(FileManagerPlugin, [
{ {
onEnd: { onEnd: {
...@@ -158,8 +154,8 @@ module.exports = { ...@@ -158,8 +154,8 @@ module.exports = {
}, },
}, },
]) ])
.end(); .end()
}); })
} }
}, },
runtimeCompiler: true, runtimeCompiler: true,
...@@ -174,16 +170,16 @@ module.exports = { ...@@ -174,16 +170,16 @@ module.exports = {
/*sass-loader 9.0写法,感谢github用户 shaonialife*/ /*sass-loader 9.0写法,感谢github用户 shaonialife*/
additionalData(content, loaderContext) { additionalData(content, loaderContext) {
const { resourcePath, rootContext } = loaderContext; const { resourcePath, rootContext } = loaderContext
const relativePath = path.relative(rootContext, resourcePath); const relativePath = path.relative(rootContext, resourcePath)
if ( if (
relativePath.replace(/\\/g, "/") !== "src/styles/variables.scss" relativePath.replace(/\\/g, '/') !== 'src/styles/variables.scss'
) { ) {
return '@import "~@/styles/variables.scss";' + content; return '@import "~@/styles/variables.scss";' + content
} }
return content; return content
}, },
}, },
}, },
}, },
}; }
"use strict"; 'use strict'
const webpackConfig = require("@vue/cli-service/webpack.config.js"); const webpackConfig = require('@vue/cli-service/webpack.config.js')
module.exports = webpackConfig; module.exports = webpackConfig
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment