feat: 产物更新 v1.4.0,新增 UmRemoteClass
同步源码仓库 FunjiaUI_Vue 的 v1.4.0 构建产物。 - 新增 UmRemoteClass(index.vue.d.ts / remoteScript.d.ts 类型声明) - funjiaui.es.js / cjs.js / umd.js / index.d.ts / style.css 全量重建 - package.json:版本 1.3.1 → 1.4.0;files 白名单补上 UmRemoteClass (漏了它的话,按 npm 发布时新组件的类型声明不会进包) - peerDependencies 未变:vue / element-plus / @element-plus/icons-vue 其余组件声明文件的改动来自本次重新生成(dts 输出格式化差异),行为未变。
This commit is contained in:
+338
-163
@@ -12,8 +12,8 @@ var __privateAdd = (obj, member, value) => {
|
||||
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
||||
};
|
||||
var _historyInfo;
|
||||
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, ref, createVNode, createElementVNode, h, Fragment, withCtx, renderSlot, createBlock, resolveDynamicComponent, useCssVars, isRef, createSlots, toDisplayString, createTextVNode, renderList, withKeys, pushScopeId, popScopeId, onBeforeMount, watch, resolveComponent, normalizeProps, mergeProps, withModifiers, createCommentVNode, getCurrentInstance, nextTick } from "vue";
|
||||
import { ElTable, ElTableColumn, ElDialog, ElButton, ElFormItem, ElInput, ElSwitch, ElDatePicker, ElSelect, ElForm, ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon, ElMessage, ElTree } from "element-plus";
|
||||
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, ref, createVNode, createElementVNode, h, Fragment, withCtx, renderSlot, createBlock, resolveDynamicComponent, useCssVars, isRef, createSlots, toDisplayString, createTextVNode, renderList, withKeys, pushScopeId, popScopeId, onBeforeMount, watch, resolveComponent, normalizeProps, mergeProps, withModifiers, createCommentVNode, getCurrentInstance, nextTick, onMounted } from "vue";
|
||||
import { ElTable, ElTableColumn, ElDialog, ElButton, ElFormItem, ElInput, ElSwitch, ElDatePicker, ElSelect, ElForm, ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon, ElMessage, ElTree, ElAlert } from "element-plus";
|
||||
import { CaretTop, CaretBottom, ArrowLeft, ArrowRight, Plus, Search } from "@element-plus/icons-vue";
|
||||
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
||||
/*! *****************************************************************************
|
||||
@@ -504,10 +504,10 @@ var Reflect$1;
|
||||
return this;
|
||||
};
|
||||
MapIterator2.prototype.next = function() {
|
||||
var index = this._index;
|
||||
if (index >= 0 && index < this._keys.length) {
|
||||
var result = this._selector(this._keys[index], this._values[index]);
|
||||
if (index + 1 >= this._keys.length) {
|
||||
var index2 = this._index;
|
||||
if (index2 >= 0 && index2 < this._keys.length) {
|
||||
var result = this._selector(this._keys[index2], this._values[index2]);
|
||||
if (index2 + 1 >= this._keys.length) {
|
||||
this._index = -1;
|
||||
this._keys = arraySentinel;
|
||||
this._values = arraySentinel;
|
||||
@@ -554,19 +554,19 @@ var Reflect$1;
|
||||
return this._find(key, false) >= 0;
|
||||
};
|
||||
Map2.prototype.get = function(key) {
|
||||
var index = this._find(key, false);
|
||||
return index >= 0 ? this._values[index] : void 0;
|
||||
var index2 = this._find(key, false);
|
||||
return index2 >= 0 ? this._values[index2] : void 0;
|
||||
};
|
||||
Map2.prototype.set = function(key, value) {
|
||||
var index = this._find(key, true);
|
||||
this._values[index] = value;
|
||||
var index2 = this._find(key, true);
|
||||
this._values[index2] = value;
|
||||
return this;
|
||||
};
|
||||
Map2.prototype.delete = function(key) {
|
||||
var index = this._find(key, false);
|
||||
if (index >= 0) {
|
||||
var index2 = this._find(key, false);
|
||||
if (index2 >= 0) {
|
||||
var size = this._keys.length;
|
||||
for (var i = index + 1; i < size; i++) {
|
||||
for (var i = index2 + 1; i < size; i++) {
|
||||
this._keys[i - 1] = this._keys[i];
|
||||
this._values[i - 1] = this._values[i];
|
||||
}
|
||||
@@ -754,7 +754,7 @@ const __default__$6 = {
|
||||
name: "iconfont",
|
||||
inheritAttrs: false
|
||||
};
|
||||
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
||||
...__default__$6,
|
||||
props: {
|
||||
class: null,
|
||||
@@ -776,7 +776,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
var style0$6 = {
|
||||
var style0$7 = {
|
||||
"um-import": "_um-import_19xyw_1"
|
||||
};
|
||||
var _export_sfc = (sfc, props) => {
|
||||
@@ -787,7 +787,7 @@ var _export_sfc = (sfc, props) => {
|
||||
return target;
|
||||
};
|
||||
const _hoisted_1$7 = /* @__PURE__ */ createElementVNode("span", null, "\u5BFC\u5165", -1);
|
||||
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
||||
emits: ["click"],
|
||||
setup(__props, { emit }) {
|
||||
const fileInput = ref();
|
||||
@@ -802,7 +802,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
||||
class: normalizeClass(_ctx.$style["um-import"]),
|
||||
onClick
|
||||
}, [
|
||||
createVNode(_sfc_main$k, { type: "icon-daoru" }),
|
||||
createVNode(_sfc_main$l, { type: "icon-daoru" }),
|
||||
_hoisted_1$7,
|
||||
createElementVNode("input", {
|
||||
ref_key: "fileInput",
|
||||
@@ -814,12 +814,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
const cssModules$6 = {
|
||||
"$style": style0$6
|
||||
const cssModules$7 = {
|
||||
"$style": style0$7
|
||||
};
|
||||
var UmImport = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__cssModules", cssModules$6]]);
|
||||
var UmImport = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__cssModules", cssModules$7]]);
|
||||
var UmTableToolbar_vue_vue_type_style_index_0_scoped_true_lang = "";
|
||||
const _sfc_main$i = defineComponent({
|
||||
const _sfc_main$j = defineComponent({
|
||||
inheritAttrs: false,
|
||||
render() {
|
||||
var _a, _b;
|
||||
@@ -829,11 +829,11 @@ const _sfc_main$i = defineComponent({
|
||||
const searchParams = ((_b = that.$attrs) == null ? void 0 : _b["search-params"]) || {};
|
||||
const events = that.$attrs.events || [];
|
||||
const selection = that.$attrs.selection || [];
|
||||
const list = data.map((item, index) => {
|
||||
const event = () => events == null ? void 0 : events[index](selection);
|
||||
const list = data.map((item, index2) => {
|
||||
const event = () => events == null ? void 0 : events[index2](selection);
|
||||
switch (item.type) {
|
||||
case "\u6DFB\u52A0":
|
||||
return h("div", { "class": "item add", "onclick": event }, [h(_sfc_main$k, {
|
||||
return h("div", { "class": "item add", "onclick": event }, [h(_sfc_main$l, {
|
||||
type: "icon-tianjia"
|
||||
}), h("a", {}, item.title || "\u6DFB\u52A0")]);
|
||||
case "\u5BFC\u5165\u6A21\u677F":
|
||||
@@ -842,16 +842,16 @@ const _sfc_main$i = defineComponent({
|
||||
return h(UmImport, {
|
||||
"class": "item",
|
||||
"onClick": (data2) => {
|
||||
events == null ? void 0 : events[index](data2);
|
||||
events == null ? void 0 : events[index2](data2);
|
||||
}
|
||||
});
|
||||
case "\u5BFC\u51FA":
|
||||
return h("div", {
|
||||
"class": "item",
|
||||
"onclick": (e) => {
|
||||
events == null ? void 0 : events[index]({ ...otherParams || {}, ...searchParams || {} });
|
||||
events == null ? void 0 : events[index2]({ ...otherParams || {}, ...searchParams || {} });
|
||||
}
|
||||
}, [h(_sfc_main$k, {
|
||||
}, [h(_sfc_main$l, {
|
||||
type: "icon-daochu"
|
||||
}), h("a", {}, "\u5BFC\u51FA")]);
|
||||
case "\u6279\u91CF\u5220\u9664":
|
||||
@@ -863,16 +863,16 @@ const _sfc_main$i = defineComponent({
|
||||
}
|
||||
return event();
|
||||
}
|
||||
}, [h(_sfc_main$k, {
|
||||
}, [h(_sfc_main$l, {
|
||||
type: "icon-shanchu-"
|
||||
}), h("a", {}, "\u6279\u91CF\u5220\u9664")]);
|
||||
case "\u81EA\u5B9A\u4E49":
|
||||
return h("div", {
|
||||
"class": "item",
|
||||
"onclick": (e) => {
|
||||
events == null ? void 0 : events[index]({ ...otherParams || {}, ...searchParams || {} });
|
||||
events == null ? void 0 : events[index2]({ ...otherParams || {}, ...searchParams || {} });
|
||||
}
|
||||
}, [h(_sfc_main$k, {
|
||||
}, [h(_sfc_main$l, {
|
||||
type: "icon-daochu"
|
||||
}), h("a", {}, item.title || "\u81EA\u5B9A\u4E49")]);
|
||||
default:
|
||||
@@ -882,9 +882,9 @@ const _sfc_main$i = defineComponent({
|
||||
return h("div", { "class": "toolbar" }, list);
|
||||
}
|
||||
});
|
||||
var UmTableToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-4e3c97de"]]);
|
||||
var UmTableToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-4e3c97de"]]);
|
||||
var UmTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
||||
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
||||
props: {
|
||||
style: null,
|
||||
width: { default: "100%" },
|
||||
@@ -934,7 +934,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
var UmTable = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-1fc1c360"]]);
|
||||
var UmTable = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-1fc1c360"]]);
|
||||
var dayjs_min = { exports: {} };
|
||||
(function(module2, exports2) {
|
||||
!function(t, e) {
|
||||
@@ -1279,10 +1279,10 @@ const hasEmitListener = (instance, event) => {
|
||||
const props = ((_b = (_a = instance == null ? void 0 : instance.$) == null ? void 0 : _a.vnode) == null ? void 0 : _b.props) || ((_c = instance == null ? void 0 : instance.vnode) == null ? void 0 : _c.props) || {};
|
||||
return typeof props[key] === "function";
|
||||
};
|
||||
var style0$5 = {
|
||||
var style0$6 = {
|
||||
"table-column-img": "_table-column-img_citx0_1"
|
||||
};
|
||||
const _sfc_main$g = defineComponent({
|
||||
const _sfc_main$h = defineComponent({
|
||||
name: "UmColumnRender",
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
@@ -1351,10 +1351,10 @@ const _sfc_main$g = defineComponent({
|
||||
return data == null ? void 0 : data[prop];
|
||||
}
|
||||
});
|
||||
const cssModules$5 = {
|
||||
"$style": style0$5
|
||||
const cssModules$6 = {
|
||||
"$style": style0$6
|
||||
};
|
||||
var UmColumnRender = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__cssModules", cssModules$5]]);
|
||||
var UmColumnRender = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__cssModules", cssModules$6]]);
|
||||
var UmTableOperate_vue_vue_type_style_index_0_scoped_true_lang = "";
|
||||
const DEFAULT_TEXT = {
|
||||
edit: "\u7F16\u8F91",
|
||||
@@ -1367,7 +1367,7 @@ const BUTTON_CLASS = {
|
||||
del: "del",
|
||||
customOperateEvent: "custom-operate"
|
||||
};
|
||||
const _sfc_main$f = defineComponent({
|
||||
const _sfc_main$g = defineComponent({
|
||||
name: "UmTableOperate",
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
@@ -1407,8 +1407,8 @@ const _sfc_main$f = defineComponent({
|
||||
);
|
||||
}
|
||||
});
|
||||
var UmTableOperate = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-10c2977a"]]);
|
||||
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
||||
var UmTableOperate = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-10c2977a"]]);
|
||||
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
||||
props: {
|
||||
type: null,
|
||||
fieldType: { default: "default" },
|
||||
@@ -1600,9 +1600,9 @@ function isSymbol(value) {
|
||||
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
|
||||
}
|
||||
function arrayMap(array, iteratee) {
|
||||
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
||||
while (++index < length) {
|
||||
result[index] = iteratee(array[index], index, array);
|
||||
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
||||
while (++index2 < length) {
|
||||
result[index2] = iteratee(array[index2], index2, array);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1625,10 +1625,10 @@ function baseToString(value) {
|
||||
}
|
||||
var reWhitespace = /\s/;
|
||||
function trimmedEndIndex(string) {
|
||||
var index = string.length;
|
||||
while (index-- && reWhitespace.test(string.charAt(index))) {
|
||||
var index2 = string.length;
|
||||
while (index2-- && reWhitespace.test(string.charAt(index2))) {
|
||||
}
|
||||
return index;
|
||||
return index2;
|
||||
}
|
||||
var reTrimStart = /^\s+/;
|
||||
function baseTrim(string) {
|
||||
@@ -1739,10 +1739,10 @@ var baseCreate = function() {
|
||||
}();
|
||||
var baseCreate$1 = baseCreate;
|
||||
function copyArray(source, array) {
|
||||
var index = -1, length = source.length;
|
||||
var index2 = -1, length = source.length;
|
||||
array || (array = Array(length));
|
||||
while (++index < length) {
|
||||
array[index] = source[index];
|
||||
while (++index2 < length) {
|
||||
array[index2] = source[index2];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
@@ -1756,9 +1756,9 @@ var defineProperty = function() {
|
||||
}();
|
||||
var defineProperty$1 = defineProperty;
|
||||
function arrayEach(array, iteratee) {
|
||||
var index = -1, length = array == null ? 0 : array.length;
|
||||
while (++index < length) {
|
||||
if (iteratee(array[index], index, array) === false) {
|
||||
var index2 = -1, length = array == null ? 0 : array.length;
|
||||
while (++index2 < length) {
|
||||
if (iteratee(array[index2], index2, array) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1797,9 +1797,9 @@ function assignValue(object, key, value) {
|
||||
function copyObject(source, props, object, customizer) {
|
||||
var isNew = !object;
|
||||
object || (object = {});
|
||||
var index = -1, length = props.length;
|
||||
while (++index < length) {
|
||||
var key = props[index];
|
||||
var index2 = -1, length = props.length;
|
||||
while (++index2 < length) {
|
||||
var key = props[index2];
|
||||
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
|
||||
if (newValue === void 0) {
|
||||
newValue = source[key];
|
||||
@@ -1825,9 +1825,9 @@ function isPrototype(value) {
|
||||
return value === proto;
|
||||
}
|
||||
function baseTimes(n, iteratee) {
|
||||
var index = -1, result = Array(n);
|
||||
while (++index < n) {
|
||||
result[index] = iteratee(index);
|
||||
var index2 = -1, result = Array(n);
|
||||
while (++index2 < n) {
|
||||
result[index2] = iteratee(index2);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1993,10 +1993,10 @@ function hashSet(key, value) {
|
||||
return this;
|
||||
}
|
||||
function Hash(entries) {
|
||||
var index = -1, length = entries == null ? 0 : entries.length;
|
||||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||||
this.clear();
|
||||
while (++index < length) {
|
||||
var entry = entries[index];
|
||||
while (++index2 < length) {
|
||||
var entry = entries[index2];
|
||||
this.set(entry[0], entry[1]);
|
||||
}
|
||||
}
|
||||
@@ -2021,41 +2021,41 @@ function assocIndexOf(array, key) {
|
||||
var arrayProto = Array.prototype;
|
||||
var splice = arrayProto.splice;
|
||||
function listCacheDelete(key) {
|
||||
var data = this.__data__, index = assocIndexOf(data, key);
|
||||
if (index < 0) {
|
||||
var data = this.__data__, index2 = assocIndexOf(data, key);
|
||||
if (index2 < 0) {
|
||||
return false;
|
||||
}
|
||||
var lastIndex = data.length - 1;
|
||||
if (index == lastIndex) {
|
||||
if (index2 == lastIndex) {
|
||||
data.pop();
|
||||
} else {
|
||||
splice.call(data, index, 1);
|
||||
splice.call(data, index2, 1);
|
||||
}
|
||||
--this.size;
|
||||
return true;
|
||||
}
|
||||
function listCacheGet(key) {
|
||||
var data = this.__data__, index = assocIndexOf(data, key);
|
||||
return index < 0 ? void 0 : data[index][1];
|
||||
var data = this.__data__, index2 = assocIndexOf(data, key);
|
||||
return index2 < 0 ? void 0 : data[index2][1];
|
||||
}
|
||||
function listCacheHas(key) {
|
||||
return assocIndexOf(this.__data__, key) > -1;
|
||||
}
|
||||
function listCacheSet(key, value) {
|
||||
var data = this.__data__, index = assocIndexOf(data, key);
|
||||
if (index < 0) {
|
||||
var data = this.__data__, index2 = assocIndexOf(data, key);
|
||||
if (index2 < 0) {
|
||||
++this.size;
|
||||
data.push([key, value]);
|
||||
} else {
|
||||
data[index][1] = value;
|
||||
data[index2][1] = value;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
function ListCache(entries) {
|
||||
var index = -1, length = entries == null ? 0 : entries.length;
|
||||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||||
this.clear();
|
||||
while (++index < length) {
|
||||
var entry = entries[index];
|
||||
while (++index2 < length) {
|
||||
var entry = entries[index2];
|
||||
this.set(entry[0], entry[1]);
|
||||
}
|
||||
}
|
||||
@@ -2100,10 +2100,10 @@ function mapCacheSet(key, value) {
|
||||
return this;
|
||||
}
|
||||
function MapCache(entries) {
|
||||
var index = -1, length = entries == null ? 0 : entries.length;
|
||||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||||
this.clear();
|
||||
while (++index < length) {
|
||||
var entry = entries[index];
|
||||
while (++index2 < length) {
|
||||
var entry = entries[index2];
|
||||
this.set(entry[0], entry[1]);
|
||||
}
|
||||
}
|
||||
@@ -2173,20 +2173,20 @@ function toKey(value) {
|
||||
}
|
||||
function baseGet(object, path) {
|
||||
path = castPath(path, object);
|
||||
var index = 0, length = path.length;
|
||||
while (object != null && index < length) {
|
||||
object = object[toKey(path[index++])];
|
||||
var index2 = 0, length = path.length;
|
||||
while (object != null && index2 < length) {
|
||||
object = object[toKey(path[index2++])];
|
||||
}
|
||||
return index && index == length ? object : void 0;
|
||||
return index2 && index2 == length ? object : void 0;
|
||||
}
|
||||
function get(object, path, defaultValue) {
|
||||
var result = object == null ? void 0 : baseGet(object, path);
|
||||
return result === void 0 ? defaultValue : result;
|
||||
}
|
||||
function arrayPush(array, values) {
|
||||
var index = -1, length = values.length, offset = array.length;
|
||||
while (++index < length) {
|
||||
array[offset + index] = values[index];
|
||||
var index2 = -1, length = values.length, offset = array.length;
|
||||
while (++index2 < length) {
|
||||
array[offset + index2] = values[index2];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
@@ -2251,10 +2251,10 @@ function cloneBuffer(buffer, isDeep) {
|
||||
return result;
|
||||
}
|
||||
function arrayFilter(array, predicate) {
|
||||
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (predicate(value, index, array)) {
|
||||
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
||||
while (++index2 < length) {
|
||||
var value = array[index2];
|
||||
if (predicate(value, index2, array)) {
|
||||
result[resIndex++] = value;
|
||||
}
|
||||
}
|
||||
@@ -2499,18 +2499,18 @@ function setCacheHas(value) {
|
||||
return this.__data__.has(value);
|
||||
}
|
||||
function SetCache(values) {
|
||||
var index = -1, length = values == null ? 0 : values.length;
|
||||
var index2 = -1, length = values == null ? 0 : values.length;
|
||||
this.__data__ = new MapCache();
|
||||
while (++index < length) {
|
||||
this.add(values[index]);
|
||||
while (++index2 < length) {
|
||||
this.add(values[index2]);
|
||||
}
|
||||
}
|
||||
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
||||
SetCache.prototype.has = setCacheHas;
|
||||
function arraySome(array, predicate) {
|
||||
var index = -1, length = array == null ? 0 : array.length;
|
||||
while (++index < length) {
|
||||
if (predicate(array[index], index, array)) {
|
||||
var index2 = -1, length = array == null ? 0 : array.length;
|
||||
while (++index2 < length) {
|
||||
if (predicate(array[index2], index2, array)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2530,13 +2530,13 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
||||
if (arrStacked && othStacked) {
|
||||
return arrStacked == other && othStacked == array;
|
||||
}
|
||||
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
|
||||
var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
|
||||
stack.set(array, other);
|
||||
stack.set(other, array);
|
||||
while (++index < arrLength) {
|
||||
var arrValue = array[index], othValue = other[index];
|
||||
while (++index2 < arrLength) {
|
||||
var arrValue = array[index2], othValue = other[index2];
|
||||
if (customizer) {
|
||||
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
||||
var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
|
||||
}
|
||||
if (compared !== void 0) {
|
||||
if (compared) {
|
||||
@@ -2564,16 +2564,16 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
||||
return result;
|
||||
}
|
||||
function mapToArray(map) {
|
||||
var index = -1, result = Array(map.size);
|
||||
var index2 = -1, result = Array(map.size);
|
||||
map.forEach(function(value, key) {
|
||||
result[++index] = [key, value];
|
||||
result[++index2] = [key, value];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
function setToArray(set) {
|
||||
var index = -1, result = Array(set.size);
|
||||
var index2 = -1, result = Array(set.size);
|
||||
set.forEach(function(value) {
|
||||
result[++index] = value;
|
||||
result[++index2] = value;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
@@ -2635,9 +2635,9 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
||||
if (objLength != othLength && !isPartial) {
|
||||
return false;
|
||||
}
|
||||
var index = objLength;
|
||||
while (index--) {
|
||||
var key = objProps[index];
|
||||
var index2 = objLength;
|
||||
while (index2--) {
|
||||
var key = objProps[index2];
|
||||
if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
|
||||
return false;
|
||||
}
|
||||
@@ -2651,8 +2651,8 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
||||
stack.set(object, other);
|
||||
stack.set(other, object);
|
||||
var skipCtor = isPartial;
|
||||
while (++index < objLength) {
|
||||
key = objProps[index];
|
||||
while (++index2 < objLength) {
|
||||
key = objProps[index2];
|
||||
var objValue = object[key], othValue = other[key];
|
||||
if (customizer) {
|
||||
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
||||
@@ -2718,19 +2718,19 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
|
||||
}
|
||||
var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
||||
function baseIsMatch(object, source, matchData, customizer) {
|
||||
var index = matchData.length, length = index, noCustomizer = !customizer;
|
||||
var index2 = matchData.length, length = index2, noCustomizer = !customizer;
|
||||
if (object == null) {
|
||||
return !length;
|
||||
}
|
||||
object = Object(object);
|
||||
while (index--) {
|
||||
var data = matchData[index];
|
||||
while (index2--) {
|
||||
var data = matchData[index2];
|
||||
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
while (++index < length) {
|
||||
data = matchData[index];
|
||||
while (++index2 < length) {
|
||||
data = matchData[index2];
|
||||
var key = data[0], objValue = object[key], srcValue = data[1];
|
||||
if (noCustomizer && data[2]) {
|
||||
if (objValue === void 0 && !(key in object)) {
|
||||
@@ -2781,15 +2781,15 @@ function baseHasIn(object, key) {
|
||||
}
|
||||
function hasPath(object, path, hasFunc) {
|
||||
path = castPath(path, object);
|
||||
var index = -1, length = path.length, result = false;
|
||||
while (++index < length) {
|
||||
var key = toKey(path[index]);
|
||||
var index2 = -1, length = path.length, result = false;
|
||||
while (++index2 < length) {
|
||||
var key = toKey(path[index2]);
|
||||
if (!(result = object != null && hasFunc(object, key))) {
|
||||
break;
|
||||
}
|
||||
object = object[key];
|
||||
}
|
||||
if (result || ++index != length) {
|
||||
if (result || ++index2 != length) {
|
||||
return result;
|
||||
}
|
||||
length = object == null ? 0 : object.length;
|
||||
@@ -2834,18 +2834,18 @@ function baseIteratee(value) {
|
||||
return property(value);
|
||||
}
|
||||
function arrayAggregator(array, setter, iteratee, accumulator) {
|
||||
var index = -1, length = array == null ? 0 : array.length;
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
var index2 = -1, length = array == null ? 0 : array.length;
|
||||
while (++index2 < length) {
|
||||
var value = array[index2];
|
||||
setter(accumulator, value, iteratee(value), array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
function createBaseFor(fromRight) {
|
||||
return function(object, iteratee, keysFunc) {
|
||||
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
||||
var index2 = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
||||
while (length--) {
|
||||
var key = props[fromRight ? length : ++index];
|
||||
var key = props[fromRight ? length : ++index2];
|
||||
if (iteratee(iterable[key], key, iterable) === false) {
|
||||
break;
|
||||
}
|
||||
@@ -2866,9 +2866,9 @@ function createBaseEach(eachFunc, fromRight) {
|
||||
if (!isArrayLike(collection)) {
|
||||
return eachFunc(collection, iteratee);
|
||||
}
|
||||
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
|
||||
while (fromRight ? index-- : ++index < length) {
|
||||
if (iteratee(iterable[index], index, iterable) === false) {
|
||||
var length = collection.length, index2 = fromRight ? length : -1, iterable = Object(collection);
|
||||
while (fromRight ? index2-- : ++index2 < length) {
|
||||
if (iteratee(iterable[index2], index2, iterable) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3059,7 +3059,7 @@ const collectDataColumns = (target) => scanDecoratedMembers(target, "table:field
|
||||
var _a;
|
||||
return {
|
||||
sort: (_a = member.meta.sort) != null ? _a : 1,
|
||||
vnode: h(_sfc_main$e, {
|
||||
vnode: h(_sfc_main$f, {
|
||||
prop: member.fieldName,
|
||||
label: member.meta.def,
|
||||
fieldType: member.meta.fieldType,
|
||||
@@ -3181,7 +3181,7 @@ const buildOperateColumn = (groups, options) => {
|
||||
phases: isDeferredAfter(String(group.type), deferAfterTypes) ? DEFERRED_PHASES : void 0
|
||||
})
|
||||
}));
|
||||
return h(_sfc_main$e, {
|
||||
return h(_sfc_main$f, {
|
||||
type: "operate",
|
||||
label: "\u64CD\u4F5C",
|
||||
operateItems,
|
||||
@@ -3503,11 +3503,11 @@ const diagnoseTarget = (target, options = {}) => {
|
||||
message: `"${column.meta.def || column.key}" \u51BB\u7ED3\u5230\u4E86${dir === "left" ? "\u5DE6" : "\u53F3"}\u4FA7\uFF0C\u4F46\u5B83\u7684${dir === "left" ? "\u524D\u9762" : "\u540E\u9762"}\u8FD8\u6709\u4E0D\u51BB\u7ED3\u7684\u5217\uFF0C\u8FD9\u4E00\u5217\u4E0D\u4F1A\u771F\u7684\u51BB\u7ED3`,
|
||||
hint: `\u51BB\u7ED3\u5217\u5FC5\u987B\u4ECE\u8FB9\u7F18\u8D77\u8FDE\u7EED\uFF1A\u6539 sort \u628A\u5B83\u6392\u5230${dir === "left" ? "\u6700\u524D" : "\u6700\u540E"}\uFF0C\u6216\u8005\u8BA9\u76F8\u90BB\u7684\u5217\u4E00\u8D77 fixed`
|
||||
});
|
||||
orderedColumns.forEach((column, index) => {
|
||||
const dir = fixDirs[index];
|
||||
orderedColumns.forEach((column, index2) => {
|
||||
const dir = fixDirs[index2];
|
||||
if (!dir)
|
||||
return;
|
||||
const blocked = dir === "left" ? fixDirs.slice(0, index).some((item) => item !== "left") : fixDirs.slice(index + 1).some((item) => item !== "right");
|
||||
const blocked = dir === "left" ? fixDirs.slice(0, index2).some((item) => item !== "left") : fixDirs.slice(index2 + 1).some((item) => item !== "right");
|
||||
if (blocked)
|
||||
reportFixedEdge(column, dir);
|
||||
});
|
||||
@@ -3604,7 +3604,7 @@ const reportDiagnosticsOnce = (target, options = {}) => {
|
||||
reportedTargets.add(target);
|
||||
return reportDiagnostics(target, options);
|
||||
};
|
||||
const _sfc_main$d = defineComponent({
|
||||
const _sfc_main$e = defineComponent({
|
||||
name: "UmByClass",
|
||||
inheritAttrs: false,
|
||||
emits: ["fire", "fire:onBefore", "fire:onNow", "fire:onAfter"],
|
||||
@@ -3646,7 +3646,7 @@ const _sfc_main$d = defineComponent({
|
||||
});
|
||||
if (this.$attrs["is-expand"]) {
|
||||
columnList = [
|
||||
h(_sfc_main$e, {
|
||||
h(_sfc_main$f, {
|
||||
type: "expand",
|
||||
expandTemplate: this.$attrs["expand-template"],
|
||||
fixed: leadFixed
|
||||
@@ -3699,7 +3699,7 @@ const __default__$5 = {
|
||||
name: "um-dialog",
|
||||
inheritAttrs: false
|
||||
};
|
||||
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
||||
...__default__$5,
|
||||
props: {
|
||||
appendToBody: { type: Boolean, default: true },
|
||||
@@ -3797,7 +3797,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
const _sfc_main$b = defineComponent({
|
||||
const _sfc_main$c = defineComponent({
|
||||
name: "UmTableDialog",
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
@@ -3813,7 +3813,7 @@ const _sfc_main$b = defineComponent({
|
||||
emits: ["ok", "update:modelValue"],
|
||||
render() {
|
||||
return h(
|
||||
_sfc_main$c,
|
||||
_sfc_main$d,
|
||||
{
|
||||
title: this.title,
|
||||
modelValue: this.modelValue,
|
||||
@@ -3832,12 +3832,12 @@ const _sfc_main$b = defineComponent({
|
||||
});
|
||||
const reset = "_reset_123e3_4";
|
||||
const submit$1 = "_submit_123e3_5";
|
||||
var style0$4 = {
|
||||
var style0$5 = {
|
||||
"search-form": "_search-form_123e3_1",
|
||||
reset,
|
||||
submit: submit$1
|
||||
};
|
||||
const _sfc_main$a = defineComponent({
|
||||
const _sfc_main$b = defineComponent({
|
||||
name: "UmSearchForm",
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
@@ -4030,10 +4030,10 @@ const _sfc_main$a = defineComponent({
|
||||
);
|
||||
}
|
||||
});
|
||||
const cssModules$4 = {
|
||||
"$style": style0$4
|
||||
const cssModules$5 = {
|
||||
"$style": style0$5
|
||||
};
|
||||
var UmSearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__cssModules", cssModules$4]]);
|
||||
var UmSearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__cssModules", cssModules$5]]);
|
||||
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
||||
const _withScopeId = (n) => (pushScopeId("data-v-0bda02d2"), n = n(), popScopeId(), n);
|
||||
const _hoisted_1$5 = { class: "um-pagination" };
|
||||
@@ -4044,7 +4044,7 @@ const _hoisted_5 = ["value", "max", "onKeyup"];
|
||||
const __default__$4 = {
|
||||
name: "um-pagination"
|
||||
};
|
||||
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
||||
...__default__$4,
|
||||
props: {
|
||||
page: { default: 1 },
|
||||
@@ -4196,9 +4196,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
var UmPagination = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-0bda02d2"]]);
|
||||
var UmPagination = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0bda02d2"]]);
|
||||
var UmByClassEnhance_vue_vue_type_style_index_0_scoped_true_lang = "";
|
||||
const _sfc_main$8 = defineComponent({
|
||||
const _sfc_main$9 = defineComponent({
|
||||
name: "UmByClassEnhance",
|
||||
inheritAttrs: false,
|
||||
emits: [
|
||||
@@ -4421,7 +4421,7 @@ const _sfc_main$8 = defineComponent({
|
||||
target: attrs.target,
|
||||
onChange: this.onSearchFormChange
|
||||
}),
|
||||
h(_sfc_main$d, {
|
||||
h(_sfc_main$e, {
|
||||
target: attrs.target,
|
||||
data: this.data,
|
||||
onFire: this.handleFire,
|
||||
@@ -4440,7 +4440,7 @@ const _sfc_main$8 = defineComponent({
|
||||
class: "page",
|
||||
onOnChange: this.handleCurrentChange
|
||||
}),
|
||||
h(_sfc_main$b, {
|
||||
h(_sfc_main$c, {
|
||||
modelValue: this.dialogVisible,
|
||||
"onUpdate:modelValue": this.onDialogVisibility,
|
||||
title: this.dialogTitle,
|
||||
@@ -4455,13 +4455,13 @@ const _sfc_main$8 = defineComponent({
|
||||
]);
|
||||
}
|
||||
});
|
||||
var UmByClassEnhance = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-67bf522d"]]);
|
||||
var style0$3 = {
|
||||
var UmByClassEnhance = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-67bf522d"]]);
|
||||
var style0$4 = {
|
||||
"avatar-uploader": "_avatar-uploader_ykbb1_1"
|
||||
};
|
||||
const _hoisted_1$4 = ["src"];
|
||||
const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", null, "\u8BF7\u4E0A\u4F20\u56FE\u7247", -1);
|
||||
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
||||
props: {
|
||||
modelValue: null,
|
||||
accept: { default: "image/png, image/jpeg" }
|
||||
@@ -4522,16 +4522,16 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
const cssModules$3 = {
|
||||
"$style": style0$3
|
||||
const cssModules$4 = {
|
||||
"$style": style0$4
|
||||
};
|
||||
var Upload = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$3]]);
|
||||
var Upload = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__cssModules", cssModules$4]]);
|
||||
const _hoisted_1$3 = ["title"];
|
||||
const __default__$3 = {
|
||||
name: "um-tree",
|
||||
inheritAttrs: false
|
||||
};
|
||||
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
||||
...__default__$3,
|
||||
props: {
|
||||
checkbox: { type: Boolean, default: false },
|
||||
@@ -4670,7 +4670,7 @@ const __default__$2 = {
|
||||
name: "um-tree-select",
|
||||
inheritAttrs: false
|
||||
};
|
||||
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
||||
...__default__$2,
|
||||
props: {
|
||||
checkbox: { type: Boolean },
|
||||
@@ -4822,7 +4822,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
||||
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
||||
}, ["stop", "prevent"]))
|
||||
}, null, 8, ["modelValue", "suffix-icon"])) : createCommentVNode("", true),
|
||||
createVNode(_sfc_main$6, {
|
||||
createVNode(_sfc_main$7, {
|
||||
ref_key: "treeRef",
|
||||
ref: treeRef,
|
||||
"tree-data": __props.treeData,
|
||||
@@ -4850,12 +4850,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
||||
});
|
||||
const cancel = "_cancel_omswa_6";
|
||||
const submit = "_submit_omswa_7";
|
||||
var style0$2 = {
|
||||
var style0$3 = {
|
||||
"form-operate": "_form-operate_omswa_1",
|
||||
cancel,
|
||||
submit
|
||||
};
|
||||
const _sfc_main$4 = defineComponent({
|
||||
const _sfc_main$5 = defineComponent({
|
||||
name: "UmTableForm",
|
||||
inheritAttrs: false,
|
||||
emits: ["ok", "cancel", "formModelChange"],
|
||||
@@ -5118,7 +5118,7 @@ const _sfc_main$4 = defineComponent({
|
||||
h(
|
||||
ElFormItem,
|
||||
formItemProps,
|
||||
() => h(_sfc_main$5, {
|
||||
() => h(_sfc_main$6, {
|
||||
modelValue: currentValue,
|
||||
"onUpdate:modelValue": (value) => that.initForm(fieldName, value),
|
||||
size: "default",
|
||||
@@ -5361,15 +5361,15 @@ const _sfc_main$4 = defineComponent({
|
||||
return this.buildForm();
|
||||
}
|
||||
});
|
||||
const cssModules$2 = {
|
||||
"$style": style0$2
|
||||
const cssModules$3 = {
|
||||
"$style": style0$3
|
||||
};
|
||||
var UmTableForm = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$2]]);
|
||||
var UmTableForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$3]]);
|
||||
const __default__$1 = {
|
||||
name: "UmSyncNodeForm",
|
||||
inheritAttrs: false
|
||||
};
|
||||
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
||||
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
||||
...__default__$1,
|
||||
props: {
|
||||
data: null,
|
||||
@@ -5515,6 +5515,181 @@ const TableColumnMethodDecorator = ({
|
||||
propertyKey
|
||||
);
|
||||
};
|
||||
const scriptCache = /* @__PURE__ */ new Map();
|
||||
const SAFE_SCRIPT_PATH = /^[A-Za-z0-9._-]+$/;
|
||||
const resolveScriptUrl = (baseUrl, path) => {
|
||||
if (!SAFE_SCRIPT_PATH.test(path)) {
|
||||
throw new Error(
|
||||
`\u811A\u672C\u8DEF\u5F84\u4E0D\u5408\u6CD5\uFF1A${path}\uFF08\u53EA\u5141\u8BB8\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u70B9\u3001\u4E0B\u5212\u7EBF\u548C\u77ED\u6A2A\u7EBF\uFF09`
|
||||
);
|
||||
}
|
||||
return `${baseUrl.replace(/\/+$/, "")}/${path}.js`;
|
||||
};
|
||||
const loadRemoteScript = (url) => {
|
||||
const cached = scriptCache.get(url);
|
||||
if (cached)
|
||||
return cached;
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
const script = document.createElement("script");
|
||||
script.src = url;
|
||||
script.onload = () => resolve();
|
||||
script.onerror = () => {
|
||||
scriptCache.delete(url);
|
||||
reject(new Error(`\u811A\u672C\u52A0\u8F7D\u5931\u8D25\uFF1A${url}`));
|
||||
};
|
||||
document.body.appendChild(script);
|
||||
});
|
||||
scriptCache.set(url, promise);
|
||||
return promise;
|
||||
};
|
||||
const hasRemoteScript = (url) => scriptCache.has(url);
|
||||
const clearRemoteScript = (url) => {
|
||||
if (url) {
|
||||
scriptCache.delete(url);
|
||||
} else {
|
||||
scriptCache.clear();
|
||||
}
|
||||
};
|
||||
const toGlobalKey = (name) => name.charAt(0).toUpperCase() + name.slice(1);
|
||||
const resolveGlobalClass = (key) => window[key];
|
||||
var style0$2 = {
|
||||
"um-remote-class": "_um-remote-class_1yahw_1",
|
||||
"el-alert": "_el-alert_1yahw_1"
|
||||
};
|
||||
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
||||
props: {
|
||||
src: null,
|
||||
baseUrl: { default: "/static" },
|
||||
path: null,
|
||||
name: null,
|
||||
globalKey: null,
|
||||
data: { default: () => [] },
|
||||
otherParams: null,
|
||||
formData: null,
|
||||
isExpand: { type: Boolean, default: false },
|
||||
expandTemplate: null,
|
||||
retryText: { default: "\u91CD\u8BD5" }
|
||||
},
|
||||
emits: ["loaded", "error", "dataChange", "fire"],
|
||||
setup(__props, { expose, emit }) {
|
||||
const props = __props;
|
||||
const viewModel = ref(null);
|
||||
const loadError = ref("");
|
||||
const loadErrorHint = ref("");
|
||||
const fail = (title2, hint, error) => {
|
||||
viewModel.value = null;
|
||||
loadError.value = title2;
|
||||
loadErrorHint.value = hint;
|
||||
if (error !== void 0)
|
||||
emit("error", error);
|
||||
};
|
||||
const resolveUrl = () => {
|
||||
if (props.src)
|
||||
return props.src;
|
||||
if (!props.path) {
|
||||
throw new Error("\u7F3A\u5C11 path\uFF1A\u8BF7\u4F20 src\uFF0C\u6216\u8005\u4F20 baseUrl + path");
|
||||
}
|
||||
return resolveScriptUrl(props.baseUrl, props.path);
|
||||
};
|
||||
const resolveKey = () => {
|
||||
if (props.globalKey)
|
||||
return props.globalKey;
|
||||
if (!props.name) {
|
||||
throw new Error("\u7F3A\u5C11 name\uFF1A\u65E0\u6CD5\u63A8\u65AD window \u4E0A\u7684\u7C7B\u540D\uFF0C\u53EF\u663E\u5F0F\u4F20 global-key");
|
||||
}
|
||||
return toGlobalKey(props.name);
|
||||
};
|
||||
const load = async () => {
|
||||
loadError.value = "";
|
||||
loadErrorHint.value = "";
|
||||
viewModel.value = null;
|
||||
let url = "";
|
||||
let key = "";
|
||||
try {
|
||||
url = resolveUrl();
|
||||
key = resolveKey();
|
||||
} catch (error) {
|
||||
fail("\u914D\u7F6E\u4E0D\u5B8C\u6574", error.message, error);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await loadRemoteScript(url);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
fail(
|
||||
"\u811A\u672C\u52A0\u8F7D\u5931\u8D25",
|
||||
`\u672A\u80FD\u53D6\u5230 ${url}\u3002\u8BF7\u786E\u8BA4\u8BE5\u6587\u4EF6\u5DF2\u7531\u540E\u7AEF\u6258\u7BA1\uFF0C\u4E14\u8BE5\u5730\u5740\u53EF\u8BBF\u95EE\u3002`,
|
||||
error
|
||||
);
|
||||
return;
|
||||
}
|
||||
const target = resolveGlobalClass(key);
|
||||
if (!target) {
|
||||
const message = `${url} \u5DF2\u6267\u884C\uFF0C\u4F46\u6CA1\u6709\u5728 window \u4E0A\u5B9A\u4E49 ${key}`;
|
||||
fail(
|
||||
"\u811A\u672C\u91CC\u6CA1\u6709\u627E\u5230\u914D\u7F6E\u7C7B",
|
||||
`${message}\u3002\u8BF7\u786E\u8BA4\u811A\u672C\u4EE5 window.${key} = class { ... } \u7684\u5F62\u5F0F\u5BFC\u51FA\u3002`,
|
||||
new Error(message)
|
||||
);
|
||||
return;
|
||||
}
|
||||
viewModel.value = target;
|
||||
emit("loaded", target);
|
||||
};
|
||||
onMounted(load);
|
||||
watch(
|
||||
() => [props.src, props.baseUrl, props.path, props.name, props.globalKey],
|
||||
load
|
||||
);
|
||||
const onDataChange = (payload) => emit("dataChange", payload);
|
||||
const onFire = (key, value, data) => emit("fire", key, value, data);
|
||||
expose({ reload: load });
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
class: normalizeClass(_ctx.$style["um-remote-class"])
|
||||
}, [
|
||||
loadError.value ? (openBlock(), createBlock(unref(ElAlert), {
|
||||
key: 0,
|
||||
type: "error",
|
||||
"show-icon": "",
|
||||
closable: false,
|
||||
title: loadError.value,
|
||||
description: loadErrorHint.value
|
||||
}, null, 8, ["title", "description"])) : createCommentVNode("", true),
|
||||
loadError.value ? (openBlock(), createBlock(unref(ElButton), {
|
||||
key: 1,
|
||||
size: "small",
|
||||
onClick: load
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode(toDisplayString(__props.retryText), 1)
|
||||
]),
|
||||
_: 1
|
||||
})) : createCommentVNode("", true),
|
||||
viewModel.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
||||
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", {
|
||||
key: 0,
|
||||
target: viewModel.value
|
||||
}) : (openBlock(), createBlock(UmByClassEnhance, {
|
||||
key: 1,
|
||||
target: viewModel.value,
|
||||
data: __props.data,
|
||||
"other-params": __props.otherParams,
|
||||
"form-data": __props.formData,
|
||||
"is-expand": __props.isExpand,
|
||||
"expand-template": __props.expandTemplate,
|
||||
onDataChange,
|
||||
onFire
|
||||
}, null, 8, ["target", "data", "other-params", "form-data", "is-expand", "expand-template"]))
|
||||
], 64)) : createCommentVNode("", true)
|
||||
], 2);
|
||||
};
|
||||
}
|
||||
});
|
||||
const cssModules$2 = {
|
||||
"$style": style0$2
|
||||
};
|
||||
var index = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$2]]);
|
||||
class Cache {
|
||||
static get(key) {
|
||||
if (isEmpty(key))
|
||||
@@ -5576,7 +5751,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
||||
class: normalizeClass(_ctx.$style["um-district-tree-node"]),
|
||||
title: __props.title
|
||||
}, [
|
||||
createVNode(_sfc_main$k, { type: unref(iconClass) }, null, 8, ["type"]),
|
||||
createVNode(_sfc_main$l, { type: unref(iconClass) }, null, 8, ["type"]),
|
||||
createElementVNode("span", {
|
||||
class: normalizeClass(_ctx.$style["title"])
|
||||
}, toDisplayString(__props.title), 3)
|
||||
@@ -5638,7 +5813,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
||||
refresh: loadOfficeLevelData
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return unref(resolvedOfficeLevelData) && unref(resolvedOfficeLevelData).length > 0 ? (openBlock(), createBlock(_sfc_main$6, {
|
||||
return unref(resolvedOfficeLevelData) && unref(resolvedOfficeLevelData).length > 0 ? (openBlock(), createBlock(_sfc_main$7, {
|
||||
key: 0,
|
||||
ref_key: "districtTreeRef",
|
||||
ref: districtTreeRef,
|
||||
@@ -5721,4 +5896,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
||||
};
|
||||
}
|
||||
});
|
||||
export { _sfc_main as AreaTree, DEFAULT_DEFER_TYPES, EVENT_PHASES, FIXED_VALUES, _sfc_main$k as Iconfont, TableColumnMethodDecorator, TableColumnPropertyDecorator, TableFormColumnPropertyDecorator, TableSearchFormPropertyDecorator, _sfc_main$d as UmByClass, UmByClassEnhance, UmColumnRender, _sfc_main$c as UmDialog, UmDistrictTree, UmDistrictTreeNode, UmPagination, UmSearchForm, _sfc_main$3 as UmSyncNodeForm, UmTable, _sfc_main$e as UmTableColumn, _sfc_main$b as UmTableDialog, UmTableForm, UmTableOperate, UmTableToolbar, _sfc_main$6 as UmTree, _sfc_main$5 as UmTreeSelect, buildOperateColumn, collectClassMembers, collectDataColumns, collectOperateGroups, collectToolbar, collectTypedTasks, createTargetInstance, diagnoseTarget, findMethodMeta, getMemberMeta, hasLeftFixedColumn, hasRightFixedColumn, isDiagnosticsEnabled, normalizeFieldName, normalizeFixed, reportDiagnostics, reportDiagnosticsOnce, resolveOperateFixed, resolveOperateWidth, resolveShowOperate, runEventPipeline, scanDecoratedMembers, setDiagnosticsEnabled, sortTasksByPriority, transformFields };
|
||||
export { _sfc_main as AreaTree, DEFAULT_DEFER_TYPES, EVENT_PHASES, FIXED_VALUES, _sfc_main$l as Iconfont, SAFE_SCRIPT_PATH, TableColumnMethodDecorator, TableColumnPropertyDecorator, TableFormColumnPropertyDecorator, TableSearchFormPropertyDecorator, _sfc_main$e as UmByClass, UmByClassEnhance, UmColumnRender, _sfc_main$d as UmDialog, UmDistrictTree, UmDistrictTreeNode, UmPagination, index as UmRemoteClass, UmSearchForm, _sfc_main$4 as UmSyncNodeForm, UmTable, _sfc_main$f as UmTableColumn, _sfc_main$c as UmTableDialog, UmTableForm, UmTableOperate, UmTableToolbar, _sfc_main$7 as UmTree, _sfc_main$6 as UmTreeSelect, buildOperateColumn, clearRemoteScript, collectClassMembers, collectDataColumns, collectOperateGroups, collectToolbar, collectTypedTasks, createTargetInstance, diagnoseTarget, findMethodMeta, getMemberMeta, hasLeftFixedColumn, hasRemoteScript, hasRightFixedColumn, isDiagnosticsEnabled, loadRemoteScript, normalizeFieldName, normalizeFixed, reportDiagnostics, reportDiagnosticsOnce, resolveGlobalClass, resolveOperateFixed, resolveOperateWidth, resolveScriptUrl, resolveShowOperate, runEventPipeline, scanDecoratedMembers, setDiagnosticsEnabled, sortTasksByPriority, toGlobalKey, transformFields };
|
||||
|
||||
Reference in New Issue
Block a user