12345678910111213141516171819202122232425262728293031323334353637 |
- <style>
- </style>
- <div id="{$name}">
- <input type="hidden" name="{$name}" :value="value">
- <el-input
- size="small"
- placeholder="请输入"
- v-model="value"
- style="width:100%"
- type="<?php if(isset($type)){echo $type;}else{echo 'text';};?>"
- minlength="<?php if(isset($minlength)){echo $minlength;}else{echo 0;};?>"
- maxlength="<?php if(isset($maxlength)){echo $maxlength;}else{echo 200;};?>"
- clearable
- :disabled="<?php if(isset($disabled)){echo $disabled;}else{echo 'false';};?>"
- :readonly="<?php if(isset($readonly)){echo $readonly;}else{echo 'false';};?>"
- show-word-limit
- />
- </div>
- <script>
- new Vue({
- el: '#{$name}',
- data: function() {
- return {
- value: '{$val}'
- }
- },
- watch: {
- value: function (newVal, oldVal) {
- $('input[name={$name}]').val(newVal);
- }
- },
- created(){
- }
- })
- </script>
|