djm-ui 0.67.2 → 0.67.3

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/dist/djm-ui.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! DJM UI v0.67.2 · MIT · 2026-10-26 */
1
+ /*! DJM UI v0.67.3 · MIT · 2026-10-26 */
2
2
 
3
3
  /* ---- tokens.css ---- */
4
4
 
@@ -1,4 +1,4 @@
1
- /*! DJM UI v0.67.2 · MIT · 2026-10-26 */
1
+ /*! DJM UI v0.67.3 · MIT · 2026-10-26 */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __esm = (fn, res, err) => function __init() {
@@ -1085,6 +1085,13 @@ var input_default = {
1085
1085
  this.$emit("update:modelValue", event.target.value);
1086
1086
  this.$emit("input", event);
1087
1087
  },
1088
+ // 浏览器自动填充与前进后退的表单恢复只改 DOM 值、不触发 input,
1089
+ // 模型为空时清掉,否则会看到有值但实际没按它筛选;登录类字段保留自动填充
1090
+ clearStaleValue() {
1091
+ const input = this.$refs.input;
1092
+ if (!input || this.autocomplete !== "off") return;
1093
+ if (String(this.modelValue ?? "").length === 0 && input.value) input.value = "";
1094
+ },
1088
1095
  clear() {
1089
1096
  this.$emit("update:modelValue", "");
1090
1097
  this.$emit("clear");
@@ -1098,6 +1105,15 @@ var input_default = {
1098
1105
  if (this.$refs.input) this.$refs.input.blur();
1099
1106
  }
1100
1107
  },
1108
+ mounted() {
1109
+ this.clearStaleValue();
1110
+ this.staleTimer = setTimeout(() => this.clearStaleValue(), 300);
1111
+ window.addEventListener("pageshow", this.clearStaleValue);
1112
+ },
1113
+ beforeUnmount() {
1114
+ clearTimeout(this.staleTimer);
1115
+ window.removeEventListener("pageshow", this.clearStaleValue);
1116
+ },
1101
1117
  template: `
1102
1118
  <div v-if="hasAffix" class="djm-input-wrap">
1103
1119
  <input
@@ -15227,7 +15243,7 @@ var components = [
15227
15243
  org_chart_default,
15228
15244
  page_tabs_default
15229
15245
  ];
15230
- var version = "0.67.2";
15246
+ var version = "0.67.3";
15231
15247
  function install(app, options = {}) {
15232
15248
  if (options.locale) setLocale(options.locale);
15233
15249
  components.forEach((component) => app.component(component.name, component));