Skip to content

Commit

Permalink
Merge pull request #293 from qor5/feat-ui-reborn
Browse files Browse the repository at this point in the history
fix: sendVariables
  • Loading branch information
danni-cool authored Sep 23, 2024
2 parents 106596f + e43ea52 commit f079f9f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ui/vuetifyx/vuetifyxjs/dist/assets/vuetifyx.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ui/vuetifyx/vuetifyxjs/dist/vuetifyx.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const value = ref('1eiuh1ihaubfiad')
>
</vx-field>
<vx-field
type="textarea"
counter="200"
v-model="value"
label="textarea"
Expand Down
10 changes: 5 additions & 5 deletions ui/vuetifyx/vuetifyxjs/src/lib/SendVariables.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ const addTags = (tag: any) => {
let lazyValue = vnode.value.modelValue
let selectionStart = vnode.value.selectionStart
let selectionEnd = vnode.value.selectionEnd
const input = vnode.value.$el.querySelector('input')
if (input) {
selectionStart = input.selectionStart
selectionEnd = input.selectionEnd
const inputFiled = vnode.value.$el.querySelector('input') || vnode.value.$el.querySelector('textarea')
if (inputFiled) {
selectionStart = inputFiled.selectionStart
selectionEnd = inputFiled.selectionEnd
}
let startString = lazyValue.substring(0, selectionStart)
let endString = lazyValue.substring(selectionEnd, lazyValue.length)
vnode.value.$emit('update:modelValue', startString + '{{' + tag + '}}' + endString)
input.focus()
inputFiled.focus()
}
defineExpose({
tagInputsFocus,
Expand Down

0 comments on commit f079f9f

Please sign in to comment.