feat: 🚀 站点切换
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
|
||||
<script setup lang="ts" name="ProTable">
|
||||
// /watch
|
||||
import { ref, provide, onMounted, watch } from "vue";
|
||||
import { ref, provide, onMounted } from "vue";
|
||||
import { ElTable } from "element-plus";
|
||||
import { useTable } from "@/hooks/useTable";
|
||||
import { useSelection } from "@/hooks/useSelection";
|
||||
@@ -93,6 +93,8 @@ import SearchForm from "@/components/SearchForm/index.vue";
|
||||
import Pagination from "./components/Pagination.vue";
|
||||
import ColSetting from "./components/ColSetting.vue";
|
||||
import TableColumn from "./components/TableColumn.vue";
|
||||
// import { useUserStore } from "@/stores/modules/user";
|
||||
// const userStore = useUserStore();
|
||||
const $router = useRouter();
|
||||
const routeName: any = ref($router.currentRoute.value.name);
|
||||
export interface ProTableProps {
|
||||
@@ -157,7 +159,7 @@ onMounted(() => props.requestAuto && getTableList());
|
||||
// 监听页面 initParam 改化,重新获取表格数据
|
||||
// watch(() => props.initParam, getTableList, { deep: true });
|
||||
// 监听页面 orgCode 改化,重新获取表格数据
|
||||
watch(() => props.orgCode, getTableList, { deep: true });
|
||||
// watch(() => userStore.languageType, getTableList, { deep: true });
|
||||
// 接收 columns 并设置为响应式
|
||||
const tableColumns = ref<ColumnProps[]>(props.columns);
|
||||
|
||||
@@ -195,7 +197,12 @@ const colRef = ref();
|
||||
const colSetting = tableColumns.value!.filter(
|
||||
item => !["selection", "index", "expand"].includes(item.type!) && item.prop !== "operation" && item.isShow
|
||||
);
|
||||
|
||||
// watch(
|
||||
// () => userStore.languageType,
|
||||
// (newVal: any) => {
|
||||
// console.log(newVal, "=newVal=");
|
||||
// }
|
||||
// );
|
||||
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
||||
defineExpose({
|
||||
element: tableRef,
|
||||
|
||||
Reference in New Issue
Block a user