refactor: Element Plus图标依赖@element-plus/icons过时,调整为@element-plus/icons-vue

This commit is contained in:
郝先瑞
2022-02-27 12:58:16 +08:00
parent 9cc66456b7
commit 5edc5ef334
23 changed files with 39 additions and 33 deletions

View File

@@ -108,7 +108,7 @@
<script setup lang="ts">
import {listClientsWithPage, detail, update, add, del} from '@/api/system/client'
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons-vue'
import {onMounted, reactive, getCurrentInstance, ref, unref, toRefs} from 'vue'
import {ElForm, ElMessage, ElMessageBox} from "element-plus"

View File

@@ -162,7 +162,7 @@ import {onMounted, reactive, unref, ref, toRefs} from 'vue'
import {listDeptTable, getDeptDetail, deleteDept, updateDept, addDept, listDeptSelect} from '@/api/system/dept'
// 组件依赖
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons-vue'
import TreeSelect from '@/components/TreeSelect/index.vue'
import {ElForm, ElMessage, ElMessageBox} from 'element-plus'

View File

@@ -111,7 +111,7 @@
<script setup lang="ts">
import {listDictWithPage, getDictDetail, addDict, updateDict, deleteDict} from "@/api/system/dict";
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons-vue'
import {onMounted, reactive, ref, unref} from 'vue'
import {ElForm, ElMessage, ElMessageBox} from "element-plus";

View File

@@ -119,7 +119,7 @@ import {
updateDictItem,
deleteDictItem
} from "@/api/system/dict";
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons';
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons-vue';
import {onMounted, reactive, ref, unref, watch} from 'vue'
import {ElForm, ElMessage, ElMessageBox} from "element-plus";

View File

@@ -181,7 +181,7 @@
<script setup lang="ts">
import {listTableMenus, getMenuDetail, listTreeSelectMenus, addMenu, deleteMenus, updateMenu} from "@/api/system/menu";
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons-vue'
import {ElForm, ElMessage, ElMessageBox} from "element-plus";
import {reactive, ref, unref, onMounted, toRefs} from "vue";
import SvgIcon from '@/components/SvgIcon/index.vue';

View File

@@ -133,7 +133,7 @@
<script setup lang="ts">
import {listPermsWithPage, getPermDetail, addPerm, updatePerm, deletePerms} from "@/api/system/perm"
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons-vue'
import {onMounted, watch, reactive, ref, unref, getCurrentInstance, toRefs} from 'vue'
import {ElForm, ElMessage, ElMessageBox} from "element-plus"

View File

@@ -34,7 +34,7 @@ import {listTreeSelectMenus} from "@/api/system/menu";
import {listRoleMenuIds, updateRoleMenu} from "@/api/system/role"
import { nextTick, onMounted, reactive, ref, toRefs, watch} from "vue"
import {ElTree, ElMessage, ElMessageBox} from "element-plus"
import {Switch, Check} from '@element-plus/icons'
import {Switch, Check} from '@element-plus/icons-vue'
const emit = defineEmits(['menuClick'])
const props = defineProps({

View File

@@ -44,7 +44,7 @@ import {listPerms} from "@/api/system/perm";
import {listRolePerms, saveRolePerms} from "@/api/system/role";
import { onMounted, reactive, toRefs, watch} from "vue";
import {ElMessage} from "element-plus";
import {Check} from '@element-plus/icons'
import {Check} from '@element-plus/icons-vue'
const props = defineProps({
role: {

View File

@@ -115,7 +115,7 @@
import {listRolesWithPage, updateRole, getRoleDetail, addRole, deleteRoles} from '@/api/system/role'
import { onMounted, reactive, ref, toRefs, unref} from "vue"
import {ElForm, ElMessage, ElMessageBox} from "element-plus";
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons'
import {Search, Plus, Edit, Refresh, Delete} from '@element-plus/icons-vue'
const emit = defineEmits(['roleClick'])
const dataForm = ref(ElForm) // 属性名必须和元素的ref属性值一致

View File

@@ -337,7 +337,7 @@ import {listRoles} from '@/api/system/role'
// 组件依赖
import {ElMessage, ElMessageBox, ElTree, ElForm} from 'element-plus'
import {Search, Plus, Edit, Refresh, Delete, Lock} from '@element-plus/icons'
import {Search, Plus, Edit, Refresh, Delete, Lock} from '@element-plus/icons-vue'
import TreeSelect from '@/components/TreeSelect/index.vue'
// DOM元素的引用声明定义
@@ -459,8 +459,8 @@ function filterDeptNode(value: string, data: any) {
}
/**
* 部门树点击
**/
* 部门树节点点击事件
*/
function handleDeptNodeClick(data: { [key: string]: any }) {
state.queryParams.deptId = data.id
handleQuery()
@@ -477,7 +477,7 @@ async function loadRoleOptions() {
/**
* 用户状态修改
**/
*/
function handleStatusChange(row: { [key: string]: any }) {
const text = row.status === 1 ? '启用' : '停用'
ElMessageBox.confirm('确认要' + text + '' + row.username + '用户吗?', '警告', {
@@ -604,11 +604,10 @@ function submitForm() {
/**
* 表单重置
**/
* 重置表单
*/
function resetForm() {
const dataForm = unref(dataFormRef)
dataForm.resetFields()
dataFormRef.value.resetFields()
}
@@ -667,6 +666,7 @@ function loadData() {
}
onMounted(() => {
loadData()
})
</script>