@scx-js/scx-admin 0.0.7 → 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.
@@ -194,6 +194,7 @@ const defaultEditorConfig = {
194
194
  ],
195
195
  },
196
196
  translations: [zhCNTranslations],
197
+ licenseKey: "GPL",
197
198
  };
198
199
 
199
200
  export {defaultEditorConfig};
@@ -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 : getUUID());
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.7",
3
+ "version": "0.0.9",
4
4
  "description": "SCX Admin",
5
5
  "license": "MIT",
6
6
  "author": "scx567888",
@@ -17,13 +17,14 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@ckeditor/ckeditor5-vue": "^7.0.0",
20
- "@scx-js/scx-app-x": "0.0.7",
21
- "@scx-js/scx-common": "0.0.7",
22
- "@scx-js/scx-dom": "0.0.7",
23
- "@scx-js/scx-http": "0.0.7",
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",
27
+ "monaco-editor": "^0.52.2",
27
28
  "nprogress": "^0.2.0",
28
29
  "vue": "^3.0.0"
29
30
  },
@@ -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
- this.scxCrud = new ScxCrud(this.req, baseCrudApi);
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
- q.orderBy(new OrderBy(this.orderBy.fieldName, this.orderBy.sortType));
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