aloha-vue 1.0.124 → 1.0.126
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
CHANGED
package/src/ATable/ATable.js
CHANGED
|
@@ -482,7 +482,10 @@ export default {
|
|
|
482
482
|
if (this.modelColumnsOrdering.length) {
|
|
483
483
|
this.modelColumnsOrderingLocal = cloneDeep(this.modelColumnsOrdering);
|
|
484
484
|
} else {
|
|
485
|
-
this.changeColumnsOrdering({
|
|
485
|
+
this.changeColumnsOrdering({
|
|
486
|
+
modelColumnsOrderingLocal: getModelColumnsOrderingDefault(this.columns),
|
|
487
|
+
isFirst: true,
|
|
488
|
+
});
|
|
486
489
|
}
|
|
487
490
|
},
|
|
488
491
|
|
|
@@ -501,7 +504,7 @@ export default {
|
|
|
501
504
|
this.closePreviewAll();
|
|
502
505
|
},
|
|
503
506
|
|
|
504
|
-
changeColumnsOrdering({ modelColumnsOrderingLocal, columnIndexDraggable, columnIndexOver }) {
|
|
507
|
+
changeColumnsOrdering({ modelColumnsOrderingLocal, columnIndexDraggable, columnIndexOver, isFirst }) {
|
|
505
508
|
if (columnIndexDraggable === columnIndexOver && !modelColumnsOrderingLocal) {
|
|
506
509
|
return;
|
|
507
510
|
}
|
|
@@ -516,6 +519,7 @@ export default {
|
|
|
516
519
|
columnIndexDraggable,
|
|
517
520
|
columnIndexOver,
|
|
518
521
|
modelColumnsOrdering: cloneDeep(this.modelColumnsOrderingLocal),
|
|
522
|
+
isFirst,
|
|
519
523
|
});
|
|
520
524
|
this.checkVisibleColumns();
|
|
521
525
|
},
|
|
@@ -142,9 +142,18 @@ export default {
|
|
|
142
142
|
const TO = cloneDeep(this.column.to);
|
|
143
143
|
const PARAMS = TO.params || {};
|
|
144
144
|
if (this.column.to.paramsDynamic) {
|
|
145
|
+
let hasParamsDynamicError = false;
|
|
145
146
|
forEach(this.column.to.paramsDynamic, (value, key) => {
|
|
146
|
-
|
|
147
|
+
const PARAMS_VALUE = get(this.row, value);
|
|
148
|
+
if (isUndefined(PARAMS_VALUE)) {
|
|
149
|
+
hasParamsDynamicError = true;
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
PARAMS[key] = PARAMS_VALUE;
|
|
147
153
|
});
|
|
154
|
+
if (hasParamsDynamicError) {
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
148
157
|
}
|
|
149
158
|
TO.params = PARAMS;
|
|
150
159
|
return TO;
|
|
@@ -177,7 +186,7 @@ export default {
|
|
|
177
186
|
row: this.row,
|
|
178
187
|
rowIndex: this.rowIndex,
|
|
179
188
|
rows: this.rowsLocal,
|
|
180
|
-
}) : this.isLink ? [
|
|
189
|
+
}) : (this.isLink && this.toLocal) ? [
|
|
181
190
|
h(resolveComponent("RouterLink"), {
|
|
182
191
|
class: [this.column.class, this.classForLink],
|
|
183
192
|
to: this.toLocal,
|
|
@@ -7,7 +7,7 @@ import AIcon from "../../AIcon/AIcon";
|
|
|
7
7
|
import {
|
|
8
8
|
cloneDeep,
|
|
9
9
|
forEach, get,
|
|
10
|
-
isFunction, isPlainObject, isString,
|
|
10
|
+
isFunction, isPlainObject, isString, isUndefined,
|
|
11
11
|
} from "lodash-es";
|
|
12
12
|
|
|
13
13
|
export default {
|
|
@@ -99,9 +99,18 @@ export default {
|
|
|
99
99
|
const TO = cloneDeep(this.rowAction.to);
|
|
100
100
|
const PARAMS = TO.params || {};
|
|
101
101
|
if (this.rowAction.to.paramsDynamic) {
|
|
102
|
+
let hasParamsDynamicError = false;
|
|
102
103
|
forEach(this.rowAction.to.paramsDynamic, (value, key) => {
|
|
103
|
-
|
|
104
|
+
const PARAMS_VALUE = get(this.row, value);
|
|
105
|
+
if (isUndefined(PARAMS_VALUE)) {
|
|
106
|
+
hasParamsDynamicError = true;
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
PARAMS[key] = PARAMS_VALUE;
|
|
104
110
|
});
|
|
111
|
+
if (hasParamsDynamicError) {
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
105
114
|
}
|
|
106
115
|
TO.params = PARAMS;
|
|
107
116
|
return TO;
|
|
@@ -181,12 +190,14 @@ export default {
|
|
|
181
190
|
if (this.rowAction.type === "link") {
|
|
182
191
|
return h("li", null, [
|
|
183
192
|
this.rowAction.to ?
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
193
|
+
this.toLocal ?
|
|
194
|
+
h(resolveComponent("RouterLink"), {
|
|
195
|
+
id: this.idLocal,
|
|
196
|
+
class: ["a_dropdown__item a_table__row_action", this.classLocal],
|
|
197
|
+
to: this.toLocal,
|
|
198
|
+
...this.targetObject,
|
|
199
|
+
}, () => CONTENT) :
|
|
200
|
+
"" :
|
|
190
201
|
h("a", {
|
|
191
202
|
id: this.idLocal,
|
|
192
203
|
class: ["a_dropdown__item a_table__row_action", this.classLocal],
|