Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
NFT
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
NFT
Commits
cf256ef1
Commit
cf256ef1
authored
Jul 26, 2021
by
salitedfish
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
60787343
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
18 deletions
+43
-18
closeBtn.png
src/assets/img/closeBtn.png
+0
-0
Cell.vue
src/components/common/Cell.vue
+21
-18
cliboard.ts
src/util/cliboard.ts
+2
-0
Login.vue
src/view/Auth/Login/Login.vue
+19
-0
Edit.vue
src/view/User/Edit.vue
+1
-0
No files found.
src/assets/img/closeBtn.png
0 → 100644
View file @
cf256ef1
485 Bytes
src/components/common/Cell.vue
View file @
cf256ef1
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
{{
name
}}
{{
name
}}
</div>
</div>
<div
ref=
"btn"
@
click=
"handleClickCopy(name)"
class=
"
ml-1"
>
<div
ref=
"btn"
@
click=
"handleClickCopy(name)"
class=
"
copyBtn ml-1"
>
<app-icon
name=
"icon-fuzhi"
size=
"18px"
></app-icon>
<app-icon
name=
"icon-fuzhi"
size=
"18px"
></app-icon>
</div>
</div>
</div>
</div>
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
Vue
from
"vue"
;
import
Vue
from
"vue"
;
// import Clipboard
from "clipboard";
import
ClipboardJS
from
"clipboard"
;
import
{
ActionSheet
}
from
"vant"
;
import
{
ActionSheet
}
from
"vant"
;
export
default
Vue
.
extend
({
export
default
Vue
.
extend
({
...
@@ -225,23 +225,26 @@ export default Vue.extend({
...
@@ -225,23 +225,26 @@ export default Vue.extend({
}
}
this
.
$emit
(
"cellOnChange"
,
this
.
inputValue
);
this
.
$emit
(
"cellOnChange"
,
this
.
inputValue
);
},
},
handleClickCopy
(
text
:
string
|
number
)
{
async
handleClickCopy
(
text
:
string
|
number
)
{
this
.
$util
.
cliboard
(
text
);
// this.$util.cliboard(text);
this
.
$toast
(
"复制成功"
);
// const btn = this.$refs.btn as HTMLElement;
// const clipboard = new Clipboard(btn);
// clipboard.on("success", function (e) {
// console.info("Action:", e.action);
// console.info("Text:", e.text);
// console.info("Trigger:", e.trigger);
// e.clearSelection();
// });
// clipboard.on("error", function (e) {
// console.error("Action:", e.action);
// console.error("Trigger:", e.trigger);
// });
// this.$toast("复制成功");
// this.$toast("复制成功");
// const clipboardObj = navigator.clipboard
// await clipboardObj.writeText(text.toString())
let
clipboard
=
new
ClipboardJS
(
'.copyBtn'
,
{
text
:
function
()
{
return
text
.
toString
();
}
});
clipboard
.
on
(
"success"
,
(
e
)
=>
{
this
.
$toast
(
"复制成功~"
);
e
.
clearSelection
();
});
clipboard
.
on
(
"error"
,
()
=>
{
this
.
$toast
(
"复制失败~"
);
});
},
},
onCancel
()
{},
onCancel
()
{},
onSelect
(
value
:
any
)
{
onSelect
(
value
:
any
)
{
...
...
src/util/cliboard.ts
View file @
cf256ef1
...
@@ -5,5 +5,7 @@ export default function (text: string | number) {
...
@@ -5,5 +5,7 @@ export default function (text: string | number) {
ele
.
setAttribute
(
'data-clipboard-text'
,
text
.
toString
())
ele
.
setAttribute
(
'data-clipboard-text'
,
text
.
toString
())
document
.
body
.
appendChild
(
ele
)
document
.
body
.
appendChild
(
ele
)
const
clipboard
=
new
ClipboardJS
(
ele
)
const
clipboard
=
new
ClipboardJS
(
ele
)
// clipboard.write(text.toString())
// return new ClipboardJS(ele)
// document.body.removeChild(ele)
// document.body.removeChild(ele)
}
}
src/view/Auth/Login/Login.vue
View file @
cf256ef1
<
template
>
<
template
>
<div
class=
"register pt-5"
>
<div
class=
"register pt-5"
>
<div
class=
"closeBtnBox"
>
<img
src=
"@/assets/img/closeBtn.png"
class=
"closeBtn"
@
click=
"closeLogin"
/>
</div>
<div
class=
"flex justify-between items-center text-base"
>
<div
class=
"flex justify-between items-center text-base"
>
<img
src=
"@/assets/img/cmp_logo.png"
class=
"h-12"
alt=
""
/>
<img
src=
"@/assets/img/cmp_logo.png"
class=
"h-12"
alt=
""
/>
<div
class=
" text-font-white header-text"
>
注册/登录
</div>
<div
class=
" text-font-white header-text"
>
注册/登录
</div>
...
@@ -324,6 +327,9 @@ export default Vue.extend({
...
@@ -324,6 +327,9 @@ export default Vue.extend({
sendVoice
()
{
sendVoice
()
{
return
this
.
sendVoiceFunc
(
this
.
phone
);
return
this
.
sendVoiceFunc
(
this
.
phone
);
},
},
closeLogin
(){
this
.
$router
.
push
(
'/Mine'
)
}
},
},
computed
:
{
computed
:
{
codeValid
():
boolean
{
codeValid
():
boolean
{
...
@@ -384,4 +390,16 @@ export default Vue.extend({
...
@@ -384,4 +390,16 @@ export default Vue.extend({
font-weight
:
500
;
font-weight
:
500
;
color
:
#EEF1F6
;
color
:
#EEF1F6
;
}
}
.closeBtnBox
{
color
:
white
;
height
:
50px
;
line-height
:
50px
;
display
:
flex
;
align-items
:
center
;
}
.closeBtn
{
width
:
40px
;
text-align
:
center
;
cursor
:
pointer
;
}
</
style
>
</
style
>
\ No newline at end of file
src/view/User/Edit.vue
View file @
cf256ef1
...
@@ -69,6 +69,7 @@ export default Vue.extend({
...
@@ -69,6 +69,7 @@ export default Vue.extend({
},
},
methods
:{
methods
:{
async
submitUserInfo
(){
async
submitUserInfo
(){
if
(
this
.
btnDisabled
)
return
let
data
=
{}
as
any
let
data
=
{}
as
any
const
value
=
this
.
inputSet
.
value
;
const
value
=
this
.
inputSet
.
value
;
data
[
this
.
$route
.
params
.
type
]
=
value
;
data
[
this
.
$route
.
params
.
type
]
=
value
;
...
...
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