ocpview-pro 0.1.18 → 0.1.20

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": "ocpview-pro",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -199,7 +199,7 @@
199
199
  <Button customIcon="iconfont icon-custom-jiaqian" @click="comMethod(billBack, $t('加签'))" >{{ $t('加签') }}</Button>
200
200
  </Col>
201
201
  <Col v-if="showReject">
202
- <Button customIcon="iconfont icon-custom-reject" @click="comMethod(reject, $t('驳回'))" >{{ $t('驳回') }}</Button>
202
+ <Button customIcon="iconfont icon-custom-reject" @click="reject" >{{ $t('驳回') }}</Button>
203
203
  </Col>
204
204
  <Col v-if="showApprove">
205
205
  <Button customIcon="iconfont icon-custom-approve" @click="comMethod(submitApprove, $t('审批'))" >{{ $t('审批') }}</Button>
@@ -456,7 +456,7 @@ export default {
456
456
  },
457
457
  reject() { // 审批驳回
458
458
  if (!this.idea) {
459
- this.alert(this.$t('意见不能为空'),null,1);
459
+ this.alert(this.$t('意见不能为空'));
460
460
  return;
461
461
  }
462
462
  let para = {};
@@ -761,6 +761,9 @@ export default {
761
761
  </script>
762
762
 
763
763
  <style lang="less" scoped>
764
+ .efutureapproval .content .log-list .right .desc{
765
+ word-break: break-all;
766
+ }
764
767
  .efutureapproval .content .line-wrap::after{
765
768
  position: absolute;
766
769
  content:'';
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  </template>
28
28
  <template v-else>
29
- <Row type="flex" justify="center" align="middle" >
29
+ <Row type="flex" justify="center" align="middle" style="width:100%">
30
30
  <Col :span="gridCol">
31
31
  <Card :padding="0" bordered dis-hover>
32
32
  <template #title>
@@ -38,15 +38,6 @@
38
38
  </template>
39
39
  </Table>
40
40
  </Card>
41
- <div ref="page" name="page">
42
- <div v-if="myConfig.showPage" ref="page" style="padding-top:10px;">
43
- <Card :bordered="false" :padding="0" :dis-hover="true" style="border-radius:0px">
44
- <Row type="flex" justify="end" style="padding-right:10px" :gutter="0">
45
- <PageCustom v-model="culPage" :total="myConfig.pageConfig.total_results" :size="myConfig.pageSize" :current="myConfig.pageConfig.page_no" :page-size="myConfig.pageConfig.page_size" :page-size-opts="myConfig.pageConfig.pageSizeList" @on-page-size-change="changePageSize" @on-change="changePage" :show-total="myConfig.pageShowTotal" :show-elevator="myConfig.pageShowElevator" :show-sizer="myConfig.pageShowSizer"></PageCustom>
46
- </Row>
47
- </Card>
48
- </div>
49
- </div>
50
41
  </Col>
51
42
  <Col span= '2'>
52
43
  <Row type="flex" justify="center" align="middle" style="padding:5px;" >
@@ -60,7 +51,7 @@
60
51
  </Tooltip>
61
52
  </Row>
62
53
  </Col>
63
- <Col :span="multiGridCol" style="padding-bottom: 40px;">
54
+ <Col :span="multiGridCol">
64
55
  <Card :padding="0" bordered dis-hover>
65
56
  <template #title>
66
57
  <span v-text="myConfig.multiGridTitle"></span>
@@ -73,6 +64,15 @@
73
64
  </Card>
74
65
  </Col>
75
66
  </Row>
67
+ <div ref="page" name="page">
68
+ <div v-if="myConfig.showPage" style="padding-top:10px;">
69
+ <Card :bordered="false" :padding="0" :dis-hover="true" style="border-radius:0px">
70
+ <Row type="flex" justify="end" style="padding-right:10px" :gutter="0">
71
+ <PageCustom v-model="culPage" :total="myConfig.pageConfig.total_results" :size="myConfig.pageSize" :current="myConfig.pageConfig.page_no" :page-size="myConfig.pageConfig.page_size" :page-size-opts="myConfig.pageConfig.pageSizeList" @on-page-size-change="changePageSize" @on-change="changePage" :show-total="myConfig.pageShowTotal" :show-elevator="myConfig.pageShowElevator" :show-sizer="myConfig.pageShowSizer"></PageCustom>
72
+ </Row>
73
+ </Card>
74
+ </div>
75
+ </div>
76
76
  </template>
77
77
  </div>
78
78
  </template>
@@ -1,13 +1,50 @@
1
-
2
1
  <template>
3
2
  <div v-show="myConfig.visible" :class="['textbox-wrapper', { 'textbox-mask': isMaskMode, 'textbox-mask-visible': isMaskMode && maskVisible }]">
3
+ <form v-if="isMaskMode" autocomplete="off" @submit.prevent style="margin:0;padding:0">
4
+ <!-- 蜜罐输入框:让浏览器/密码管理器优先识别这两个隐藏字段为凭据,从而忽略真实 mask 字段 -->
5
+ <input type="text" name="username" autocomplete="off" tabindex="-1" aria-hidden="true"
6
+ style="position:absolute;left:-9999px;width:1px;height:1px;opacity:0" />
7
+ <input type="password" name="password" autocomplete="off" tabindex="-1" aria-hidden="true"
8
+ style="position:absolute;left:-9999px;width:1px;height:1px;opacity:0" />
9
+ <Input
10
+ ref="myControl"
11
+ v-model="value"
12
+ :size="myConfig.size"
13
+ :type="inputType"
14
+ :password="passwordFlag"
15
+ autocomplete="off"
16
+ name="mask-field"
17
+ data-lpignore="true"
18
+ data-1p-ignore="true"
19
+ data-form-type="other"
20
+ role="textbox"
21
+ :rows="myConfig.rows"
22
+ :placeholder="myConfig.placeholder"
23
+ :maxlength="myConfig.maxLength"
24
+ :disabled="myConfig.readOnly"
25
+ :clearable="myConfig.clearable"
26
+ :readonly="!myConfig.allowInput"
27
+ @keydown.enter.stop="_enterSetFatherValue"
28
+ @keyup="keyUp"
29
+ @on-blur="setFatherValue"
30
+ :search="myConfig.search"
31
+ @on-search="search"
32
+ >
33
+ <template v-if="myConfig.maskToggle" #suffix>
34
+ <Icon :type="maskVisible ? 'md-eye-off' : 'md-eye'" @click.stop="toggleMask" style="cursor:pointer;font-size:16px" />
35
+ </template>
36
+ <template v-if="myConfig.showAppend" #append>
37
+ <Button :size="myConfig.size" type="primary" :disabled="myConfig.readOnly" @click="appendClick">{{myConfig.appendText}}</Button>
38
+ </template>
39
+ </Input>
40
+ </form>
4
41
  <Input
42
+ v-else
5
43
  ref="myControl"
6
44
  v-model="value"
7
45
  :size="myConfig.size"
8
46
  :type="inputType"
9
47
  :password="passwordFlag"
10
- :autocomplete="isMaskMode ? 'new-password' : undefined"
11
48
  :rows="myConfig.rows"
12
49
  :placeholder="myConfig.placeholder"
13
50
  :maxlength="myConfig.maxLength"
@@ -15,17 +52,14 @@
15
52
  :clearable="myConfig.clearable"
16
53
  :readonly="!myConfig.allowInput"
17
54
  @keydown.enter.stop="_enterSetFatherValue"
18
- @keyup="keyUp"
55
+ @keyup="keyUp"
19
56
  @on-blur="setFatherValue"
20
57
  :search="myConfig.search"
21
58
  @on-search="search"
22
59
  >
23
- <template v-if="isMaskMode && myConfig.maskToggle" #suffix>
24
- <Icon :type="maskVisible ? 'md-eye-off' : 'md-eye'" @click.stop="toggleMask" style="cursor:pointer;font-size:16px" />
25
- </template>
26
- <template v-if="myConfig.showAppend" #append>
27
- <Button :size="myConfig.size" type="primary" :disabled="myConfig.readOnly" @click="appendClick">{{myConfig.appendText}}</Button>
28
- </template>
60
+ <template v-if="myConfig.showAppend" #append>
61
+ <Button :size="myConfig.size" type="primary" :disabled="myConfig.readOnly" @click="appendClick">{{myConfig.appendText}}</Button>
62
+ </template>
29
63
  </Input>
30
64
  </div>
31
65
  </template>
@@ -62,13 +96,49 @@ export default {
62
96
  return this.isMaskMode ? 'text' : this.myConfig.vtype;
63
97
  }
64
98
  },
99
+ mounted() {
100
+ // mask 模式下运行时强制覆写原生 input 的属性,防止某些浏览器/扩展在多次编辑后重新识别为密码字段
101
+ if (this.isMaskMode) {
102
+ this.$nextTick(() => {
103
+ this.hardenMaskInput();
104
+ });
105
+ }
106
+ },
107
+ updated() {
108
+ // 每次组件更新(含多次录入/修改)后再次加固,确保属性不被 ViewUI Plus 内部重置
109
+ if (this.isMaskMode) {
110
+ this.$nextTick(() => {
111
+ this.hardenMaskInput();
112
+ });
113
+ }
114
+ },
65
115
  methods: {
116
+ hardenMaskInput() {
117
+ const comp = this.$refs.myControl;
118
+ if (!comp || !comp.$el) return;
119
+ // 定位真实 <input> 元素(ViewUI Plus Input 内部)
120
+ const inputEl = comp.$el.querySelector ? comp.$el.querySelector('input') : null;
121
+ if (!inputEl) return;
122
+ // 强制 type=text(绝不为 password)
123
+ if (inputEl.type !== 'text') {
124
+ inputEl.setAttribute('type', 'text');
125
+ }
126
+ // 强制 autocomplete=off
127
+ inputEl.setAttribute('autocomplete', 'off');
128
+ // 非 password name
129
+ inputEl.setAttribute('name', 'mask-field');
130
+ // 通知密码管理器忽略(LastPass / 1Password / Dashlane 等遵循这些 data 属性)
131
+ inputEl.setAttribute('data-lpignore', 'true');
132
+ inputEl.setAttribute('data-1p-ignore', 'true');
133
+ inputEl.setAttribute('data-form-type', 'other');
134
+ },
66
135
  toggleMask() {
67
136
  this.maskVisible = !this.maskVisible;
68
137
  },
69
138
  keyUp(e) {
70
139
  if (this.myConfig.notSpecial) {
71
- e.target.value = e.target.value.replace(/[`~!@$%^&*()_\-+=<>?:"{}|,\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g, '')
140
+ // 注意:连字符 '-' 放在字符类末尾以避免被解释为范围运算符(修复 "Range out of order in character class" 构建错误)
141
+ e.target.value = e.target.value.replace(/[`~!@$%^&*()_+=<>?:"{}|,\/;'\\[\]·~!@¥%……&*()+={}|《》?:“”【】、;‘’,。、-]/g, '')
72
142
  }
73
143
  },
74
144
  customInit() {