mooho-base-admin-plus 2.2.14 → 2.3.0

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.14",
4
+ "version": "2.3.0",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -288,6 +288,32 @@
288
288
  </Select>
289
289
  </FormItem>
290
290
  </Col>
291
+ <Col v-bind="grid8" v-if="viewType == 'TableView' && data.controlType == 'Label'">
292
+ <FormItem label="强制单行" key="is_fixed" prop="isSingleLine">
293
+ <Switch
294
+ :model-value="!!data.isSingleLine"
295
+ @update:model-value="
296
+ $event => {
297
+ data.isSingleLine = $event;
298
+ //$forceUpdate();
299
+ }
300
+ "
301
+ />
302
+ </FormItem>
303
+ </Col>
304
+ <Col v-bind="grid8" v-if="viewType == 'TableView' && data.controlType == 'Label'">
305
+ <FormItem label="固定在最前" key="isFixed" prop="isFixed">
306
+ <Switch
307
+ :model-value="!!data.isFixed"
308
+ @update:model-value="
309
+ $event => {
310
+ data.isFixed = $event;
311
+ //$forceUpdate();
312
+ }
313
+ "
314
+ />
315
+ </FormItem>
316
+ </Col>
291
317
  <Col v-bind="grid8">
292
318
  <FormItem label="是否必填" key="isRequired" prop="isRequired">
293
319
  <Switch
@@ -121,7 +121,11 @@
121
121
  <slot name="column" :row="rowData(row, index)" :index="index" :column="column" :code="column.code"></slot>
122
122
  </template>
123
123
  <template v-else-if="column.controlType === 'Label'">
124
- <div v-html="showData(rowData(row, index), column)"></div>
124
+ <div
125
+ :title="column.isSingleLine ? showData(rowData(row, index), column) : null"
126
+ :class="{ 'single-line': column.isSingleLine }"
127
+ v-html="showData(rowData(row, index), column)"
128
+ ></div>
125
129
  </template>
126
130
  <template v-else-if="column.controlType === 'Hyperlink'">
127
131
  <a :href="getHyperlink(rowData(row, index), column.hyperlink)" :target="column.isNewWindow ? '_blank' : ''">
@@ -980,6 +984,7 @@
980
984
 
981
985
  this.columns.forEach(column => {
982
986
  column.name = this.getNameI18n(column);
987
+ column.fixed = column.isFixed ? 'left' : null;
983
988
  });
984
989
 
985
990
  if (this.tableView.snEnable) {
@@ -584,3 +584,9 @@
584
584
  ::-webkit-scrollbar-track {
585
585
  background-color: transparent;
586
586
  }
587
+
588
+ .single-line {
589
+ overflow: hidden;
590
+ text-overflow: ellipsis;
591
+ white-space: nowrap;
592
+ }