Vue.component("plan-user-selector", { mounted: function () { let that = this Tea.action("/plans/users/options") .post() .success(function (resp) { that.users = resp.data.users }) }, props: ["v-user-id"], data: function () { let userId = this.vUserId if (userId == null) { userId = 0 } return { users: [], userId: userId } }, watch: { userId: function (v) { this.$emit("change", v) } }, template: `
` })