Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
66dd1ad9
Commit
66dd1ad9
authored
Nov 23, 2021
by
叶富雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
指定字符需要base64
parent
c2c9316c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
src/components/form.vue
+14
-5
No files found.
src/components/form.vue
View file @
66dd1ad9
...
...
@@ -881,6 +881,14 @@ export default {
type
:
Object
,
default
:
()
=>
{},
},
fileBase64
:
{
type
:
Object
,
default
:
()
=>
{},
},
base64Transform
:
{
type
:
Boolean
,
default
:
false
,
},
propTitle
:
String
,
pageBs
:
String
,
},
...
...
@@ -890,11 +898,9 @@ export default {
rules
:
{},
propFormField
:
this
.
formField
,
formLabelAlign
:
this
.
formLabelAligns
,
rules
:
{},
fileLists
:
{},
imageUrl
:
{},
shade
:
false
,
fileBase64
:
''
};
},
created
()
{
...
...
@@ -1405,9 +1411,12 @@ export default {
);
// debugger;
if
(
item
.
type
==
"photo"
)
{
this
.
getBase64
(
file
.
raw
).
then
((
resBase64
)
=>
{
this
.
fileBase64
=
resBase64
.
split
(
","
)[
1
];
//直接拿到base64信息
});
if
(
this
.
base64Transform
){
this
.
getBase64
(
file
.
raw
).
then
((
resBase64
)
=>
{
this
.
fileBase64
[
item
.
id
]
=
resBase64
.
split
(
","
)[
1
];
//直接拿到base64信息
this
.
$emit
(
"onBase64Transform"
,
this
.
fileBase64
);
});
}
if
(
isJPG
)
{
this
.
$set
(
self
.
imageUrl
,
item
.
id
,
file
.
raw
);
this
.
$set
(
...
...
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