小编xDe*_*ers的帖子

How to use v-on:change in VueJS and send the parameter to get update JSON data with axios

Please see my code that I'am not sure what I'm doing wrong?. I want to get new JSON data when the id="select1" has changed and then send the parameter to id="select2" and then id="select2" will be show data in option.

var appZone = new Vue({
	el: '#el',
	data() {
		return {
		  options: [],
          list:[],
		  selected:''
		}
	},
	mounted() {
	    var self = this
		axios.get('/wp-json/tour-api/v1/search/0')
		.then(function (response) {
		 console.log(response);
		  self.options = response.data;
       
		})
		.catch(function (error) {
		  console.log(error);
		});
	 },
    
  methods: { …
Run Code Online (Sandbox Code Playgroud)

json vue.js axios

2
推荐指数
1
解决办法
3万
查看次数

标签 统计

axios ×1

json ×1

vue.js ×1