| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <script >
- export default {
- name: 'inputRow',
- props: {
- label: {
- type: String,
- default: ''
- },
- form: {
- type: Object,
- default: () => {}
- },
- checkFormItem: {
- type: Function,
- default: () => {}
- },
- state: {
- type: Number,
- default: 0
- },
- msg: {
- type: String,
- default: ''
- },
- remark: {
- type: String,
- default: ''
- }
- },
- data(){
- return {
- }
- },
- methods: {
- }
- }
- </script>
- <template>
- <div class="w-full px-1.5 flex">
- <div class="w-4/12 flex items-center u px-1">
- <p class="w-full text-justify">
- {{ label }}
- <!-- 显示一个问号,悬浮时显示remark, 不使用 a toolTip -->
- <a-tooltip v-if="remark" placement="topLeft">
- <template slot="title">
- {{remark}}
- </template>
- <a-icon type="question-circle" />
- </a-tooltip>
- </p>
- </div>
- <div class="w-8/12">
- <slot></slot>
- <div :class="`w-full ${state===0?'text-red-600':'text-green-300'}`" v-show="msg" >
- {{msg}}
- </div>
- <slot name="extra"></slot>
- </div>
- </div>
- </template>
- <style scoped>
- </style>
|