CSS input输入框

HTML: 

<!-- 原生 最简 -->
<input type="text" placeholder="请输入您的内容">


<!-- 绑定数据 -->
<input class="type-fill" type="text" v-model="gapInputValue" placeholder="请输入您的内容" @input="fillOver()">

JS: 

<script>
export default {
	name: "survey",
	data() {
		return {
			surveyData: {}, // 数据
			gapInputValue: '', // 填空题数据
			
		};
	},
	methods: {

		// 填空
		fillOver() {
			this.nextParams = {

				b: this.gapInputValue,
			
			};
			this.checked = true;
		},
	
		// 下一题
		nextQuestion() {
			if (this.checked == true) {
				if (this.isShowInput && (this.aa.b === '' || this.aa.b=== undefined)) {
					this.$message({
						message: "请先进行作答!!",
						duration: 1000
					});
					return;
				}
				this.getSurvey();
				this.aa= {
					b: '',
					c: '',
				};
			} else {
				this.$message({
					message: "请先进行作答!!",
					duration: 1000
				});
			}
			
		},
		
		// 获取题目
		getSurvey() {
			this.post(this.api.getSurvey, this.aa)
				.then(res => {
					if (res.data.data.length <= 0) {
						return;
					}
					
				})
				.catch(err => {
					console.log(err);
				});
		}
	},
	mounted() {
		this.getSurvey();
	}
};//
</script>

 CSS:

<style lang="less" scoped>
    <!-- 原生 -->
    input {
			max-width: 548px;
			border: 1px solid rgba(47, 116, 255, 0.1);
			border-radius: 10px;
			padding: 27px;
			outline: none; // 去除原生样式

			&::-webkit-input-placeholder {
				color: #889ab8; // 提示词样式
			}
	}
    <!-- 获取光标时的填写状态 -->
     input:focus{ 
            // border: 2px solid #857AAF !important;
            border: 2px solid #5369df;
            border-radius: 10px;
            outline: 0;
     }
</style>

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值