yuang-framework-ui-pc 1.1.138 → 1.1.140

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.
@@ -6,7 +6,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
6
6
  type: import('vue').PropType<{}>;
7
7
  default: any;
8
8
  };
9
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ }>, {
10
+ getAttachmentList: () => any;
11
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
12
  change: (frameworkAttachment: FrameworkAttachment) => void;
11
13
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
12
14
  modelValue: import('vue').PropType<string>;
@@ -3,8 +3,8 @@ import { ElMessageBox } from "element-plus/es";
3
3
  import { EleMessage } from "../utils/message";
4
4
  import EleUploadList from "../ele-upload-list/index";
5
5
  import { http } from "yuang-framework-ui-common/lib/config/httpConfig";
6
- import { application } from "yuang-framework-ui-common/lib/config/applicationConfig";
7
6
  import * as imageConversion from "image-conversion";
7
+ import { deepClone } from "yuang-framework-ui-common/lib/utils/objectUtils";
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  ...{ name: "YuFrameworkAttachmentUpload" },
10
10
  __name: "index",
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  "modelModifiers": {}
16
16
  }),
17
17
  emits: /* @__PURE__ */ mergeModels(["change"], ["update:modelValue"]),
18
- setup(__props, { emit: __emit }) {
18
+ setup(__props, { expose: __expose, emit: __emit }) {
19
19
  const props = __props;
20
20
  const emit = __emit;
21
21
  const modelValue = useModel(__props, "modelValue");
@@ -209,6 +209,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
209
209
  const handleRetryUpload = (uploadItem) => {
210
210
  handleUpload(uploadItem, true);
211
211
  };
212
+ const getAttachmentList = () => {
213
+ return deepClone(fileList.value);
214
+ };
212
215
  watch(
213
216
  () => componentParam,
214
217
  () => {
@@ -217,6 +220,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
217
220
  },
218
221
  { deep: true, immediate: true }
219
222
  );
223
+ __expose({
224
+ getAttachmentList
225
+ });
220
226
  return (_ctx, _cache) => {
221
227
  return openBlock(), createBlock(EleUploadList, {
222
228
  drag: true,
@@ -4,8 +4,8 @@ const es = require("element-plus/es");
4
4
  const message = require("../utils/message");
5
5
  const EleUploadList = require("../ele-upload-list/index");
6
6
  const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
7
- const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
8
7
  const imageConversion = require("image-conversion");
8
+ const objectUtils = require("yuang-framework-ui-common/lib/utils/objectUtils");
9
9
  function _interopNamespaceDefault(e) {
10
10
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
11
11
  if (e) {
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
33
33
  "modelModifiers": {}
34
34
  }),
35
35
  emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
36
- setup(__props, { emit: __emit }) {
36
+ setup(__props, { expose: __expose, emit: __emit }) {
37
37
  const props = __props;
38
38
  const emit = __emit;
39
39
  const modelValue = vue.useModel(__props, "modelValue");
@@ -91,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
91
91
  }
92
92
  isExecuting = true;
93
93
  fileList.value = [];
94
- httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { codeForEqual: modelValue.value, pageSize: 100 }).then((res) => {
94
+ httpConfig.http.post(`/framework-api/core/framework-attachment/selectPage`, { codeForEqual: modelValue.value, pageSize: 100 }).then((res) => {
95
95
  let attachemtList = res.data.data.records;
96
96
  for (let i = 0; i < attachemtList.length; i++) {
97
97
  fileList.value.push({
@@ -140,7 +140,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
140
140
  formData.append("code", modelValue.value);
141
141
  formData.append("multipartFile", uploadFile, uploadFile.name);
142
142
  httpConfig.http({
143
- url: `${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/uploadAttachment`,
143
+ url: `/framework-api/core/framework-attachment/uploadAttachment`,
144
144
  method: "post",
145
145
  headers: {
146
146
  "Content-Type": "multipart/form-data"
@@ -183,7 +183,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
183
183
  formData.append("code", modelValue.value);
184
184
  formData.append("multipartFile", uploadFile, uploadFile.name);
185
185
  httpConfig.http({
186
- url: `${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/uploadAttachment`,
186
+ url: `/framework-api/core/framework-attachment/uploadAttachment`,
187
187
  method: "post",
188
188
  headers: {
189
189
  "Content-Type": "multipart/form-data"
@@ -209,7 +209,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
209
209
  if (!modelValue.value) {
210
210
  return;
211
211
  }
212
- httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { codeForEqual: modelValue.value, pageSize: 100 }).then((res) => {
212
+ httpConfig.http.post(`/framework-api/core/framework-attachment/selectPage`, { codeForEqual: modelValue.value, pageSize: 100 }).then((res) => {
213
213
  let attachemtList = res.data.data.records;
214
214
  emit("change", attachemtList);
215
215
  });
@@ -217,7 +217,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
217
217
  const handleRemove = (uploadItem) => {
218
218
  let id = uploadItem.id;
219
219
  es.ElMessageBox.confirm("确定要删除吗?", "系统提示", { type: "warning", draggable: true }).then(() => {
220
- httpConfig.http.get(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/deleteInfo`, { params: { id } }).then((res) => {
220
+ httpConfig.http.get(`/framework-api/core/framework-attachment/deleteInfo`, { params: { id } }).then((res) => {
221
221
  message.EleMessage.success(res.data.message);
222
222
  fileList.value.splice(fileList.value.indexOf(uploadItem), 1);
223
223
  emitChange();
@@ -227,6 +227,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
227
227
  const handleRetryUpload = (uploadItem) => {
228
228
  handleUpload(uploadItem, true);
229
229
  };
230
+ const getAttachmentList = () => {
231
+ return objectUtils.deepClone(fileList.value);
232
+ };
230
233
  vue.watch(
231
234
  () => componentParam,
232
235
  () => {
@@ -235,6 +238,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
235
238
  },
236
239
  { deep: true, immediate: true }
237
240
  );
241
+ __expose({
242
+ getAttachmentList
243
+ });
238
244
  return (_ctx, _cache) => {
239
245
  return vue.openBlock(), vue.createBlock(EleUploadList, {
240
246
  drag: true,
@@ -6,7 +6,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
6
6
  type: import('vue').PropType<{}>;
7
7
  default: any;
8
8
  };
9
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ }>, {
10
+ getAttachmentList: () => any;
11
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
12
  change: (frameworkAttachment: FrameworkAttachment) => void;
11
13
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
12
14
  modelValue: import('vue').PropType<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuang-framework-ui-pc",
3
- "version": "1.1.138",
3
+ "version": "1.1.140",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --host --config vite.global.ts --mode dev",
@@ -77,7 +77,7 @@
77
77
  "xgplayer": "^3.0.20",
78
78
  "xgplayer-hls": "^3.0.20",
79
79
  "xgplayer-music": "^3.0.20",
80
- "yuang-framework-ui-common": "^1.0.113"
80
+ "yuang-framework-ui-common": "^1.0.114"
81
81
  },
82
82
  "main": "lib/index.cjs",
83
83
  "module": "es/index.js",