12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view class="zs-search" :class="[fixed?'fixed':'']">
- <input class="input" :style="{lineHeight:height+'rpx',height:height+'rpx',borderRadius:height / 2+'px',color:color,background:bgColor}" :type="type" :value="value1" @input="input" />
- <!-- <u-icon class="search" name="search" color="#rgb(16, 16, 16)" size="88"></u-icon> -->
- </view>
- </template>
- <script>
- export default {
- props: {
- type: {
- type: String,
- default: 'text'
- },
- height: {
- type: String,
- default: '90'
- },
- color: {
- type: String,
- default: '#606266'
- },
- bgColor:{
- type: String,
- default: '#efefef'
- },
- fixed:{
- type: Boolean,
- default: false
- },
- value:{
- }
- },
- data() {
- return {
- }
- },
- onReady(res) {
- },
- onLoad(){
- },
- computed: {
- value1() {
- return this.value
- }
- },
- methods: {
- input(val){
- this.$emit('input',val.detail.value )
- }
- }
- }
- </script>
- <style lang="scss">
- .zs-search{
- background: #fff;
- padding: 20rpx;
- box-sizing: border-box;
- top: 0%;
- left: 0;
- width: 100%;
- position: relative;
- .input{
- box-sizing: border-box;
- padding-left: 35rpx;
- }
- }
- .fixed{
- position: fixed !important;
- }
- </style>
|