Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <tr id="cmp">
  2. <td class="fi_wall">Company Type </td>
  3. <td class="fi_wall"><select name="companyType" v-model="companyType">
  4. <option value="-1">select</option>
  5.  
  6. <option v-for=" result in results " v-bind:value="result.commonId">
  7. {{ result.name}}</option>
  8.  
  9. </select></td>
  10. </tr>
  11.  
  12. <script type="text/javascript">
  13. new Vue({
  14. el: '#cmp',
  15. data: {
  16. results: [],
  17. companyType : '-1'
  18.  
  19. },
  20. mounted() {
  21. axios.get('/easyoffice/companyType.do?method=getCompanyTypeAjax').then(response => {
  22. this.results = response.data,
  23. this.companyType = document.forms['companyForm'].companyType.value
  24.  
  25. })
  26. .catch(e => {
  27. this.errors.push(e)
  28. })
  29. }
  30. });</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement