mooho-base-admin-plus 2.2.7 → 2.2.8

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.2.7",
4
+ "version": "2.2.8",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -343,11 +343,16 @@
343
343
  </Dropdown>
344
344
  </FormItem>
345
345
  </Col>
346
- <Col v-bind="grid8">
346
+ <Col v-bind="grid8" v-if="data.controlType != 'Description'">
347
347
  <FormItem label="描述" key="description" prop="description">
348
348
  <Input type="text" v-model="data.description" maxlength="200" />
349
349
  </FormItem>
350
350
  </Col>
351
+ <Col v-bind="grid24" v-if="data.controlType == 'Description'">
352
+ <FormItem label="描述" key="description" prop="description">
353
+ <Input type="textarea" :rows="5" v-model="data.description" />
354
+ </FormItem>
355
+ </Col>
351
356
  <Col v-bind="grid8" v-if="data.controlType == 'TextInput' || data.controlType == 'TextArea'">
352
357
  <FormItem label="最大字符数量" key="maxLength" prop="maxLength">
353
358
  <Input type="number" style="width: 100px" number v-model="data.maxLength" />
@@ -186,6 +186,7 @@
186
186
  this.componentGroups.find(componentGroup => componentGroup.key == 'DateTime').components.push(component);
187
187
  } else if (
188
188
  item.id == 'Title' ||
189
+ item.id == 'Description' ||
189
190
  item.id == 'Table' ||
190
191
  item.id == 'List' ||
191
192
  item.id == 'Attachment' ||
@@ -93,6 +93,9 @@
93
93
  <div :class="{ error: compareData != null && parseData(data, column.code) != parseData(compareData, column.code) }" v-html="showData(data, column)"></div>
94
94
  </div>
95
95
  </template>
96
+ <template v-else-if="column.controlType === 'Description'">
97
+ <div v-html="showDataMultiLine(column.description)"></div>
98
+ </template>
96
99
  <template v-if="column.controlType === 'Hyperlink'">
97
100
  <a :href="getHyperlink(data, column.hyperlink)" :target="column.isNewWindow ? '_blank' : ''">
98
101
  <span v-html="showData(data, column)"></span>
@@ -296,6 +296,13 @@ export default {
296
296
  return value;
297
297
  }
298
298
  },
299
+ showDataMultiLine(content) {
300
+ if (content == null) {
301
+ return null;
302
+ } else {
303
+ return content.replaceAll(' ', '&nbsp;').replaceAll('\n', '<br/>');
304
+ }
305
+ },
299
306
  // 根据表达式取值
300
307
  parseData(model, expression) {
301
308
  // if (expression == null) {