djm-ui 0.67.3 → 0.67.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # 更新日志
2
2
 
3
+ ## 0.67.4
4
+
5
+ - 自动填充清理加严:挂载后按 200 / 600 / 1200 / 2400ms 多次校验,输入框聚焦时再清一次,晚到的自动填充也能清干净
6
+ - 站点 JS / CSS 强缓存从 5 分钟改为 1 分钟,改完刷新就能拿到新脚本,不会被旧缓存误导
7
+
3
8
  ## 0.67.3
4
9
 
5
10
  - 修复浏览器自动填充残留:`DjmInput` 挂载时、`pageshow` 时若 `autocomplete="off"` 且模型为空,清掉 DOM 里被填入的值,输入框不会再显示一个没参与筛选的账号
package/README.md CHANGED
@@ -65,9 +65,9 @@ import DjmCol from 'djm-ui/components/grid/col'
65
65
  UMD 产物复用全局 Vue,不会重复打包 Vue。Vue 必须先加载:
66
66
 
67
67
  ```html
68
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/djm-ui@0.67.3/dist/djm-ui.min.css" />
68
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/djm-ui@0.67.4/dist/djm-ui.min.css" />
69
69
  <script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
70
- <script src="https://cdn.jsdelivr.net/npm/djm-ui@0.67.3/dist/djm-ui.umd.min.js"></script>
70
+ <script src="https://cdn.jsdelivr.net/npm/djm-ui@0.67.4/dist/djm-ui.umd.min.js"></script>
71
71
 
72
72
  <script>
73
73
  Vue.createApp({
package/dist/djm-ui.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! DJM UI v0.67.3 · MIT · 2026-10-26 */
1
+ /*! DJM UI v0.67.4 · MIT · 2026-10-26 */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1249,19 +1249,29 @@ var input_default = {
1249
1249
  this.focus();
1250
1250
  },
1251
1251
  focus() {
1252
+ this.clearStaleValue();
1252
1253
  if (this.$refs.input) this.$refs.input.focus();
1253
1254
  },
1255
+ onFocus(event) {
1256
+ this.clearStaleValue();
1257
+ this.$emit("focus", event);
1258
+ },
1254
1259
  blur() {
1255
1260
  if (this.$refs.input) this.$refs.input.blur();
1256
1261
  }
1257
1262
  },
1258
1263
  mounted() {
1259
- this.clearStaleValue();
1260
- this.staleTimer = setTimeout(() => this.clearStaleValue(), 300);
1264
+ this.staleTimers = [null, 200, 600, 1200, 2400].map((delay) => {
1265
+ if (delay === null) {
1266
+ this.clearStaleValue();
1267
+ return null;
1268
+ }
1269
+ return setTimeout(() => this.clearStaleValue(), delay);
1270
+ });
1261
1271
  window.addEventListener("pageshow", this.clearStaleValue);
1262
1272
  },
1263
1273
  beforeUnmount() {
1264
- clearTimeout(this.staleTimer);
1274
+ this.staleTimers.forEach((timer) => clearTimeout(timer));
1265
1275
  window.removeEventListener("pageshow", this.clearStaleValue);
1266
1276
  },
1267
1277
  template: `
@@ -1281,7 +1291,7 @@ var input_default = {
1281
1291
  @input="onInput"
1282
1292
  @change="$emit('change', $event)"
1283
1293
  @keyup.enter="$emit('enter', $event)"
1284
- @focus="$emit('focus', $event)"
1294
+ @focus="onFocus"
1285
1295
  @blur="$emit('blur', $event)"
1286
1296
  />
1287
1297
  <button
@@ -1311,7 +1321,7 @@ var input_default = {
1311
1321
  @input="onInput"
1312
1322
  @change="$emit('change', $event)"
1313
1323
  @keyup.enter="$emit('enter', $event)"
1314
- @focus="$emit('focus', $event)"
1324
+ @focus="onFocus"
1315
1325
  @blur="$emit('blur', $event)"
1316
1326
  />
1317
1327
  `
@@ -15393,7 +15403,7 @@ var components = [
15393
15403
  org_chart_default,
15394
15404
  page_tabs_default
15395
15405
  ];
15396
- var version = "0.67.3";
15406
+ var version = "0.67.4";
15397
15407
  function install(app, options = {}) {
15398
15408
  if (options.locale) setLocale(options.locale);
15399
15409
  components.forEach((component) => app.component(component.name, component));