adminforth 1.7.0-next.24 → 1.7.0-next.25

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.
@@ -9,6 +9,7 @@
9
9
 
10
10
  <!-- translate needed for bumping ring above prefix without z-index -->
11
11
  <input
12
+ ref="input"
12
13
  v-bind="$attrs"
13
14
  :type="type"
14
15
  @input="$emit('update:modelValue', $event.target?.value)"
@@ -31,6 +32,8 @@
31
32
 
32
33
  <script setup lang="ts">
33
34
 
35
+ import { ref } from 'vue';
36
+
34
37
  const props = defineProps({
35
38
  type: String,
36
39
  fullWidth: Boolean,
@@ -39,6 +42,11 @@ const props = defineProps({
39
42
  prefix: String,
40
43
  })
41
44
 
45
+ const input = ref<HTMLInputElement | null>(null)
46
+
47
+ defineExpose({
48
+ focus: () => input.value?.focus(),
49
+ });
42
50
 
43
51
  </script>
44
52
 
@@ -8,6 +8,8 @@
8
8
  @update:value="$emit('update:modelValue', $event)"
9
9
  :meta="column.components[props.source].meta"
10
10
  :record="currentValues"
11
+ :resource="coreStore.resource"
12
+ :adminUser="coreStore.adminUser"
11
13
  @update:inValidity="$emit('update:inValidity', $event)"
12
14
  @update:emptiness="$emit('update:emptiness', $event)"
13
15
  />
@@ -135,20 +137,29 @@
135
137
  import { ref } from 'vue';
136
138
  import { getCustomComponent } from '@/utils';
137
139
  import { useI18n } from 'vue-i18n';
140
+ import { useCoreStore } from '@/stores/core';
141
+
142
+ const coreStore = useCoreStore();
138
143
 
139
144
  const { t } = useI18n();
140
145
 
141
- const props = defineProps<{
142
- source: 'create' | 'edit',
143
- column: any,
144
- type: string,
145
- value: any,
146
- currentValues: any,
147
- mode: string,
148
- columnOptions: any,
149
- unmasked: any,
150
- deletable: boolean,
151
- }>();
146
+ const props = withDefaults(
147
+ defineProps<{
148
+ source: 'create' | 'edit',
149
+ column: any,
150
+ type?: string,
151
+ value: any,
152
+ currentValues: any,
153
+ mode: string,
154
+ columnOptions: any,
155
+ unmasked: any,
156
+ deletable?: boolean,
157
+ }>(),
158
+ {
159
+ type: undefined,
160
+ deletable: false,
161
+ }
162
+ );
152
163
 
153
164
  const input = ref(null);
154
165
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.7.0-next.24",
3
+ "version": "1.7.0-next.25",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",