djm-ui 0.67.2 → 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 +11 -0
- package/README.md +2 -2
- package/dist/djm-ui.cjs +30 -4
- package/dist/djm-ui.cjs.map +2 -2
- package/dist/djm-ui.css +1 -1
- package/dist/djm-ui.esm.js +30 -4
- package/dist/djm-ui.esm.js.map +2 -2
- package/dist/djm-ui.esm.min.js +5 -5
- package/dist/djm-ui.min.cjs +5 -5
- package/dist/djm-ui.min.css +1 -1
- package/dist/djm-ui.umd.js +30 -4
- package/dist/djm-ui.umd.min.js +5 -5
- package/package.json +1 -1
- package/src/components/input/index.js +30 -2
- package/src/index.js +1 -1
- package/src/styles/components/layout.css +34 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## 0.67.4
|
|
4
|
+
|
|
5
|
+
- 自动填充清理加严:挂载后按 200 / 600 / 1200 / 2400ms 多次校验,输入框聚焦时再清一次,晚到的自动填充也能清干净
|
|
6
|
+
- 站点 JS / CSS 强缓存从 5 分钟改为 1 分钟,改完刷新就能拿到新脚本,不会被旧缓存误导
|
|
7
|
+
|
|
8
|
+
## 0.67.3
|
|
9
|
+
|
|
10
|
+
- 修复浏览器自动填充残留:`DjmInput` 挂载时、`pageshow` 时若 `autocomplete="off"` 且模型为空,清掉 DOM 里被填入的值,输入框不会再显示一个没参与筛选的账号
|
|
11
|
+
- 登录类字段(`autocomplete="username"` / `current-password`)保留自动填充,不受影响
|
|
12
|
+
- 示例应用补 `:autofill` 检测,动态渲染的筛选框被自动填充时同样会清空
|
|
13
|
+
|
|
3
14
|
## 0.67.2
|
|
4
15
|
|
|
5
16
|
- 数据字典页左侧类型列表改为独立列表:去掉与面板标题重复的表头,名称与条目数同行、编码跟随下一行,选中态用内缩圆角底色
|
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.
|
|
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.
|
|
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.
|
|
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;
|
|
@@ -1235,6 +1235,13 @@ var input_default = {
|
|
|
1235
1235
|
this.$emit("update:modelValue", event.target.value);
|
|
1236
1236
|
this.$emit("input", event);
|
|
1237
1237
|
},
|
|
1238
|
+
// 浏览器自动填充与前进后退的表单恢复只改 DOM 值、不触发 input,
|
|
1239
|
+
// 模型为空时清掉,否则会看到有值但实际没按它筛选;登录类字段保留自动填充
|
|
1240
|
+
clearStaleValue() {
|
|
1241
|
+
const input = this.$refs.input;
|
|
1242
|
+
if (!input || this.autocomplete !== "off") return;
|
|
1243
|
+
if (String(this.modelValue ?? "").length === 0 && input.value) input.value = "";
|
|
1244
|
+
},
|
|
1238
1245
|
clear() {
|
|
1239
1246
|
this.$emit("update:modelValue", "");
|
|
1240
1247
|
this.$emit("clear");
|
|
@@ -1242,12 +1249,31 @@ var input_default = {
|
|
|
1242
1249
|
this.focus();
|
|
1243
1250
|
},
|
|
1244
1251
|
focus() {
|
|
1252
|
+
this.clearStaleValue();
|
|
1245
1253
|
if (this.$refs.input) this.$refs.input.focus();
|
|
1246
1254
|
},
|
|
1255
|
+
onFocus(event) {
|
|
1256
|
+
this.clearStaleValue();
|
|
1257
|
+
this.$emit("focus", event);
|
|
1258
|
+
},
|
|
1247
1259
|
blur() {
|
|
1248
1260
|
if (this.$refs.input) this.$refs.input.blur();
|
|
1249
1261
|
}
|
|
1250
1262
|
},
|
|
1263
|
+
mounted() {
|
|
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
|
+
});
|
|
1271
|
+
window.addEventListener("pageshow", this.clearStaleValue);
|
|
1272
|
+
},
|
|
1273
|
+
beforeUnmount() {
|
|
1274
|
+
this.staleTimers.forEach((timer) => clearTimeout(timer));
|
|
1275
|
+
window.removeEventListener("pageshow", this.clearStaleValue);
|
|
1276
|
+
},
|
|
1251
1277
|
template: `
|
|
1252
1278
|
<div v-if="hasAffix" class="djm-input-wrap">
|
|
1253
1279
|
<input
|
|
@@ -1265,7 +1291,7 @@ var input_default = {
|
|
|
1265
1291
|
@input="onInput"
|
|
1266
1292
|
@change="$emit('change', $event)"
|
|
1267
1293
|
@keyup.enter="$emit('enter', $event)"
|
|
1268
|
-
@focus="
|
|
1294
|
+
@focus="onFocus"
|
|
1269
1295
|
@blur="$emit('blur', $event)"
|
|
1270
1296
|
/>
|
|
1271
1297
|
<button
|
|
@@ -1295,7 +1321,7 @@ var input_default = {
|
|
|
1295
1321
|
@input="onInput"
|
|
1296
1322
|
@change="$emit('change', $event)"
|
|
1297
1323
|
@keyup.enter="$emit('enter', $event)"
|
|
1298
|
-
@focus="
|
|
1324
|
+
@focus="onFocus"
|
|
1299
1325
|
@blur="$emit('blur', $event)"
|
|
1300
1326
|
/>
|
|
1301
1327
|
`
|
|
@@ -15377,7 +15403,7 @@ var components = [
|
|
|
15377
15403
|
org_chart_default,
|
|
15378
15404
|
page_tabs_default
|
|
15379
15405
|
];
|
|
15380
|
-
var version = "0.67.
|
|
15406
|
+
var version = "0.67.4";
|
|
15381
15407
|
function install(app, options = {}) {
|
|
15382
15408
|
if (options.locale) setLocale(options.locale);
|
|
15383
15409
|
components.forEach((component) => app.component(component.name, component));
|