agilebuilder-ui 1.0.1 → 1.0.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
@@ -98,38 +98,39 @@
98
98
  >
99
99
  <div>
100
100
  <el-tooltip
101
- :content="$t('imatrixUIPublicModel.systemCode') +':' + params.code"
101
+ :content="props && props.content?getPropValue('content', params) + '('+ params.code+')':(props && props.title?getPropValue('title', params) + '('+ params.code+')':'')"
102
102
  effect="dark"
103
103
  placement="top-start"
104
104
  >
105
105
  <div
106
106
  v-if="props && props.content"
107
- style="display: inline-block"
107
+ :style="'display: inline-block;width:'+titleWidth"
108
+ class="ellipsis cell--span"
108
109
  >
109
110
  {{
110
- getPropValue('content', params) +
111
- getLength(params.code)
111
+ getPropValue('content', params) + '('+ params.code+')'
112
112
  }}
113
113
  </div>
114
114
  <div
115
115
  v-else-if="props && props.title"
116
- style="display: inline-block"
116
+ :style="'display: inline-block;width:'+titleWidth"
117
+ class="ellipsis cell--span"
117
118
  >
118
119
  {{
119
- getPropValue('title', params) + getLength(params.code)
120
+ getPropValue('title', params) + '('+ params.code+')'
120
121
  }}
121
122
  </div>
122
123
  </el-tooltip>
123
124
  <div
124
125
  v-if="showEnableButton(params)"
125
126
  style="
126
- margin-left: 2px;
127
- color: #00b42a;
128
- background-color: #e8ffea;
129
- width: 68px;
130
- text-align: center;
131
- display: inline-block;
132
- "
127
+ margin-left: 2px;
128
+ color: #00b42a;
129
+ background-color: #e8ffea;
130
+ width: 68px;
131
+ text-align: center;
132
+ display: inline-block;
133
+ "
133
134
  >
134
135
  <el-icon>
135
136
  <SuccessFilled/>
@@ -142,13 +143,14 @@
142
143
  </div>
143
144
  </div>
144
145
  <div class="button-style">
145
- <div style="padding: 10px;box-sizing: border-box;">
146
+ <div style="padding: 10px;box-sizing: border-box;width: 50px">
146
147
  {{ $t('imatrixUIPublicModel.edit') }}
147
148
  </div>
148
- <div>
149
+ <div style="padding-left: 15px">
149
150
  <template v-for="button in operations">
150
151
  <template v-if="isShowButton(params, button)">
151
152
  <el-tooltip
153
+ :key="button.name"
152
154
  v-if="button.icon"
153
155
  v-permission="
154
156
  button.permission ? button.permission : 'true'
@@ -165,6 +167,7 @@
165
167
  </el-tooltip>
166
168
  <em
167
169
  v-else
170
+ :key="button.name"
168
171
  v-permission="
169
172
  button.permission ? button.permission : 'true'
170
173
  "
@@ -177,26 +180,28 @@
177
180
  <slot :name="slotBefore" :params="params"/>
178
181
  </div>
179
182
  </div>
180
- <div
181
- v-if="isShowEnableState"
183
+ <div
182
184
  style="position: absolute;right: 5%;bottom: 9%;"
183
185
  >
186
+ <slot :name="slotState" :params="params"/>
187
+ <template v-if="isShowEnableState">
184
188
  <el-button
185
- v-if="showEnableButton(params)"
186
- class="button--default"
187
- size="default"
188
- @click.stop="changeState(params)"
189
+ v-if="showEnableButton(params)"
190
+ class="button--default"
191
+ size="default"
192
+ @click.stop="changeState(params)"
189
193
  >
190
194
  {{ $t('imatrixUIPublicModel.forbidden') }}
191
195
  </el-button>
192
196
  <el-button
193
- v-else
197
+ v-else
194
198
  size="default"
195
199
  type="primary"
196
200
  @click.stop="changeState(params)"
197
201
  >
198
202
  {{ $t('imatrixUIPublicModel.startUsing') }}
199
203
  </el-button>
204
+ </template>
200
205
  </div>
201
206
  </div>
202
207
  </div>
@@ -303,6 +308,8 @@ export default {
303
308
  this.options && this.options.showRadio !== undefined
304
309
  ? this.options.showRadio
305
310
  : false
311
+ const titleWidth = this.options && this.options.style && this.options.style.titleWidth !== undefined
312
+ ? this.options.style.titleWidth:'60%'
306
313
  return {
307
314
  isLoading: false,
308
315
  currentPage: 1,
@@ -346,7 +353,9 @@ export default {
346
353
  titleStyle: null, // 标题的样式对象,格式为:{ color: 'green', fontWeight: 'bold'}
347
354
  isShowEnableState: false,
348
355
  colSpan: 6,
349
- slotBefore: 'before'
356
+ slotBefore: 'before',
357
+ titleWidth,
358
+ slotState: 'bottom'
350
359
  }
351
360
  },
352
361
  computed: {},
@@ -43,7 +43,8 @@ const cn = {
43
43
  fullScreen: '全屏',
44
44
  forbidden: '禁用',
45
45
  startUsing: '启用',
46
- systemCode: '系统编码'
46
+ systemCode: '系统编码',
47
+ code:'编码'
47
48
  },
48
49
  imatrixUIMessage: {
49
50
  whetherToConfirmDeletion: '是否确认删除',
@@ -120,7 +121,7 @@ const cn = {
120
121
  previewTitleWhenNotImg: '非图片格式,使用其它方式预览',
121
122
  refresh: '刷新',
122
123
  open: '展开',
123
- fold: '收起',
124
+ fold: '收起'
124
125
  },
125
126
  // 部门树组件
126
127
  departmentTree: {},
@@ -43,7 +43,8 @@ const en = {
43
43
  fullScreen: 'Full Screen',
44
44
  forbidden: 'forbidden',
45
45
  startUsing: 'Start Using',
46
- systemCode: 'System Code'
46
+ systemCode: 'System Code',
47
+ code:'Code'
47
48
  },
48
49
  imatrixUIMessage: {
49
50
  whetherToConfirmDeletion: 'Whether To Confirm Deletion',