@mixd-id/web-scaffold 0.1.230406317 → 0.1.230406319

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406317",
4
+ "version": "0.1.230406319",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -209,9 +209,9 @@ export default{
209
209
  else if(Array.isArray(this.src)){
210
210
 
211
211
  const src = {}
212
- src['all'] = this.src[0]
212
+ src['all'] = (this.src[0].indexOf('://') < 0 ? import.meta.env.VITE_IMAGE_HOST + '/' : '') + this.src[0]
213
213
  if(this.src[1]){
214
- src['md'] = this.src[1]
214
+ src['md'] = (this.src[1].indexOf('://') < 0 ? import.meta.env.VITE_IMAGE_HOST + '/' : '') + this.src[1]
215
215
  }
216
216
 
217
217
  let imgSrc
@@ -24,7 +24,7 @@ export default{
24
24
  props: {
25
25
 
26
26
  download: {
27
- type: Boolean,
27
+ type: [ Boolean, String ],
28
28
  default: false
29
29
  },
30
30
 
@@ -362,8 +362,14 @@ const filtersToSequelizeWhere = async(filters, opt) => {
362
362
  const type = ((keyColumns[key] ?? [])[0] ?? {}).type
363
363
 
364
364
  let whereObj = {}
365
- const modelAttributes = opt.model.getAttributes()
366
- const {Model, field} = modelAttributes[key]
365
+ let Model, field
366
+ if(opt.model){
367
+ const modelAttributes = opt.model.getAttributes()
368
+ if(modelAttributes[key]){
369
+ Model = opt.model
370
+ field = modelAttributes[key].field
371
+ }
372
+ }
367
373
 
368
374
  switch(type){
369
375