pushdeer/quickapp/src/pages/component/Device/index.ux

58 lines
1.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<import name="dev-card" src="./card"></import>
<template>
<div class="wrapper">
<!-- <text class="title">device</text>
<text class="title">device</text> -->
<div class="header">
<text>设备</text>
<image @click="onPlusBtnClick" src="/assets/images/plus.svg" />
</div>
<list style="width: 80%">
<list-item type="devitem" for="{{ dev in devs}}">
<dev-card dev-obj="{{ dev }}" idx="{{ $idx }}"></dev-card>
</list-item>
</list>
</div>
</template>
<script>
export default {
data: {
devs: [
{ icon: "/assets/images/device-ipad.svg", name: "Easys iPad(当前设备)" },
{ icon: "/assets/images/device-ipad.svg", name: "备用机iPhone2" },
],
},
onPlusBtnClick() {
// $utils.showToast('aaaaa')
this.devs.push({ icon: "/assets/images/device-iphone.svg", name: "备用机iPhone" + (this.devs.length + 1) })
},
onInit() {
console.log('device', 'init')
}
}
</script>
<style lang="less">
@import '../../../assets/styles/style.less';
.wrapper {
.flex-box-mixins(column, flex-start, center);
width: 100%;
height: 100%;
padding-top: 84px;
.header {
margin-bottom: 24px;
width: 80%;
justify-content: space-between;
text {
font-size: 48px;
color: #000000;
}
}
}
</style>