CSS之 align-items的选项试验220729

本文详细介绍了CSS align-items属性的多种可用选项,包括stretch、normal、center等,并通过代码示例展示了如何在flex和grid布局中应用这些选项,实时观察其效果。

CSS之 align-items的选项试验220729

align-items的选项:
[‘stretch’,‘normal’,‘center’,‘safe center’,‘unsafe center’,‘start’,‘end’,‘flex-start’,‘flex-end’,‘self-start’,‘self-end’,‘baseline’,‘first baseline’,‘last baseline’];

测试代码:

<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"/><title></title><style>

body{margin:0}

#BodyH{display:flex; align-items:center; justify-content:flex-start; background-image:linear-gradient(to right, red, orange, yellow, green, cyan, blue, purple);}



</style><script>
if(!document.title.length)(function(){var str=document.URL; str=str.substring( str.lastIndexOf("/")+1 , str.lastIndexOf('.')); str=decodeURI(str); document.title=str;})();

let isLog=true;clog=function(){if(isLog)for(let a of arguments)console.log(a);}; n09="0123456789"; lAZ="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; laz="abcdefghijklmnopqrstuvwxyz"; Z62=n09+lAZ+laz; Z62o={};for(let i=0;i<Z62.length;i++)Z62o[Z62[i]]=i; const CTTT="Content-type";
rdmN=(u)=>parseInt(Math.random()*u); rdmV=(sa)=>sa[rdmN(sa.length)]; rdmS=(l=1,sample=Z62)=>{let s='';for(let i=0;i<l;i++)s+=rdmV(sample);return s;};
z62=z62l=(l)=>rdmS(l);		decFrZ62=(z)=>{let a=Array.from(z).reverse(); let i=0; for(let j=0;j<a.length;j++)i+=Z62o[a[j]]*Math.pow(62,j);return i;};
z62Now=()=>{let l=Date.now(),a=[]; while(l>62){a.push(Z62[l%62]);l=parseInt(l/62);};a.push(Z62[l]);return a.reverse().join('');};
z62Id=(l)=>{let s=z62Now(); if(l&&l>6){l-=6;s+=z62(l);}return s;};
rdmRgb=()=>'rgb('+rdmN(256)+','+rdmN(256)+','+rdmN(256)+')'; rdmBgc=()=>"background-color:"+rdmRgb()+";";

isA=(x)=>x&&x.constructor===Array,isS=(x)=>x&&x.constructor===String,isF=(x)=>x&&x.constructor===Function,isO=(x)=>x&&x.constructor===Object,isJ=(x)=>isA(x)||isO(x),isM=(x)=>x&&x.constructor===Map;
isE=(x,tn)=>{let b=(x&&x instanceof HTMLElement); if(b&&tn)b=(x.tagName===tn.toUpperCase()); return b;}; 
isColl=(x)=>x&&isFinite(x.length)&&x.constructor!==String;
isEnterEvent=(ev)=>ev&&(ev.which===13&&ev.keyCode===13&&ev.key==="Enter"&&ev.code==="Enter");
triggee=triggerElementEvent=触发元素的事件=(e,evn)=>{e=dgebi(e);e.dispatchEvent(new Event(evn)); return e;};
z24ParseInt=(s)=>{let ar=Array.from(s); let ar1=ar.filter((v)=>isFinite(v)); return parseInt(ar1.join(''));};
stringSeparator=(str,ss,hf)=>{if(!ss||ss.length===0)return str; let ar=str.split(ss.shift()); if(isF(hf))hf(ar); ar=ar.map((s)=>stringSeparator(s,ss.slice())); return ar;};
//ge //dgebi
const ge=window.dgebi=function(i,s){if(!i)return;let e=i;if(isS(i)){e=document.getElementById(i);if(!e)e=document.querySelector(i);} if(!s)return e; s=ge(s); if(isE(e)&&isE(s))e.appendChild(e.新娃=e.xw=s);else{clog("↓↓↓",e,"父或子不是Element",s,"↑↑↑");}return e;};
dce=window.dcept=(p,tn="DIV")=>{let e=document.createElement(tn);e.idefine=(i)=>{e.id=i;return window[i]=e;};e.htm=(h)=>{if(h!==undefined)e.innerHTML=h;return e;};
		e.ass=e.aCssText=(s)=>{if(s)e.style.cssText+=";"+s;return e;};e.cls=(c)=>{if(c!==undefined)e.className+=" "+c;return e;};
		e.ce=(a0,c2,h2)=>{let ar; if(isS(a0))ar=a0.split("=->");else ar=a0; let t=ar[0].replace(/\s/g,''),h=ar[1],ct=ar[2],c=ar[3]; e.ceLast=dcept(e,t).htm(h).htm(h2).aCssText(ct).cls(c).cls(c2); if(isS(ar[4]))eval("const P=e,I=e.ceLast;"+ar[4]); return e.ceLast};
		e.ca=(a0,c,h)=>{e.ce(a0,c,h);return e};
		e.cen=function(a0, n=1, c, f)	{e.cenAr=[];let ar;if(isS(a0))ar=a0.split('\n');else ar=a0; for(let t=0;t<n;t++)for(let tn of ar){let s=e.ce(tn).cls(c); if(f)f(s,e, e.cenAr); e.cenAr.push(s)};return e;};
		e.cbn=function(a0,n0=1,n1=1,c0,c1,f0,f1)	{let ar;if(isS(a0))ar=a0.split('\n');else ar=a0; let pt=ar.shift(); e.cen(pt,n0,c0,f0); for(let b of e.cenAr){b.cen(ar,n1,c1,f1);} return e;};
		e.rdmBgc=function(){e.style.backgroundColor=rdmRgb();return e;};
		dgebi(p,e);return e;};
window.dceptq=function(p,t,q=1){let ear=Array(q); for(let n=0;n<q;q++){ear.push(dcept(p,t));} return ear;};
dceptc=(p,t,c)=>dcept(p,t).cls(c); dcDiv=(p,c)=>dceptc(p,"div",c); dcArticle=(p,c)=>dceptc(p,"article",c); dcSection=(p,c)=>dceptc(p,"section",c);
dcFL=(p,lh,c)=>{let f=dcept(p,"fieldset").cls(c); f.l=dcept(f,"legend").htm(lh); return f;};
evalab=(p,code)=>dcept(p,"label").cls("evalab").cen("span=->"+code+"=->=->evalabL , span=->的结果是=->=->evalabC , span=->"+eval(code)+"=->=->evalabR");
window.dwbr=function(a0=1){let ar=arguments,br=dwbr.br; if(Number.isFinite(a0)){br(a0);return;} for(let a of ar)document.write(a.replace(/\n/g,"<br/>"));br();}; dwbr.br=function(n=1){for(let c=0;c<n;c++)document.write("<br/>");};
window.simpleTableByA2=(p,a2)=>{let tb=dcept(p,"table").cen(['thead','tbody','tfoot']);tb.h=tb.tHead;let tbd=tb.b=tb.tBody=tb.tBodies[0]; tb.f=tb.tFoot; tb.Ntr=dcept(tb.h,"tr","Ntr"); let ar=a2.shift(); ar.forEach((v)=>dce(tb.Ntr,"th").htm(v)); 
		a2.forEach((row,r)=>{let tr=dcept(tbd,"tr");row.forEach((v,c)=>{let td=dce(tr,"td").htm(v).cls("R"+r+"C"+c);});});};
</script><script>





</script></head><body><header id="BodyH">

	<label></label><script>{let s=document.currentScript; let l=s.previousElementSibling; if(!l.innerHTML.length)l.textContent=document.title}</script>

</header><div id="BodyB">





</div><script>const BodyH=dgebi("BodyH") , BodyB=dgebi("BodyB") ; dce(document.body).idefine("BodyF"); dce(BodyB).idefine("BBB");</script>
<script>{


	const ops1 = ['stretch','normal','center','safe center','unsafe center','start','end','flex-start','flex-end','self-start','self-end','baseline','first baseline','last baseline'];
	const ops2 = ['inherit' , 'initial' , 'unset' , 'revert' , ''];
	const ops = [...ops1,...ops2];

	const alignItemsBoxAr=[];
	function buildSettingButtons(containerElement, cssProperty, ops){
		let fdst = dcept(containerElement,"fieldset");
		let leg = dcept(fdst, "legend").htm("设置"+cssProperty);
		for(let v of ops){
			let btn = dcept(fdst, "button").htm(v||"清空").cls("CssSettingButton");
			btn.addEventListener("click",function(ev){
				for(let tarE of alignItemsBoxAr){ 
					tarE.style.setProperty(cssProperty,v);
				}
			});
		}
	}

	function buildUnit(p , itemCount){
		let unit  = dcSection(p,"Unit");
		let h = dcept(unit, "header");
		unit.cbn(["section","span"],1,itemCount,"Box","Item Cell",null,function(e,p,ear){e.rdmBgc();});
		alignItemsBoxAr.push(unit.ceLast);
	}


	let btnBar = dcept(BBB,"nav").cls("BtnBar");
	
	let flexArea = dcept(BBB,"section").cls("FlexArea");
	let flexBoxHolder = dcFL(flexArea,"flex").ce("div","FlexBoxHolder");

	let gridArea = dcept(BBB,"section").cls("GridArea");
	let gridBoxHolder = dcFL(gridArea,"grid").ce("article","GridBoxHolder");

for(let n=1;n<=10;n++){ buildUnit(flexBoxHolder, n); buildUnit(gridBoxHolder, n); }


	buildSettingButtons(btnBar, "align-items", ops);

	let itv = setInterval(function(){
		for(let box of alignItemsBoxAr){
			box.previousElementSibling.innerHTML='↓ align-items: '+getComputedStyle(box).getPropertyValue("align-items");
		}
	} , 100);
	


}</script><style>
	*{box-sizing:border-box;}

	.BtnBar button{padding:5px 30px; margin:5px; font-size:16px; color:white; background-color:#0099ff; border:none; border-radius:10px; }
	.BtnBar button:hover{ cursor:pointer; transform:scale(1.1); }
	.FlexBoxHolder , .GridBoxHolder {display:grid;  grid-template-columns:1fr 1fr 1fr 1fr 1fr;  }
	.FlexBoxHolder .Box{display:flex;  height:100px;  border:1px solid black;}
	.GridBoxHolder .Box{display:grid; height:200px; border:1px solid blue; grid-template-columns:1fr 1fr 1fr; }

	.Item{display:block; width:30px; height:30px; }

</style><script>{
	






}</script><script>{


	






}</script></body></html>






在这里插入图片描述

<template> <transition name="el-zoom-in-center"> <div class="JNPF-preview-main"> <div class="JNPF-common-page-header"> <div class="options"> <el-button type="primary" > 保 存</el-button > </div> </div> <el-row :gutter="15" class="main" :style="{ margin: '0 auto', width: '100%' }" > <el-form ref="elForm" :model="dataForm" size="small" label-width="130px" label-position="right" > <template> <el-col :span="24" > <jnpf-form-tip-item label-width="0"> <el-table :header-cell-class-name="'custom-header'" :data="dataForm.internalcommissionordermoddleList" size="mini" ref="tableEle" > <el-table-column type="expand" width="40"> <template slot-scope="scope"> <div class="grandchild-table-container"> <el-table :header-cell-class-name="'child-table'" :data="scope.row.internalcommissionordersonList" size="mini" > <el-table-column fixed="left" type="index" width="50" label="序号" align="center" /> <el-table-column prop="testpost" label="试验岗位" fixed="left" align="center" > <template slot-scope="scope"> <el-select v-model="scope.row.testpost" clearable placeholder="请选择试验岗位" @change=" getSetList(scope.row.relatedfields, '', '1') " > <el-option v-for="(item, index) in testpostOptions" :key="index" :label="item.fullName" :value="item.enCode" > </el-option> </el-select> </template> </el-table-column> <el-table-column prop="testingitems" label="检测项目" fixed="left" width="150" align="center" > <template slot="header"> <span class="required-sign">*</span>检测项目 </template> <template slot-scope="scope"> <el-select filterable :disabled="!scope.row.testpost" placeholder="请选择检测项目" v-model="scope.row.testingitems" @change=" getChange( scope.row.relatedfields, scope.row.testingitems ) " @focus=" getSetList(scope.row.relatedfields, '', '2') " > <el-option v-for="(item, index) in settestingitemsOptions" :key="index" :label="item.inspectionProject" :value="item.inspectionProject" > </el-option> </el-select> </template> </el-table-column> <el-table-column prop="testingnum" label="检测次数" width="90" align="center" > <template slot="header"> <span class="required-sign">*</span>检测次数 </template> <template slot-scope="scope"> <el-input oninput="value=value.replace(/[^\d]/g,'')" v-model="scope.row.testingnum" placeholder="请输入检测次数" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column prop="measurementmethod" label="测定方法" width="150" align="center" > <template slot-scope="scope"> <el-select filterable allow-create @focus=" getSetList(scope.row.relatedfields, '', '4') " :disabled="!scope.row.testingitems" v-model="scope.row.measurementmethod" placeholder="请选择测定方法" clearable > <el-option v-for="(item, index) in OptionsA" :key="index" :label="item.measurementMethod" :value="item.measurementMethod" > </el-option> </el-select> </template> </el-table-column> <el-table-column prop="testmethod" label="试验方法" align="center" > <template slot-scope="scope"> <el-tooltip class="item" effect="dark" :content="scope.row.testmethod" placement="bottom" > <el-select filterable @focus=" getSetList(scope.row.relatedfields, '', '5') " :disabled="!scope.row.testingitems" v-model="scope.row.testmethod" placeholder="请选择试验方法" clearable > <el-option v-for="(item, index) in SYFFOptions" :key="index" :label="item.fullName" :value="item.enCode" > </el-option> </el-select> </el-tooltip> </template> </el-table-column> <el-table-column prop="samplespecifications" label="所需样品规格" align="center" > <template slot-scope="scope"> <el-tooltip class="item" effect="dark" :content="scope.row.samplespecifications" placement="bottom" > <el-select @focus=" getSetList(scope.row.relatedfields, '', '6') " allow-create filterable :disabled="!scope.row.testingitems" v-model="scope.row.samplespecifications" placeholder="请选择所需样品规格" clearable > <el-option v-for="(item, index) in OptionsC" :key="index" :label="item.sampleSpecification" :value="item.sampleSpecification" > </el-option> </el-select> </el-tooltip> </template> </el-table-column> <el-table-column prop="changetype" label="变化类型" align="center" > <template slot-scope="scope"> <el-select v-model="scope.row.changetype" placeholder="请选择变化类型" > <el-option v-for="(item, index) in changetypeOptions" :key="index" :label="item.fullName" :value="item.enCode" > </el-option> </el-select> </template> </el-table-column> <el-table-column prop="compress" label="压缩(拉伸)率" width="90" align="center" > <template slot-scope="scope"> <el-input v-model="scope.row.compress" placeholder="请输入压缩(拉伸)率" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column prop="media" label="介质" align="center" > <template slot-scope="scope"> <el-input v-model="scope.row.media" placeholder="请输入介质" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column prop="isselfmedium" label="是否自备介质" align="center" > <template slot-scope="scope"> <el-select placeholder="请选择是否自备介质" v-model="scope.row.isselfmedium" > <el-option v-for="(item, index) in OkOptions" :key="index" :label="item.fullName" :value="item.id" > </el-option> </el-select> </template> </el-table-column> <el-table-column label="老化条件" align="center"> <el-table-column prop="temperature" label="温度(℃)" width="90" align="center" > <template slot-scope="scope"> <el-input v-model="scope.row.temperature" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column prop="times" label="时间(h)" width="90" align="center" > <template slot-scope="scope"> <el-input v-model="scope.row.times" placeholder="请输入时间" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> </el-table-column> <el-table-column prop="remark" label="备注" width="100" align="center" > <template slot-scope="scope"> <el-tooltip class="item" effect="dark" :content="scope.row.remark" placement="bottom" > <el-input v-model="scope.row.remark" placeholder="请输入备注" clearable :style="{ width: '100%' }" > </el-input> </el-tooltip> </template> </el-table-column> <el-table-column label="操作" width="50" fixed="right"> <template slot-scope="scope"> <el-button size="mini" type="text" class="JNPF-table-delBtn" @click=" delinternalcommissionordersonList( scope.row.relatedfields, scope.$index ) " >删除</el-button > </template> </el-table-column> </el-table> <div class="table-actions" @click=" addinternalcommissionordersonList(scope.$index) " > <el-button type="text" icon="el-icon-plus" >添加</el-button > </div> </div> </template> </el-table-column> <el-table-column fixed="left" type="index" width="50" label="序号" align="center" /> <!-- <el-table-column prop="samplenum" label="样品编号" width="120px" align="center" > <template slot="header"> <span class="required-sign">*</span>样品编号 </template> <template slot-scope="scope"> <el-input @blur="getsamplenNum(scope.$index)" :ref="'samplenum' + scope.$index" @keyup.native=" moveFocusOne($event, scope.$index, 'samplenum') " v-model="scope.row.samplenum" placeholder="请输入样品编号" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> --> <el-table-column prop="samplename" label="胶种" align="center"> <template slot="header"> <span class="required-sign">*</span>胶种 </template> <template slot-scope="scope"> <el-input v-model="scope.row.samplename" :ref="'samplename' + scope.$index" @keyup.native=" moveFocusOne($event, scope.$index, 'samplename') " placeholder="请输入胶种" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column prop="recipeno" label="配方号" align="center"> <template slot-scope="scope"> <el-input v-model="scope.row.recipeno" :ref="'recipeno' + scope.$index" @keyup.native=" moveFocusOne($event, scope.$index, 'recipeno') " placeholder="请输入配方号" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column prop="number" label="料号起" align="center"> <template slot-scope="scope"> <el-input v-model="scope.row.number" :ref="'number' + scope.$index" oninput="value=value.replace(/[^\d]/g,'')" @keyup.native=" moveFocusOne($event, scope.$index, 'number') " placeholder="请输入料号起" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column prop="numbertwo" label="料号止" align="center"> <template slot-scope="scope"> <el-input v-model="scope.row.numbertwo" oninput="value=value.replace(/[^\d]/g,'')" :ref="'numbertwo' + scope.$index" @keyup.native=" moveFocusOne($event, scope.$index, 'numbertwo') " placeholder="请输入料号止" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column prop="batchnumber" label="批次号" align="center" > <template slot-scope="scope"> <el-input v-model="scope.row.batchnumber" :ref="'batchnumber' + scope.$index" @keyup.native=" moveFocusOne($event, scope.$index, 'batchnumber') " placeholder="请输入批次号" clearable :style="{ width: '100%' }" > </el-input> </template> </el-table-column> <el-table-column label="操作" width="50" fixed="right"> <template slot-scope="scope"> <el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delinternalcommissionordermoddleList(scope.$index)" >删除</el-button > </template> </el-table-column> </el-table> <div class="table-actions" @click="addinternalcommissionordermoddleList()" > <el-button type="text" icon="el-icon-plus">添加</el-button> </div> </jnpf-form-tip-item> </el-col> </template> </el-form> </el-row> </div> </transition> </template> <script> import request from "@/utils/request"; import { mapGetters } from "vuex"; import { getDataInterfaceRes } from "@/api/systemData/dataInterface"; import { getDictionaryDataSelector } from "@/api/systemData/dictionary"; import { getDefaultCurrentValueUserId } from "@/api/permission/user"; import { getDefaultCurrentValueDepartmentId } from "@/api/permission/organize"; import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime, } from "@/components/Generator/utils/index.js"; import { thousandsFormat } from "@/components/Generator/utils/index"; import { getTestingItemsList } from "@/api/resourceManagement/testingItems"; import portfoliosList from "@/views/resourceManagement/components/portfoliosList.vue"; export default { components: { portfoliosList }, props: [], data() { return { dataForm: { internalcommissionordermoddleList: [], }, settestingitemsOptions: [], //检测项目 changetypeOptions: [], //变化类型 testpostOptions: [], //岗位 experimentmethodOptions: [], //试验方法 OptionsA: [], //测定方法 OptionsB: [], //试验方法 OptionsC: [], //试验规格 measureOption: [], //测定方法 SYFFOptions: [], OkOptions: [ { id: "1", fullName: "自备" }, { id: "2", fullName: "未自备" }, ], isOkOptions: [ { id: "1", fullName: "是" }, { id: "2", fullName: "否" }, ], dataListNum:0, }; }, computed: { ...mapGetters(["userInfo"]), }, watch: {}, created() { this.getOptions() }, mounted() {}, methods: { getOptions() { //变化类型 this.$store .dispatch("base/getDictionaryData", { sort: "BHLX", }) .then((res) => { this.changetypeOptions = res; }); //试验岗位 this.$store .dispatch("base/getDictionaryData", { sort: "BMGL", }) .then((res) => { this.testpostOptions = res; }); //试验方法 this.$store .dispatch("base/getDictionaryData", { sort: "SYFF", }) .then((res) => { this.SYFFOptions = res; }); //项目 this.$store .dispatch("base/getDictionaryData", { sort: "SFXMJS", }) .then((res) => { this.projectOptions = res; }); }, init(){ }, //岗位查组合 getSetList(relatedfields, testingitems, state) { console.log(relatedfields,'/relatedfields'); let a = relatedfields.split("-")[0]; let b = relatedfields.split("-")[1]; console.log(this.dataForm.internalcommissionordermoddleList,'/this.dataForm.internalcommissionordermoddleList'); this.settestingitemsOptions = []; this.OptionsA = []; this.OptionsB = []; this.OptionsC = []; let _query = { testingPosition: this.dataForm.internalcommissionordermoddleList[a] .internalcommissionordersonList[b].testpost, inspectionProject: state == 2 ? null : this.dataForm.internalcommissionordermoddleList[a] .internalcommissionordersonList[b].testingitems, dataType: 0, menuId: "670258335538279301", moduleId: "670255008868004677", }; request({ url: `/api/projectCombination/TestProjectCombinationManage/getListTwo`, method: "post", data: _query, }).then((res) => { if (state == 1 || state == 2) { this.settestingitemsOptions = res.data; } else { this.OptionsA = res.data.byFieldA; this.OptionsB = res.data.byFieldB; this.OptionsC = res.data.byFieldC; } }); }, getChange(relatedfields, testingitems) { let a = relatedfields.split("-")[0]; let b = relatedfields.split("-")[1]; this.settestingitemsOptions.map((item) => { let newdata = this.dataForm.internalcommissionordermoddleList[a].internalcommissionordersonList[b] if (item.inspectionProject == testingitems) { newdata.associationtablesample =item.associationtablesample; //表样 newdata.projectunit = item.agingcommissionunit; //项目单位 newdata.businessorganizationid = item.testingPositionId; //bid newdata.testingnum = item.testCount; //检测次数 newdata.reserve1 = item.id; //项目id } }); }, //添加子表 addinternalcommissionordermoddleList() { let item = { relatedfields: this.dataListNum++, samplename: undefined, recipeno: undefined, number: undefined, numbertwo: undefined, batchnumber: undefined, internalcommissionordersonList: [], }; this.dataForm.internalcommissionordermoddleList.push(item); }, //添加孙表 addinternalcommissionordersonList(index) { let item = { relatedfields: this.dataForm.internalcommissionordermoddleList[index].relatedfields + "-" + this.dataForm.internalcommissionordermoddleList[index] .internalcommissionordersonList.length, testingitems: undefined, testingnum: undefined, testingcondition: undefined, measurementmethod: undefined, testpost: "", changetype: "", otheraging: "", testmethod: "", media: "", compress: "", projectunit: "", times: "", temperature: "", humidity: "", isselfmedium: "2", reserve6: "", reserve7: "", businessorganizationid: "", associationtablesample: "", //表样 productname: "", otherspecifications: "", upindexx: undefined, downindexx: undefined, recordcode: "", inputcontent: undefined, remark: undefined, samplespecifications: "", }; this.dataForm.internalcommissionordermoddleList[ index ].internalcommissionordersonList.push(item); }, dataList() { var _data = JSON.parse(JSON.stringify(this.dataForm)); _data.sendsamplesdate = _data.sendsamplesdate ? this.jnpf.toDate(Number(_data.sendsamplesdate), "yyyy-MM-dd HH:mm:ss") : ""; //将时间戳转为日期格式 this.projectOptions.map((item) => { if (item.enCode == _data.projectnumber) { _data.projectname = item.fullName; } }); return _data; }, dataInfo(dataAll) { let _dataAll = dataAll; _dataAll.id = _dataAll.id; this.dataListNum = _dataAll.internalcommissionordermoddleList.length; this.dataForm = _dataAll; this.isEdit = true; this.dataAll(); for ( let i = 0; i < _dataAll.internalcommissionordermoddleList.length; i++ ) { this.childIndex = i; } this.num = this.dataForm.internalcommissionordermoddleList.length; this.childIndex = -1; }, }, }; </script> <style scoped> el-table__expanded-cell[class*="cell"] { padding: 5px 0px 5px 0px !important; } ::v-deep .custom-header { background-color: #f0f8ff !important; } ::v-deep .child-table { background-color: #f0fff0 !important; } ::v-deep .grandchild-table { background-color: #fffff0 !important; } ::v-deep .el-upload--picture-card { width: 60px; height: 60px; line-height: 70px; } ::v-deep .el-upload-list--picture-card .el-upload-list__item { width: 60px; height: 60px; } .child-table-container { margin-left: 40px; /* 控制子级缩进量 */ margin-right: 40px; /* 控制子级缩进量 */ background: #f8f8f8; /* 保持与父级背景一致 */ } .grandchild-table-container { margin-left: 40px; /* 控制孙子级缩进量 */ margin-right: 40px; /* 控制子级缩进量 */ background: #f0f0f0; /* 保持与子级背景一致 */ } </style> 分析一下添加孙表,输入检测次数、温度、选择岗位等字段值时候卡顿是为什么,如何解决
06-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kfepiza

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值