Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-easy-ui
Project
Project
Details
Activity
Releases
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
easyUI
hls-easy-ui
Commits
a645de15
Commit
a645de15
authored
Apr 22, 2021
by
nature
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
placeholder 处理
parent
eb2927a1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
hField.less
packages/common/styles/hField.less
+3
-3
index.vue
packages/components/DateField/index.vue
+1
-0
SelectField.vue
packages/components/Select/SelectField.vue
+4
-3
index.vue
packages/components/Select/index.vue
+13
-12
No files found.
packages/common/styles/hField.less
View file @
a645de15
...
...
@@ -36,7 +36,7 @@
.field-title {
line-height: 25px;
font-size: 1
4
px;
font-size: 1
2
px;
color: #333;
letter-spacing: 0;
margin-right: 12px;
...
...
@@ -47,7 +47,7 @@
position: absolute;
left: 8px;
color: #D24E4E;
font-size: 1
4
px;
font-size: 1
2
px;
content: '*';
}
}
...
...
@@ -66,7 +66,7 @@
.field-control {
display: block;
box-sizing: border-box;
font-size: 1
4
px;
font-size: 1
2
px;
width: 100%;
min-width: 0;
margin: 0;
...
...
packages/components/DateField/index.vue
View file @
a645de15
...
...
@@ -15,6 +15,7 @@
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<input
ref=
"fieldInput"
v-bind=
"$attrs"
v-model=
"value"
:disabled=
"disabled"
:placeholder=
"dataPlaceholder"
:class=
"('field-control-'+inputAlign)"
class=
"field-control"
...
...
packages/components/Select/SelectField.vue
View file @
a645de15
...
...
@@ -15,9 +15,10 @@
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<input
v-bind=
"$attrs"
v-model=
"codeName"
:disabled=
"disabled"
:placeholder=
"selectPlaceholder"
:class=
"('field-control-'+inputAlign)"
type=
"text"
class=
"field-control"
ref=
"fieldInput"
v-bind=
"$attrs"
v-model=
"codeName"
:disabled=
"disabled"
:placeholder=
"selectPlaceholder"
:class=
"('field-control-'+inputAlign)"
type=
"text"
class=
"field-control"
readonly
@
click=
"showSelect"
@
blur=
"onBlur"
>
...
...
packages/components/Select/index.vue
View file @
a645de15
...
...
@@ -15,9 +15,10 @@
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<input
v-bind=
"$attrs"
v-model=
"codeName"
:disabled=
"disabled"
:placeholder=
"selectPlaceholder"
:class=
"('field-control-'+inputAlign)"
type=
"text"
class=
"field-control"
ref=
"fieldInput"
v-bind=
"$attrs"
v-model=
"codeName"
:disabled=
"disabled"
:placeholder=
"selectPlaceholder"
:class=
"('field-control-'+inputAlign)"
type=
"text"
class=
"field-control"
readonly
@
click=
"showSelect"
@
blur=
"onBlur"
>
...
...
@@ -215,7 +216,7 @@ export default {
getLovCode
()
{
let
vm
=
this
const
tenantId
=
localStorage
.
getItem
(
'tenantId'
)
let
url
=
`
${
process
.
env
.
VUE_APP_API_HOST
}
/hpfm/v1/
${
tenantId
}
/lov-view/info?viewCode=
${
vm
.
lovCode
}
&t=
${
new
Date
().
getTime
()}
`
let
url
=
`
${
process
.
env
.
VUE_APP_API_HOST
}
/hpfm/v1/
${
tenantId
}
/lov-view/info?viewCode=
${
vm
.
lovCode
}
&t=
${
Math
.
random
()}
`
let
headers
=
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
'Bearer '
+
window
.
localStorage
.
access_token
,
...
...
@@ -225,7 +226,7 @@ export default {
}).
then
((
res
)
=>
{
if
(
res
.
queryUrl
)
{
const
queryUrl
=
res
.
queryUrl
let
lovUrl
=
`
${
process
.
env
.
VUE_APP_API_HOST
}${
queryUrl
}
?lovCode=
${
this
.
lovCode
}
&page=0&size=99&t=
${
new
Date
().
getTime
()}
`
let
lovUrl
=
`
${
process
.
env
.
VUE_APP_API_HOST
}${
queryUrl
}
?lovCode=
${
this
.
lovCode
}
&page=0&size=99&t=
${
Math
.
random
()}
`
axios
.
get
(
lovUrl
,
{
headers
:
headers
,
}).
then
((
res
)
=>
{
...
...
@@ -241,7 +242,7 @@ export default {
getLookUpCode
()
{
let
vm
=
this
const
tenantId
=
localStorage
.
getItem
(
'tenantId'
)
let
url
=
`
${
process
.
env
.
VUE_APP_API_HOST
}
/hpfm/v1/
${
tenantId
}
/lovs/data?lovCode=
${
vm
.
lookUpCode
}
&t=
${
new
Date
().
getTime
()}
`
let
url
=
`
${
process
.
env
.
VUE_APP_API_HOST
}
/hpfm/v1/
${
tenantId
}
/lovs/data?lovCode=
${
vm
.
lookUpCode
}
&t=
${
Math
.
random
()}
`
axios
.
get
(
url
,
{
headers
:
{
'Content-Type'
:
'application/json'
,
...
...
@@ -281,12 +282,12 @@ export default {
if
(
!
vm
.
disabled
)
{
let
array
=
(
vm
.
lookUpCode
||
vm
.
lovCode
)
?
vm
.
arrayList
:
vm
.
dataArray
let
list
=
[]
array
.
forEach
((
dat
e
,
index
,
array
)
=>
{
list
.
push
({
value
:
dat
e
[
vm
.
valueKey
],
name
:
dat
e
[
vm
.
valueName
],
parent
:
dat
e
.
parent
,
})
array
.
forEach
((
dat
a
,
index
,
array
)
=>
{
list
.
push
(
Object
.
assign
(
{
value
:
dat
a
[
vm
.
valueKey
],
name
:
dat
a
[
vm
.
valueName
],
parent
:
dat
a
.
parent
,
}
,
data
)
)
})
VueSelect
.
show
({
list
:
list
,
...
...
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