全面svg化以及设备页实现list滚动

This commit is contained in:
7YHong 2021-12-29 18:37:58 +08:00
parent a8d3c65292
commit a4bbf151eb
12 changed files with 62 additions and 44 deletions

Binary file not shown.

View File

@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="92" height="95" viewBox="0 0 92 95">
<text id="calander" transform="translate(0 76)" fill="#a7a7a7" font-size="80" font-family="STSong, SF Compact"><tspan x="0" y="0">􀉉</tspan></text>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="92" height="95" viewBox="0 0 92 95">
<image id="calander" width="92" height="95" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABfCAYAAABle6D2AAAABHNCSVQICAgIfAhkiAAACABJREFUeF7tnWtsFUUUgOkLqLWgQBQCgokthCBRkIAgiIkaoEZqMJSWFkgxEVF8BDD6B60IiVH4gQpaIjapfV0EfFejYI2JSCwGH2jkFaIg1gjGoiB9+51mL5bt7t29j869251NNnu7c3bOnG/Ozsyemd0m9dGbUgJJSrVpZX00cMVOoIFr4IoJKFanPVwDV0xAsTrt4Rq4YgKK1WkP18AVE1CsTnu4Bq6YgGJ12sM1cMUEFKuLysM7OjqSAoHAJMo8mt9Z7NlJSUlZ/D2C38mKbekpdaex6QiZH8Gmo3JsbW3dv3jx4nORKIwYeE1NzcT29vaXKczUSBR7/JpT2L0qPz+/Jlw7wga+ffv2QW1tbeup7ftR2lu8OFxunfIwqEtNTV2Rl5f3o9sMwgJeWlqalpmZeQDQ49wq8IFcE3f6+MLCQml2HLewgFdXVz9Bjs855uo/gY8LCgpmuTHbNfDKyspRycnJcutc5iZjH8rMB/oOJ7tdA8e7d5LZPKcM/ZpOe36yqakpu7i4+EIoBq6BV1VVnaXtzvQrUJd2T8TLD0QNnJHJUEYmv7lU6mexfIAHogZOczKDTD73M0mXtq8B+LpYAL+PTF5zqdS3YrTj5QsXLlwSC+AyFJQhod5CEAD4lwCfFgvgW8hkuaYdm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 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="105" height="95" viewBox="0 0 105 95">
<text id="device-ipad" transform="translate(0 76)" fill="#3b4789" font-size="80" font-family="STSong, SF Compact"><tspan x="0" y="0">􀥔</tspan></text>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="105" height="95" viewBox="0 0 105 95">
<image id="device-ipad" width="105" height="95" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAABfCAYAAADroemKAAAABHNCSVQICAgIfAhkiAAABnpJREFUeF7tnV1oHFUUgO+dzV9Tay3WGqxtQZIqiBKJNXY3SkizG4r4g1ihiCBo8QdRrDa7bVCD1mZnqyiKolAf6kMFS4mgkGRrJNjupjEWW8W+NOZBRa21Vqqtabo7x7PBYtHZ3XM3055M9uxLIHPmnHu/b+7M3RDOaCWfGU9Az/gRygCVSPLBRSCSRJIPCPhgiLKSRJIPCPhgiLKSRJIPCPhgiLKSRJIPCPhgiLKSRJIPCPhgiLKSRJIPCPhgiNNcSaBXtscbLSuwHBTUY7IGnHM9aFisQVk+mP95GSIodUopPYZMDmv8iVwOI46D6eSGX0opWLKkYDjRqC3nDRxMSymFy+4cgAlQOl41+Zc9NNQ9YTJ/Y0ktLT0LYK5+EeU8goUCJsUkFgkAjDvKenI42fkxlYeRpKamdyprFh7/EgVdSy0gcXkIgHoolYy+S+FjJCnYYUfxhDglscQUJgAAxzJZ5+rPBzcdK8aKLCnY9vIyVZk5hA/C2mJJ5TiNAG4wtqUHouuKRZMlhTrsXZjs7mIJ8Qo5orQeV6Ami8XO1uNaw0J8JNTj/KoLzRFw+6eyTnN6cONooTgTSScw0TzXZAAZ/P1rjq7qGR5Y/9tshW82r24r1F4ThIB6He8+N+Q/F7pSA7Et05a0ojVRV1UNP+VLlAW4Y18y9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OGt88YtvW8KD83vT6V7Hx12re7XIJQxE5gH9YNMwHCrBnD1E5SXVNsd0xeSddHts6dp7KH8KpYOmsgcU8EVCduUrYWGwZZUi7Ryoh9l6VVb7GkcpxCAL6pPD3RiFvvXOP7gh8jSVPPpg57B560tlhiOV6AAMCfylGrU5/E9lI4GUuaWlHhxBpLwyv4jFpCKSIx/xLALff72lHPYJvuH6lcSpKUS950e3dt9WRNroXy4/jXgYupBcsxburFIRoOOBrW7+vfOGTKoGRJ5xZqXvXS5RU60IDv8qtXlm7QoBfjV/eyfaefxj/UOkqN4VcWfKefGsNnz7emr4g7l68nkkyvDIk3IyCSzHixRIskFuxmRUWSGS+WaJHEgt2sqEgy48USLZJYsJsVFUlmvFiiRRILdrOiIsmMF0u0SGLBblb0b96GtI05L1ULAAAAAElFTkSuQmCC"/>
</svg>

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="95" viewBox="0 0 75 95">
<text id="device-iphone" transform="translate(0 76)" fill="#3b4789" font-size="80" font-family="STSong, SF Compact"><tspan x="0" y="0">􀟜</tspan></text>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="75" height="95" viewBox="0 0 75 95">
<image id="device-iphone" width="75" height="95" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABfCAYAAACgCTpnAAAABHNCSVQICAgIfAhkiAAABdFJREFUeF7tnFtoXFUUhvc+k5kkvWEVLFUfGrCEhEYqWpPJ9GEo6UwreHmpRbyAQWwFbwSbpLWFQaqZqdRCRdGoWPACBkEQsczExjw4k8aaF6OJVFqFWKWWFm0suUxmb/+jFibJXM7aZyaJuM5TyPx7r3W+8+/L0y8FP44JSMdKFgqGRTABw2JYBAIEKTuLYREIEKTsLIZFIECQlsVZG4NHrllWNVMnlarXQq/DBcUi9ORKKoXMCC3O6Iwa+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mB9Clh35Wv+ltBLy1dK9St+X+kQSF6ZHRwGZ9UVmgcuHoOLb5qvWSBY9n6zRk3YX9MztwkE9/yUinfWFFwa22K1iCraKbSrRLcLaib9wUDf/nP5am3e3LVaL7dyJi2hz1Po8w7KBzOKV7ELIONlBBkvOb+qVuqRVO/eY5RGyqFF5NQrmPeJXHMjne0dJCW1Uuoaw0J+FlLZJNLZcj7j+G97Mj6BMLHIrJAxSnOmWnupr9DqADJo2vMGN2rZlky0H6HUMIYFZz2HRgqeRNi/fkMzo4gHG0NOFj5mmR+tvXihGiTC1SERaVXBalqEkMaEwDTnjzEsf0u0QVpyCMCM70rO2yytEgfDOXlF1iWTHfYKcPwYw7IrBLbGDiAI+HnH1ZaKUOs7EVt1nNqOK1h2RHDaV23nU91OLbxoei3exvJ71KS+K1h2QTuI0CN1D5bjRpMGFnIM9tDPMp7q+wePP3XZpK5rWH8X/Sdb70n8ZS9J15dNkxcpspn/gtPlaVyWP3Izd2lg/duBf8vBGy2Pt1VLXY+J7TtYLU7BKjcNGo3Vwr4w26fwCO4tw8qzrNvUTdn1Swpr/otFrNvC3jW+tF6wPPgZ5cuc6t9zHnfAkl9VygzLyBdLdhDDInwahsWwCAQIUnYWAdZfn5ClnH5pOnoAAAAASUVORK5CYII="/>
</svg>

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,3 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="79" height="95" viewBox="0 0 79 95">
<text id="plus" transform="translate(0 76)" fill="#d8d8d8" font-size="80" font-family="STSong, SF Compact"><tspan x="0" y="0">􀅼</tspan></text>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="79" height="95" viewBox="0 0 79 95">
<image id="plus" width="79" height="95" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAABfCAYAAACp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PMsDBgDq5FkeMABQJ8/ygAGAOnmWBwwA1MmzPGAAoE6e5QEDAP0DDiwVfl1guh8AAAAASUVORK5CYII="/>
</svg>

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -4,7 +4,7 @@
"versionName": "1.0.0",
"versionCode": 1,
"minPlatformVersion": 1070,
"icon": "/assets/images/logo.png",
"icon": "/assets/images/logo.svg",
"features": [
{
"name": "system.prompt"
@ -36,7 +36,7 @@
},
"pages/Home": {
"component": "index",
"launchMode":"singleTask"
"launchMode": "singleTask"
}
}
},
@ -46,7 +46,10 @@
"pages": {
"pages": {
"titleBar": false
},
"pages/Home": {
"titleBar": false
}
}
}
}
}

View File

@ -1,21 +1,25 @@
<template>
<div class="card">
<list-item type="device" class="card">
<div class="icon">
<image src="{{ devObj.icon}}" />
</div>
<text class="label">{{ devObj.name }}</text>
</div>
</list-item>
</template>
<script>
export default {
props: {
devObj: { default: { icon: "/assets/images/device-ipad.png", name: "Easys iPad(当前设备)" } },
props: ['devObj'],
data: {
defaultDevObj: { icon: "/assets/images/device-ipad.svg", name: "Easys iPad(当前设备)" },
},
onInit() {
console.log('card', this.devObj, this.devObj.name)
if (!this.devObj) this.devObj = this.defaultDevObj
// console.log('card', this.devObj)
// console.log('card', 'name', this.devObj.name)
}
}
</script>
@ -24,17 +28,17 @@ export default {
@color: #3b4789;
.card {
width: 80%;
border-color: @color;
border-radius: 16px;
border-width: 3px;
padding: 32px;
margin: 24px 0;
background-color: #FFFFFF;
/* justify-content: center;
align-items: center; */
.icon {
width: 130px;
width: 120px;
height: 80px;
margin-right: 16px;
justify-content: center;

View File

@ -3,15 +3,30 @@
<div class="wrapper">
<!-- <text class="title">device</text>
<text class="title">device</text> -->
<card></card>
<card dev-obj="{{ dev }}"></card>
<div class="header">
<text>设备</text>
<image src="/assets/images/plus.svg" />
</div>
<list style="width: 80%">
<card></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
<card dev-obj="{{ dev }}"></card>
</list>
</div>
</template>
<script>
export default {
data: {
dev: { icon: "/assets/images/device-iphone.png", name: "备用机iPhone13" },
dev: { icon: "/assets/images/device-iphone.svg", name: "备用机iPhone13" },
},
onInit() { }
@ -24,5 +39,17 @@ export default {
.wrapper {
.flex-box-mixins(column, flex-start, center);
width: 100%;
padding-top: 84px;
.header {
margin-bottom: 24px;
width: 80%;
justify-content: space-between;
text {
font-size: 48px;
color: #000000;
}
}
}
</style>

View File

@ -23,28 +23,24 @@ export default {
selectedIconPath: '/assets/images/tabbar-device-active.svg',
active: true,
compName: 'device',
title: '设备'
},
{
iconPath: '/assets/images/tabbar-key.svg',
selectedIconPath: '/assets/images/tabbar-key-active.svg',
active: false,
compName: 'key',
title: 'Key'
},
{
iconPath: '/assets/images/tabbar-message.svg',
selectedIconPath: '/assets/images/tabbar-message-active.svg',
active: false,
compName: 'message',
title: '消息'
},
{
iconPath: '/assets/images/tabbar-settings.svg',
selectedIconPath: '/assets/images/tabbar-settings-active.svg',
active: false,
compName: 'settings',
title: '设置'
}
]
},
@ -58,10 +54,10 @@ export default {
emitEvt({ detail: { idx: newIdx } } = evt) {
// console.log('home', 'emitEvt', 'newIdx', newIdx)
// console.log('home', 'emitEvt', 'tabbarData', this.tabbarData)
this.tabbarData[this.currentPageIndex].active = false;
this.tabbarData[newIdx].active = true;
// 解构交换变量
[this.tabbarData[this.currentPageIndex].active, this.tabbarData[newIdx].active]
= [this.tabbarData[newIdx].active, this.tabbarData[this.currentPageIndex].active]
this.currentPageIndex = newIdx
this.$page.setTitleBar({ text: this.tabbarData[newIdx].title })
},
}
</script>
@ -72,15 +68,12 @@ export default {
.flex-box-mixins(column, center, center);
.stack {
/* width: 100%; */
flex-grow: 1;
align-items: flex-end;
.deer-background {
/* position: fixed; */
width: 100%;
margin-bottom: 20px;
/* bottom: 200px; */
}
}
}

View File

@ -50,10 +50,10 @@ export default {
flex-direction: column;
justify-content: center;
align-items: center;
width: 60px;
}
image {
/* width: 58px; */
height: 80px;
}
@ -61,17 +61,5 @@ export default {
font-size: 30px;
}
}
/* .selected {
color: #0091ff;
}
.tab-recommend {
left: 0;
}
.tab-mine {
right: 0;
} */
}
</style>