我发布时,审核说无法选择.xlsx文件,在我本地是可以的,这是为什么呢,以下是源代码。
页面:<button class="btn btn-primary" @click="selectSourceFile" :style="{
backgroundColor: getThemeColor(),
color: getTextColorForBackground(getThemeColor())
}">
选择文件
</button>
js代码: async selectSourceFile() {
const files = utools.showOpenDialog({
filters: [{ name: "Excel & CSV Files", extensions: ["xlsx", "csv"] }],
properties: ["openFile "],
});
if (!files) return;
this.sourceFilePath = files[0];
},