@netang/quasar 0.0.91 → 0.0.92
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 +10 -7
package/package.json
CHANGED
package/utils/$power.js
CHANGED
|
@@ -743,12 +743,15 @@ function formatBtns(powerBtns, filterBtns, toObject = false) {
|
|
|
743
743
|
*/
|
|
744
744
|
function getRequestQuery(o) {
|
|
745
745
|
|
|
746
|
+
// 获取按钮数据
|
|
747
|
+
const btnData = o.powerBtn.data
|
|
748
|
+
|
|
746
749
|
// 传参
|
|
747
750
|
const query = {}
|
|
748
751
|
|
|
749
752
|
// 如果有请求传参的传参设置
|
|
750
|
-
if ($n_has(
|
|
751
|
-
const resQuery = parseQuery(o.query,
|
|
753
|
+
if ($n_has(btnData, 'requestQuery.query')) {
|
|
754
|
+
const resQuery = parseQuery(o.query, btnData.requestQuery.query)
|
|
752
755
|
if ($n_isValidObject(resQuery)) {
|
|
753
756
|
Object.assign(query, resQuery)
|
|
754
757
|
}
|
|
@@ -757,18 +760,18 @@ function getRequestQuery(o) {
|
|
|
757
760
|
// 获取列表数据
|
|
758
761
|
if (
|
|
759
762
|
// 如果按钮参数有显示类型
|
|
760
|
-
$n_has(
|
|
763
|
+
$n_has(btnData, 'show')
|
|
761
764
|
// 按钮参数的显示类型必须是单选或多选
|
|
762
|
-
&& $n_indexOf(['single', 'multiple'],
|
|
765
|
+
&& $n_indexOf(['single', 'multiple'], btnData.show) > -1
|
|
763
766
|
// 如果有请求传参的列表设置
|
|
764
|
-
&& $n_has(
|
|
767
|
+
&& $n_has(btnData, 'requestQuery.list')
|
|
765
768
|
// 如果有表格数据
|
|
766
769
|
&& $n_isValidArray(o.tableSelected)
|
|
767
770
|
) {
|
|
768
771
|
let newQuery = {}
|
|
769
772
|
|
|
770
773
|
// 如果是单选
|
|
771
|
-
if (
|
|
774
|
+
if (btnData.show === 'single') {
|
|
772
775
|
// 取表格选中第一条数据
|
|
773
776
|
newQuery = o.tableSelected[0]
|
|
774
777
|
|
|
@@ -786,7 +789,7 @@ function getRequestQuery(o) {
|
|
|
786
789
|
}
|
|
787
790
|
}
|
|
788
791
|
|
|
789
|
-
const resTable = parseQuery(newQuery,
|
|
792
|
+
const resTable = parseQuery(newQuery, btnData.requestQuery.list)
|
|
790
793
|
if ($n_isValidObject(resTable)) {
|
|
791
794
|
Object.assign(query, resTable)
|
|
792
795
|
}
|