w-ui-v1 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/w-detail/w-detail.vue +27 -22
- package/w-menu/w-menu.vue +2 -2
package/package.json
CHANGED
package/w-detail/w-detail.vue
CHANGED
|
@@ -65,31 +65,36 @@
|
|
|
65
65
|
success: (res) => {
|
|
66
66
|
if (res.statusCode === 200) {
|
|
67
67
|
console.log('下载成功', res.tempFilePath);
|
|
68
|
-
|
|
69
|
-
// 将临时文件保存到本地
|
|
70
|
-
uni.saveFile({
|
|
71
|
-
tempFilePath: res.tempFilePath,
|
|
72
|
-
success: (saveRes) => {
|
|
73
|
-
console.log('文件保存成功', saveRes.savedFilePath);
|
|
74
|
-
const savedFilePath = saveRes.savedFilePath; // 保存后的路径
|
|
75
|
-
// 打开文件(如PDF、Word等)
|
|
68
|
+
// 打开文件(如PDF、Word等)
|
|
76
69
|
uni.openDocument({
|
|
77
|
-
filePath:
|
|
70
|
+
filePath: res.tempFilePath,
|
|
71
|
+
showMenu:true,
|
|
78
72
|
success: () => console.log('打开文件成功')
|
|
79
73
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
74
|
+
// // 将临时文件保存到本地
|
|
75
|
+
// uni.saveFile({
|
|
76
|
+
// tempFilePath: res.tempFilePath,
|
|
77
|
+
// success: (saveRes) => {
|
|
78
|
+
// console.log('文件保存成功', saveRes.savedFilePath);
|
|
79
|
+
// const savedFilePath = saveRes.savedFilePath; // 保存后的路径
|
|
80
|
+
// // 打开文件(如PDF、Word等)
|
|
81
|
+
// uni.openDocument({
|
|
82
|
+
// filePath: savedFilePath,
|
|
83
|
+
// success: () => console.log('打开文件成功')
|
|
84
|
+
// });
|
|
85
|
+
// uni.showToast({
|
|
86
|
+
// title: '文件保存成功',
|
|
87
|
+
// icon: 'success'
|
|
88
|
+
// });
|
|
89
|
+
// },
|
|
90
|
+
// fail: (saveErr) => {
|
|
91
|
+
// console.error('文件保存失败', saveErr);
|
|
92
|
+
// uni.showToast({
|
|
93
|
+
// title: '文件保存失败',
|
|
94
|
+
// icon: 'none'
|
|
95
|
+
// });
|
|
96
|
+
// }
|
|
97
|
+
// });
|
|
93
98
|
} else {
|
|
94
99
|
console.error('下载失败', res);
|
|
95
100
|
uni.showToast({
|
package/w-menu/w-menu.vue
CHANGED
|
@@ -121,7 +121,7 @@ function queryList() {
|
|
|
121
121
|
<template>
|
|
122
122
|
<z-paging ref="paging" v-model="menuList" @query="queryList">
|
|
123
123
|
<template #top>
|
|
124
|
-
|
|
124
|
+
<slot name="top"></slot>
|
|
125
125
|
</template>
|
|
126
126
|
<view>
|
|
127
127
|
<view v-if="filtermenu.length > 0">
|
|
@@ -148,7 +148,7 @@ function queryList() {
|
|
|
148
148
|
@select="({ item }) => { sheetGotoPage(item) }" />
|
|
149
149
|
</view>
|
|
150
150
|
<template #bottom>
|
|
151
|
-
|
|
151
|
+
<slot name="bottom"></slot>
|
|
152
152
|
</template>
|
|
153
153
|
</z-paging>
|
|
154
154
|
</template>
|