glib-web 3.0.6 → 3.0.7

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.
@@ -2,7 +2,7 @@
2
2
  <div :style="'width: 100%'" :class="$classes()">
3
3
  <v-tabs v-model="tab" :bg-color="spec.backgroundColor || 'white'" slider-color="primary" color="primary" show-arrows
4
4
  :height="spec.height || 60" :grow="$classes().includes('no-grow') ? false : true">
5
- <v-tab v-for="(item, index) in spec.buttons " :key="index" height="100%" :value="index">
5
+ <v-tab v-for="(item, index) in spec.buttons" @click="handleClick(index)" :key="index" height="100%" :value="index">
6
6
  <common-icon :class="index == spec.activeIndex ? 'text-primary' : null" :spec="item.icon" v-if="item.icon" />
7
7
  <span :style="{ marginLeft: '2px' }" :class="index == spec.activeIndex ? 'text-primary' : null">{{ item.text
8
8
  }}</span>
@@ -26,21 +26,32 @@ export default {
26
26
  buttons: null
27
27
  };
28
28
  },
29
- watch: {
30
- tab: function (val, oldVal) {
31
- if (val == oldVal && oldVal == null) return null;
29
+ // watch: {
30
+ // tab: function (val, oldVal) {
31
+ // if (val == oldVal && oldVal == null) return null;
32
32
 
33
+ // this.$nextTick(function () {
34
+ // const activeTab = this.buttons[val]
35
+ // const onClick = activeTab?.onClick
36
+
37
+ // if (onClick) {
38
+ // Action.execute(onClick, this)
39
+ // }
40
+ // })
41
+ // }
42
+ // },
43
+ methods: {
44
+ handleClick(index) {
33
45
  this.$nextTick(function () {
34
- const activeTab = this.buttons[val]
46
+ const activeTab = this.buttons[index]
35
47
  const onClick = activeTab?.onClick
36
48
 
37
49
  if (onClick) {
38
50
  Action.execute(onClick, this)
39
51
  }
52
+ this.tab = index
40
53
  })
41
- }
42
- },
43
- methods: {
54
+ },
44
55
  $ready() {
45
56
  if (this.spec.activeIndex) {
46
57
  this.tab = this.spec.activeIndex;
package/nav/dialog.vue CHANGED
@@ -138,7 +138,7 @@ export default {
138
138
  },
139
139
  reload(newSpec) {
140
140
  if (Utils.http.proceedEvenWhenDirty()) {
141
- this.spec = newSpec;
141
+ this.spec.url = newSpec.url
142
142
  this.urlLoaded = false;
143
143
  this.show(true);
144
144
  }
@@ -158,6 +158,7 @@ export default {
158
158
  }
159
159
  const url = Utils.url.appendParams(this.url, { _dialog: "v1" });
160
160
  Http.execute({ url: url }, "GET", this, (response) => {
161
+ console.log(url)
161
162
  Utils.http.forceComponentUpdate(() => {
162
163
  this.urlLoaded = true;
163
164
  this.title = response.title;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {