11 changed files with 184 additions and 105 deletions
@ -0,0 +1,46 @@ |
|||
<template> |
|||
<view class="flex flex-col items-center mx-3"> |
|||
<view class="px-6 w-full"> |
|||
<img class="w-full mt-16" style="height: 6rem" src="https://www.tall.wiki/staticrec/yanyuan/input-code.png" /> |
|||
</view> |
|||
|
|||
<view class="flex flex-nowrap my-5"> |
|||
<u-input |
|||
input-align="center" |
|||
type="number" |
|||
:value="num.value" |
|||
:placeholder="placeholder" |
|||
class="flex-1 mx-1 bg-gray-100" |
|||
v-for="num in nums" |
|||
:key="num.id" |
|||
/> |
|||
</view> |
|||
<view class="px-2 mt-2 w-full"> |
|||
<u-button type="primary" class="w-full">确认</u-button> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
placeholder: ' ', |
|||
nums: [ |
|||
{ value: '', id: 1 }, |
|||
{ value: '', id: 2 }, |
|||
{ value: '', id: 3 }, |
|||
{ value: '', id: 4 }, |
|||
{ value: '', id: 5 }, |
|||
{ value: '', id: 6 }, |
|||
{ value: '', id: 7 }, |
|||
{ value: '', id: 8 }, |
|||
{ value: '', id: 9 }, |
|||
{ value: '', id: 10 }, |
|||
], |
|||
}; |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped></style> |
@ -0,0 +1,14 @@ |
|||
// 返回上一页
|
|||
const back = () => uni.navigateBack(); |
|||
|
|||
/** |
|||
* 打开 某一页 |
|||
* @param {string} pageName |
|||
* @param {String} param "key=value" |
|||
*/ |
|||
const openPage = (pageName, param) => { |
|||
const query = param || ''; |
|||
uni.navigateTo({ url: `${pageName}?${query}` }); |
|||
}; |
|||
|
|||
export default { back, openPage }; |
Loading…
Reference in new issue