@@ -1,5 +1,5 @@
<template>
- <el-table class="table" :data="data" row-key="name" style="width: 100%" :cell-style="{
+ <el-table class="table" :data="newData" row-key="name" style="width: 100%" :cell-style="{
...cellStyle,
...props.cellStyle
}" :header-cell-style="{
@@ -67,6 +67,10 @@ const state = reactive<BasicTableProps>({
}
})
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state);
+const newData = ref(props.data);
+watch(props.data, () => {
+ newData.value = props.data;
+});
</script>
<style scoped lang="scss">
.percent-box {