@scx-js/scx-admin 0.0.8 → 0.0.9
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.
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<script>
|
8
8
|
import {computed} from "vue";
|
9
|
-
import {notBlank} from "@scx-js/scx-common";
|
9
|
+
import {notBlank, randomUUID} from "@scx-js/scx-common";
|
10
10
|
import {checkIDCard, checkPhoneNumber, useCrudContext,} from "../../index.js";
|
11
11
|
|
12
12
|
export default {
|
@@ -61,7 +61,7 @@ export default {
|
|
61
61
|
|
62
62
|
const crudContext = useCrudContext();
|
63
63
|
|
64
|
-
const easyProp = computed(() => props.prop ? props.prop :
|
64
|
+
const easyProp = computed(() => props.prop ? props.prop : randomUUID());
|
65
65
|
|
66
66
|
const easyLabel = computed(() => {
|
67
67
|
if (props.label) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@scx-js/scx-admin",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.9",
|
4
4
|
"description": "SCX Admin",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "scx567888",
|
@@ -17,10 +17,10 @@
|
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
19
|
"@ckeditor/ckeditor5-vue": "^7.0.0",
|
20
|
-
"@scx-js/scx-app-x": "0.0.
|
21
|
-
"@scx-js/scx-common": "0.0.
|
22
|
-
"@scx-js/scx-dom": "0.0.
|
23
|
-
"@scx-js/scx-http": "0.0.
|
20
|
+
"@scx-js/scx-app-x": "0.0.9",
|
21
|
+
"@scx-js/scx-common": "0.0.9",
|
22
|
+
"@scx-js/scx-dom": "0.0.9",
|
23
|
+
"@scx-js/scx-http": "0.0.9",
|
24
24
|
"ckeditor5": "^44.0.0",
|
25
25
|
"element-plus": "^2.9.3",
|
26
26
|
"lodash-es": "^4.17.21",
|
package/scx/crud-context.js
CHANGED
@@ -150,12 +150,17 @@ class CrudContext {
|
|
150
150
|
baseCrudApi,
|
151
151
|
defaultTemp = {},
|
152
152
|
defaultWhere = {},
|
153
|
+
scxCrud = null,
|
153
154
|
} = {}) {
|
154
155
|
this.req = useScxReq();
|
155
156
|
this.userInfo = useScxUserInfo();
|
156
157
|
this.defaultTemp = defaultTemp;
|
157
158
|
this.defaultWhere = defaultWhere;
|
158
|
-
|
159
|
+
if (scxCrud) {
|
160
|
+
this.scxCrud = scxCrud;
|
161
|
+
} else {
|
162
|
+
this.scxCrud = new ScxCrud(this.req, baseCrudApi);
|
163
|
+
}
|
159
164
|
|
160
165
|
//重置全部对象
|
161
166
|
this.resetPagination();
|
@@ -246,7 +251,9 @@ class CrudContext {
|
|
246
251
|
q.offset((this.pagination.currentPage - 1) * this.pagination.pageSize);
|
247
252
|
|
248
253
|
//2, 设置 orderBy
|
249
|
-
|
254
|
+
if (this.orderBy.sortType) {
|
255
|
+
q.orderBy(new OrderBy(this.orderBy.fieldName, this.orderBy.sortType));
|
256
|
+
}
|
250
257
|
|
251
258
|
//3, 设置 where
|
252
259
|
|