123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <div :class="$style.mainDiv">
- <a-spin tip="内容套打中..." :spinning="spinning">
- <ul :class="$style.templateUl">
- <li
- v-for="template in templateList"
- :key="template.id"
- :class="{ [$style.checkedLi]: checkedTemp.id === template.id }"
- @click="(e) => setChecked(template)"
- >
- <a-radio :checked="checkedTemp.id === template.id"></a-radio>{{ template.redheadName }}
- </li>
- </ul>
- </a-spin>
- </div>
- </template>
- <script>
- import components from './_import-components/iam-audit-notice-template-select-import'
- export default {
- name: 'IamAuditNoticeTemplateSelect',
- metaInfo: {
- title: 'IamAuditNoticeTemplateSelect',
- },
- components: {
- ...components,
- },
- props: {
- // 项目ID
- projectId: {
- type: String,
- default: '',
- },
- // 模板列表
- templateList: {
- type: Array,
- default: () => {
- return []
- },
- },
- },
- data() {
- return {
- searchform: 'searchform',
- checkedTemp: { id: null },
- spinning: false,
- }
- },
- methods: {
- // 设置单选选中
- setChecked(template) {
- this.checkedTemp = template
- },
- },
- }
- </script>
- <style module lang="scss">
- @use '@/common/design' as *;
- .main-div {
- min-height: 300px;
- background: #ffffff;
- }
- .left-div {
- background: #ffffff;
- border: 1px solid #e8e8e8;
- margin-right: 15px;
- }
- .right-div {
- background: #ffffff;
- }
- .template-ul {
- height: 100%;
- margin: 0;
- padding: 0;
- overflow: auto;
- list-style: none;
- border: 1px solid #e8e8e8;
- li {
- min-height: 32px;
- padding: 6px 12px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- transition: all 0.3s;
- cursor: pointer;
- border-bottom: 1px solid #e8e8e8;
- }
- .checked-li {
- background-color: #e6f7ff;
- }
- li:hover {
- background-color: #e6f7ff;
- cursor: pointer;
- }
- li:last-child {
- border-bottom: none;
- }
- }
- </style>
|