zoukankan      html  css  js  c++  java
  • element-ui

    vue-cli3集成element-ui:
    1. vue create demo
    2. vue add element
    3. srcpluginselement.js 设置全局插件
    4. views中页面按需引入

    import {Row, Col, Dialog, Tabs, TabPane, Form, FormItem, Input,Message } from 'element-ui'
    export default{
    name: 'About',
    components:{
      [Row.name]:Row,
      [Col.name]:Col,
      [Dialog.name]:Dialog,
      [Tabs.name]:Tabs,
      [TabPane.name]:TabPane,
      [Form.name]:Form,
      [FormItem.name]:FormItem,
      [Input.name]:Input,
      [Message.name]:Message
    }


    常见问题
    1、
    EL-Table获得选中的行
    <el-table ref="singleTable"/>
    多选: this.$refs.multipleTable.store.states.selection
    单选: this.$refs.summaryTable.store.states.currentRow

    2、el-table 多选改单选
    <el-table-column
    label="操作"
    width="55">
      <template slot-scope="scope">
        <el-checkbox v-model="scope.row.checked"></el-checkbox>
      </template>
    </el-table-column>

    handleSelectionChange (row) {
      this.tableData3.forEach(item => {
        // 排他,每次选择时把其他选项都清除
        if (item.id !== row.id) {
          item.checked = false
        }
       })
      console.log(row)
    }

    3、el-input type="textarea"    设置高度

         :rows="5"
    青春承载希望,奋斗成就未来
  • 相关阅读:
    专业的户外直播视频传输系统是如何搭建起来的?通过GB28181协议建立的户外直播方案
    Go-注释
    语言的动态性和静态性
    程序&命名-执行环境
    Go-错误栈信息
    Mongo-文档主键-ObjectId
    Mongo-关系型VS非关系型
    数据-CRUD
    Mongo基本操作
    mongo环境搭建
  • 原文地址:https://www.cnblogs.com/ckmouse/p/11394161.html
Copyright © 2011-2022 走看看