Commit f28f4e49 authored by salitedfish's avatar salitedfish

图标修改

parent eeff1884
......@@ -29,6 +29,7 @@
<app-icon v-if="icon" :name="icon" class="self-center"></app-icon>
</div>
</div>
<div v-else-if="type == 'input'">
<input
v-model="inputValue"
......@@ -194,6 +195,7 @@ export default Vue.extend({
// const temp = this.inputValue;
const value = e.target.value as string;
this.inputValue = value;
this.$emit("cellOnChange", Number(this.inputValue));
},
eventEmit(v: any) {
......@@ -212,7 +214,10 @@ export default Vue.extend({
this.show = true;
}
},
cellOnChange() {
cellOnChange(e:any) {
if(e.target.value.length >= 15) {
this.inputValue = (this.inputValue as string).slice(0,15)
}
this.$emit("cellOnChange", this.inputValue);
},
handleClickCopy(text: string | number) {
......@@ -267,7 +272,7 @@ input[type="password"],
input[type="number"],
textarea {
text-align: right;
padding: 0 25px;
padding: 0 25px 0 0;
}
input:not([type="range"]),
textarea {
......
......@@ -24,7 +24,9 @@
<div v-for="(i,index) in apps" :key="index" class="flex justify-center">
<div class="flex flex-col items-center gap-y-2">
<div class="flex content-center">
<app-icon :name="i.icon" size='24px' class='p-5 bg-table-light-blue shadow-md rounded-full'></app-icon>
<!-- <app-icon :name="i.icon" size='24px' class='p-5 bg-table-light-blue shadow-md rounded-full'></app-icon> -->
<img :src="i.icon" alt="">
<!-- <img src="../../assets/img/img-a-tupian.png" alt=""> -->
</div>
<div class='text-xs text-font-white'>
{{i.text}}
......@@ -56,25 +58,28 @@
import Vue from 'vue';
import { Badge } from 'vant';
import { token } from '@/util/userInfoUtils'
import anquanzhongxin89 from "../../assets/img/img-anquanzhongxin89.png"
import chakan from "../../assets/img/img-chakan.png"
import atupian from "../../assets/img/img-a-tupian.png"
import bossyingyetingchushi from "../../assets/img/img-BOSS-yingyeting-chushi.png"
Vue.use(Badge)
const apps=[
{
text:'版权授权',
icon:'icon-anquanzhongxin89'
icon: anquanzhongxin89
},
{
text:'区块链浏览器',
icon:'icon-chakan'
icon: chakan
},
{
text:'制片管理',
icon:'icon-a-tupian'
icon: atupian
},
{
text:'我的投资',
icon:'icon-BOSS-yingyeting-chushi'
icon: bossyingyetingchushi
},
]
......
......@@ -37,6 +37,7 @@
class="text-font-white my-3"
@click.native="$router.push('/Nft/create/pick')"
></app-cell>
<div>
<div class="my-4 text-font-gray text-sm ml-4">{{fromText.desText}}</div>
<textarea
......@@ -55,8 +56,10 @@
rounded-md
text-sm
"
@input="textareaChange"
></textarea>
</div>
<div class="fixed bottom-0 w-full left-0 z-30">
<app-btn
text="下一步"
......@@ -519,6 +522,11 @@ export default Vue.extend({
clickRepublish() {
this.currentStep = 1;
},
textareaChange(e:any){
if(e.target.value.length >= 500) {
this.createNFT.value_des = e.target.value.slice(0,500)
}
}
},
});
</script>
......
<template>
<Layout-Child>
<div class=" w-11/12 mx-auto py-6 text-font-white">
<input type="file" accept="image/*" capture="camera" class=" hidden" ref='fileElem' @change="fileUpload"/>
<input type="file" accept="image/*" capture="camera" class=" hidden" ref='cameraElem' @change="fileUpload"/>
<input type="file" accept="image/*" class=" hidden" ref='fileElem' @change="fileUpload"/>
<van-action-sheet v-model="show" :actions="actions" @select="onSelect" />
<app-cell text='头像' boxType='border' type='image' :value='avatarImgUrl?avatarImgUrl:this.userInfo.avatar?this.userInfo.avatar : "/img/mokeImg/avatar.png"' icon='icon-xiayibu' @click.native='uploadImg'></app-cell>
<app-cell text='昵称' boxType='border' :value='userInfo.nickname?userInfo.nickname:"无昵称"' icon='icon-xiayibu' @click.native="goEdit({type:'nickname',title:'设置昵称'})"></app-cell>
......@@ -28,8 +29,9 @@ export default Vue.extend({
userInfo:this.$util.userMsg.getUserMsg(),
show:false,
actions: [
{ name: '拍摄头像',router:'/photo' },
{ name: '从图片夹上传',router:'/photoEdit' },
{ name: '拍摄头像',router:'/photo' },
],
file:{},
avatarImgUrl:''
......@@ -59,6 +61,7 @@ export default Vue.extend({
this.show= true
},
async fileUpload(event:any){
this.$toast.loading('头像更新中...')
this.file = event.target.files[0]
// this.$store.commit('app/SET_FILEDATA',event.target.files)
const upload = await this.$service.userService.avatarUpload(event.target.files[0])
......@@ -71,11 +74,15 @@ export default Vue.extend({
},
onSelect(item:any){
this.show = false;
let cEl =this.$refs.cameraElem as HTMLInputElement
let fEl =this.$refs.fileElem as HTMLInputElement
switch(item.name){
case '拍摄头像':
cEl.click();
break;
case '从图片夹上传':
fEl.click();
break;
break;
}
this.$toast(item.name);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment