Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
component
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
purplevin
component
Commits
13eb67b1
Commit
13eb67b1
authored
Feb 10, 2023
by
erichsieh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 更新lib
parent
701af2f5
Pipeline
#4638
passed with stage
in 12 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
161 additions
and
176 deletions
+161
-176
package-lock.json
package-lock.json
+4
-4
package.json
package.json
+1
-1
packages/convertTool/src/components/WordGrabPic.vue
packages/convertTool/src/components/WordGrabPic.vue
+156
-171
No files found.
package-lock.json
View file @
13eb67b1
{
"name"
:
"@purplevin/component"
,
"version"
:
"0.1.2
2
"
,
"version"
:
"0.1.2
3
"
,
"lockfileVersion"
:
2
,
"requires"
:
true
,
"packages"
:
{
""
:
{
"name"
:
"@purplevin/component"
,
"version"
:
"0.1.2
2
"
,
"version"
:
"0.1.2
3
"
,
"dependencies"
:
{
"axios"
:
"^0.27.2"
,
"core-js"
:
"^3.6.5"
,
...
...
@@ -6342,7 +6342,7 @@
},
"node_modules/file-saver"
:
{
"version"
:
"2.0.5"
,
"resolved"
:
"https://registry.npm
mirror.com
/file-saver/-/file-saver-2.0.5.tgz"
,
"resolved"
:
"https://registry.npm
js.org
/file-saver/-/file-saver-2.0.5.tgz"
,
"integrity"
:
"sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
},
"node_modules/file-uri-to-path"
:
{
...
...
@@ -19537,7 +19537,7 @@
},
"file-saver"
:
{
"version"
:
"2.0.5"
,
"resolved"
:
"https://registry.npm
mirror.com
/file-saver/-/file-saver-2.0.5.tgz"
,
"resolved"
:
"https://registry.npm
js.org
/file-saver/-/file-saver-2.0.5.tgz"
,
"integrity"
:
"sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
},
"file-uri-to-path"
:
{
...
...
package.json
View file @
13eb67b1
{
"name"
:
"@purplevin/component"
,
"version"
:
"0.1.2
2
"
,
"version"
:
"0.1.2
3
"
,
"private"
:
false
,
"main"
:
"lib/index.umd.min.js"
,
"scripts"
:
{
...
...
packages/convertTool/src/components/WordGrabPic.vue
View file @
13eb67b1
<
template
>
<div>
<div>
<h3>
word抓取图片
</h3>
<el-alert
title=
"此功能将协助您将word内的图片进行抓取"
type=
"info"
/>
<br>
...
...
@@ -7,19 +7,9 @@
<el-row>
<el-col
:span=
"16"
>
<el-form-item
label=
"文档"
prop=
"file"
>
<el-upload
ref=
"upload"
class=
"upload-demo"
drag
:limit=
"1"
:file-list=
"fileList"
:action=
"uploadURL"
:on-change=
"handelFileChange"
:on-remove=
"handleFileRemove"
:on-exceed=
"handleExceed"
:auto-upload=
"false"
accept=
"application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<el-upload
ref=
"upload"
class=
"upload-demo"
drag
:limit=
"1"
:file-list=
"fileList"
:action=
"uploadURL"
:on-change=
"handelFileChange"
:on-remove=
"handleFileRemove"
:on-exceed=
"handleExceed"
:auto-upload=
"false"
accept=
"application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<i
class=
"el-icon-upload"
/>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em>
...
...
@@ -27,7 +17,7 @@
</el-upload>
</el-form-item>
<el-form-item
label=
"最大宽度:"
>
<el-input
v-model=
"form.MaxWidthCm"
style=
"width:358px"
></el-input>
<el-input
v-model=
"form.MaxWidthCm"
style=
"width:358px"
></el-input>
</el-form-item>
<el-form-item
label=
"最大高度:"
>
<el-input
v-model=
"form.MaxHeightCm"
style=
"width:358px"
></el-input>
...
...
@@ -40,25 +30,20 @@
</el-row>
<el-row>
<el-col
:span=
"12"
:offset=
"10"
>
<el-button
style=
"margin-left: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload"
>
<el-button
style=
"margin-left: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload"
>
下载档案
</el-button>
</el-col>
</el-row>
</el-form>
</div>
</div>
</
template
>
<
script
>
import
{
fetchWordPic
}
from
"
@api/convertApi
"
import
{
fetchWordPic
}
from
"
@api/convertApi
"
import
{
saveAs
}
from
'
file-saver
'
export
default
{
name
:
'
GrabPic
'
,
data
:
function
()
{
name
:
'
GrabPic
'
,
data
:
function
()
{
return
{
form
:
{
MaxWidthCm
:
''
,
...
...
@@ -69,13 +54,13 @@ data: function() {
uploadURL
:
'
Aspose/GetWordAllPic
'
,
fileList
:
[]
}
},
props
:
{
baseUrl
:
{
},
props
:
{
baseUrl
:
{
type
:
String
}
},
methods
:
{
},
methods
:
{
// 上传到服务器
async
submitUpload
()
{
if
(
this
.
fileList
.
length
<=
0
)
{
...
...
@@ -88,8 +73,8 @@ methods: {
formData
.
append
(
'
MaxWidthCm
'
,
this
.
form
.
MaxWidthCm
)
formData
.
append
(
'
MaxHeightCm
'
,
this
.
form
.
MaxHeightCm
)
formData
.
append
(
'
Dpi
'
,
this
.
form
.
Dpi
)
await
fetchWordPic
(
this
.
baseUrl
,
formData
).
then
(
res
=>
{
await
fetchWordPic
(
this
.
baseUrl
,
formData
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
saveAs
(
blob
,
`
${
this
.
fileList
[
0
].
name
}
.zip`
)
this
.
$message
({
...
...
@@ -178,6 +163,6 @@ methods: {
this
.
$refs
[
'
rebateUpload
'
].
handleStart
(
files
[
0
])
// 选择文件后的赋值方法
}
}
}
}
</
script
>
\ No newline at end of file
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