waibu-db 1.2.10 → 1.2.11

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/index.js CHANGED
@@ -42,6 +42,7 @@ async function factory (pkgName) {
42
42
  ensureDir: true,
43
43
  fields
44
44
  }
45
+ options.filter.sort = 'id:1'
45
46
  const dmodel = 'SumbaDownload'
46
47
  try {
47
48
  await recordUpdate(dmodel, id, { status: 'PROCESSING' })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12,8 +12,10 @@ async function form () {
12
12
  const xModels = get(schema, 'view.x.model', [])
13
13
  const xOns = get(schema, 'view.x.on', [])
14
14
  for (const l of schema.view.layout) {
15
+ const fields = filter(l.fields, f => schema.view.fields.includes(f))
16
+ if (fields.length === 0) continue
15
17
  body.push(`<c:fieldset ${schema.view.card === false ? '' : 'card'} ${l.name[0] !== '_' ? ('t:legend="' + l.name + '"') : ''} grid-gutter="2">`)
16
- for (const f of l.fields) {
18
+ for (const f of fields) {
17
19
  const w = schema.view.widget[f]
18
20
  let prop = find(schema.properties, { name: f })
19
21
  if (!prop) prop = find(schema.view.calcFields, { name: f })
@@ -21,7 +23,8 @@ async function form () {
21
23
  const attr = [`x-ref="${w.name}"`]
22
24
  if (xModels.includes(w.name)) attr.push(`x-model="${w.name}"`)
23
25
  forOwn(w.attr, (v, k) => {
24
- attr.push(`${k}="${v}"`)
26
+ if (v === true) attr.push(k)
27
+ else attr.push(`${k}="${v}"`)
25
28
  })
26
29
  const xon = filter(xOns, { field: w.name })
27
30
  for (const o of xon) {