mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
chore: update
This commit is contained in:
@@ -46,8 +46,7 @@ function dig(path = "0", level = 3) {
|
||||
};
|
||||
|
||||
if (level > 0) {
|
||||
// @ts-expect-error
|
||||
treeNode.children = dig(value, level - 1);
|
||||
(treeNode as any).children = dig(value, level - 1);
|
||||
}
|
||||
|
||||
list.push(treeNode);
|
||||
@@ -111,8 +110,7 @@ const onLoadData = treeNode => {
|
||||
return new Promise(resolve => {
|
||||
const { id } = treeNode.dataRef;
|
||||
setTimeout(() => {
|
||||
// @ts-expect-error
|
||||
treeData3.value = treeData3.value.concat([
|
||||
treeData3.value = (treeData3 as any).value.concat([
|
||||
genTreeNode(id, false),
|
||||
genTreeNode(id, true)
|
||||
]);
|
||||
|
||||
@@ -31,8 +31,7 @@ let menusData = computed(() => {
|
||||
let expandedKeys = extractPathList(menusData.value);
|
||||
|
||||
const onQueryChanged = (query: string) => {
|
||||
// @ts-expect-error
|
||||
treeRef.value!.filter(query);
|
||||
(treeRef as any).value!.filter(query);
|
||||
};
|
||||
|
||||
const filterMethod = (query: string, node: treeNode) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, getCurrentInstance } from "vue";
|
||||
import { ref, nextTick } from "vue";
|
||||
import Cropper from "/@/components/ReCropper";
|
||||
import img from "./picture.jpeg";
|
||||
|
||||
@@ -7,20 +7,17 @@ defineOptions({
|
||||
name: "Cropping"
|
||||
});
|
||||
|
||||
let refCropper = ref();
|
||||
let info = ref<object>(null);
|
||||
let cropperImg = ref<string>("");
|
||||
const instance = getCurrentInstance();
|
||||
|
||||
const onCropper = (): void => {
|
||||
nextTick(() => {
|
||||
// @ts-expect-error
|
||||
instance.refs.refCropper.cropper.getCroppedCanvas().toBlob(blob => {
|
||||
refCropper.value.cropper.getCroppedCanvas().toBlob(blob => {
|
||||
let fileReader: FileReader = new FileReader();
|
||||
fileReader.onloadend = (e: ProgressEvent) => {
|
||||
// @ts-ignore
|
||||
cropperImg.value = e.target.result;
|
||||
// @ts-expect-error
|
||||
info.value = instance.refs.refCropper.cropper.getData();
|
||||
cropperImg.value = (e.target as any).result;
|
||||
info.value = refCropper.value.cropper.getData();
|
||||
};
|
||||
fileReader.readAsDataURL(blob);
|
||||
}, "image/jpeg");
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import Sortable from "sortablejs";
|
||||
import { ref, onMounted } from "vue";
|
||||
import draggable from "vuedraggable/src/vuedraggable";
|
||||
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
|
||||
@@ -39,7 +40,6 @@ const change = (evt): void => {
|
||||
|
||||
onMounted(() => {
|
||||
// 使用原生sortable实现元素位置切换
|
||||
// @ts-ignore
|
||||
new Sortable(document.querySelector(".cut-container"), {
|
||||
swap: true,
|
||||
forceFallback: true,
|
||||
|
||||
@@ -44,8 +44,7 @@ let classOption = reactive({
|
||||
});
|
||||
|
||||
function changeDirection(val) {
|
||||
// @ts-ignore
|
||||
unref(scroll).reset();
|
||||
(unref(scroll) as any).reset();
|
||||
unref(classOption).direction = val;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -45,8 +45,7 @@ function nodeClick(value) {
|
||||
}
|
||||
|
||||
function toggleRowExpansionAll(status) {
|
||||
// @ts-expect-error
|
||||
let nodes = proxy.$refs["treeRef"].store._getAllNodes();
|
||||
let nodes = (proxy.$refs["treeRef"] as any).store._getAllNodes();
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
nodes[i].expanded = status;
|
||||
}
|
||||
|
||||
@@ -38,8 +38,9 @@ function onCloseTags() {
|
||||
getNodeByUniqueId(treeData.value, uniqueId).path;
|
||||
useMultiTagsStoreHook().handleTags("splice", currentPath);
|
||||
if (currentPath === "/tabs/index")
|
||||
// @ts-expect-error
|
||||
router.push({ path: multiTags.value[multiTags.value.length - 1].path });
|
||||
router.push({
|
||||
path: multiTags.value[(multiTags as any).value.length - 1].path
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user