From bc5538eae041493fb1761ec9ffc1b2a7450dd4bf Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期五, 29 三月 2024 00:07:02 +0800 Subject: [PATCH] # --- uni_modules/mtview-ui/components/mt-card/mt-card.vue | 10 ++++ uni_modules/mtview-ui/components/mt-input/mt-input.vue | 51 +++++++++++++++++++++++++ pages/test/test01.vue | 2 + 3 files changed, 62 insertions(+), 1 deletions(-) diff --git a/pages/test/test01.vue b/pages/test/test01.vue index e92b2a0..cb2190c 100644 --- a/pages/test/test01.vue +++ b/pages/test/test01.vue @@ -1,6 +1,7 @@ <template> <view> <mt-card></mt-card> + <mt-input></mt-input> </view> </template> @@ -9,6 +10,7 @@ data() { return { + } }, methods: { diff --git a/uni_modules/mtview-ui/components/mt-card/mt-card.vue b/uni_modules/mtview-ui/components/mt-card/mt-card.vue index 7bd1c48..8eac51b 100644 --- a/uni_modules/mtview-ui/components/mt-card/mt-card.vue +++ b/uni_modules/mtview-ui/components/mt-card/mt-card.vue @@ -1,5 +1,8 @@ <template> - <view>111</view> + <view class="container"> + <view>鍟嗗搧缂栧彿</view> + <view>鍟嗗搧鍚嶇О</view> + </view> </template> <script> @@ -9,4 +12,9 @@ </script> <style scoped> + .container { + margin: 16rpx; + padding: 16rpx; + background-color: #999; + } </style> \ No newline at end of file diff --git a/uni_modules/mtview-ui/components/mt-input/mt-input.vue b/uni_modules/mtview-ui/components/mt-input/mt-input.vue new file mode 100644 index 0000000..ead0c8b --- /dev/null +++ b/uni_modules/mtview-ui/components/mt-input/mt-input.vue @@ -0,0 +1,51 @@ +<template> + <view class="container"> + <view class="tips">{{tips}}</view> + <view class="input"> + <uni-icons class="input-icon" type="scan" size="16" color="#a6a6a6" @click="scan" /> + <input class="input-input" type="text"> + <uni-icons class="input-icon" type="close" size="16" color="#a6a6a6" @click="clear" /> + </view> + <view class="option"></view> + + </view> +</template> + +<script> + export default { + name: "mt-input", + props: { + tips: { + type: String, + default: '鎻愮ず' + }, + } + } +</script> + +<style scoped> + .container { + margin: 16rpx; + padding: 16rpx; + background-color: #fff; + display: flex; + align-items: center; + border: 1px solid #999; + border-radius: 17rpx; + } + .tips { + /* border-right: 2px solid #999; */ + /* padding-right: 8rpx; */ + } + .input { + display: flex; + align-items: center; + flex: 1; + } + .input-input { + flex: 1; + } + .input-icon { + margin: 0 8rpx; + } +</style> \ No newline at end of file -- Gitblit v1.9.1