@v2coding/ui 0.1.52 → 0.1.54
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 +175 -143
- package/dist/v2coding-ui.min.js +1 -1
- package/dist/v2coding-ui.ssr.js +210 -98
- package/package.json +1 -1
package/dist/v2coding-ui.esm.js
CHANGED
|
@@ -1119,132 +1119,132 @@ var script$E = {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
};
|
|
1121
1121
|
|
|
1122
|
-
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
1123
|
-
if (typeof shadowMode !== 'boolean') {
|
|
1124
|
-
createInjectorSSR = createInjector;
|
|
1125
|
-
createInjector = shadowMode;
|
|
1126
|
-
shadowMode = false;
|
|
1127
|
-
}
|
|
1128
|
-
// Vue.extend constructor export interop.
|
|
1129
|
-
const options = typeof script === 'function' ? script.options : script;
|
|
1130
|
-
// render functions
|
|
1131
|
-
if (template && template.render) {
|
|
1132
|
-
options.render = template.render;
|
|
1133
|
-
options.staticRenderFns = template.staticRenderFns;
|
|
1134
|
-
options._compiled = true;
|
|
1135
|
-
// functional template
|
|
1136
|
-
if (isFunctionalTemplate) {
|
|
1137
|
-
options.functional = true;
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
// scopedId
|
|
1141
|
-
if (scopeId) {
|
|
1142
|
-
options._scopeId = scopeId;
|
|
1143
|
-
}
|
|
1144
|
-
let hook;
|
|
1145
|
-
if (moduleIdentifier) {
|
|
1146
|
-
// server build
|
|
1147
|
-
hook = function (context) {
|
|
1148
|
-
// 2.3 injection
|
|
1149
|
-
context =
|
|
1150
|
-
context || // cached call
|
|
1151
|
-
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
1152
|
-
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
1153
|
-
// 2.2 with runInNewContext: true
|
|
1154
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
1155
|
-
context = __VUE_SSR_CONTEXT__;
|
|
1156
|
-
}
|
|
1157
|
-
// inject component styles
|
|
1158
|
-
if (style) {
|
|
1159
|
-
style.call(this, createInjectorSSR(context));
|
|
1160
|
-
}
|
|
1161
|
-
// register component module identifier for async chunk inference
|
|
1162
|
-
if (context && context._registeredComponents) {
|
|
1163
|
-
context._registeredComponents.add(moduleIdentifier);
|
|
1164
|
-
}
|
|
1165
|
-
};
|
|
1166
|
-
// used by ssr in case component is cached and beforeCreate
|
|
1167
|
-
// never gets called
|
|
1168
|
-
options._ssrRegister = hook;
|
|
1169
|
-
}
|
|
1170
|
-
else if (style) {
|
|
1171
|
-
hook = shadowMode
|
|
1172
|
-
? function (context) {
|
|
1173
|
-
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
1174
|
-
}
|
|
1175
|
-
: function (context) {
|
|
1176
|
-
style.call(this, createInjector(context));
|
|
1177
|
-
};
|
|
1178
|
-
}
|
|
1179
|
-
if (hook) {
|
|
1180
|
-
if (options.functional) {
|
|
1181
|
-
// register for functional component in vue file
|
|
1182
|
-
const originalRender = options.render;
|
|
1183
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
1184
|
-
hook.call(context);
|
|
1185
|
-
return originalRender(h, context);
|
|
1186
|
-
};
|
|
1187
|
-
}
|
|
1188
|
-
else {
|
|
1189
|
-
// inject component registration as beforeCreate hook
|
|
1190
|
-
const existing = options.beforeCreate;
|
|
1191
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
return script;
|
|
1122
|
+
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
|
|
1123
|
+
if (typeof shadowMode !== 'boolean') {
|
|
1124
|
+
createInjectorSSR = createInjector;
|
|
1125
|
+
createInjector = shadowMode;
|
|
1126
|
+
shadowMode = false;
|
|
1127
|
+
}
|
|
1128
|
+
// Vue.extend constructor export interop.
|
|
1129
|
+
const options = typeof script === 'function' ? script.options : script;
|
|
1130
|
+
// render functions
|
|
1131
|
+
if (template && template.render) {
|
|
1132
|
+
options.render = template.render;
|
|
1133
|
+
options.staticRenderFns = template.staticRenderFns;
|
|
1134
|
+
options._compiled = true;
|
|
1135
|
+
// functional template
|
|
1136
|
+
if (isFunctionalTemplate) {
|
|
1137
|
+
options.functional = true;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
// scopedId
|
|
1141
|
+
if (scopeId) {
|
|
1142
|
+
options._scopeId = scopeId;
|
|
1143
|
+
}
|
|
1144
|
+
let hook;
|
|
1145
|
+
if (moduleIdentifier) {
|
|
1146
|
+
// server build
|
|
1147
|
+
hook = function (context) {
|
|
1148
|
+
// 2.3 injection
|
|
1149
|
+
context =
|
|
1150
|
+
context || // cached call
|
|
1151
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
1152
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
|
|
1153
|
+
// 2.2 with runInNewContext: true
|
|
1154
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
1155
|
+
context = __VUE_SSR_CONTEXT__;
|
|
1156
|
+
}
|
|
1157
|
+
// inject component styles
|
|
1158
|
+
if (style) {
|
|
1159
|
+
style.call(this, createInjectorSSR(context));
|
|
1160
|
+
}
|
|
1161
|
+
// register component module identifier for async chunk inference
|
|
1162
|
+
if (context && context._registeredComponents) {
|
|
1163
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
1164
|
+
}
|
|
1165
|
+
};
|
|
1166
|
+
// used by ssr in case component is cached and beforeCreate
|
|
1167
|
+
// never gets called
|
|
1168
|
+
options._ssrRegister = hook;
|
|
1169
|
+
}
|
|
1170
|
+
else if (style) {
|
|
1171
|
+
hook = shadowMode
|
|
1172
|
+
? function (context) {
|
|
1173
|
+
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
|
|
1174
|
+
}
|
|
1175
|
+
: function (context) {
|
|
1176
|
+
style.call(this, createInjector(context));
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
if (hook) {
|
|
1180
|
+
if (options.functional) {
|
|
1181
|
+
// register for functional component in vue file
|
|
1182
|
+
const originalRender = options.render;
|
|
1183
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
1184
|
+
hook.call(context);
|
|
1185
|
+
return originalRender(h, context);
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
else {
|
|
1189
|
+
// inject component registration as beforeCreate hook
|
|
1190
|
+
const existing = options.beforeCreate;
|
|
1191
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
return script;
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
|
-
const isOldIE = typeof navigator !== 'undefined' &&
|
|
1198
|
-
/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
|
|
1199
|
-
function createInjector(context) {
|
|
1200
|
-
return (id, style) => addStyle(id, style);
|
|
1201
|
-
}
|
|
1202
|
-
let HEAD;
|
|
1203
|
-
const styles = {};
|
|
1204
|
-
function addStyle(id, css) {
|
|
1205
|
-
const group = isOldIE ? css.media || 'default' : id;
|
|
1206
|
-
const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
|
|
1207
|
-
if (!style.ids.has(id)) {
|
|
1208
|
-
style.ids.add(id);
|
|
1209
|
-
let code = css.source;
|
|
1210
|
-
if (css.map) {
|
|
1211
|
-
// https://developer.chrome.com/devtools/docs/javascript-debugging
|
|
1212
|
-
// this makes source maps inside style tags work properly in Chrome
|
|
1213
|
-
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
|
|
1214
|
-
// http://stackoverflow.com/a/26603875
|
|
1215
|
-
code +=
|
|
1216
|
-
'\n/*# sourceMappingURL=data:application/json;base64,' +
|
|
1217
|
-
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
|
|
1218
|
-
' */';
|
|
1219
|
-
}
|
|
1220
|
-
if (!style.element) {
|
|
1221
|
-
style.element = document.createElement('style');
|
|
1222
|
-
style.element.type = 'text/css';
|
|
1223
|
-
if (css.media)
|
|
1224
|
-
style.element.setAttribute('media', css.media);
|
|
1225
|
-
if (HEAD === undefined) {
|
|
1226
|
-
HEAD = document.head || document.getElementsByTagName('head')[0];
|
|
1227
|
-
}
|
|
1228
|
-
HEAD.appendChild(style.element);
|
|
1229
|
-
}
|
|
1230
|
-
if ('styleSheet' in style.element) {
|
|
1231
|
-
style.styles.push(code);
|
|
1232
|
-
style.element.styleSheet.cssText = style.styles
|
|
1233
|
-
.filter(Boolean)
|
|
1234
|
-
.join('\n');
|
|
1235
|
-
}
|
|
1236
|
-
else {
|
|
1237
|
-
const index = style.ids.size - 1;
|
|
1238
|
-
const textNode = document.createTextNode(code);
|
|
1239
|
-
const nodes = style.element.childNodes;
|
|
1240
|
-
if (nodes[index])
|
|
1241
|
-
style.element.removeChild(nodes[index]);
|
|
1242
|
-
if (nodes.length)
|
|
1243
|
-
style.element.insertBefore(textNode, nodes[index]);
|
|
1244
|
-
else
|
|
1245
|
-
style.element.appendChild(textNode);
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1197
|
+
const isOldIE = typeof navigator !== 'undefined' &&
|
|
1198
|
+
/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
|
|
1199
|
+
function createInjector(context) {
|
|
1200
|
+
return (id, style) => addStyle(id, style);
|
|
1201
|
+
}
|
|
1202
|
+
let HEAD;
|
|
1203
|
+
const styles = {};
|
|
1204
|
+
function addStyle(id, css) {
|
|
1205
|
+
const group = isOldIE ? css.media || 'default' : id;
|
|
1206
|
+
const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
|
|
1207
|
+
if (!style.ids.has(id)) {
|
|
1208
|
+
style.ids.add(id);
|
|
1209
|
+
let code = css.source;
|
|
1210
|
+
if (css.map) {
|
|
1211
|
+
// https://developer.chrome.com/devtools/docs/javascript-debugging
|
|
1212
|
+
// this makes source maps inside style tags work properly in Chrome
|
|
1213
|
+
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
|
|
1214
|
+
// http://stackoverflow.com/a/26603875
|
|
1215
|
+
code +=
|
|
1216
|
+
'\n/*# sourceMappingURL=data:application/json;base64,' +
|
|
1217
|
+
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
|
|
1218
|
+
' */';
|
|
1219
|
+
}
|
|
1220
|
+
if (!style.element) {
|
|
1221
|
+
style.element = document.createElement('style');
|
|
1222
|
+
style.element.type = 'text/css';
|
|
1223
|
+
if (css.media)
|
|
1224
|
+
style.element.setAttribute('media', css.media);
|
|
1225
|
+
if (HEAD === undefined) {
|
|
1226
|
+
HEAD = document.head || document.getElementsByTagName('head')[0];
|
|
1227
|
+
}
|
|
1228
|
+
HEAD.appendChild(style.element);
|
|
1229
|
+
}
|
|
1230
|
+
if ('styleSheet' in style.element) {
|
|
1231
|
+
style.styles.push(code);
|
|
1232
|
+
style.element.styleSheet.cssText = style.styles
|
|
1233
|
+
.filter(Boolean)
|
|
1234
|
+
.join('\n');
|
|
1235
|
+
}
|
|
1236
|
+
else {
|
|
1237
|
+
const index = style.ids.size - 1;
|
|
1238
|
+
const textNode = document.createTextNode(code);
|
|
1239
|
+
const nodes = style.element.childNodes;
|
|
1240
|
+
if (nodes[index])
|
|
1241
|
+
style.element.removeChild(nodes[index]);
|
|
1242
|
+
if (nodes.length)
|
|
1243
|
+
style.element.insertBefore(textNode, nodes[index]);
|
|
1244
|
+
else
|
|
1245
|
+
style.element.appendChild(textNode);
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
1250
|
/* script */
|
|
@@ -7359,9 +7359,9 @@ var script$g = {
|
|
|
7359
7359
|
* (函数节流. 600ms内只执行一次, 防止 form 表单多次提交)
|
|
7360
7360
|
* @private
|
|
7361
7361
|
*/
|
|
7362
|
-
onSubmit: throttle(function () {
|
|
7362
|
+
onSubmit: throttle(async function () {
|
|
7363
7363
|
let formData = this.getValues();
|
|
7364
|
-
const allow = this.beforeSubmit(formData);
|
|
7364
|
+
const allow = await this.beforeSubmit(formData);
|
|
7365
7365
|
|
|
7366
7366
|
if (typeof allow === 'boolean' && allow === false) {
|
|
7367
7367
|
return;
|
|
@@ -7563,8 +7563,8 @@ var __vue_staticRenderFns__$f = [];
|
|
|
7563
7563
|
|
|
7564
7564
|
const __vue_inject_styles__$g = function (inject) {
|
|
7565
7565
|
if (!inject) return;
|
|
7566
|
-
inject("data-v-
|
|
7567
|
-
source: ".el-form--inline[data-v-
|
|
7566
|
+
inject("data-v-3dfdaaf7_0", {
|
|
7567
|
+
source: ".el-form--inline[data-v-3dfdaaf7] .el-form-item{display:inline-flex}",
|
|
7568
7568
|
map: undefined,
|
|
7569
7569
|
media: undefined
|
|
7570
7570
|
});
|
|
@@ -7572,7 +7572,7 @@ const __vue_inject_styles__$g = function (inject) {
|
|
|
7572
7572
|
/* scoped */
|
|
7573
7573
|
|
|
7574
7574
|
|
|
7575
|
-
const __vue_scope_id__$g = "data-v-
|
|
7575
|
+
const __vue_scope_id__$g = "data-v-3dfdaaf7";
|
|
7576
7576
|
/* module identifier */
|
|
7577
7577
|
|
|
7578
7578
|
const __vue_module_identifier__$g = undefined;
|
|
@@ -7715,31 +7715,47 @@ var script$f = {
|
|
|
7715
7715
|
this.$refs.form.resetValues(values, all);
|
|
7716
7716
|
},
|
|
7717
7717
|
|
|
7718
|
-
|
|
7718
|
+
getValues() {
|
|
7719
7719
|
if (!this.$refs.form) {
|
|
7720
7720
|
return;
|
|
7721
7721
|
}
|
|
7722
7722
|
|
|
7723
|
-
this.$refs.form.
|
|
7723
|
+
return this.$refs.form.getValues();
|
|
7724
7724
|
},
|
|
7725
7725
|
|
|
7726
|
-
|
|
7726
|
+
setValues(values) {
|
|
7727
7727
|
if (!this.$refs.form) {
|
|
7728
7728
|
return;
|
|
7729
7729
|
}
|
|
7730
7730
|
|
|
7731
|
-
|
|
7731
|
+
this.$refs.form.setValues(values);
|
|
7732
7732
|
},
|
|
7733
7733
|
|
|
7734
|
-
|
|
7734
|
+
validate() {
|
|
7735
7735
|
if (!this.$refs.form) {
|
|
7736
7736
|
return;
|
|
7737
7737
|
}
|
|
7738
7738
|
|
|
7739
|
-
this.$refs.form.
|
|
7739
|
+
return this.$refs.form.validate(...arguments);
|
|
7740
7740
|
},
|
|
7741
7741
|
|
|
7742
|
-
|
|
7742
|
+
validateField() {
|
|
7743
|
+
if (!this.$refs.form) {
|
|
7744
|
+
return;
|
|
7745
|
+
}
|
|
7746
|
+
|
|
7747
|
+
return this.$refs.form.validateField(...arguments);
|
|
7748
|
+
},
|
|
7749
|
+
|
|
7750
|
+
clearValidate() {
|
|
7751
|
+
if (!this.$refs.form) {
|
|
7752
|
+
return;
|
|
7753
|
+
}
|
|
7754
|
+
|
|
7755
|
+
this.$refs.form.clearValidate();
|
|
7756
|
+
},
|
|
7757
|
+
|
|
7758
|
+
async onSubmit(formData) {
|
|
7743
7759
|
var _this = this;
|
|
7744
7760
|
|
|
7745
7761
|
if (!this.ready) {
|
|
@@ -7748,7 +7764,7 @@ var script$f = {
|
|
|
7748
7764
|
|
|
7749
7765
|
this.$emit('submit', { ...formData
|
|
7750
7766
|
});
|
|
7751
|
-
const allow = this.beforeSubmit(formData);
|
|
7767
|
+
const allow = await this.beforeSubmit(formData);
|
|
7752
7768
|
|
|
7753
7769
|
if (typeof allow === 'boolean' && allow === false) {
|
|
7754
7770
|
return;
|
|
@@ -7864,8 +7880,8 @@ var __vue_staticRenderFns__$e = [];
|
|
|
7864
7880
|
|
|
7865
7881
|
const __vue_inject_styles__$f = function (inject) {
|
|
7866
7882
|
if (!inject) return;
|
|
7867
|
-
inject("data-v-
|
|
7868
|
-
source: ".action-button[data-v-
|
|
7883
|
+
inject("data-v-42a629ae_0", {
|
|
7884
|
+
source: ".action-button[data-v-42a629ae]{text-align:right;margin:0 -20px -20px;padding:10px 20px;border-top:1px solid #e8e8e8}",
|
|
7869
7885
|
map: undefined,
|
|
7870
7886
|
media: undefined
|
|
7871
7887
|
});
|
|
@@ -7873,7 +7889,7 @@ const __vue_inject_styles__$f = function (inject) {
|
|
|
7873
7889
|
/* scoped */
|
|
7874
7890
|
|
|
7875
7891
|
|
|
7876
|
-
const __vue_scope_id__$f = "data-v-
|
|
7892
|
+
const __vue_scope_id__$f = "data-v-42a629ae";
|
|
7877
7893
|
/* module identifier */
|
|
7878
7894
|
|
|
7879
7895
|
const __vue_module_identifier__$f = undefined;
|
|
@@ -8158,6 +8174,22 @@ var script$d = {
|
|
|
8158
8174
|
this.$refs.form.setValues(values);
|
|
8159
8175
|
},
|
|
8160
8176
|
|
|
8177
|
+
validate() {
|
|
8178
|
+
if (!this.$refs.form) {
|
|
8179
|
+
return;
|
|
8180
|
+
}
|
|
8181
|
+
|
|
8182
|
+
return this.$refs.form.validate(...arguments);
|
|
8183
|
+
},
|
|
8184
|
+
|
|
8185
|
+
validateField() {
|
|
8186
|
+
if (!this.$refs.form) {
|
|
8187
|
+
return;
|
|
8188
|
+
}
|
|
8189
|
+
|
|
8190
|
+
return this.$refs.form.validateField(...arguments);
|
|
8191
|
+
},
|
|
8192
|
+
|
|
8161
8193
|
clearValidate() {
|
|
8162
8194
|
if (!this.$refs.form) {
|
|
8163
8195
|
return;
|
|
@@ -8166,7 +8198,7 @@ var script$d = {
|
|
|
8166
8198
|
this.$refs.form.clearValidate(...arguments);
|
|
8167
8199
|
},
|
|
8168
8200
|
|
|
8169
|
-
onSubmit(formData) {
|
|
8201
|
+
async onSubmit(formData) {
|
|
8170
8202
|
var _this = this;
|
|
8171
8203
|
|
|
8172
8204
|
// if (!this.ready) {
|
|
@@ -8174,7 +8206,7 @@ var script$d = {
|
|
|
8174
8206
|
// }
|
|
8175
8207
|
this.$emit('submit', { ...formData
|
|
8176
8208
|
});
|
|
8177
|
-
const allow = this.beforeSubmit(formData);
|
|
8209
|
+
const allow = await this.beforeSubmit(formData);
|
|
8178
8210
|
|
|
8179
8211
|
if (typeof allow === 'boolean' && allow === false) {
|
|
8180
8212
|
return;
|
|
@@ -8284,7 +8316,7 @@ var __vue_staticRenderFns__$c = [];
|
|
|
8284
8316
|
|
|
8285
8317
|
const __vue_inject_styles__$d = function (inject) {
|
|
8286
8318
|
if (!inject) return;
|
|
8287
|
-
inject("data-v-
|
|
8319
|
+
inject("data-v-0dd33ec0_0", {
|
|
8288
8320
|
source: ".ui-form-drawer{display:flex;flex-direction:column;padding:0;outline:0}.ui-form-drawer .el-drawer-body{flex:1;padding:0;overflow:hidden;display:flex;flex-direction:column}.ui-form-drawer .el-drawer-body>.el-form{flex:1;overflow:auto}.ui-form-drawer .el-drawer-body>.action-button{flex:none}.ui-form-drawer .ui-form-drawer-wrapper{flex:1;overflow:hidden}.ui-form-drawer .ui-form-drawer-wrapper .el-form{width:100%;height:100%;overflow:auto;padding:16px;box-sizing:border-box}.ui-form-drawer .action-button{flex:none;padding:16px;border-top:1px solid #e8eaec;display:flex;flex-direction:row-reverse}.ui-form-drawer .action-button button+button{margin-right:16px}.ui-form-drawer .action-button::after{content:'';clear:both}",
|
|
8289
8321
|
map: undefined,
|
|
8290
8322
|
media: undefined
|