| | |
| | | </div> |
| | | <div style="height: calc(100vh - 190px)"> |
| | | <div> |
| | | <el-button icon="el-icon-plus" type="primary" size="mini" @click="addHandler">添加</el-button> |
| | | <el-button icon="el-icon-upload" type="primary" size="mini" @click="uploadHandler">上传</el-button> |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" type="primary" size="small" @click="addHandler"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | 添加 |
| | | </el-button> |
| | | <el-button v-if="permissionList.uploadBtn" class="button-custom-icon" type="primary" size="small" @click="uploadHandler"> |
| | | <icon-show :name="permissionList.uploadBtn.source"></icon-show> |
| | | 上传 |
| | | </el-button> |
| | | </div> |
| | | |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane v-for="item in iconList" :label="item.lable" :name="item.lable" style="height: calc(100vh - 270px);overflow: auto "> |
| | | <div class="iconList"> |
| | | <div class="iconList" :key="key"> |
| | | <div class="iconItem" v-for="svg in item.list" |
| | | :data-value="svg.name" v-right-click="{action:checkSvg,data:svg}"> |
| | | <div class="svgContent" v-html="svg.content"></div> |
| | |
| | | import {getStore} from "@/util/store"; |
| | | import store from "@/store"; |
| | | import {getToken} from "@/util/auth"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "index", |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | key:1, |
| | | types: [], |
| | | checkedTypes:[], |
| | | searchText:'', |
| | |
| | | "Authorizationtoken":getToken(), |
| | | }; |
| | | }, |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), |
| | | uploadBtn: this.vaildData(this.permission[this.$route.query.id].UPLOAD, false), |
| | | }; |
| | | }, |
| | | }, |
| | | watch:{ |
| | | 'form.groups'(val){ |
| | |
| | | if (this.iconList.length > 0) { |
| | | this.activeName = this.iconList[0].lable; |
| | | } |
| | | this.key++; |
| | | } else { |
| | | this.$message.error(res.data.msg); |
| | | } |