mooho-base-admin-plus 2.0.50 → 2.0.51

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.0.50",
4
+ "version": "2.0.51",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -766,7 +766,7 @@
766
766
  paramOpen() {
767
767
  this.params = [];
768
768
  this.paramOpened = true;
769
- if (this.data.param != null && this.data.param != '') {
769
+ if (this.data.param != null && this.data.param !== '') {
770
770
  let obj = JSON.parse(this.data.param);
771
771
  for (let key in obj) {
772
772
  let type = '变量';
@@ -579,7 +579,7 @@
579
579
  paramOpen() {
580
580
  this.params = [];
581
581
  this.paramOpened = true;
582
- if (this.data.param != null && this.data.param != '') {
582
+ if (this.data.param != null && this.data.param !== '') {
583
583
  let obj = JSON.parse(this.data.param);
584
584
  for (let key in obj) {
585
585
  let type = '变量';
@@ -205,6 +205,11 @@
205
205
  // 打开字段设置界面
206
206
  edit(row, index) {
207
207
  this.$refs.columnEdit.open(row, index, this.$refs.form.columns, data => {
208
+ // 创建结构
209
+ if (get(this.$refs.form.data, data.code) == null) {
210
+ set(this.$refs.form.data, data.code, null);
211
+ }
212
+
208
213
  let columns = this.$refs.form.columns;
209
214
  columns.splice(index, 1, data);
210
215
  });
@@ -126,7 +126,7 @@
126
126
  // 将数据库获取的json字符串转换为数组对象
127
127
  toData() {
128
128
  let filterArr = [];
129
- if (this.filter != '' && this.filter != null) {
129
+ if (this.filter !== '' && this.filter != null) {
130
130
  let json = JSON.parse(this.filter);
131
131
  for (let key in json) {
132
132
  let operatorArr = [];
@@ -143,7 +143,7 @@
143
143
  toData() {
144
144
  let array = [];
145
145
  // 如果该字段为空,则如下转换不进行
146
- if (this.sort != '' && this.sort != null) {
146
+ if (this.sort !== '' && this.sort != null) {
147
147
  let json = JSON.parse(this.sort);
148
148
  for (let key in json) {
149
149
  array.push({
@@ -157,7 +157,7 @@
157
157
  // 添加排序规则确认
158
158
  async saveSortingForm() {
159
159
  // 保存前字段均不为空
160
- if (this.data.code != '' && this.data.code != null && this.data.rule != null && this.data.rule != '') {
160
+ if (this.data.code !== '' && this.data.code != null && this.data.rule != null && this.data.rule !== '') {
161
161
  let checkSort = false;
162
162
  // 遍历原排序对象 dataSorting 中是否有与新增的字段相同的
163
163
  // 暂时不做此判断,后续再优化2021年3月19日18:39:13
@@ -601,7 +601,7 @@
601
601
  parseArrayFilterData(model, column) {
602
602
  let data = [];
603
603
  let value = this.parseFilterData(model, column);
604
- if (value != null && value != '') {
604
+ if (value != null && value !== '') {
605
605
  data = value.split(',');
606
606
  }
607
607
 
@@ -1369,7 +1369,6 @@
1369
1369
  } else if (column.controlType === 'DialogSelect' || column.controlType === 'MultiDialogSelect') {
1370
1370
  if (param == null) {
1371
1371
  // 参数不完整,清空数据
1372
- column.dataSource = [];
1373
1372
  this.setData(this.data, column.code, null);
1374
1373
  // column.displayValue = null;
1375
1374
 
package/src/index.js CHANGED
@@ -117,9 +117,7 @@ const install = function (app) {
117
117
  app.use(router);
118
118
  app.use(store);
119
119
  app.use(i18n);
120
- app.use(ViewUIPlus, {
121
- i18n
122
- });
120
+ app.use(ViewUIPlus);
123
121
  //app.use(plugins);
124
122
 
125
123
  app.mixin(mixinApp);
@@ -361,7 +361,7 @@
361
361
  paramOpen() {
362
362
  this.params = [];
363
363
  this.paramOpened = true;
364
- if (this.data.param != null && this.data.param != '') {
364
+ if (this.data.param != null && this.data.param !== '') {
365
365
  let obj = JSON.parse(this.data.param);
366
366
  for (let key in obj) {
367
367
  this.params.push({