@v2coding/ui 1.4.3 → 1.5.0
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/v2coding-ui.esm.js +261 -260
- package/dist/v2coding-ui.min.js +1 -1
- package/dist/v2coding-ui.ssr.js +10 -9
- package/package.json +1 -1
package/dist/v2coding-ui.esm.js
CHANGED
|
@@ -659,8 +659,8 @@ const getSetting = () => {
|
|
|
659
659
|
return Objects.merge({}, setting);
|
|
660
660
|
};
|
|
661
661
|
|
|
662
|
-
/**
|
|
663
|
-
* 自动解析 get/post 请求并提示信息(解析返回信息中的 message/data 字段)
|
|
662
|
+
/**
|
|
663
|
+
* 自动解析 get/post 请求并提示信息(解析返回信息中的 message/data 字段)
|
|
664
664
|
*/
|
|
665
665
|
var AxiosWithMessage = {
|
|
666
666
|
methods: {
|
|
@@ -733,9 +733,9 @@ var AxiosWithMessage = {
|
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
735
|
|
|
736
|
-
/**
|
|
737
|
-
* 注: 需要在 data 中先配置好 api
|
|
738
|
-
* 提供 select/selectList/create/update/delete/deleteList 方法及每个方法请求时对应的请求状态
|
|
736
|
+
/**
|
|
737
|
+
* 注: 需要在 data 中先配置好 api
|
|
738
|
+
* 提供 select/selectList/create/update/delete/deleteList 方法及每个方法请求时对应的请求状态
|
|
739
739
|
*/
|
|
740
740
|
var EntityRequest = {
|
|
741
741
|
data() {
|
|
@@ -871,8 +871,8 @@ var EntityRequest = {
|
|
|
871
871
|
}
|
|
872
872
|
};
|
|
873
873
|
|
|
874
|
-
/**
|
|
875
|
-
* router 进入时自动执行 refresh 方法.(解决 keep-alive 缓存页面再次进入时统一刷新页面)
|
|
874
|
+
/**
|
|
875
|
+
* router 进入时自动执行 refresh 方法.(解决 keep-alive 缓存页面再次进入时统一刷新页面)
|
|
876
876
|
*/
|
|
877
877
|
var Refresh = {
|
|
878
878
|
beforeRouteEnter(to, from, next) {
|
|
@@ -893,11 +893,11 @@ var Refresh = {
|
|
|
893
893
|
|
|
894
894
|
var Utils = {
|
|
895
895
|
methods: {
|
|
896
|
-
/**
|
|
897
|
-
*
|
|
898
|
-
* @param {Number} min
|
|
899
|
-
* @param {Number} max
|
|
900
|
-
* @return {*}
|
|
896
|
+
/**
|
|
897
|
+
*
|
|
898
|
+
* @param {Number} min
|
|
899
|
+
* @param {Number} max
|
|
900
|
+
* @return {*}
|
|
901
901
|
*/
|
|
902
902
|
random() {
|
|
903
903
|
let min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -937,9 +937,9 @@ var Mixins = {
|
|
|
937
937
|
}
|
|
938
938
|
};
|
|
939
939
|
|
|
940
|
-
/**
|
|
941
|
-
* 打印页面中的指定的 dom
|
|
942
|
-
* @param element elementNode
|
|
940
|
+
/**
|
|
941
|
+
* 打印页面中的指定的 dom
|
|
942
|
+
* @param element elementNode
|
|
943
943
|
*/
|
|
944
944
|
const print = element => {
|
|
945
945
|
if (!element || element.nodeType !== 1) {
|
|
@@ -960,9 +960,9 @@ const print = element => {
|
|
|
960
960
|
};
|
|
961
961
|
};
|
|
962
962
|
|
|
963
|
-
/**
|
|
964
|
-
* @param {Array|String} identities 权限标识
|
|
965
|
-
* @return {Boolean} 是否含有权限
|
|
963
|
+
/**
|
|
964
|
+
* @param {Array|String} identities 权限标识
|
|
965
|
+
* @return {Boolean} 是否含有权限
|
|
966
966
|
*/
|
|
967
967
|
|
|
968
968
|
const permission = identities => {
|
|
@@ -1114,132 +1114,132 @@ var script$B = {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
1116
|
|
|
1117
|
-
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
1118
|
-
if (typeof shadowMode !== 'boolean') {
|
|
1119
|
-
createInjectorSSR = createInjector;
|
|
1120
|
-
createInjector = shadowMode;
|
|
1121
|
-
shadowMode = false;
|
|
1122
|
-
}
|
|
1123
|
-
// Vue.extend constructor export interop.
|
|
1124
|
-
const options = typeof script === 'function' ? script.options : script;
|
|
1125
|
-
// render functions
|
|
1126
|
-
if (template && template.render) {
|
|
1127
|
-
options.render = template.render;
|
|
1128
|
-
options.staticRenderFns = template.staticRenderFns;
|
|
1129
|
-
options._compiled = true;
|
|
1130
|
-
// functional template
|
|
1131
|
-
if (isFunctionalTemplate) {
|
|
1132
|
-
options.functional = true;
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
// scopedId
|
|
1136
|
-
if (scopeId) {
|
|
1137
|
-
options._scopeId = scopeId;
|
|
1138
|
-
}
|
|
1139
|
-
let hook;
|
|
1140
|
-
if (moduleIdentifier) {
|
|
1141
|
-
// server build
|
|
1142
|
-
hook = function (context) {
|
|
1143
|
-
// 2.3 injection
|
|
1144
|
-
context =
|
|
1145
|
-
context || // cached call
|
|
1146
|
-
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
1147
|
-
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
1148
|
-
// 2.2 with runInNewContext: true
|
|
1149
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
1150
|
-
context = __VUE_SSR_CONTEXT__;
|
|
1151
|
-
}
|
|
1152
|
-
// inject component styles
|
|
1153
|
-
if (style) {
|
|
1154
|
-
style.call(this, createInjectorSSR(context));
|
|
1155
|
-
}
|
|
1156
|
-
// register component module identifier for async chunk inference
|
|
1157
|
-
if (context && context._registeredComponents) {
|
|
1158
|
-
context._registeredComponents.add(moduleIdentifier);
|
|
1159
|
-
}
|
|
1160
|
-
};
|
|
1161
|
-
// used by ssr in case component is cached and beforeCreate
|
|
1162
|
-
// never gets called
|
|
1163
|
-
options._ssrRegister = hook;
|
|
1164
|
-
}
|
|
1165
|
-
else if (style) {
|
|
1166
|
-
hook = shadowMode
|
|
1167
|
-
? function (context) {
|
|
1168
|
-
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
1169
|
-
}
|
|
1170
|
-
: function (context) {
|
|
1171
|
-
style.call(this, createInjector(context));
|
|
1172
|
-
};
|
|
1173
|
-
}
|
|
1174
|
-
if (hook) {
|
|
1175
|
-
if (options.functional) {
|
|
1176
|
-
// register for functional component in vue file
|
|
1177
|
-
const originalRender = options.render;
|
|
1178
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
1179
|
-
hook.call(context);
|
|
1180
|
-
return originalRender(h, context);
|
|
1181
|
-
};
|
|
1182
|
-
}
|
|
1183
|
-
else {
|
|
1184
|
-
// inject component registration as beforeCreate hook
|
|
1185
|
-
const existing = options.beforeCreate;
|
|
1186
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
return script;
|
|
1117
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
1118
|
+
if (typeof shadowMode !== 'boolean') {
|
|
1119
|
+
createInjectorSSR = createInjector;
|
|
1120
|
+
createInjector = shadowMode;
|
|
1121
|
+
shadowMode = false;
|
|
1122
|
+
}
|
|
1123
|
+
// Vue.extend constructor export interop.
|
|
1124
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
1125
|
+
// render functions
|
|
1126
|
+
if (template && template.render) {
|
|
1127
|
+
options.render = template.render;
|
|
1128
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
1129
|
+
options._compiled = true;
|
|
1130
|
+
// functional template
|
|
1131
|
+
if (isFunctionalTemplate) {
|
|
1132
|
+
options.functional = true;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
// scopedId
|
|
1136
|
+
if (scopeId) {
|
|
1137
|
+
options._scopeId = scopeId;
|
|
1138
|
+
}
|
|
1139
|
+
let hook;
|
|
1140
|
+
if (moduleIdentifier) {
|
|
1141
|
+
// server build
|
|
1142
|
+
hook = function (context) {
|
|
1143
|
+
// 2.3 injection
|
|
1144
|
+
context =
|
|
1145
|
+
context || // cached call
|
|
1146
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
1147
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
1148
|
+
// 2.2 with runInNewContext: true
|
|
1149
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
1150
|
+
context = __VUE_SSR_CONTEXT__;
|
|
1151
|
+
}
|
|
1152
|
+
// inject component styles
|
|
1153
|
+
if (style) {
|
|
1154
|
+
style.call(this, createInjectorSSR(context));
|
|
1155
|
+
}
|
|
1156
|
+
// register component module identifier for async chunk inference
|
|
1157
|
+
if (context && context._registeredComponents) {
|
|
1158
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
1159
|
+
}
|
|
1160
|
+
};
|
|
1161
|
+
// used by ssr in case component is cached and beforeCreate
|
|
1162
|
+
// never gets called
|
|
1163
|
+
options._ssrRegister = hook;
|
|
1164
|
+
}
|
|
1165
|
+
else if (style) {
|
|
1166
|
+
hook = shadowMode
|
|
1167
|
+
? function (context) {
|
|
1168
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
1169
|
+
}
|
|
1170
|
+
: function (context) {
|
|
1171
|
+
style.call(this, createInjector(context));
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
if (hook) {
|
|
1175
|
+
if (options.functional) {
|
|
1176
|
+
// register for functional component in vue file
|
|
1177
|
+
const originalRender = options.render;
|
|
1178
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
1179
|
+
hook.call(context);
|
|
1180
|
+
return originalRender(h, context);
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
else {
|
|
1184
|
+
// inject component registration as beforeCreate hook
|
|
1185
|
+
const existing = options.beforeCreate;
|
|
1186
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
return script;
|
|
1190
1190
|
}
|
|
1191
1191
|
|
|
1192
|
-
const isOldIE = typeof navigator !== 'undefined' &&
|
|
1193
|
-
/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
|
|
1194
|
-
function createInjector(context) {
|
|
1195
|
-
return (id, style) => addStyle(id, style);
|
|
1196
|
-
}
|
|
1197
|
-
let HEAD;
|
|
1198
|
-
const styles = {};
|
|
1199
|
-
function addStyle(id, css) {
|
|
1200
|
-
const group = isOldIE ? css.media || 'default' : id;
|
|
1201
|
-
const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
|
|
1202
|
-
if (!style.ids.has(id)) {
|
|
1203
|
-
style.ids.add(id);
|
|
1204
|
-
let code = css.source;
|
|
1205
|
-
if (css.map) {
|
|
1206
|
-
// https://developer.chrome.com/devtools/docs/javascript-debugging
|
|
1207
|
-
// this makes source maps inside style tags work properly in Chrome
|
|
1208
|
-
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
|
|
1209
|
-
// http://stackoverflow.com/a/26603875
|
|
1210
|
-
code +=
|
|
1211
|
-
'\n/*# sourceMappingURL=data:application/json;base64,' +
|
|
1212
|
-
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
|
|
1213
|
-
' */';
|
|
1214
|
-
}
|
|
1215
|
-
if (!style.element) {
|
|
1216
|
-
style.element = document.createElement('style');
|
|
1217
|
-
style.element.type = 'text/css';
|
|
1218
|
-
if (css.media)
|
|
1219
|
-
style.element.setAttribute('media', css.media);
|
|
1220
|
-
if (HEAD === undefined) {
|
|
1221
|
-
HEAD = document.head || document.getElementsByTagName('head')[0];
|
|
1222
|
-
}
|
|
1223
|
-
HEAD.appendChild(style.element);
|
|
1224
|
-
}
|
|
1225
|
-
if ('styleSheet' in style.element) {
|
|
1226
|
-
style.styles.push(code);
|
|
1227
|
-
style.element.styleSheet.cssText = style.styles
|
|
1228
|
-
.filter(Boolean)
|
|
1229
|
-
.join('\n');
|
|
1230
|
-
}
|
|
1231
|
-
else {
|
|
1232
|
-
const index = style.ids.size - 1;
|
|
1233
|
-
const textNode = document.createTextNode(code);
|
|
1234
|
-
const nodes = style.element.childNodes;
|
|
1235
|
-
if (nodes[index])
|
|
1236
|
-
style.element.removeChild(nodes[index]);
|
|
1237
|
-
if (nodes.length)
|
|
1238
|
-
style.element.insertBefore(textNode, nodes[index]);
|
|
1239
|
-
else
|
|
1240
|
-
style.element.appendChild(textNode);
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1192
|
+
const isOldIE = typeof navigator !== 'undefined' &&
|
|
1193
|
+
/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
|
|
1194
|
+
function createInjector(context) {
|
|
1195
|
+
return (id, style) => addStyle(id, style);
|
|
1196
|
+
}
|
|
1197
|
+
let HEAD;
|
|
1198
|
+
const styles = {};
|
|
1199
|
+
function addStyle(id, css) {
|
|
1200
|
+
const group = isOldIE ? css.media || 'default' : id;
|
|
1201
|
+
const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
|
|
1202
|
+
if (!style.ids.has(id)) {
|
|
1203
|
+
style.ids.add(id);
|
|
1204
|
+
let code = css.source;
|
|
1205
|
+
if (css.map) {
|
|
1206
|
+
// https://developer.chrome.com/devtools/docs/javascript-debugging
|
|
1207
|
+
// this makes source maps inside style tags work properly in Chrome
|
|
1208
|
+
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
|
|
1209
|
+
// http://stackoverflow.com/a/26603875
|
|
1210
|
+
code +=
|
|
1211
|
+
'\n/*# sourceMappingURL=data:application/json;base64,' +
|
|
1212
|
+
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
|
|
1213
|
+
' */';
|
|
1214
|
+
}
|
|
1215
|
+
if (!style.element) {
|
|
1216
|
+
style.element = document.createElement('style');
|
|
1217
|
+
style.element.type = 'text/css';
|
|
1218
|
+
if (css.media)
|
|
1219
|
+
style.element.setAttribute('media', css.media);
|
|
1220
|
+
if (HEAD === undefined) {
|
|
1221
|
+
HEAD = document.head || document.getElementsByTagName('head')[0];
|
|
1222
|
+
}
|
|
1223
|
+
HEAD.appendChild(style.element);
|
|
1224
|
+
}
|
|
1225
|
+
if ('styleSheet' in style.element) {
|
|
1226
|
+
style.styles.push(code);
|
|
1227
|
+
style.element.styleSheet.cssText = style.styles
|
|
1228
|
+
.filter(Boolean)
|
|
1229
|
+
.join('\n');
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
const index = style.ids.size - 1;
|
|
1233
|
+
const textNode = document.createTextNode(code);
|
|
1234
|
+
const nodes = style.element.childNodes;
|
|
1235
|
+
if (nodes[index])
|
|
1236
|
+
style.element.removeChild(nodes[index]);
|
|
1237
|
+
if (nodes.length)
|
|
1238
|
+
style.element.insertBefore(textNode, nodes[index]);
|
|
1239
|
+
else
|
|
1240
|
+
style.element.appendChild(textNode);
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
1243
|
}
|
|
1244
1244
|
|
|
1245
1245
|
/* script */
|
|
@@ -1723,9 +1723,9 @@ const getInputTypeText = type => {
|
|
|
1723
1723
|
return input;
|
|
1724
1724
|
};
|
|
1725
1725
|
const VType = Object.create(null);
|
|
1726
|
-
/**
|
|
1727
|
-
* type: {String} 名称
|
|
1728
|
-
* func: {Function} (props, ...args) => {...}. props: {name,label,type,placeholder,vtype}; ...args: 通过":"传递的参数
|
|
1726
|
+
/**
|
|
1727
|
+
* type: {String} 名称
|
|
1728
|
+
* func: {Function} (props, ...args) => {...}. props: {name,label,type,placeholder,vtype}; ...args: 通过":"传递的参数
|
|
1729
1729
|
*/
|
|
1730
1730
|
|
|
1731
1731
|
const addVType = (type, func) => {
|
|
@@ -1970,11 +1970,11 @@ const DefaultVType = {
|
|
|
1970
1970
|
newComplexCipher: () => {
|
|
1971
1971
|
return {
|
|
1972
1972
|
validator: (rule, value, callback) => {
|
|
1973
|
-
// 密码长度不少于8
|
|
1974
|
-
const passwordPattern = /^(?=.*[a-
|
|
1973
|
+
// 密码长度不少于8位且必须包含字母、数字和特殊字符
|
|
1974
|
+
const passwordPattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+\-=,.;'\":\\\\/<>\?])[A-Za-z\d~!@#$%^&*()_+\-=,.;'\":\\\\/<>\?]{8,}$/;
|
|
1975
1975
|
|
|
1976
1976
|
if (!passwordPattern.test(value)) {
|
|
1977
|
-
callback(new Error('密码长度不少于8
|
|
1977
|
+
callback(new Error('密码长度不少于8位且必须包含字母、数字和特殊字符'));
|
|
1978
1978
|
} else {
|
|
1979
1979
|
callback();
|
|
1980
1980
|
}
|
|
@@ -2310,10 +2310,10 @@ var DataMixin = {
|
|
|
2310
2310
|
})
|
|
2311
2311
|
},
|
|
2312
2312
|
|
|
2313
|
-
/**
|
|
2314
|
-
* 级联
|
|
2315
|
-
* 当 depends 中每一个 key 改变则重新请求数据并重置当前 data 为空
|
|
2316
|
-
* 当 depends 中某一个 key 为空则只重置当前 data 为空(所级联的上级清空了)
|
|
2313
|
+
/**
|
|
2314
|
+
* 级联
|
|
2315
|
+
* 当 depends 中每一个 key 改变则重新请求数据并重置当前 data 为空
|
|
2316
|
+
* 当 depends 中某一个 key 为空则只重置当前 data 为空(所级联的上级清空了)
|
|
2317
2317
|
*/
|
|
2318
2318
|
depends: {
|
|
2319
2319
|
type: [Boolean, Object],
|
|
@@ -3463,8 +3463,8 @@ var script$u = {
|
|
|
3463
3463
|
});
|
|
3464
3464
|
},
|
|
3465
3465
|
|
|
3466
|
-
/**
|
|
3467
|
-
* 展开有层级关系的 list
|
|
3466
|
+
/**
|
|
3467
|
+
* 展开有层级关系的 list
|
|
3468
3468
|
*/
|
|
3469
3469
|
getExpandList(data, valueKey, upValue) {
|
|
3470
3470
|
return data.reduce((prev, _ref) => {
|
|
@@ -3484,13 +3484,13 @@ var script$u = {
|
|
|
3484
3484
|
}, []);
|
|
3485
3485
|
},
|
|
3486
3486
|
|
|
3487
|
-
/**
|
|
3488
|
-
* 返回
|
|
3489
|
-
* {
|
|
3490
|
-
* child1: [father1,grandfather1,...],
|
|
3491
|
-
* child2: [father2,grandfather2,...],
|
|
3492
|
-
* ...
|
|
3493
|
-
* }
|
|
3487
|
+
/**
|
|
3488
|
+
* 返回
|
|
3489
|
+
* {
|
|
3490
|
+
* child1: [father1,grandfather1,...],
|
|
3491
|
+
* child2: [father2,grandfather2,...],
|
|
3492
|
+
* ...
|
|
3493
|
+
* }
|
|
3494
3494
|
*/
|
|
3495
3495
|
getExpandMap(data) {
|
|
3496
3496
|
const {
|
|
@@ -3663,20 +3663,20 @@ const __vue_component__$v = /*#__PURE__*/normalizeComponent({
|
|
|
3663
3663
|
|
|
3664
3664
|
var CascadeField = __vue_component__$v;
|
|
3665
3665
|
|
|
3666
|
-
/**
|
|
3667
|
-
* @param text
|
|
3668
|
-
* @param unit
|
|
3669
|
-
years y
|
|
3670
|
-
quarters Q
|
|
3671
|
-
months M
|
|
3672
|
-
weeks w
|
|
3673
|
-
days d
|
|
3674
|
-
hours h
|
|
3675
|
-
minutes m
|
|
3676
|
-
seconds s
|
|
3677
|
-
milliseconds ms
|
|
3678
|
-
* @param num num > 0 表示当前时间之前; num < 0 表示当前时间之后
|
|
3679
|
-
* @return {{onClick(*): void, text: *}|null}
|
|
3666
|
+
/**
|
|
3667
|
+
* @param text
|
|
3668
|
+
* @param unit
|
|
3669
|
+
years y
|
|
3670
|
+
quarters Q
|
|
3671
|
+
months M
|
|
3672
|
+
weeks w
|
|
3673
|
+
days d
|
|
3674
|
+
hours h
|
|
3675
|
+
minutes m
|
|
3676
|
+
seconds s
|
|
3677
|
+
milliseconds ms
|
|
3678
|
+
* @param num num > 0 表示当前时间之前; num < 0 表示当前时间之后
|
|
3679
|
+
* @return {{onClick(*): void, text: *}|null}
|
|
3680
3680
|
*/
|
|
3681
3681
|
|
|
3682
3682
|
const generateShortcut = (text, unit, num) => {
|
|
@@ -4978,10 +4978,10 @@ var script$l = {
|
|
|
4978
4978
|
default: true
|
|
4979
4979
|
},
|
|
4980
4980
|
|
|
4981
|
-
/**
|
|
4982
|
-
* eg: beforeUpload(file) { ... }
|
|
4983
|
-
*
|
|
4984
|
-
* return false will cancel upload
|
|
4981
|
+
/**
|
|
4982
|
+
* eg: beforeUpload(file) { ... }
|
|
4983
|
+
*
|
|
4984
|
+
* return false will cancel upload
|
|
4985
4985
|
**/
|
|
4986
4986
|
beforeUpload: {
|
|
4987
4987
|
type: Function,
|
|
@@ -5845,10 +5845,10 @@ const FormFields = {
|
|
|
5845
5845
|
TriggerField,
|
|
5846
5846
|
IconsField
|
|
5847
5847
|
};
|
|
5848
|
-
/**
|
|
5849
|
-
*
|
|
5850
|
-
* @param type {string}
|
|
5851
|
-
* @param field
|
|
5848
|
+
/**
|
|
5849
|
+
*
|
|
5850
|
+
* @param type {string}
|
|
5851
|
+
* @param field
|
|
5852
5852
|
*/
|
|
5853
5853
|
|
|
5854
5854
|
const addFieldType = (type, field) => {
|
|
@@ -5948,9 +5948,9 @@ var script$g = {
|
|
|
5948
5948
|
info: String,
|
|
5949
5949
|
rules: null,
|
|
5950
5950
|
|
|
5951
|
-
/**
|
|
5952
|
-
* 是否显示 label 后面的冒号
|
|
5953
|
-
* 默认显示
|
|
5951
|
+
/**
|
|
5952
|
+
* 是否显示 label 后面的冒号
|
|
5953
|
+
* 默认显示
|
|
5954
5954
|
*/
|
|
5955
5955
|
colon: {
|
|
5956
5956
|
type: Boolean,
|
|
@@ -6263,8 +6263,8 @@ var script$f = {
|
|
|
6263
6263
|
default: 'post'
|
|
6264
6264
|
},
|
|
6265
6265
|
|
|
6266
|
-
/**
|
|
6267
|
-
* 是否显示 label 后面的冒号
|
|
6266
|
+
/**
|
|
6267
|
+
* 是否显示 label 后面的冒号
|
|
6268
6268
|
*/
|
|
6269
6269
|
colon: {
|
|
6270
6270
|
type: Boolean,
|
|
@@ -6279,12 +6279,12 @@ var script$f = {
|
|
|
6279
6279
|
default: false
|
|
6280
6280
|
},
|
|
6281
6281
|
|
|
6282
|
-
/**
|
|
6283
|
-
* listeners:
|
|
6284
|
-
* ready 所有表单项都准备好后触发
|
|
6285
|
-
* submit 触发提交事件
|
|
6286
|
-
* after-submit 配置 url 后触发submit事件时触发提交数据完成事件
|
|
6287
|
-
* validate 任一表单项被校验后触发
|
|
6282
|
+
/**
|
|
6283
|
+
* listeners:
|
|
6284
|
+
* ready 所有表单项都准备好后触发
|
|
6285
|
+
* submit 触发提交事件
|
|
6286
|
+
* after-submit 配置 url 后触发submit事件时触发提交数据完成事件
|
|
6287
|
+
* validate 任一表单项被校验后触发
|
|
6288
6288
|
**/
|
|
6289
6289
|
autocomplete: {
|
|
6290
6290
|
type: String,
|
|
@@ -6333,29 +6333,29 @@ var script$f = {
|
|
|
6333
6333
|
},
|
|
6334
6334
|
|
|
6335
6335
|
methods: {
|
|
6336
|
-
/**
|
|
6337
|
-
* @public
|
|
6336
|
+
/**
|
|
6337
|
+
* @public
|
|
6338
6338
|
*/
|
|
6339
6339
|
validate() {
|
|
6340
6340
|
return this.$refs.form.validate(...arguments);
|
|
6341
6341
|
},
|
|
6342
6342
|
|
|
6343
|
-
/**
|
|
6344
|
-
* @public
|
|
6343
|
+
/**
|
|
6344
|
+
* @public
|
|
6345
6345
|
*/
|
|
6346
6346
|
validateField() {
|
|
6347
6347
|
return this.$refs.form.validateField(...arguments);
|
|
6348
6348
|
},
|
|
6349
6349
|
|
|
6350
|
-
/**
|
|
6351
|
-
* @public
|
|
6350
|
+
/**
|
|
6351
|
+
* @public
|
|
6352
6352
|
*/
|
|
6353
6353
|
clearValidate() {
|
|
6354
6354
|
return this.$refs.form.clearValidate(...arguments);
|
|
6355
6355
|
},
|
|
6356
6356
|
|
|
6357
|
-
/**
|
|
6358
|
-
* @public
|
|
6357
|
+
/**
|
|
6358
|
+
* @public
|
|
6359
6359
|
*/
|
|
6360
6360
|
resetValues(values) {
|
|
6361
6361
|
let all = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
@@ -6374,8 +6374,8 @@ var script$f = {
|
|
|
6374
6374
|
});
|
|
6375
6375
|
},
|
|
6376
6376
|
|
|
6377
|
-
/**
|
|
6378
|
-
* @public
|
|
6377
|
+
/**
|
|
6378
|
+
* @public
|
|
6379
6379
|
*/
|
|
6380
6380
|
setValues(values) {
|
|
6381
6381
|
if (!values || !Objects.isObject(values)) {
|
|
@@ -6395,8 +6395,8 @@ var script$f = {
|
|
|
6395
6395
|
});
|
|
6396
6396
|
},
|
|
6397
6397
|
|
|
6398
|
-
/**
|
|
6399
|
-
* @public
|
|
6398
|
+
/**
|
|
6399
|
+
* @public
|
|
6400
6400
|
*/
|
|
6401
6401
|
getValues() {
|
|
6402
6402
|
const formItems = this.getFormItems();
|
|
@@ -6428,8 +6428,8 @@ var script$f = {
|
|
|
6428
6428
|
return listSearchItem(this.$children);
|
|
6429
6429
|
},
|
|
6430
6430
|
|
|
6431
|
-
/**
|
|
6432
|
-
* @private
|
|
6431
|
+
/**
|
|
6432
|
+
* @private
|
|
6433
6433
|
*/
|
|
6434
6434
|
addField(name) {
|
|
6435
6435
|
let defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
@@ -6440,9 +6440,9 @@ var script$f = {
|
|
|
6440
6440
|
}
|
|
6441
6441
|
},
|
|
6442
6442
|
|
|
6443
|
-
/**
|
|
6444
|
-
* (函数节流. 600ms内只执行一次, 防止 form 表单多次提交)
|
|
6445
|
-
* @private
|
|
6443
|
+
/**
|
|
6444
|
+
* (函数节流. 600ms内只执行一次, 防止 form 表单多次提交)
|
|
6445
|
+
* @private
|
|
6446
6446
|
*/
|
|
6447
6447
|
onSubmit: throttle(async function () {
|
|
6448
6448
|
let formData = this.getValues();
|
|
@@ -6501,8 +6501,8 @@ var script$f = {
|
|
|
6501
6501
|
});
|
|
6502
6502
|
},
|
|
6503
6503
|
|
|
6504
|
-
/**
|
|
6505
|
-
* @private
|
|
6504
|
+
/**
|
|
6505
|
+
* @private
|
|
6506
6506
|
*/
|
|
6507
6507
|
onReset(e) {
|
|
6508
6508
|
e.preventDefault();
|
|
@@ -6510,8 +6510,8 @@ var script$f = {
|
|
|
6510
6510
|
this.$emit('reset');
|
|
6511
6511
|
},
|
|
6512
6512
|
|
|
6513
|
-
/**
|
|
6514
|
-
* @private
|
|
6513
|
+
/**
|
|
6514
|
+
* @private
|
|
6515
6515
|
*/
|
|
6516
6516
|
trigger(event) {
|
|
6517
6517
|
if (typeof event !== 'string') {
|
|
@@ -6531,8 +6531,8 @@ var script$f = {
|
|
|
6531
6531
|
this[`onField${e}`](...args);
|
|
6532
6532
|
},
|
|
6533
6533
|
|
|
6534
|
-
/**
|
|
6535
|
-
* @private
|
|
6534
|
+
/**
|
|
6535
|
+
* @private
|
|
6536
6536
|
*/
|
|
6537
6537
|
onFieldPending(component) {
|
|
6538
6538
|
if (!component.name) {
|
|
@@ -6546,8 +6546,8 @@ var script$f = {
|
|
|
6546
6546
|
});
|
|
6547
6547
|
},
|
|
6548
6548
|
|
|
6549
|
-
/**
|
|
6550
|
-
* @private
|
|
6549
|
+
/**
|
|
6550
|
+
* @private
|
|
6551
6551
|
*/
|
|
6552
6552
|
onFieldDestroy(component) {
|
|
6553
6553
|
if (component.name) {
|
|
@@ -6564,8 +6564,8 @@ var script$f = {
|
|
|
6564
6564
|
}
|
|
6565
6565
|
},
|
|
6566
6566
|
|
|
6567
|
-
/**
|
|
6568
|
-
* @private
|
|
6567
|
+
/**
|
|
6568
|
+
* @private
|
|
6569
6569
|
*/
|
|
6570
6570
|
onFieldDone(component) {
|
|
6571
6571
|
if (!component.name) {
|
|
@@ -7455,8 +7455,8 @@ var script$b = {
|
|
|
7455
7455
|
|
|
7456
7456
|
},
|
|
7457
7457
|
|
|
7458
|
-
/**
|
|
7459
|
-
* 初始时是否展开
|
|
7458
|
+
/**
|
|
7459
|
+
* 初始时是否展开
|
|
7460
7460
|
*/
|
|
7461
7461
|
collapse: {
|
|
7462
7462
|
type: Boolean,
|
|
@@ -7997,8 +7997,8 @@ var script$9 = {
|
|
|
7997
7997
|
};
|
|
7998
7998
|
},
|
|
7999
7999
|
|
|
8000
|
-
/**
|
|
8001
|
-
* @private
|
|
8000
|
+
/**
|
|
8001
|
+
* @private
|
|
8002
8002
|
*/
|
|
8003
8003
|
fetchData(params) {
|
|
8004
8004
|
this.remoteLoading = true;
|
|
@@ -8035,31 +8035,31 @@ var script$9 = {
|
|
|
8035
8035
|
});
|
|
8036
8036
|
},
|
|
8037
8037
|
|
|
8038
|
-
/**
|
|
8039
|
-
* @private
|
|
8038
|
+
/**
|
|
8039
|
+
* @private
|
|
8040
8040
|
*/
|
|
8041
8041
|
registerSearchBar(searchBar) {
|
|
8042
8042
|
this.searchBar = searchBar;
|
|
8043
8043
|
},
|
|
8044
8044
|
|
|
8045
|
-
/**
|
|
8046
|
-
* @private
|
|
8045
|
+
/**
|
|
8046
|
+
* @private
|
|
8047
8047
|
*/
|
|
8048
8048
|
registerPagination(pagination) {
|
|
8049
8049
|
this.pagination = pagination;
|
|
8050
8050
|
this.initPaginationParams();
|
|
8051
8051
|
},
|
|
8052
8052
|
|
|
8053
|
-
/**
|
|
8054
|
-
* @private
|
|
8053
|
+
/**
|
|
8054
|
+
* @private
|
|
8055
8055
|
*/
|
|
8056
8056
|
unRegisterPagination() {
|
|
8057
8057
|
this.removePaginationParams();
|
|
8058
8058
|
this.pagination = null;
|
|
8059
8059
|
},
|
|
8060
8060
|
|
|
8061
|
-
/**
|
|
8062
|
-
* @private
|
|
8061
|
+
/**
|
|
8062
|
+
* @private
|
|
8063
8063
|
*/
|
|
8064
8064
|
initPaginationParams() {
|
|
8065
8065
|
if (!this.pagination) {
|
|
@@ -8077,15 +8077,15 @@ var script$9 = {
|
|
|
8077
8077
|
this.tablePageParams = {};
|
|
8078
8078
|
},
|
|
8079
8079
|
|
|
8080
|
-
/**
|
|
8081
|
-
* @private
|
|
8080
|
+
/**
|
|
8081
|
+
* @private
|
|
8082
8082
|
*/
|
|
8083
8083
|
clearSelection() {
|
|
8084
8084
|
this.$refs.table.clearSelection();
|
|
8085
8085
|
},
|
|
8086
8086
|
|
|
8087
|
-
/**
|
|
8088
|
-
* Events
|
|
8087
|
+
/**
|
|
8088
|
+
* Events
|
|
8089
8089
|
*/
|
|
8090
8090
|
toggleSearchBarVisible() {
|
|
8091
8091
|
this.searchBarVisible = !this.searchBarVisible;
|
|
@@ -8178,8 +8178,8 @@ var script$9 = {
|
|
|
8178
8178
|
}
|
|
8179
8179
|
},
|
|
8180
8180
|
|
|
8181
|
-
/**
|
|
8182
|
-
* @private
|
|
8181
|
+
/**
|
|
8182
|
+
* @private
|
|
8183
8183
|
*/
|
|
8184
8184
|
addColumn(column) {
|
|
8185
8185
|
const isAdded = this.cols.some(c => c.id === column.id);
|
|
@@ -8237,8 +8237,8 @@ var script$9 = {
|
|
|
8237
8237
|
}));
|
|
8238
8238
|
},
|
|
8239
8239
|
|
|
8240
|
-
/**
|
|
8241
|
-
* @private
|
|
8240
|
+
/**
|
|
8241
|
+
* @private
|
|
8242
8242
|
*/
|
|
8243
8243
|
getVisible(id) {
|
|
8244
8244
|
const column = this.cols.find(column => column.id === id);
|
|
@@ -8639,10 +8639,10 @@ var Fragment$1 = {
|
|
|
8639
8639
|
};
|
|
8640
8640
|
|
|
8641
8641
|
const ColumnType = Object.create(null);
|
|
8642
|
-
/**
|
|
8643
|
-
*
|
|
8644
|
-
* @param type {string}
|
|
8645
|
-
* @param config {Function} (opt) => string/Vnode/Vnodes. opt: {row, column, cellValue, index, attrs, props, h}
|
|
8642
|
+
/**
|
|
8643
|
+
*
|
|
8644
|
+
* @param type {string}
|
|
8645
|
+
* @param config {Function} (opt) => string/Vnode/Vnodes. opt: {row, column, cellValue, index, attrs, props, h}
|
|
8646
8646
|
*/
|
|
8647
8647
|
|
|
8648
8648
|
const addColumnType = (type, config) => {
|
|
@@ -8759,7 +8759,8 @@ const DefaultTypes = {
|
|
|
8759
8759
|
h
|
|
8760
8760
|
} = arg;
|
|
8761
8761
|
const buttons = attrs.buttons || props.buttons;
|
|
8762
|
-
const render = attrs.render || props.render;
|
|
8762
|
+
const render = attrs.render || props.render;
|
|
8763
|
+
const limit = Math.max(attrs.limit || props.limit || 7, 3); // 使用 buttons 配置
|
|
8763
8764
|
|
|
8764
8765
|
if (buttons) {
|
|
8765
8766
|
let _buttons = Array.isArray(buttons) ? buttons : [buttons];
|
|
@@ -8807,8 +8808,8 @@ const DefaultTypes = {
|
|
|
8807
8808
|
Objects.isFunction(btn.handle) && btn.handle(rowData, index);
|
|
8808
8809
|
};
|
|
8809
8810
|
|
|
8810
|
-
const hasMore = _buttons.length >
|
|
8811
|
-
return h(Fragment$1, null, [..._buttons.slice(0, hasMore ?
|
|
8811
|
+
const hasMore = _buttons.length > limit;
|
|
8812
|
+
return h(Fragment$1, null, [..._buttons.slice(0, hasMore ? limit - 2 : limit).map((_ref7, i) => {
|
|
8812
8813
|
let {
|
|
8813
8814
|
text,
|
|
8814
8815
|
key,
|
|
@@ -8856,7 +8857,7 @@ const DefaultTypes = {
|
|
|
8856
8857
|
}
|
|
8857
8858
|
})]), h('el-dropdown-menu', {
|
|
8858
8859
|
slot: 'dropdown'
|
|
8859
|
-
}, _buttons.slice(
|
|
8860
|
+
}, _buttons.slice(limit - 2).map(_ref8 => {
|
|
8860
8861
|
let {
|
|
8861
8862
|
text,
|
|
8862
8863
|
key,
|
|
@@ -9929,13 +9930,13 @@ var script$6 = {
|
|
|
9929
9930
|
default: hide => hide()
|
|
9930
9931
|
},
|
|
9931
9932
|
|
|
9932
|
-
/**
|
|
9933
|
-
* {
|
|
9934
|
-
* text: '', // required
|
|
9935
|
-
* handle: () => {}, // required
|
|
9936
|
-
* icon: '', // optional
|
|
9937
|
-
* ... el-button`s options
|
|
9938
|
-
* }
|
|
9933
|
+
/**
|
|
9934
|
+
* {
|
|
9935
|
+
* text: '', // required
|
|
9936
|
+
* handle: () => {}, // required
|
|
9937
|
+
* icon: '', // optional
|
|
9938
|
+
* ... el-button`s options
|
|
9939
|
+
* }
|
|
9939
9940
|
*/
|
|
9940
9941
|
buttons: {
|
|
9941
9942
|
type: null,
|
|
@@ -11247,8 +11248,8 @@ var Components = {
|
|
|
11247
11248
|
}
|
|
11248
11249
|
};
|
|
11249
11250
|
|
|
11250
|
-
/**
|
|
11251
|
-
* 以引用的特性构建tree
|
|
11251
|
+
/**
|
|
11252
|
+
* 以引用的特性构建tree
|
|
11252
11253
|
*/
|
|
11253
11254
|
const array2Tree = function (arr) {
|
|
11254
11255
|
let opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -11413,7 +11414,7 @@ var mixin = {
|
|
|
11413
11414
|
...menu
|
|
11414
11415
|
} = _ref;
|
|
11415
11416
|
|
|
11416
|
-
if ([1, 2, 100].includes(menu.type)) {
|
|
11417
|
+
if ([1, 2, 4, 5, 100].includes(menu.type)) {
|
|
11417
11418
|
if (Array.isArray(children) && children.length > 0) {
|
|
11418
11419
|
menu.children = this.filterMenu(children);
|
|
11419
11420
|
}
|
|
@@ -11430,7 +11431,7 @@ var mixin = {
|
|
|
11430
11431
|
return;
|
|
11431
11432
|
}
|
|
11432
11433
|
|
|
11433
|
-
if (!this.isMenu(route, [2, 100])) {
|
|
11434
|
+
if (!this.isMenu(route, [2, 4, 5, 100])) {
|
|
11434
11435
|
return;
|
|
11435
11436
|
}
|
|
11436
11437
|
|