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
Show 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 @@
...
@@ -36,7 +36,7 @@
.field-title {
.field-title {
line-height: 25px;
line-height: 25px;
font-size: 1
4
px;
font-size: 1
2
px;
color: #333;
color: #333;
letter-spacing: 0;
letter-spacing: 0;
margin-right: 12px;
margin-right: 12px;
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
position: absolute;
position: absolute;
left: 8px;
left: 8px;
color: #D24E4E;
color: #D24E4E;
font-size: 1
4
px;
font-size: 1
2
px;
content: '*';
content: '*';
}
}
}
}
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
.field-control {
.field-control {
display: block;
display: block;
box-sizing: border-box;
box-sizing: border-box;
font-size: 1
4
px;
font-size: 1
2
px;
width: 100%;
width: 100%;
min-width: 0;
min-width: 0;
margin: 0;
margin: 0;
...
...
packages/components/DateField/index.vue
View file @
a645de15
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<input
<input
ref=
"fieldInput"
v-bind=
"$attrs"
v-bind=
"$attrs"
v-model=
"value"
v-model=
"value"
:disabled=
"disabled"
:placeholder=
"dataPlaceholder"
:class=
"('field-control-'+inputAlign)"
class=
"field-control"
:disabled=
"disabled"
:placeholder=
"dataPlaceholder"
:class=
"('field-control-'+inputAlign)"
class=
"field-control"
...
...
packages/components/Select/SelectField.vue
View file @
a645de15
...
@@ -15,9 +15,10 @@
...
@@ -15,9 +15,10 @@
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<input
<input
v-bind=
"$attrs"
ref=
"fieldInput"
v-model=
"codeName"
:disabled=
"disabled"
:placeholder=
"selectPlaceholder"
:class=
"('field-control-'+inputAlign)"
v-bind=
"$attrs"
v-model=
"codeName"
:disabled=
"disabled"
:placeholder=
"selectPlaceholder"
type=
"text"
class=
"field-control"
:class=
"('field-control-'+inputAlign)"
type=
"text"
class=
"field-control"
readonly
readonly
@
click=
"showSelect"
@
click=
"showSelect"
@
blur=
"onBlur"
>
@
blur=
"onBlur"
>
...
...
packages/components/Select/index.vue
View file @
a645de15
...
@@ -15,9 +15,10 @@
...
@@ -15,9 +15,10 @@
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:style=
"
{'flex':proportion[1] }" class="field-value">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<div
:class=
"
{'field-control-error':hasError}" class="field-body">
<input
<input
v-bind=
"$attrs"
ref=
"fieldInput"
v-model=
"codeName"
:disabled=
"disabled"
:placeholder=
"selectPlaceholder"
:class=
"('field-control-'+inputAlign)"
v-bind=
"$attrs"
v-model=
"codeName"
:disabled=
"disabled"
:placeholder=
"selectPlaceholder"
type=
"text"
class=
"field-control"
:class=
"('field-control-'+inputAlign)"
type=
"text"
class=
"field-control"
readonly
readonly
@
click=
"showSelect"
@
click=
"showSelect"
@
blur=
"onBlur"
>
@
blur=
"onBlur"
>
...
@@ -215,7 +216,7 @@ export default {
...
@@ -215,7 +216,7 @@ export default {
getLovCode
()
{
getLovCode
()
{
let
vm
=
this
let
vm
=
this
const
tenantId
=
localStorage
.
getItem
(
'tenantId'
)
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
=
{
let
headers
=
{
'Content-Type'
:
'application/json'
,
'Content-Type'
:
'application/json'
,
'Authorization'
:
'Bearer '
+
window
.
localStorage
.
access_token
,
'Authorization'
:
'Bearer '
+
window
.
localStorage
.
access_token
,
...
@@ -225,7 +226,7 @@ export default {
...
@@ -225,7 +226,7 @@ export default {
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
if
(
res
.
queryUrl
)
{
if
(
res
.
queryUrl
)
{
const
queryUrl
=
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
,
{
axios
.
get
(
lovUrl
,
{
headers
:
headers
,
headers
:
headers
,
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
...
@@ -241,7 +242,7 @@ export default {
...
@@ -241,7 +242,7 @@ export default {
getLookUpCode
()
{
getLookUpCode
()
{
let
vm
=
this
let
vm
=
this
const
tenantId
=
localStorage
.
getItem
(
'tenantId'
)
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
,
{
axios
.
get
(
url
,
{
headers
:
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Content-Type'
:
'application/json'
,
...
@@ -281,12 +282,12 @@ export default {
...
@@ -281,12 +282,12 @@ export default {
if
(
!
vm
.
disabled
)
{
if
(
!
vm
.
disabled
)
{
let
array
=
(
vm
.
lookUpCode
||
vm
.
lovCode
)
?
vm
.
arrayList
:
vm
.
dataArray
let
array
=
(
vm
.
lookUpCode
||
vm
.
lovCode
)
?
vm
.
arrayList
:
vm
.
dataArray
let
list
=
[]
let
list
=
[]
array
.
forEach
((
dat
e
,
index
,
array
)
=>
{
array
.
forEach
((
dat
a
,
index
,
array
)
=>
{
list
.
push
({
list
.
push
(
Object
.
assign
(
{
value
:
dat
e
[
vm
.
valueKey
],
value
:
dat
a
[
vm
.
valueKey
],
name
:
dat
e
[
vm
.
valueName
],
name
:
dat
a
[
vm
.
valueName
],
parent
:
dat
e
.
parent
,
parent
:
dat
a
.
parent
,
})
}
,
data
)
)
})
})
VueSelect
.
show
({
VueSelect
.
show
({
list
:
list
,
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