首页 > 其他分享 >uniapp使用elementui表格等组件

uniapp使用elementui表格等组件

时间:2023-08-04 10:32:54浏览次数:36  
标签:uniapp elementui sign 组件 scope element row

uniapp使用elementui表格

安装element-ui

npm i element-ui -S

uniapp使用elementui表格等组件_移动端表格

引入Element

uniapp使用elementui表格等组件_移动端表格_02

直接使用组件

<el-table :data="list" style="width: 100%" size="small"  border >
			 
		   
		   <el-table-column prop="status" label="签约日期" width="90">
		     <template slot-scope="scope">
		   	 
		   	  <text>{{scope.row.sign_year}}-{{scope.row.sign_month}}-{{scope.row.sign_date}}</text>
		   	   
		     </template>
		   </el-table-column>
		   <el-table-column  prop="type_name" label="合同类型" width="90"> </el-table-column>
		   <el-table-column  prop="contranct_title" label="合同名称" width="100"> </el-table-column>
		   
		    <el-table-column  prop="purchaser" label="乙方" width="130"> </el-table-column>
			<el-table-column  prop="real_name" label="经办人" width="100"> </el-table-column>
			<el-table-column prop="status" label="状态" width="60">
			  <template slot-scope="scope">
				  <!-- 0=待确认;1=待签署;2=已完成 -->
				  <text v-if="scope.row.status==0" class="st" style="">待确认</text>
				  <text v-if="scope.row.status==1" class="st" style="">待签署</text>
				  <text v-if="scope.row.status==2" class="st" style="">已完成</text>
			  </template>
			</el-table-column>
			 
		    
		    <el-table-column fixed="right" label="操作" width="160">
		      <template slot-scope="scope">
				<el-button @click="down(scope.row.id)" type="text" size="small" 
				style="color: #A8810B;" v-if="scope.row.status==2">
				   下载
				</el-button>
		        <el-button @click="look(scope.row)" type="text" size="small" style="color: #A8810B;" >
		         查看
		        </el-button>
				
				<el-button @click="add(scope.row.id)" type="text" size="small" style="color: #A8810B;" v-if="user_role==1">
				 编辑
				</el-button>
				
				<el-button @click="del(scope.row.id)" type="text" size="small" style="color: #A8810B;" v-if="user_role==1">
				 删除
				</el-button>
		      </template>
		    </el-table-column>
		</el-table>

uniapp使用elementui表格等组件_移动端表格_03

标签:uniapp,elementui,sign,组件,scope,element,row
From: https://blog.51cto.com/u_16204378/6957788

相关文章

  • 【设计模式】装饰器模式Decorator:在基础组件上扩展新功能
    (目录)装饰器模式看上去和适配器模式、桥接模式很相似,都是使用组合方式来扩展原有类的,但其实本质上却相差甚远呢。简单来说,适配器模式侧重于转换,而装饰模式侧重于动态扩展;桥接模式侧重于横向宽度的扩展,而装饰模式侧重于纵向深度的扩展。原理装饰模式的原始定义是:允许动态地向......
  • Apache Rocket MQ 组件 (泛型应用)
     一、实现 importjava.util.Map;importjava.util.concurrent.ConcurrentHashMap;importorg.apache.commons.lang3.StringUtils;importorg.apache.rocketmq.client.consumer.DefaultMQPushConsumer;importorg.apache.rocketmq.client.consumer.listener.MessageList......
  • 子组件调用父组件方法带参数
    子组件调用父组件方法带参数父组件###template<DBTableSelectref="DBTableEdit"@customEvent="handleCustomEvent"@close="closedDrawDBTable"v-if="showDrawDBTable"/>###jsimportDBTableS......
  • 子组件调用父组件的方法
    父组件<importExcelref="importExcelEdit":disabled="ExcelDisabled"@closed="closedDrawExcel"v-if="showDrawExcel":labelItem="objectTypeKey"tabLabel="手动打标配......
  • npm更新指定的组件
    npm更新指定的组件1、例如:react-router已经更新到4.x版本,想要下载2.x版本,可以通过下面命令[email protected][email protected]、–save-dev–save:将保存配置信息到package.json。默认为dependencies节点中。–dev:将保......
  • 分布式流处理组件-生产实战:Broker副本与优化
    ......
  • 百度统一socket长连接组件从0到1的技术实践
    本文由百度消息中台团队分享,引用自百度Geek说,原题“百度iOS端长连接组件建设及应用实践”,为了帮助理解,本文有修订和改动。1、引言在过去的十年里,移动端互联网技术飞速发展,移动应用逐渐成为主要的便捷访问和使用互联网的方式,它们承接了越来越多的业务和功能,这也意味着对移动端......
  • uniapp底部弹出层
    methods:{changeRelation(){uni.showActionSheet({itemList:['妻子','丈夫','妈妈','爸爸','爷爷','奶奶','儿子','女儿','兄弟姐妹','亲......
  • uniapp中使用微信支付
     超简单wx.requestPayment({ timeStamp:zhifu.timeStamp,//需要的参数,由后端返回 nonceStr:zhifu.nonceStr,//需要的参数,由后端返回 package:zhifu.prepayId,//需要的参数,由后端返回 signType:zhifu.signType,//需要的参数,由后端返回 paySign:zh......
  • 鸿海拟投资印度6亿美元,全面布局半导体组件 | 百能云芯
    日前,印度各地陆续传出鸿海将进行投资的消息,投资金额从1.94亿美元到5亿美元不等,然而,印度卡纳塔克邦(Karnataka)大中型企业厅长巴蒂尔(M.B.Patil)2日在社交媒体平台上率先贴出与鸿海董事长刘扬伟的合照,正式确认双方的投资意向。据巴蒂尔透露,鸿海已与卡纳塔克邦签署了意向书(LOI),将在该地......