bl-common-vue3 3.8.75 → 3.8.76

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": "bl-common-vue3",
3
- "version": "3.8.75",
3
+ "version": "3.8.76",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "description": "bailing vue3 common components lib",
@@ -9,7 +9,19 @@
9
9
  </div>
10
10
 
11
11
  <!-- 二维码弹框 -->
12
- <QrcodeModal :visible="qrcodeModalVisible" :isCopy="true" :download="false" :urls="annexUploadPageUrl" @cancel="handleCancelQrcode" @request="handleRequest" :zIndex="visible ? 1001 : 1000" :title="t('BlMobileAnnexUpload.index-1')"></QrcodeModal>
12
+ <QrcodeModal
13
+ :visible="qrcodeModalVisible"
14
+ :isCopy="true"
15
+ :download="false"
16
+ :size="260"
17
+ :widthRatio="2"
18
+ :urls="annexUploadPageUrl"
19
+ @cancel="handleCancelQrcode"
20
+ @request="handleRequest"
21
+ :zIndex="visible ? 1001 : 1000"
22
+ :title="t('BlMobileAnnexUpload.index-1')"
23
+ :tip="t('BlMobileAnnexUpload.index.676543-0')"
24
+ ></QrcodeModal>
13
25
 
14
26
  <!-- 批量上传弹框 -->
15
27
  <bl-modal
@@ -44,7 +56,7 @@
44
56
  </a-table>
45
57
 
46
58
  </bl-modal>
47
-
59
+
48
60
  <!-- 预览图片 -->
49
61
  <div style="display: none">
50
62
  <a-image-preview-group v-if="imgList?.length" :preview="{ visible: previewVisible, onVisibleChange: vis => (previewVisible = vis), current: currentImgNum}">>
@@ -183,8 +195,11 @@ export default defineComponent({
183
195
  uploadConfig[key] = cfg;
184
196
  });
185
197
 
198
+ let tokenName = utils.getCommonLocal("org_token_name");
199
+ let token = tokenName ? localStorage.getItem(tokenName) : '';
200
+
186
201
  const h5Domain = (props.h5Domain || location.origin).replace(/\/$/, "");
187
- state.annexUploadPageUrl = `${h5Domain}/h5_orgs/pages/common/annexUpload?key=${encodeURIComponent(state.key || "")}&uploadConfig=${encodeURIComponent(JSON.stringify(uploadConfig))}`;
202
+ state.annexUploadPageUrl = `${h5Domain}/h5_orgs/pages/common/annexUpload?key=${encodeURIComponent(state.key || "")}&uploadConfig=${encodeURIComponent(JSON.stringify(uploadConfig))}&uploadToken=${encodeURIComponent(token || "")}`;
188
203
  };
189
204
 
190
205
  // 获取key
@@ -1,13 +1,18 @@
1
1
  <template>
2
2
  <bl-modal
3
3
  :visible="visible"
4
- :title="titleProps"
5
4
  centered
6
5
  :footer="null"
7
6
  @cancel="handleClose"
8
7
  :width="modalWidth"
9
8
  :zIndex="zIndex"
10
9
  >
10
+ <template #title>
11
+ <div>
12
+ {{titleProps}}
13
+ <span v-if="tip" class="tip-info">({{tip}})</span>
14
+ </div>
15
+ </template>
11
16
  <Row :gutter="[12, 12]" :wrap="true">
12
17
  <Col
13
18
  :span="24"
@@ -131,7 +136,15 @@ export default defineComponent({
131
136
  zIndex: {
132
137
  type: Number,
133
138
  default: 1000
134
- }
139
+ },
140
+ tip: {
141
+ type: String,
142
+ default: "",
143
+ },
144
+ widthRatio: {
145
+ type: Number,
146
+ default: 3,
147
+ },
135
148
  },
136
149
  setup(props, { emit }) {
137
150
  const state = reactive({
@@ -176,7 +189,7 @@ export default defineComponent({
176
189
  method: "get",
177
190
  server: "/public",
178
191
  url: "/qrcode",
179
- extra: { qrCode: url },
192
+ extra: { qrCode: url, shortLink:1 },
180
193
  },
181
194
  success: (res) => {
182
195
  if (typeof props.urls === 'string') {
@@ -194,7 +207,7 @@ export default defineComponent({
194
207
  const { size, urls } = props;
195
208
  let length = "string" === typeof urls ? 1 : urls.length;
196
209
  length = length < 3 ? length : 3;
197
- state.modalWidth = size * 3 + 150;
210
+ state.modalWidth = (size * (props.widthRatio || 3)) + 150;
198
211
  state.colNum = 24 / length;
199
212
  };
200
213
 
@@ -219,11 +232,11 @@ export default defineComponent({
219
232
 
220
233
  // 复制
221
234
  const copy = (url) => {
222
- let ele = document.createElement("input");
223
- ele.setAttribute("value", url);
224
- document.body.appendChild(ele);
225
- ele.select();
226
- document.execCommand("copy");
235
+ let ele = document.createElement("input");
236
+ ele.setAttribute("value", url);
237
+ document.body.appendChild(ele);
238
+ ele.select();
239
+ document.execCommand("copy");
227
240
  document.body.removeChild(ele);
228
241
  message.success(t('QrcodeModal.index.612016-2'))
229
242
  }
@@ -259,4 +272,8 @@ export default defineComponent({
259
272
  .ml-10 {
260
273
  margin-left: 10px;
261
274
  }
275
+ .tip-info {
276
+ font-size: 12px;
277
+ color: rgba(0, 0, 0, 0.4);
278
+ }
262
279
  </style>
@@ -513,5 +513,6 @@
513
513
  "ApprovalDetail.index.683625-3": "審批需要手寫簽名,系統還未記錄過您的簽名。第一次請前往移動端審批,完成手寫簽名!",
514
514
  "DepartmentUser.index.555981-0": "清除選項",
515
515
  "DepartmentUser.index.555981-1": "展開",
516
- "DepartmentUser.index.555981-2": "收起"
516
+ "DepartmentUser.index.555981-2": "收起",
517
+ "BlMobileAnnexUpload.index.676543-0": "該二維碼十五分鐘內有效"
517
518
  }
@@ -513,5 +513,6 @@
513
513
  "ApprovalDetail.index.683625-3": "A handwritten signature is required for approval, and the system has not yet recorded your signature. For the first time, please go to the mobile terminal for approval to complete the handwritten signature!",
514
514
  "DepartmentUser.index.555981-0": "Clear Options",
515
515
  "DepartmentUser.index.555981-1": "expand",
516
- "DepartmentUser.index.555981-2": "fold up"
516
+ "DepartmentUser.index.555981-2": "fold up",
517
+ "BlMobileAnnexUpload.index.676543-0": "This QR code is valid for fifteen minutes"
517
518
  }
@@ -513,5 +513,6 @@
513
513
  "ApprovalDetail.index.683625-3": "承認には手書きの署名が必要ですが、システムはまだあなたの署名を記録していません。初めての場合は、モバイル端末で承認に進み、手書きの署名を完了してください!",
514
514
  "DepartmentUser.index.555981-0": "パージオプション",
515
515
  "DepartmentUser.index.555981-1": "展開",
516
- "DepartmentUser.index.555981-2": "畳む"
516
+ "DepartmentUser.index.555981-2": "畳む",
517
+ "BlMobileAnnexUpload.index.676543-0": "このQRコードは15分間有効です"
517
518
  }
@@ -412,5 +412,6 @@
412
412
  "ApprovalDetail.index.683625-3": "審批需要手寫簽名,系統還未記錄過您的簽名。第一次請前往移動端審批,完成手寫簽名!",
413
413
  "DepartmentUser.index.555981-0": "清除選項",
414
414
  "DepartmentUser.index.555981-1": "展開",
415
- "DepartmentUser.index.555981-2": "收起"
415
+ "DepartmentUser.index.555981-2": "收起",
416
+ "BlMobileAnnexUpload.index.676543-0": "該二維碼十五分鐘內有效"
416
417
  }
@@ -513,5 +513,6 @@
513
513
  "ApprovalDetail.index.683625-3": "审批需要手写签名,系统还未记录过您的签名。第一次请前往移动端审批,完成手写签名!",
514
514
  "DepartmentUser.index.555981-0": "清除选项",
515
515
  "DepartmentUser.index.555981-1": "展开",
516
- "DepartmentUser.index.555981-2": "收起"
516
+ "DepartmentUser.index.555981-2": "收起",
517
+ "BlMobileAnnexUpload.index.676543-0": "该二维码十五分钟内有效"
517
518
  }