摘要:
background-image: -webkit-linear-gradient(bottom, #003268, #0f91f6, #fff); -webkit-text-fill-color: transparent; -webkit-background-clip: text; 阅读全文
摘要:
class: <div v-bind:class="{ active: isActive, 'text-danger': hasError }"></div> <div v-bind:class="[isActive ? 'activeClass' : '', 'errorClass']"></di 阅读全文
摘要:
只能输入数字 并保留小数点后两位: <el-input maxlength="20" onkeyup="value=value.replace(/^(\d*\.?\d{0,2}).*/,'$1')"></el-input> 1.限制input输入框只能输入大小写字母、数字、下划线的正则表达式: <e 阅读全文
摘要:
watch: { // 方式一: 'cityName.name': { handler(newName, oldName) { // ... }, deep: true, immediate: true //立即执行 } //方式二: cityName(newName, oldName){ // . 阅读全文
摘要:
parseInt(Math.random() * 1000) 阅读全文
摘要:
// 获取element 结构tree的选中节点 let list = this.$refs.tree.getCheckedKeys(); //选中节点 const halfList = this.$refs.tree.getHalfCheckedKeys(); //半选节点 list = [... 阅读全文
摘要:
关键样式代码:white-space: pre-line; 示例: <span style="white-space: pre-line;" v-html="dutyDescription"></span> 阅读全文
摘要:
updated() { let scrollContainer = document.querySelector('.trend-top'); scrollContainer.scrollTop = scrollContainer.scrollHeight; }, 阅读全文
摘要:
// 父组件中调用子组件: <field ref="typeRef"></field> 在需要的地方直接用如下代码: this.$refs['typeRef'].dialogVisible = true; // 子组件调用父组件方法: this.$parent.getList(); 阅读全文
摘要:
Array.from(new Set(this.yearList)); 阅读全文