Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
gin-vue-admin
提交
bd127e67
G
gin-vue-admin
项目概览
飞鱼0526
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bd127e67
编写于
6月 11, 2021
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
格式化前端代码
上级
ea05f230
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
97 addition
and
97 deletion
+97
-97
web/src/core/element_lazy.js
web/src/core/element_lazy.js
+52
-52
web/src/core/gin-vue-admin.js
web/src/core/gin-vue-admin.js
+3
-3
web/src/main.js
web/src/main.js
+1
-1
web/src/view/systemTools/autoCode/component/previewCodeDialg.vue
.../view/systemTools/autoCode/component/previewCodeDialg.vue
+41
-41
未找到文件。
web/src/core/element_lazy.js
浏览文件 @
bd127e67
...
...
@@ -8,57 +8,57 @@
import
Vue
from
'
vue
'
// 按需引入element
import
{
Button
,
Select
,
Dialog
,
Form
,
Input
,
FormItem
,
Option
,
Loading
,
Message
,
Container
,
Card
,
Dropdown
,
DropdownMenu
,
DropdownItem
,
Row
,
Col
,
Menu
,
Submenu
,
MenuItem
,
Aside
,
Main
,
Badge
,
Header
,
Tabs
,
Breadcrumb
,
BreadcrumbItem
,
Scrollbar
,
Avatar
,
TabPane
,
Divider
,
Table
,
TableColumn
,
Cascader
,
Checkbox
,
CheckboxGroup
,
Pagination
,
Tag
,
Drawer
,
Tree
,
Popover
,
Switch
,
Collapse
,
CollapseItem
,
Tooltip
,
DatePicker
,
InputNumber
,
Steps
,
Upload
,
Progress
,
MessageBox
,
Image
Button
,
Select
,
Dialog
,
Form
,
Input
,
FormItem
,
Option
,
Loading
,
Message
,
Container
,
Card
,
Dropdown
,
DropdownMenu
,
DropdownItem
,
Row
,
Col
,
Menu
,
Submenu
,
MenuItem
,
Aside
,
Main
,
Badge
,
Header
,
Tabs
,
Breadcrumb
,
BreadcrumbItem
,
Scrollbar
,
Avatar
,
TabPane
,
Divider
,
Table
,
TableColumn
,
Cascader
,
Checkbox
,
CheckboxGroup
,
Pagination
,
Tag
,
Drawer
,
Tree
,
Popover
,
Switch
,
Collapse
,
CollapseItem
,
Tooltip
,
DatePicker
,
InputNumber
,
Steps
,
Upload
,
Progress
,
MessageBox
,
Image
}
from
'
element-ui
'
Vue
.
use
(
Button
)
...
...
@@ -116,4 +116,4 @@ Vue.prototype.$message = Message
Vue
.
prototype
.
$confirm
=
MessageBox
.
confirm
Dialog
.
props
.
closeOnClickModal
.
default
=
false
console
.
warn
(
'
[GIN-VUE-ADMIN]--按需加载elementUI成功
'
)
\ No newline at end of file
console
.
warn
(
'
[GIN-VUE-ADMIN]--按需加载elementUI成功,如出现element-ui组件无法使用问题,请至/src/core/element_lazy 下引入对应组件即可
'
)
web/src/core/gin-vue-admin.js
浏览文件 @
bd127e67
...
...
@@ -3,7 +3,7 @@
*
* */
import
Vue
from
'
vue
'
import
'
./element_lazy
'
import
'
./element_lazy
'
// 按需加载element
import
uploader
from
'
vue-simple-uploader
'
import
APlayer
from
'
@moefe/vue-aplayer
'
// time line css
...
...
@@ -12,8 +12,8 @@ import '../../node_modules/timeline-vuejs/dist/timeline-vuejs.css'
import
Bus
from
'
@/utils/bus
'
Vue
.
use
(
Bus
)
Vue
.
use
(
APlayer
,
{
defaultCover
:
'
https://github.com/u3u.png
'
,
productionTip
:
true
defaultCover
:
'
https://github.com/u3u.png
'
,
productionTip
:
true
})
Vue
.
use
(
uploader
)
...
...
web/src/main.js
浏览文件 @
bd127e67
import
Vue
from
'
vue
'
import
App
from
'
./App.vue
'
// 引入gin-vue-admin前端
组件
// 引入gin-vue-admin前端
初始化相关内容
import
'
./core/gin-vue-admin
'
// 引入封装的router
import
router
from
'
@/router/index
'
...
...
web/src/view/systemTools/autoCode/component/previewCodeDialg.vue
浏览文件 @
bd127e67
...
...
@@ -6,60 +6,37 @@
<el-button
@
click=
"copy"
>
复制
</el-button>
</div>
<el-tabs
v-model=
"activeName"
>
<el-tab-pane
:label=
"key"
:name=
"key"
v-for=
"(item, key) in previewCode"
:key
=
"key"
>
<div
class=
"tab-info"
:id=
"key"
></div
>
<el-tab-pane
v-for=
"(item, key) in previewCode"
:key=
"key"
:label=
"key"
:name
=
"key"
>
<div
:id=
"key"
class=
"tab-info"
/
>
</el-tab-pane>
</el-tabs>
</div>
</
template
>
<
script
>
import
marked
from
"
marked
"
;
import
hljs
from
"
highlight.js
"
;
import
marked
from
'
marked
'
import
hljs
from
'
highlight.js
'
// import 'highlight.js/styles/atelier-cave-light.css';
import
"
highlight.js/styles/atelier-plateau-light.css
"
;
import
'
highlight.js/styles/atelier-plateau-light.css
'
export
default
{
props
:
{
previewCode
:
{
type
:
Object
,
default
()
{
return
{}
;
}
,
}
,
return
{}
}
}
},
data
()
{
return
{
activeName
:
""
,
};
},
methods
:
{
selectText
()
{
const
element
=
document
.
getElementById
(
this
.
activeName
);
if
(
document
.
body
.
createTextRange
)
{
let
range
=
document
.
body
.
createTextRange
();
range
.
moveToElementText
(
element
);
range
.
select
();
}
else
if
(
window
.
getSelection
)
{
let
selection
=
window
.
getSelection
();
let
range
=
document
.
createRange
();
range
.
selectNodeContents
(
element
);
selection
.
removeAllRanges
();
selection
.
addRange
(
range
);
}
else
{
alert
(
"
none
"
);
}
},
copy
()
{
this
.
selectText
();
document
.
execCommand
(
"
copy
"
);
this
.
$message
.
success
(
"
复制成功
"
);
},
activeName
:
''
}
},
mounted
()
{
marked
.
setOptions
({
renderer
:
new
marked
.
Renderer
(),
highlight
:
function
(
code
)
{
return
hljs
.
highlightAuto
(
code
).
value
;
highlight
:
function
(
code
)
{
return
hljs
.
highlightAuto
(
code
).
value
},
pedantic
:
false
,
gfm
:
true
,
...
...
@@ -68,16 +45,39 @@ export default {
sanitize
:
false
,
smartLists
:
true
,
smartypants
:
false
,
xhtml
:
false
,
})
;
xhtml
:
false
})
for
(
const
key
in
this
.
previewCode
)
{
if
(
this
.
activeName
==
""
)
{
this
.
activeName
=
key
;
if
(
this
.
activeName
==
=
''
)
{
this
.
activeName
=
key
}
document
.
getElementById
(
key
).
innerHTML
=
marked
(
this
.
previewCode
[
key
])
;
document
.
getElementById
(
key
).
innerHTML
=
marked
(
this
.
previewCode
[
key
])
}
},
};
methods
:
{
selectText
()
{
const
element
=
document
.
getElementById
(
this
.
activeName
)
if
(
document
.
body
.
createTextRange
)
{
const
range
=
document
.
body
.
createTextRange
()
range
.
moveToElementText
(
element
)
range
.
select
()
}
else
if
(
window
.
getSelection
)
{
const
selection
=
window
.
getSelection
()
const
range
=
document
.
createRange
()
range
.
selectNodeContents
(
element
)
selection
.
removeAllRanges
()
selection
.
addRange
(
range
)
}
else
{
alert
(
'
none
'
)
}
},
copy
()
{
this
.
selectText
()
document
.
execCommand
(
'
copy
'
)
this
.
$message
.
success
(
'
复制成功
'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录