sctj-components 1.0.35 → 1.0.36
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/lib/sctj-components.es.js +63 -10
- package/lib/sctj-components.umd.js +1 -1
- package/package.json +1 -1
|
@@ -3959,6 +3959,10 @@ const _sfc_main$5 = {
|
|
|
3959
3959
|
headers: {
|
|
3960
3960
|
type: Object,
|
|
3961
3961
|
default: () => ({})
|
|
3962
|
+
},
|
|
3963
|
+
otherTemplate: {
|
|
3964
|
+
type: Array,
|
|
3965
|
+
default: () => []
|
|
3962
3966
|
}
|
|
3963
3967
|
},
|
|
3964
3968
|
emits: ["loadSucccess"],
|
|
@@ -4014,13 +4018,17 @@ const _sfc_main$5 = {
|
|
|
4014
4018
|
return url.includes("?") ? `${url}&${query}` : `${url}?${query}`;
|
|
4015
4019
|
}
|
|
4016
4020
|
};
|
|
4017
|
-
const importTemplate =
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
+
const importTemplate = (item) => {
|
|
4022
|
+
var _a, _b;
|
|
4023
|
+
if (!item) {
|
|
4024
|
+
downLoad(props.templateUrl, { ...extraParams });
|
|
4025
|
+
} else {
|
|
4026
|
+
downLoad((_a = item.templateUrl) != null ? _a : props.templateUrl, { ...(_b = item.extraParams) != null ? _b : {} });
|
|
4021
4027
|
}
|
|
4028
|
+
};
|
|
4029
|
+
const downLoad = async (url, params2) => {
|
|
4022
4030
|
try {
|
|
4023
|
-
const href = buildUrlWithParams(
|
|
4031
|
+
const href = buildUrlWithParams(url, params2);
|
|
4024
4032
|
const response = await fetch(href, {
|
|
4025
4033
|
method: "POST",
|
|
4026
4034
|
headers: props.headers || {}
|
|
@@ -4095,13 +4103,16 @@ const _sfc_main$5 = {
|
|
|
4095
4103
|
const _component_el_icon = resolveComponent("el-icon");
|
|
4096
4104
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
4097
4105
|
const _component_el_link = resolveComponent("el-link");
|
|
4106
|
+
const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
|
|
4107
|
+
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
4108
|
+
const _component_el_dropdown = resolveComponent("el-dropdown");
|
|
4098
4109
|
const _component_el_upload = resolveComponent("el-upload");
|
|
4099
4110
|
const _component_el_button = resolveComponent("el-button");
|
|
4100
4111
|
const _component_el_dialog = resolveComponent("el-dialog");
|
|
4101
4112
|
return openBlock(), createBlock(_component_el_dialog, {
|
|
4102
4113
|
title: __props.title + "\u5BFC\u5165",
|
|
4103
4114
|
modelValue: params.open,
|
|
4104
|
-
"onUpdate:modelValue": _cache[
|
|
4115
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => params.open = $event),
|
|
4105
4116
|
width: "400px",
|
|
4106
4117
|
"append-to-body": "",
|
|
4107
4118
|
onClose: cancel
|
|
@@ -4109,7 +4120,7 @@ const _sfc_main$5 = {
|
|
|
4109
4120
|
footer: withCtx(() => [
|
|
4110
4121
|
createElementVNode("div", _hoisted_5$2, [
|
|
4111
4122
|
createVNode(_component_el_button, {
|
|
4112
|
-
onClick: _cache[
|
|
4123
|
+
onClick: _cache[2] || (_cache[2] = ($event) => params.open = false)
|
|
4113
4124
|
}, {
|
|
4114
4125
|
default: withCtx(() => [
|
|
4115
4126
|
createTextVNode("\u53D6 \u6D88")
|
|
@@ -4152,17 +4163,59 @@ const _sfc_main$5 = {
|
|
|
4152
4163
|
createTextVNode(" \u662F\u5426\u66F4\u65B0\u5DF2\u7ECF\u5B58\u5728\u7684\u6570\u636E ")
|
|
4153
4164
|
])) : createCommentVNode("", true),
|
|
4154
4165
|
_hoisted_4$2,
|
|
4155
|
-
|
|
4166
|
+
!__props.otherTemplate.length ? (openBlock(), createBlock(_component_el_link, {
|
|
4167
|
+
key: 1,
|
|
4156
4168
|
type: "primary",
|
|
4157
4169
|
underline: false,
|
|
4158
4170
|
style: { "font-size": "12px", "vertical-align": "baseline" },
|
|
4159
|
-
onClick: importTemplate
|
|
4171
|
+
onClick: _cache[1] || (_cache[1] = ($event) => importTemplate())
|
|
4160
4172
|
}, {
|
|
4161
4173
|
default: withCtx(() => [
|
|
4162
4174
|
createTextVNode(" \u4E0B\u8F7D\u6A21\u677F ")
|
|
4163
4175
|
]),
|
|
4164
4176
|
_: 1
|
|
4165
|
-
})
|
|
4177
|
+
})) : (openBlock(), createBlock(_component_el_dropdown, {
|
|
4178
|
+
key: 2,
|
|
4179
|
+
onCommand: importTemplate,
|
|
4180
|
+
trigger: "click"
|
|
4181
|
+
}, {
|
|
4182
|
+
dropdown: withCtx(() => [
|
|
4183
|
+
createVNode(_component_el_dropdown_menu, null, {
|
|
4184
|
+
default: withCtx(() => [
|
|
4185
|
+
createVNode(_component_el_dropdown_item, null, {
|
|
4186
|
+
default: withCtx(() => [
|
|
4187
|
+
createTextVNode("\u57FA\u7840\u6A21\u677F")
|
|
4188
|
+
]),
|
|
4189
|
+
_: 1
|
|
4190
|
+
}),
|
|
4191
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.otherTemplate, (item, index2) => {
|
|
4192
|
+
return openBlock(), createBlock(_component_el_dropdown_item, {
|
|
4193
|
+
key: index2,
|
|
4194
|
+
command: item
|
|
4195
|
+
}, {
|
|
4196
|
+
default: withCtx(() => [
|
|
4197
|
+
createTextVNode(toDisplayString(item.name), 1)
|
|
4198
|
+
]),
|
|
4199
|
+
_: 2
|
|
4200
|
+
}, 1032, ["command"]);
|
|
4201
|
+
}), 128))
|
|
4202
|
+
]),
|
|
4203
|
+
_: 1
|
|
4204
|
+
})
|
|
4205
|
+
]),
|
|
4206
|
+
default: withCtx(() => [
|
|
4207
|
+
createVNode(_component_el_link, {
|
|
4208
|
+
type: "primary",
|
|
4209
|
+
underline: false
|
|
4210
|
+
}, {
|
|
4211
|
+
default: withCtx(() => [
|
|
4212
|
+
createTextVNode(" \u9009\u62E9\u6A21\u677F ")
|
|
4213
|
+
]),
|
|
4214
|
+
_: 1
|
|
4215
|
+
})
|
|
4216
|
+
]),
|
|
4217
|
+
_: 1
|
|
4218
|
+
}))
|
|
4166
4219
|
])
|
|
4167
4220
|
]),
|
|
4168
4221
|
default: withCtx(() => [
|