@netang/quasar 0.1.73 → 0.1.74
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/utils/$power.js +12 -10
- package/utils/$table.js +13 -6
package/package.json
CHANGED
package/utils/$power.js
CHANGED
|
@@ -145,6 +145,9 @@ function create(options) {
|
|
|
145
145
|
// 权限路由
|
|
146
146
|
let $route
|
|
147
147
|
|
|
148
|
+
// 自定义参数
|
|
149
|
+
const optionsQuery = $n_isValidObject(o.query) ? o.query : {}
|
|
150
|
+
|
|
148
151
|
// 如果没有路由
|
|
149
152
|
if (o.path === false) {
|
|
150
153
|
|
|
@@ -152,7 +155,7 @@ function create(options) {
|
|
|
152
155
|
$route = {
|
|
153
156
|
fullPath: '',
|
|
154
157
|
path: '',
|
|
155
|
-
query:
|
|
158
|
+
query: optionsQuery,
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
// 如果有自定义路径
|
|
@@ -161,19 +164,18 @@ function create(options) {
|
|
|
161
164
|
// 获取自定义路由
|
|
162
165
|
$route = $n_router.resolve({
|
|
163
166
|
path: o.path,
|
|
164
|
-
query:
|
|
167
|
+
query: optionsQuery,
|
|
165
168
|
})
|
|
166
169
|
|
|
167
|
-
// 如果在渲染组件内 && 该渲染组件有自定义路由
|
|
168
|
-
} else if (hasRender && $n_has($render, 'getRoute')) {
|
|
169
|
-
|
|
170
|
-
// 设为渲染组件的路由
|
|
171
|
-
$route = $render.getRoute()
|
|
172
|
-
|
|
173
|
-
// 否则获取当前路由
|
|
174
170
|
} else {
|
|
175
171
|
|
|
176
|
-
|
|
172
|
+
// 如果在渲染组件内 && 该渲染组件有自定义路由
|
|
173
|
+
$route = hasRender && $n_has($render, 'getRoute')
|
|
174
|
+
// 设为渲染组件的路由
|
|
175
|
+
? $render.getRoute()
|
|
176
|
+
// 否则获取当前路由
|
|
177
|
+
: $currentRoute
|
|
178
|
+
Object.assign($route.query, optionsQuery)
|
|
177
179
|
}
|
|
178
180
|
|
|
179
181
|
// quasar 对象
|
package/utils/$table.js
CHANGED
|
@@ -231,15 +231,22 @@ function create(options) {
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
//
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
// 自定义参数
|
|
235
|
+
const optionsQuery = $n_isValidObject(o.query) ? o.query : {}
|
|
236
|
+
|
|
237
|
+
// 如果为自定义路由
|
|
238
|
+
if ($n_isValidString(o.path)) {
|
|
239
|
+
// 获取权限路由
|
|
240
|
+
$route = $n_router.resolve({
|
|
238
241
|
path: o.path,
|
|
239
|
-
query:
|
|
242
|
+
query: optionsQuery,
|
|
240
243
|
})
|
|
241
244
|
// 否则获取当前路由
|
|
242
|
-
|
|
245
|
+
} else {
|
|
246
|
+
// 获取权限路由
|
|
247
|
+
$route = hasPowr ? $power.getRoute() : $n_router.getRoute()
|
|
248
|
+
Object.assign($route.query, optionsQuery)
|
|
249
|
+
}
|
|
243
250
|
|
|
244
251
|
// 是否有权限按钮
|
|
245
252
|
const _hasPowerBtns = hasPowr ? $power.powerBtns.value.length : false
|