bxs-tools-ui 1.2.0 → 1.2.1

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.
@@ -1,19 +1,25 @@
1
1
  <template>
2
2
  <div class="bxt-item-age-birthday" @click="openPicker()">
3
- <span
4
- class="bxt-item-button bxt-item-button__birthday"
5
- :data-stat-id="`${personData.key}_birthday`"
6
- @click.stop="openPicker('birthday')"
7
- >
8
- <em :class="[birthdayData.value ? '' : 'disabled']">{{
9
- birthdayData.value ? birthdayData.value : '生日(选填)'
10
- }}</em>
11
- <i class="iconfont icon-arrow_down"></i>
12
- </span>
13
- <span class="bxt-item-button bxt-item-button__age">
14
- <em :class="[valueDesc ? '' : 'disabled']">{{ valueDesc || eleData.placeholder }}</em>
15
- <i class="iconfont icon-arrow_down"></i>
16
- </span>
3
+ <p class="bxt-item-age-birthday-wrapper">
4
+ <span
5
+ class="bxt-item__birthday"
6
+ :data-stat-id="`${personData.key}_birthday`"
7
+ @click.stop="openPicker('birthday')"
8
+ >
9
+ <em v-if="birthdayData.value">
10
+ {{ birthdayData.value }}
11
+ </em>
12
+ <em v-else>
13
+ <i>生日</i>
14
+ <i>(选填)</i>
15
+ </em>
16
+ </span>
17
+ <span class="bxt-item__age">
18
+ <em :class="[valueDesc ? '' : 'disabled']">
19
+ {{ valueDesc || eleData.placeholder }}
20
+ </em>
21
+ </span>
22
+ </p>
17
23
  </div>
18
24
  </template>
19
25
  <script lang="ts">
@@ -119,38 +125,61 @@ export default class BxtAgeBirthdayItem extends Vue {
119
125
  }
120
126
  </script>
121
127
  <style lang="postcss">
122
- @import 'base.css';
128
+ @import 'color.css';
123
129
 
124
130
  .bxt-item-age-birthday {
125
- & .bxt-item-button {
131
+ & .bxt-item-age-birthday-wrapper {
126
132
  position: relative;
127
133
  display: inline-block;
128
- min-width: 60px;
129
- height: 25px;
134
+ height: 27px;
130
135
  line-height: 25px;
131
- padding: 0 24px 0 9px;
132
136
  text-align: center;
133
137
  border: 1px solid var(--color-text-disabled);
134
138
  border-radius: 100px;
135
139
  font-size: 13px;
136
140
  box-sizing: border-box;
137
141
 
138
- &.bxt-item-button__age {
139
- margin-left: 10px;
140
- }
142
+ & .bxt-item__birthday,
143
+ & .bxt-item__age {
144
+ position: relative;
145
+ display: inline-block;
146
+ width: 100px;
147
+ text-align: center;
148
+ font-size: 13px;
149
+ box-sizing: border-box;
150
+
151
+ & em {
152
+ & i {
153
+ font-style: normal;
154
+ }
141
155
 
142
- & em.disabled {
143
- color: var(--color-text-disabled);
156
+ & i:nth-child(2) {
157
+ margin-left: 5px;
158
+ font-size: 12px;
159
+ color: var(--color-text-disabled);
160
+ transform: scale(0.8334);
161
+ }
162
+ }
163
+
164
+ & em.disabled {
165
+ color: var(--color-text-disabled);
166
+ }
144
167
  }
145
168
 
146
- & i {
147
- position: absolute;
148
- top: 50%;
149
- right: 9px;
150
- transform: translateY(-50%) scale(0.8);
151
- font-size: 12px;
152
- color: inherit;
169
+ & .bxt-item__age {
170
+ width: 80px;
153
171
  }
154
172
  }
173
+
174
+ & .bxt-item-age-birthday-wrapper::after {
175
+ position: absolute;
176
+ left: 100px;
177
+ top: 50%;
178
+ transform: translateY(-50%);
179
+ width: 1px;
180
+ height: 60%;
181
+ content: ' ';
182
+ border-left: 1px solid var(--color-text-disabled);
183
+ }
155
184
  }
156
185
  </style>
@@ -92,12 +92,16 @@ export default class BxtSelectItem extends Vue {
92
92
  }
93
93
  </script>
94
94
  <style lang="postcss">
95
+ @import 'color.css';
96
+
95
97
  .bxt-item-select {
96
98
  & .bx-input {
97
99
  & .bx-input-value {
98
100
  & .bx-input-body {
99
101
  & .bx-input-control {
100
102
  text-align: right;
103
+ color: var(--color-text-primary) !important;
104
+ -webkit-text-fill-color: var(--color-text-primary) !important;
101
105
  }
102
106
  }
103
107
  }
@@ -23,7 +23,7 @@
23
23
  width: 18rem;
24
24
  padding: 15px 0;
25
25
  line-height: normal;
26
- font-size: 15px;
26
+ font-size: 17px;
27
27
  font-weight: bold;
28
28
  vertical-align: middle;
29
29
 
@@ -35,6 +35,13 @@
35
35
  & input {
36
36
  text-align: right;
37
37
  }
38
+
39
+ & .bx-input-icon {
40
+ & .bx-icon,
41
+ & .icon-edit2 {
42
+ color: var(--color-text-minor) !important;
43
+ }
44
+ }
38
45
  }
39
46
  }
40
47
 
@@ -103,6 +110,38 @@
103
110
  }
104
111
  }
105
112
  }
113
+
114
+ & .bxt-ins-unit-tips {
115
+ display: inline-block;
116
+ position: absolute;
117
+ top: 60%;
118
+ right: 55px;
119
+ margin-top: 11px;
120
+ line-height: normal;
121
+
122
+ & em {
123
+ position: absolute;
124
+ top: -3px;
125
+ left: 50%;
126
+ display: inline-block;
127
+ width: 6px;
128
+ height: 6px;
129
+ background: #666;
130
+ transform: translateX(-50%) rotate(45deg);
131
+ content: ' ';
132
+ }
133
+
134
+ & span {
135
+ position: relative;
136
+ display: inline-block;
137
+ padding: 1px 12px;
138
+ line-height: normal;
139
+ background: #666;
140
+ color: #fff;
141
+ font-size: 12px;
142
+ border-radius: 4px;
143
+ }
144
+ }
106
145
  }
107
146
 
108
147
  & .bxt-form-item-label-note {
@@ -42,6 +42,7 @@
42
42
  autosize
43
43
  type="text"
44
44
  border
45
+ autocomplete="off"
45
46
  :placeholder="ele.placeholder"
46
47
  v-model.number="ele.value"
47
48
  :disabled="!!ele.isDisabled"
@@ -51,9 +52,21 @@
51
52
  prefix: 'icon',
52
53
  name: 'edit2 iconfont'
53
54
  }"
55
+ @focus="
56
+ activeInputKey = ele.key;
57
+ numberUnitStr = getAmountUnit(ele);
58
+ "
59
+ @blur="activeInputKey = ''"
60
+ @input="numberUnitStr = getAmountUnit(ele)"
54
61
  @change="change({ insData: ins, eleData: ele, type: 'change' })"
55
62
  @click-icon="onClickIcon(`id_${ins.key}_${ele.key}`)"
56
63
  />
64
+ <div v-if="activeInputKey === ele.key && numberUnitStr" class="bxt-ins-unit-tips">
65
+ <em />
66
+ <span>
67
+ {{ numberUnitStr }}
68
+ </span>
69
+ </div>
57
70
  </bxs-form-item>
58
71
  </template>
59
72
  <template v-if="['cmCommonRadioBtn'].includes(ele.componentName)">
@@ -142,7 +155,7 @@
142
155
  :title="ele.label"
143
156
  :options="ele.opts.filter(o => !o.isHide && !o.isDisabled && !o.isInvalid)"
144
157
  :disabled="isDisabled(ele)"
145
- right-icon="arrow-right"
158
+ :right-icon="isDisabled(ele) ? '' : 'arrow-right'"
146
159
  @change="change({ insData: ins, eleData: ele, type: 'change' })"
147
160
  />
148
161
  </bxs-form-item>
@@ -178,6 +191,9 @@ import 'bxs-ui-vue/esm/index.css';
178
191
  }
179
192
  })
180
193
  export default class BxtProductInfo extends Vue {
194
+ activeInputKey = '';
195
+ numberUnitStr = '';
196
+
181
197
  @Prop({
182
198
  default: () => ({})
183
199
  })
@@ -344,6 +360,23 @@ export default class BxtProductInfo extends Vue {
344
360
  }
345
361
  return '当前投保人不能加该险种,<em>修改</em>投保人信息后选择';
346
362
  }
363
+ getAmountUnit(ele) {
364
+ let digits = isNaN(ele.value * 1) ? 0 : Math.floor(Math.log10(ele.value) + 1);
365
+ switch (digits) {
366
+ case 5:
367
+ return '万';
368
+ case 6:
369
+ return '十万';
370
+ case 7:
371
+ return '百万';
372
+ case 8:
373
+ return '千万';
374
+ case 9:
375
+ return '亿';
376
+ default:
377
+ return '';
378
+ }
379
+ }
347
380
  async validate() {
348
381
  let insKeys: any = this.filterInsuranceList.map(ins => ins.key);
349
382
  let validateInfo: any = [];