waibu-db 1.0.9 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,6 +22,7 @@ async function btnEdit () {
22
22
  this.params.attr.split = true
23
23
  this.params.attr.triggerDisabled = true
24
24
  this.params.attr.triggerId = this.params.attr.id
25
+ this.params.attr.triggerTag = 'a'
25
26
  this.params.attr['trigger-x-data'] = `{
26
27
  path: '${this.params.attr.href}'
27
28
  }`
@@ -24,7 +24,6 @@ async function echarts () {
24
24
  const { defaultsDeep, generateId } = this.plugin.app.bajo
25
25
  const { base64JsonDecode, jsonStringify } = this.plugin.app.waibuMpa
26
26
  const { cloneDeep } = this.plugin.app.bajo.lib._
27
- this.params.attr.dim = this.params.attr.dim ?? 'width:100 height:100'
28
27
  this.params.attr.id = generateId('alpha')
29
28
  this.params.attr['x-data'] = `chart${this.params.attr.id}`
30
29
  this.params.attr['@resize.window.debounce.500ms'] = `
@@ -143,7 +143,10 @@ async function table () {
143
143
  this.params.attr = omit(this.params.attr, ['sortUpIcon', 'sortDownIcon', 'noSort', 'selection', 'headerNowrap'])
144
144
  const goDetails = `
145
145
  goDetails (id) {
146
- window.location.href = '${this.component.buildUrl({ base: 'details', prettyUrl })}&id=' + id
146
+ let url = '${this.params.attr.detailsHref ?? this.component.buildUrl({ base: 'details', prettyUrl })}'
147
+ if (url.indexOf('/:id') > -1) url = url.replace('/:id', '/' + id)
148
+ else url += '&id=' + id
149
+ window.location.href = url
147
150
  }
148
151
  `
149
152
  if (selection === 'multi') {