vue2-client 1.13.21 → 1.13.23

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": "vue2-client",
3
- "version": "1.13.21",
3
+ "version": "1.13.23",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -80,7 +80,8 @@
80
80
  @columnClick="columnClick"
81
81
  @gotoUserDetail="gotoUserDetail"
82
82
  @editButtonStateDataClick="editButtonStateDataClick"
83
- @importExcelOk="importExcelOk">
83
+ @importExcelOk="importExcelOk"
84
+ @rowClick="handleRowClick">
84
85
  <template slot="leftButton" slot-scope="{selectedRowKeys, selectedRows}">
85
86
  <slot name="leftButton" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
86
87
  </template>
@@ -816,6 +817,10 @@ export default {
816
817
  // 直接转发事件的函数
817
818
  emitEvent (event, ...args) {
818
819
  this.$emit(event, ...args)
820
+ },
821
+ // 添加处理 rowClick 的方法
822
+ handleRowClick (record) {
823
+ this.$emit('rowClick', record)
819
824
  }
820
825
  },
821
826
  action: {
@@ -36,6 +36,7 @@
36
36
  @hook:mounted="(h)=>onComponentMounted(h,cell,cellIndex)"
37
37
  :queryParamsName="cell.slotConfig"
38
38
  :configName="cell.slotConfig"
39
+ @rowClick="handleRowClick"
39
40
  :countVisible="false"
40
41
  :env="env"
41
42
  />
@@ -71,7 +72,7 @@
71
72
  @hook:mounted="(h)=>onComponentMounted(h,cell,cellIndex)"
72
73
  :queryParamsName="cell.slotConfig"
73
74
  :configName="cell.slotConfig"
74
- @listClick="listClick"
75
+ @rowClick="handleRowClick"
75
76
  :countVisible="false"
76
77
  :env="env"
77
78
  />
@@ -642,6 +643,9 @@ export default {
642
643
  }
643
644
  }
644
645
  },
646
+ handleRowClick (record) {
647
+ this.$emit('rowClick', record)
648
+ }
645
649
  },
646
650
  beforeMount () {
647
651
  if (this.useOssForImg) {
@@ -149,7 +149,7 @@
149
149
  </a-row>
150
150
  <!-- 如果当前是表格模式 -->
151
151
  <template v-if="isTableMode">
152
- <x-table-wrapper ref="table">
152
+ <x-table-wrapper ref="table" @rowClick="handleRowClick">
153
153
  <template slot="footer">
154
154
  <slot
155
155
  name="footer"
@@ -1302,6 +1302,9 @@ export default {
1302
1302
  item['序号'] = this.localEditModeDataSource[this.localEditModeDataSource.length - 1]['序号'] + 1
1303
1303
  }
1304
1304
  this.localEditModeDataSource.push(item)
1305
+ },
1306
+ handleRowClick (record) {
1307
+ this.$emit('rowClick', record)
1305
1308
  }
1306
1309
  }
1307
1310
  }
@@ -16,6 +16,7 @@
16
16
  :setScrollYHeight="tableContext.setScrollYHeight"
17
17
  :selectRowMode="tableContext.selectRowMode"
18
18
  :size="tableContext.tableSize"
19
+ @rowClick="handleRowClick"
19
20
  >
20
21
  <template
21
22
  v-for="(item, c_index) in tableContext.tableColumns"
@@ -154,6 +155,9 @@ export default {
154
155
  },
155
156
  inject: ['tableContext'],
156
157
  methods: {
158
+ handleRowClick (record) {
159
+ this.$emit('rowClick', record)
160
+ },
157
161
  setLocalDataSource (data) {
158
162
  this.$refs.table.setLocalDataSource(data)
159
163
  },
@@ -1,5 +1,7 @@
1
1
  <template>
2
- <div class="x-title">{{ title }}</div>
2
+ <div class="x-title" :class="{ 'with-underline': hasUnderline, 'only-line': isOnlyLine }">
3
+ <span v-show="!isOnlyLine">{{ processedTitle }}</span>
4
+ </div>
3
5
  </template>
4
6
 
5
7
  <script>
@@ -16,6 +18,17 @@ export default {
16
18
  title: ''
17
19
  }
18
20
  },
21
+ computed: {
22
+ processedTitle () {
23
+ return this.title.replace('</br>', '')
24
+ },
25
+ hasUnderline () {
26
+ return this.title.includes('</br>')
27
+ },
28
+ isOnlyLine () {
29
+ return this.title === '</br>'
30
+ }
31
+ },
19
32
  created () {
20
33
  this.getData(this.queryParamsName)
21
34
  },
@@ -36,4 +49,14 @@ export default {
36
49
  font-family: "Source Han Sans", sans-serif;
37
50
  color: #5D5C5C;
38
51
  }
52
+
53
+ .with-underline {
54
+ border-bottom: 1px solid #5D5C5C;
55
+ }
56
+
57
+ .only-line {
58
+ height: 1px;
59
+ background-color: #5D5C5C;
60
+ margin: 13px 0;
61
+ }
39
62
  </style>
@@ -53,8 +53,8 @@ routerResource.example = {
53
53
  path: 'example',
54
54
  name: '示例主页面',
55
55
  // component: () => import('@vue2-client/base-client/components/his/XTimeSelect/XTimeSelect.vue'),
56
- component: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
57
- // component: () => import('@vue2-client/base-client/components/his/XTitle/XTitle.vue'),
56
+ // component: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
57
+ component: () => import('@vue2-client/base-client/components/his/XTitle/XTitle.vue'),
58
58
  // component: () => import('@vue2-client/base-client/components/his/XSelect/XSelect.vue'),
59
59
  // component: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
60
60
  // component: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),