| | |
| | | :filter-node-method="filterNode" |
| | | /> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-container style="margin-right: 15px;min-width:560px;"> |
| | | <el-header style="font-size: 12px"> |
| | | <el-form :inline="true" :model="formInline" class="demo-form-inline"> |
| | | <el-form-item> |
| | |
| | | :data="tableData" |
| | | :header-cell-style="{background:'#f6f7fa',color:'#909399',fontWeight:400}" |
| | | ref="multipleTableRef" |
| | | highlight-current-row |
| | | @row-click="rowClick" |
| | | @selection-change="handleCurrentChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="50" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="date" label="登录名" width="100" show-overflow-tooltip sortable /> |
| | | <el-table-column prop="name" label="用户名" width="100" show-overflow-tooltip sortable /> |
| | | <el-table-column prop="address" label="所属机构" width="130" show-overflow-tooltip sortable /> |
| | | <el-table-column prop="address" label="所属部门" width="130" show-overflow-tooltip sortable/> |
| | | <el-table-column prop="address" label="所属机构" width="110" show-overflow-tooltip sortable /> |
| | | <el-table-column prop="address" label="所属部门" width="100" show-overflow-tooltip sortable/> |
| | | <el-table-column label="状态" |
| | | prop="tag" |
| | | width="100" |
| | |
| | | </el-scrollbar> |
| | | </el-main> |
| | | </el-container> |
| | | <div> |
| | | <el-tag v-for="tag in dynamicTags" :key="tag" class="mx-1" style="margin:5px" closable :disable-transitions="false" @close="handleClose(tag)"> |
| | | {{ tag }} |
| | | </el-tag> |
| | | </div> |
| | | </el-container> |
| | | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button size="default" type="primary" @click="onCancel">确定</el-button> |
| | |
| | | id: number |
| | | label: string |
| | | children?: Tree[] |
| | | } |
| | | interface User { |
| | | date: string |
| | | name: string |
| | | address: string |
| | | } |
| | | export default defineComponent({ |
| | | name: 'userSelections', |
| | |
| | | } |
| | | |
| | | const multipleTableRef = ref<InstanceType<typeof ElTable>>() |
| | | // const currentRow = ref() |
| | | |
| | | // 当某一行被点击时会触发该事件 |
| | | // const handleRowClick = (row: any, column: any, event: Event) => { |
| | | // emit('row-click', row, column, event) |
| | | // } |
| | | // const singleTableRef = ref<InstanceType<typeof ElTable>>() |
| | | // const setCurrent = (row?: User) => { |
| | | // singleTableRef.value!.setCurrentRow(row) |
| | | // } |
| | | // const handleCurrentChange = (val: User | undefined) => { |
| | | // currentRow.value = val |
| | | // } |
| | | |
| | | // 右方点击添加后显示标签 |
| | | const dynamicTags = ref(['Tag 1', 'Tag 2', 'Tag 3']); |
| | | const handleClose = (tag: string) => { |
| | | dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1); |
| | | }; |
| | | return { |
| | | openDialog, |
| | | closeDialog, |
| | |
| | | tableData, |
| | | formInline, |
| | | onSubmit, |
| | | multipleTableRef |
| | | // currentRow, |
| | | // setCurrent, |
| | | multipleTableRef, |
| | | handleClose, |
| | | dynamicTags, |
| | | // handleCurrentChange, |
| | | }; |
| | | }, |
| | | }); |
| | |
| | | margin-right: 0; |
| | | border-radius: 4px 4px 0 0; |
| | | } |
| | | //单选框圆形 |
| | | ::v-deep .el-table__header .el-table-column--selection .cell .el-checkbox { |
| | | display:none |
| | | } |
| | | ::v-deep .el-table-column--selection .cell{ |
| | | text-align: center; |
| | | } |
| | | ::v-deep .el-checkbox__input .el-checkbox__inner{ |
| | | border-radius: 50%; |
| | | } |
| | | </style> |