Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
56fa3912
Commit
56fa3912
authored
Jan 05, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复IE11浏览器报错问题
parent
2116ee18
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
8 deletions
+19
-8
ruoyi-ui/package.json
ruoyi-ui/package.json
+2
-2
ruoyi-ui/src/components/HeaderSearch/index.vue
ruoyi-ui/src/components/HeaderSearch/index.vue
+1
-1
ruoyi-ui/src/main.js
ruoyi-ui/src/main.js
+0
-4
ruoyi-ui/src/views/tool/gen/index.vue
ruoyi-ui/src/views/tool/gen/index.vue
+16
-1
No files found.
ruoyi-ui/package.json
View file @
56fa3912
...
...
@@ -44,7 +44,7 @@
"element-ui"
:
"2.14.1"
,
"file-saver"
:
"2.0.4"
,
"fuse.js"
:
"6.4.3"
,
"highlight.js"
:
"
10.4.1
"
,
"highlight.js"
:
"
9.18.5
"
,
"js-beautify"
:
"1.13.0"
,
"js-cookie"
:
"2.2.1"
,
"jsencrypt"
:
"3.0.0-rc.1"
,
...
...
@@ -69,8 +69,8 @@
"eslint"
:
"7.15.0"
,
"eslint-plugin-vue"
:
"7.2.0"
,
"lint-staged"
:
"10.5.3"
,
"sass"
:
"1.30.0"
,
"runjs"
:
"4.4.2"
,
"sass"
:
"1.32.0"
,
"sass-loader"
:
"10.1.0"
,
"script-ext-html-webpack-plugin"
:
"2.1.5"
,
"svg-sprite-loader"
:
"5.1.1"
,
...
...
ruoyi-ui/src/components/HeaderSearch/index.vue
View file @
56fa3912
...
...
@@ -20,7 +20,7 @@
<
script
>
// fuse is a lightweight fuzzy-search module
// make search results more in line with expectations
import
Fuse
from
'
fuse.js
'
import
Fuse
from
'
fuse.js
/dist/fuse.min.js
'
import
path
from
'
path
'
export
default
{
...
...
ruoyi-ui/src/main.js
View file @
56fa3912
...
...
@@ -20,9 +20,6 @@ import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels,
import
Pagination
from
"
@/components/Pagination
"
;
// 自定义表格工具扩展
import
RightToolbar
from
"
@/components/RightToolbar
"
// 代码高亮插件
import
hljs
from
'
highlight.js
'
import
'
highlight.js/styles/github-gist.css
'
// 全局方法挂载
Vue
.
prototype
.
getDicts
=
getDicts
...
...
@@ -52,7 +49,6 @@ Vue.component('Pagination', Pagination)
Vue
.
component
(
'
RightToolbar
'
,
RightToolbar
)
Vue
.
use
(
permission
)
Vue
.
use
(
hljs
.
vuePlugin
);
/**
* If you don't want to use mock-server
...
...
ruoyi-ui/src/views/tool/gen/index.vue
View file @
56fa3912
...
...
@@ -169,7 +169,7 @@
:name=
"key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))"
:key=
"key"
>
<
highlightjs
autodetect
:code=
"value"
/
>
<
pre><code
class=
"hljs"
v-html=
"highlightedCode(value, key)"
></code></pre
>
</el-tab-pane>
</el-tabs>
</el-dialog>
...
...
@@ -181,6 +181,14 @@
import
{
listTable
,
previewTable
,
delTable
,
genCode
,
synchDb
}
from
"
@/api/tool/gen
"
;
import
importTable
from
"
./importTable
"
;
import
{
downLoadZip
}
from
"
@/utils/zipdownload
"
;
import
hljs
from
"
highlight.js/lib/highlight
"
;
import
"
highlight.js/styles/github-gist.css
"
;
hljs
.
registerLanguage
(
"
java
"
,
require
(
"
highlight.js/lib/languages/java
"
));
hljs
.
registerLanguage
(
"
xml
"
,
require
(
"
highlight.js/lib/languages/xml
"
));
hljs
.
registerLanguage
(
"
html
"
,
require
(
"
highlight.js/lib/languages/xml
"
));
hljs
.
registerLanguage
(
"
vue
"
,
require
(
"
highlight.js/lib/languages/xml
"
));
hljs
.
registerLanguage
(
"
javascript
"
,
require
(
"
highlight.js/lib/languages/javascript
"
));
hljs
.
registerLanguage
(
"
sql
"
,
require
(
"
highlight.js/lib/languages/sql
"
));
export
default
{
name
:
"
Gen
"
,
...
...
@@ -294,6 +302,13 @@ export default {
this
.
preview
.
open
=
true
;
});
},
/** 高亮显示 */
highlightedCode
(
code
,
key
)
{
const
vmName
=
key
.
substring
(
key
.
lastIndexOf
(
"
/
"
)
+
1
,
key
.
indexOf
(
"
.vm
"
));
var
language
=
vmName
.
substring
(
vmName
.
indexOf
(
"
.
"
)
+
1
,
vmName
.
length
);
const
result
=
hljs
.
highlight
(
language
,
code
||
""
,
true
);
return
result
.
value
||
'
'
;
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
tableId
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment