widget.qw 1.0.79 → 1.0.80

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/.env.development CHANGED
@@ -7,4 +7,4 @@ VITE_NEED_LOGIN_CODE=401
7
7
  # 注意:发布时 VITE_IS_DEBUG必须配置为false
8
8
  # 本地开发时 VITE_IS_DEBUG必须配置为true
9
9
  VITE_IS_DEBUG=true
10
- VITE_DEBUG_TOKEN= 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJIb3VNdSIsInJuU3RyIjoiWWo2V3NLRWdKYU9kb2FzMEZFOUFKZWxyTTJzMGVJQWkifQ.wiKRQYqs2lbFC8_56qnLzfKV9H0vbn2qyGG56qmNlwg'
10
+ VITE_DEBUG_TOKEN= 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJIb3VNdSIsInJuU3RyIjoiY0hNaG1ZU1JsdlRWdlZkZHZMaHR6dVlGWXFCN3lGZkgifQ.CCwMRLeLNpgkstsB80c5-ywekZu9fuM3i-U35tJEvb0'
package/build/style.css CHANGED
@@ -394,13 +394,13 @@
394
394
  cursor: not-allowed;
395
395
  opacity: 1;
396
396
  -webkit-text-fill-color: #000;
397
- }.image-box .cover[data-v-92119e14] {
397
+ }.image-box .cover[data-v-d4977d2c] {
398
398
  width: 80px;
399
399
  height: 80px;
400
- }[data-v-df75f4fa] .label {
400
+ }[data-v-cf8ec8a0] .label {
401
401
  color: #000 !important;
402
402
  }
403
- [data-v-df75f4fa] .van-field__control:disabled {
403
+ [data-v-cf8ec8a0] .van-field__control:disabled {
404
404
  color: #000 !important;
405
405
  cursor: not-allowed;
406
406
  opacity: 1;
@@ -19943,7 +19943,7 @@ const _sfc_main$j = {
19943
19943
  }
19944
19944
  };
19945
19945
  var ImagePicker = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-16be97a4"]]);
19946
- var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-box .cover[data-v-92119e14] {\n width: 80px;\n height: 80px;\n}")();
19946
+ var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-box .cover[data-v-d4977d2c] {\n width: 80px;\n height: 80px;\n}")();
19947
19947
  const _hoisted_1$c = {
19948
19948
  class: "image-box"
19949
19949
  };
@@ -20021,9 +20021,15 @@ const _sfc_main$i = {
20021
20021
  });
20022
20022
  const onAfterRead = (e) => __async(this, null, function* () {
20023
20023
  console.log("onAfterRead", e);
20024
- if (e && e.length > 0) {
20025
- for (var i = 0; i < e.length; i++) {
20026
- let compress_file = e[i].file;
20024
+ let files2 = [];
20025
+ if (e && Array.isArray(e) && e.length > 0) {
20026
+ files2 = e;
20027
+ } else {
20028
+ files2 = [e];
20029
+ }
20030
+ if (files2 && files2.length > 0) {
20031
+ for (var i = 0; i < files2.length; i++) {
20032
+ let compress_file = files2[i].file;
20027
20033
  if (props.compress) {
20028
20034
  compress_file = yield util.compress_image(compress_file);
20029
20035
  }
@@ -20042,6 +20048,20 @@ const _sfc_main$i = {
20042
20048
  }
20043
20049
  return Promise.resolve(e);
20044
20050
  }
20051
+ console.log("onAfterRead", e);
20052
+ for (var i = 0; i < files2.length; i++) {
20053
+ let params = {
20054
+ file: files2[i].file
20055
+ };
20056
+ let res = yield util.file_upload(params);
20057
+ if (res.code == 200) {
20058
+ if (props.multiple)
20059
+ modelValue.value = [...modelValue.value || [], res.data];
20060
+ else
20061
+ modelValue.value = res.data;
20062
+ }
20063
+ }
20064
+ return Promise.resolve(e);
20045
20065
  });
20046
20066
  const onBeforeDelete = (e) => {
20047
20067
  let newUrls = props.modelValue.filter((item) => {
@@ -20129,8 +20149,8 @@ const _sfc_main$i = {
20129
20149
  };
20130
20150
  }
20131
20151
  };
20132
- var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-92119e14"]]);
20133
- var FilePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-df75f4fa] .label {\n color: #000 !important;\n}\n[data-v-df75f4fa] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
20152
+ var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-d4977d2c"]]);
20153
+ var FilePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-cf8ec8a0] .label {\n color: #000 !important;\n}\n[data-v-cf8ec8a0] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
20134
20154
  const _hoisted_1$b = {
20135
20155
  class: "file-box"
20136
20156
  };
@@ -20207,29 +20227,25 @@ const _sfc_main$h = {
20207
20227
  };
20208
20228
  const onAfterRead = (e) => __async(this, null, function* () {
20209
20229
  console.log("onAfterRead", e);
20210
- if (props.multiple) {
20211
- if (e && e.length > 0) {
20212
- for (var i = 0; i < e.length; i++) {
20213
- let params = {
20214
- file: e[i].file
20215
- };
20216
- let res = yield util.file_upload(params);
20217
- if (res.code == 200) {
20218
- modelValue.value = [...modelValue.value || [], res.data];
20219
- }
20220
- }
20221
- return Promise.resolve(e);
20222
- }
20230
+ let files2 = [];
20231
+ if (e && Array.isArray(e) && e.length > 0) {
20232
+ files2 = e;
20223
20233
  } else {
20234
+ files2 = [e];
20235
+ }
20236
+ for (var i = 0; i < files2.length; i++) {
20224
20237
  let params = {
20225
- file: e.file
20238
+ file: files2[i].file
20226
20239
  };
20227
20240
  let res = yield util.file_upload(params);
20228
20241
  if (res.code == 200) {
20229
- modelValue.value = res.data;
20230
- return Promise.resolve(e);
20242
+ if (props.multiple)
20243
+ modelValue.value = [...modelValue.value || [], res.data];
20244
+ else
20245
+ modelValue.value = res.data;
20231
20246
  }
20232
20247
  }
20248
+ return Promise.resolve(e);
20233
20249
  });
20234
20250
  const onBeforeDelete = (e) => {
20235
20251
  console.log("onBeforeDelete", e);
@@ -20296,7 +20312,7 @@ const _sfc_main$h = {
20296
20312
  };
20297
20313
  }
20298
20314
  };
20299
- var FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-df75f4fa"]]);
20315
+ var FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-cf8ec8a0"]]);
20300
20316
  var SingleUserSelector_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.user-popup[data-v-a489ca4c] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.department-selector[data-v-a489ca4c] {\r\n padding: 10px;\n}\n.search-buttons[data-v-a489ca4c] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-a489ca4c] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-a489ca4c] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-a489ca4c] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.picker-header[data-v-a489ca4c] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-a489ca4c] {\r\n flex: 1;\r\n font-size: 14px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-a489ca4c] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-a489ca4c] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-a489ca4c] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\r\n")();
20301
20317
  const _hoisted_1$a = {
20302
20318
  class: "department-selector"
@@ -19946,7 +19946,7 @@ var __async = (__this, __arguments, generator) => {
19946
19946
  }
19947
19947
  };
19948
19948
  var ImagePicker = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-16be97a4"]]);
19949
- var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-box .cover[data-v-92119e14] {\n width: 80px;\n height: 80px;\n}")();
19949
+ var images_picker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".image-box .cover[data-v-d4977d2c] {\n width: 80px;\n height: 80px;\n}")();
19950
19950
  const _hoisted_1$c = {
19951
19951
  class: "image-box"
19952
19952
  };
@@ -20024,9 +20024,15 @@ var __async = (__this, __arguments, generator) => {
20024
20024
  });
20025
20025
  const onAfterRead = (e) => __async(this, null, function* () {
20026
20026
  console.log("onAfterRead", e);
20027
- if (e && e.length > 0) {
20028
- for (var i = 0; i < e.length; i++) {
20029
- let compress_file = e[i].file;
20027
+ let files2 = [];
20028
+ if (e && Array.isArray(e) && e.length > 0) {
20029
+ files2 = e;
20030
+ } else {
20031
+ files2 = [e];
20032
+ }
20033
+ if (files2 && files2.length > 0) {
20034
+ for (var i = 0; i < files2.length; i++) {
20035
+ let compress_file = files2[i].file;
20030
20036
  if (props.compress) {
20031
20037
  compress_file = yield util.compress_image(compress_file);
20032
20038
  }
@@ -20045,6 +20051,20 @@ var __async = (__this, __arguments, generator) => {
20045
20051
  }
20046
20052
  return Promise.resolve(e);
20047
20053
  }
20054
+ console.log("onAfterRead", e);
20055
+ for (var i = 0; i < files2.length; i++) {
20056
+ let params = {
20057
+ file: files2[i].file
20058
+ };
20059
+ let res = yield util.file_upload(params);
20060
+ if (res.code == 200) {
20061
+ if (props.multiple)
20062
+ modelValue.value = [...modelValue.value || [], res.data];
20063
+ else
20064
+ modelValue.value = res.data;
20065
+ }
20066
+ }
20067
+ return Promise.resolve(e);
20048
20068
  });
20049
20069
  const onBeforeDelete = (e) => {
20050
20070
  let newUrls = props.modelValue.filter((item) => {
@@ -20132,8 +20152,8 @@ var __async = (__this, __arguments, generator) => {
20132
20152
  };
20133
20153
  }
20134
20154
  };
20135
- var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-92119e14"]]);
20136
- var FilePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-df75f4fa] .label {\n color: #000 !important;\n}\n[data-v-df75f4fa] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
20155
+ var ImagesPicker = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-d4977d2c"]]);
20156
+ var FilePicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "[data-v-cf8ec8a0] .label {\n color: #000 !important;\n}\n[data-v-cf8ec8a0] .van-field__control:disabled {\n color: #000 !important;\n cursor: not-allowed;\n opacity: 1;\n -webkit-text-fill-color: #000;\n}")();
20137
20157
  const _hoisted_1$b = {
20138
20158
  class: "file-box"
20139
20159
  };
@@ -20210,29 +20230,25 @@ var __async = (__this, __arguments, generator) => {
20210
20230
  };
20211
20231
  const onAfterRead = (e) => __async(this, null, function* () {
20212
20232
  console.log("onAfterRead", e);
20213
- if (props.multiple) {
20214
- if (e && e.length > 0) {
20215
- for (var i = 0; i < e.length; i++) {
20216
- let params = {
20217
- file: e[i].file
20218
- };
20219
- let res = yield util.file_upload(params);
20220
- if (res.code == 200) {
20221
- modelValue.value = [...modelValue.value || [], res.data];
20222
- }
20223
- }
20224
- return Promise.resolve(e);
20225
- }
20233
+ let files2 = [];
20234
+ if (e && Array.isArray(e) && e.length > 0) {
20235
+ files2 = e;
20226
20236
  } else {
20237
+ files2 = [e];
20238
+ }
20239
+ for (var i = 0; i < files2.length; i++) {
20227
20240
  let params = {
20228
- file: e.file
20241
+ file: files2[i].file
20229
20242
  };
20230
20243
  let res = yield util.file_upload(params);
20231
20244
  if (res.code == 200) {
20232
- modelValue.value = res.data;
20233
- return Promise.resolve(e);
20245
+ if (props.multiple)
20246
+ modelValue.value = [...modelValue.value || [], res.data];
20247
+ else
20248
+ modelValue.value = res.data;
20234
20249
  }
20235
20250
  }
20251
+ return Promise.resolve(e);
20236
20252
  });
20237
20253
  const onBeforeDelete = (e) => {
20238
20254
  console.log("onBeforeDelete", e);
@@ -20299,7 +20315,7 @@ var __async = (__this, __arguments, generator) => {
20299
20315
  };
20300
20316
  }
20301
20317
  };
20302
- var FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-df75f4fa"]]);
20318
+ var FilePicker = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-cf8ec8a0"]]);
20303
20319
  var SingleUserSelector_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => "\n.user-popup[data-v-a489ca4c] {\r\n width: 100%;\r\n overflow: hidden;\n}\n.department-selector[data-v-a489ca4c] {\r\n padding: 10px;\n}\n.search-buttons[data-v-a489ca4c] {\r\n display: flex;\r\n gap: 10px;\n}\n.clear-btn[data-v-a489ca4c] {\r\n background-color: #f2f3f5;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.confirm-btn[data-v-a489ca4c] {\r\n background-color: #1989fa;\r\n color: white;\r\n border: none;\r\n border-radius: 4px;\r\n padding: 4px 8px;\r\n font-size: 14px;\n}\n.no-results[data-v-a489ca4c] {\r\n text-align: center;\r\n padding: 20px;\r\n color: #969799;\n}\n.picker-header[data-v-a489ca4c] {\r\n padding: 10px;\r\n border-bottom: 1px solid #ebedf0;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.current-path[data-v-a489ca4c] {\r\n flex: 1;\r\n font-size: 14px;\r\n color: #323233;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\n.header-right[data-v-a489ca4c] {\r\n display: flex;\r\n gap: 8px;\r\n margin-left: auto;\n}\n.cancel-btn[data-v-a489ca4c] {\r\n color: #969799;\r\n margin-right: 5px;\n}\n.scroll-container[data-v-a489ca4c] {\r\n height: calc(80vh - 150px);\r\n overflow-y: auto;\n}\r\n")();
20304
20320
  const _hoisted_1$a = {
20305
20321
  class: "department-selector"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "widget.qw",
3
3
  "private": false,
4
- "version": "1.0.79",
4
+ "version": "1.0.80",
5
5
  "description": "marqstree Vue3组件库",
6
6
  "main": "build/widget.qw.es.js",
7
7
  "keywords": [
@@ -86,32 +86,29 @@ const onClickPreview = (e) => {
86
86
  const onAfterRead = async (e) => {
87
87
  console.log('onAfterRead', e)
88
88
 
89
- if (props.multiple) {
90
- if (e && e.length > 0) {
91
- for (var i = 0; i < e.length; i++) {
92
- let params = {
93
- file: e[i].file
94
- }
95
89
 
96
- let res = await util.file_upload(params)
97
- if (res.code == 200) {
98
- modelValue.value = [...(modelValue.value || []), res.data]
99
- }
100
- }
90
+ let files = []
91
+ if (e && Array.isArray(e) && e.length > 0) {
92
+ files = e
93
+ }else{
94
+ files = [e]
95
+ }
101
96
 
102
- return Promise.resolve(e)
103
- }
104
- } else {
97
+ for (var i = 0; i < files.length; i++) {
105
98
  let params = {
106
- file: e.file
99
+ file: files[i].file
107
100
  }
108
101
 
109
102
  let res = await util.file_upload(params)
110
103
  if (res.code == 200) {
111
- modelValue.value = res.data
112
- return Promise.resolve(e)
104
+ if(props.multiple)
105
+ modelValue.value = [...(modelValue.value || []), res.data]
106
+ else
107
+ modelValue.value = res.data
113
108
  }
114
109
  }
110
+
111
+ return Promise.resolve(e)
115
112
  }
116
113
 
117
114
  const onBeforeDelete = (e) => {
@@ -94,9 +94,16 @@ onMounted(() => {
94
94
  const onAfterRead = async (e) => {
95
95
  console.log('onAfterRead', e)
96
96
 
97
- if (e && e.length > 0) {
98
- for (var i = 0; i < e.length; i++) {
99
- let compress_file = e[i].file
97
+ let files = []
98
+ if (e && Array.isArray(e) && e.length > 0) {
99
+ files = e
100
+ }else{
101
+ files = [e]
102
+ }
103
+
104
+ if (files && files.length > 0) {
105
+ for (var i = 0; i < files.length; i++) {
106
+ let compress_file = files[i].file
100
107
  if (props.compress) {
101
108
  compress_file = await util.compress_image(compress_file)
102
109
  }
@@ -119,6 +126,27 @@ const onAfterRead = async (e) => {
119
126
 
120
127
  return Promise.resolve(e)
121
128
  }
129
+
130
+ console.log('onAfterRead', e)
131
+
132
+
133
+
134
+
135
+ for (var i = 0; i < files.length; i++) {
136
+ let params = {
137
+ file: files[i].file
138
+ }
139
+
140
+ let res = await util.file_upload(params)
141
+ if (res.code == 200) {
142
+ if(props.multiple)
143
+ modelValue.value = [...(modelValue.value || []), res.data]
144
+ else
145
+ modelValue.value = res.data
146
+ }
147
+ }
148
+
149
+ return Promise.resolve(e)
122
150
  }
123
151
 
124
152
  const onBeforeDelete = (e) => {
@@ -8,8 +8,8 @@
8
8
  import { onMounted, reactive, watch } from "vue";
9
9
 
10
10
  const data = reactive({
11
- auth:'readonly',
12
- urls: ['http://www.zjpsjdsb.online/static//HrMi9Q2J.png','http://www.zjpsjdsb.online/static//HrMi9Q2J.png','http://www.zjpsjdsb.online/static//HrMi9Q2J.png','http://www.zjpsjdsb.online/static//HrMi9Q2J.png','http://www.zjpsjdsb.online/static//HrMi9Q2J.png','http://www.zjpsjdsb.online/static//HrMi9Q2J.png']
11
+ auth:'require',
12
+ urls: []
13
13
  })
14
14
 
15
15
  watch(()=>data.url,(newVal,oldVal)=>{