Fix codeinput
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
:class="[theme.CodeInput.input,{ '!ring-red-500 !ring-2': hasError, '!cursor-not-allowed !bg-gray-200':disabled }]"
|
||||
>
|
||||
<codemirror :id="id?id:name" v-model="compVal" :disabled="disabled?true:null"
|
||||
:options="cmOptions"
|
||||
:style="inputStyle" :name="name"
|
||||
:extensions="extensions"
|
||||
:style="inputStyle" :name="name" :tab-size="4"
|
||||
:placeholder="placeholder"
|
||||
/>
|
||||
</div>
|
||||
@@ -27,36 +27,24 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { codemirror } from 'vue-codemirror'
|
||||
import 'codemirror/lib/codemirror.css'
|
||||
import { Codemirror } from 'vue-codemirror'
|
||||
|
||||
import 'codemirror/mode/htmlmixed/htmlmixed.js'
|
||||
import {html} from '@codemirror/lang-html'
|
||||
|
||||
import { inputProps, useFormInput } from './useFormInput.js'
|
||||
import InputWrapper from './components/InputWrapper.vue'
|
||||
|
||||
export default {
|
||||
components: { InputWrapper, codemirror },
|
||||
components: { InputWrapper, Codemirror },
|
||||
props: {
|
||||
...inputProps
|
||||
},
|
||||
|
||||
setup (props, context) {
|
||||
const extensions = [html()]
|
||||
return {
|
||||
...useFormInput(props, context)
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
cmOptions: {
|
||||
// codemirror options
|
||||
tabSize: 4,
|
||||
mode: 'text/html',
|
||||
theme: 'default',
|
||||
lineNumbers: true,
|
||||
line: true
|
||||
}
|
||||
...useFormInput(props, context),
|
||||
extensions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FormBlockLogicEditor from '../../components/form-logic-components/FormBlockLogicEditor.vue'
|
||||
import FormBlockLogicEditor from '../../components/form-logic-components/FormBlockLogicEditor.client.vue'
|
||||
|
||||
export default {
|
||||
name: 'BlockOptions',
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
import timezones from '~/data/timezones.json'
|
||||
import countryCodes from '~/data/country_codes.json'
|
||||
import CountryFlag from 'vue-country-flag-next'
|
||||
import FormBlockLogicEditor from '../../components/form-logic-components/FormBlockLogicEditor.vue'
|
||||
import FormBlockLogicEditor from '../../components/form-logic-components/FormBlockLogicEditor.client.vue'
|
||||
|
||||
export default {
|
||||
name: 'FieldOptions',
|
||||
|
||||
Reference in New Issue
Block a user