waibu-db 2.20.1 → 2.21.1
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.
|
@@ -46,9 +46,7 @@ async function btnDelete () {
|
|
|
46
46
|
await wbs.confirmation(\`${req.t(msg)}\`, {
|
|
47
47
|
ok: '${this.params.attr.id}:remove',
|
|
48
48
|
close: 'y',
|
|
49
|
-
opts: selected
|
|
50
|
-
theme: '${get(this, 'component.theme.name', 'default')}',
|
|
51
|
-
iconset: '${get(this, 'component.iconset.name', 'default')}'
|
|
49
|
+
opts: selected
|
|
52
50
|
})
|
|
53
51
|
`
|
|
54
52
|
this.params.html = await this.component.buildTag({ tag: 'btn', attr: this.params.attr, html: this.params.html })
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import path from 'path'
|
|
2
|
-
|
|
3
1
|
const defReadonly = ['id', 'createdAt', 'updatedAt']
|
|
4
2
|
|
|
5
3
|
const defFormatter = {}
|
|
@@ -200,9 +198,8 @@ async function getSchemaExt (modelName, view, options = {}) {
|
|
|
200
198
|
const ns = model.plugin.ns
|
|
201
199
|
const schema = pick(model, ['name', 'properties', 'indexes', 'disabled', 'sortables', 'scanables', 'view', 'hidden', 'options'])
|
|
202
200
|
schema.ns = ns
|
|
203
|
-
const base = options.base ?? path.basename(model.options.file, path.extname(model.options.file))
|
|
204
201
|
const parserOpts = { args: options.args }
|
|
205
|
-
let ext = await readConfig(`${ns}:/extend/waibuDb/schema/${
|
|
202
|
+
let ext = await readConfig(`${ns}:/extend/waibuDb/schema/${model.baseName}.*`, { ns, baseNs: 'waibuDb', parserOpts })
|
|
206
203
|
ext = defaultsDeep(options.schema ?? {}, ext)
|
|
207
204
|
await handler[view].call(this, schema, ext, options)
|
|
208
205
|
return { schema, ext, model }
|
package/package.json
CHANGED