Blame view

components/thorui/tui-form-field/tui-form-field.vue 745 Bytes
46b6767c   刘淇   init 提交到库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  <template>
  	<view :class="{'tui-form__field':hidden}">
  		<slot></slot>
  	</view>
  </template>
  
  <script>
  	//此组件只为form表单提交传递数据使用,暂时用于微信/百度小程序
  	export default {
  		emits: ['input', 'update:modelValue'],
  		name: "tui-form-field",
  		// #ifdef MP-WEIXIN
  		 behaviors: ['wx://form-field'],
  		// #endif
  		// #ifndef MP-WEIXIN
  		behaviors: ['uni://form-field'],
  		// #endif
  		props: {
  			//是否为隐藏域
  			hidden: {
  				type: Boolean,
  				default: false
  			},
  			value: {
  				type: [Number, String, Array],
  				default: ''
  			},
  			modelValue: {
  				type: [Number, String, Array],
  				default: ''
  			}
  		}
  	}
  </script>
  
  <style scoped>
  	.tui-form__field {
  		display: none;
  		opacity: 0;
  	}
  </style>