@iamhammad/vue-demo-1
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,3 +5,2 @@ import axios from 'axios'; | ||
var script = { | ||
name: "VueElegantButton", | ||
props: { | ||
@@ -19,3 +18,5 @@ background: { | ||
data: function data() { | ||
return {}; | ||
return { | ||
getAllNotes: null | ||
}; | ||
}, | ||
@@ -30,7 +31,23 @@ methods: { | ||
getNotes: function getNotes() { | ||
axios({ | ||
method: "get", | ||
url: "http://localhost:5000/api/CandidateNotesService/GetNotes?CandidateSOSId=306831&SubjectId=43543&ContentType=-1&DeletedRecordCount=0&PageNumber=1&PageSize=12" | ||
var _this = this; | ||
var reqInstance = axios.create({ | ||
headers: { | ||
Authorization: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiIzNzE0NzkiLCJ1bmlxdWVfbmFtZSI6ImhhbW1hZGxtczFfMSIsIkFzcE5ldC5JZGVudGl0eS5TZWN1cml0eVN0YW1wIjoiNzIzMUVDOTQtQzFGOC00NjdGLThCMzctODY3QTREQUYxM0U4Iiwicm9sZSI6ImNhbmRpZGF0ZV8xIiwiRnVsbE5hbWUiOiJoYW1tYWQgdWxsYWgga2hhbiIsIlRlbmFudElkIjoiMSIsIlBlcm1pc3Npb25JZCI6IjUiLCJVdGNPZmZzZXQiOiI3MjAiLCJUaW1lWm9uZUlkIjoiRGF0ZWxpbmUgU3RhbmRhcmQgVGltZSIsIklzT25saW5lIjoiVHJ1ZSIsIkVtYWlsIjoiaGFtbWFkQGNydW5jaGNyYWZ0LmNvbSIsIlBob25lTnVtYmVyIjoiOTIzMjM0MTc4MDIwIiwibmJmIjoxNjc2MzcxMTE5LCJleHAiOjE2ODE1NTUxMTksImlhdCI6MTY3NjM3MTExOSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo1MDAwIiwiYXVkIjoiNDE0ZTE5MjdhMzg4NGY2OGFiYzc5ZjcyODM4MzdmZDEifQ.SYxqOLsMeo7X7paq3wkHA5406GShCUWi3D-JGXFlirw", | ||
"api-security-key": "A956FFC5-8069-47F3-B1D7-AC6E11A21BFD" | ||
} | ||
}); | ||
var url = "http://localhost:5000/api/CandidateNotesService/GetNotes"; | ||
var params = { | ||
CandidateSOSId: 316547, | ||
SubjectId: 43543, | ||
ContentType: -1, | ||
DeletedRecordCount: 0, | ||
PageNumber: 1, | ||
PageSize: 12 | ||
}; | ||
reqInstance.get(url, { | ||
params: params | ||
}).then(function (res) { | ||
console.log(res); | ||
debugger; | ||
_this.getAllNotes = res.data; | ||
}).catch(function (err) { | ||
@@ -138,3 +155,3 @@ console.log(err); | ||
} | ||
}, [_vm._v("\n " + _vm._s(_vm.text) + "\n ")])]); | ||
}, [_vm._v("\n " + _vm._s(_vm.text) + "\n ")]), _vm._v(" "), _vm.getAllNotes && _vm.getAllNotes.Notes.length ? _c('div', [_vm._v("\n " + _vm._s(_vm.getAllNotes) + "\n ")]) : _vm._e()]); | ||
}; | ||
@@ -141,0 +158,0 @@ var __vue_staticRenderFns__ = []; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function i(e,t,n,o,i,d,r,s,u,a){"boolean"!=typeof r&&(u=s,s=r,r=!1);const c="function"==typeof n?n.options:n;let l;if(e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,i&&(c.functional=!0)),o&&(c._scopeId=o),d?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,u(e)),e&&e._registeredComponents&&e._registeredComponents.add(d)},c._ssrRegister=l):t&&(l=r?function(e){t.call(this,a(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),l)if(c.functional){const e=c.render;c.render=function(t,n){return l.call(n),e(t,n)}}else{const e=c.beforeCreate;c.beforeCreate=e?[].concat(e,l):[l]}return n}var d=i({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("button",{style:{padding:"15px",fontSize:"20px",background:e.background,color:e.color},on:{click:function(t){return e.getNotes()}}},[e._v("\n "+e._s(e.text)+"\n ")])])},staticRenderFns:[]},undefined,{name:"VueElegantButton",props:{background:{default:"#456099"},color:{default:"#fff"},text:{default:"My Button"}},data:function(){return{}},methods:{DisplayProps:function(){this.$emit("showProps",{background:this.background,text:this.text})},getNotes:function(){o.default({method:"get",url:"http://localhost:5000/api/CandidateNotesService/GetNotes?CandidateSOSId=306831&SubjectId=43543&ContentType=-1&DeletedRecordCount=0&PageNumber=1&PageSize=12"}).then((function(e){console.log(e)})).catch((function(e){console.log(e)}))}}},undefined,false,undefined,!1,void 0,void 0,void 0);function r(e){r.installed||(r.installed=!0,e.component("vue-demo1",d))}var s={install:r},u=null;"undefined"!=typeof window?u=window.Vue:"undefined"!=typeof global&&(u=global.vue),u&&u.use(s),d.install=r,e.button=d,Object.defineProperty(e,"__esModule",{value:!0})}(this["vue-demo1"]=this["vue-demo1"]||{},axios); | ||
!function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function i(e,t,n,o,i,s,l,d,a,r){"boolean"!=typeof l&&(a=d,d=l,l=!1);const c="function"==typeof n?n.options:n;let u;if(e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,i&&(c.functional=!0)),o&&(c._scopeId=o),s?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,a(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=u):t&&(u=l?function(e){t.call(this,r(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,d(e))}),u)if(c.functional){const e=c.render;c.render=function(t,n){return u.call(n),e(t,n)}}else{const e=c.beforeCreate;c.beforeCreate=e?[].concat(e,u):[u]}return n}var s=i({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("button",{style:{padding:"15px",fontSize:"20px",background:e.background,color:e.color},on:{click:function(t){return e.getNotes()}}},[e._v("\n "+e._s(e.text)+"\n ")]),e._v(" "),e.getAllNotes&&e.getAllNotes.Notes.length?n("div",[e._v("\n "+e._s(e.getAllNotes)+"\n ")]):e._e()])},staticRenderFns:[]},undefined,{props:{background:{default:"#456099"},color:{default:"#fff"},text:{default:"My Button"}},data:function(){return{getAllNotes:null}},methods:{DisplayProps:function(){this.$emit("showProps",{background:this.background,text:this.text})},getNotes:function(){var e=this;o.default.create({headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiIzNzE0NzkiLCJ1bmlxdWVfbmFtZSI6ImhhbW1hZGxtczFfMSIsIkFzcE5ldC5JZGVudGl0eS5TZWN1cml0eVN0YW1wIjoiNzIzMUVDOTQtQzFGOC00NjdGLThCMzctODY3QTREQUYxM0U4Iiwicm9sZSI6ImNhbmRpZGF0ZV8xIiwiRnVsbE5hbWUiOiJoYW1tYWQgdWxsYWgga2hhbiIsIlRlbmFudElkIjoiMSIsIlBlcm1pc3Npb25JZCI6IjUiLCJVdGNPZmZzZXQiOiI3MjAiLCJUaW1lWm9uZUlkIjoiRGF0ZWxpbmUgU3RhbmRhcmQgVGltZSIsIklzT25saW5lIjoiVHJ1ZSIsIkVtYWlsIjoiaGFtbWFkQGNydW5jaGNyYWZ0LmNvbSIsIlBob25lTnVtYmVyIjoiOTIzMjM0MTc4MDIwIiwibmJmIjoxNjc2MzcxMTE5LCJleHAiOjE2ODE1NTUxMTksImlhdCI6MTY3NjM3MTExOSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo1MDAwIiwiYXVkIjoiNDE0ZTE5MjdhMzg4NGY2OGFiYzc5ZjcyODM4MzdmZDEifQ.SYxqOLsMeo7X7paq3wkHA5406GShCUWi3D-JGXFlirw","api-security-key":"A956FFC5-8069-47F3-B1D7-AC6E11A21BFD"}}).get("http://localhost:5000/api/CandidateNotesService/GetNotes",{params:{CandidateSOSId:316547,SubjectId:43543,ContentType:-1,DeletedRecordCount:0,PageNumber:1,PageSize:12}}).then((function(t){e.getAllNotes=t.data})).catch((function(e){console.log(e)}))}}},undefined,false,undefined,!1,void 0,void 0,void 0);function l(e){l.installed||(l.installed=!0,e.component("vue-demo1",s))}var d={install:l},a=null;"undefined"!=typeof window?a=window.Vue:"undefined"!=typeof global&&(a=global.vue),a&&a.use(d),s.install=l,e.button=s,Object.defineProperty(e,"__esModule",{value:!0})}(this["vue-demo1"]=this["vue-demo1"]||{},axios); |
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var axios=require('axios');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var axios__default=/*#__PURE__*/_interopDefaultLegacy(axios);// | ||
var script = { | ||
name: "VueElegantButton", | ||
props: { | ||
@@ -16,3 +15,5 @@ background: { | ||
data: function data() { | ||
return {}; | ||
return { | ||
getAllNotes: null | ||
}; | ||
}, | ||
@@ -27,7 +28,23 @@ methods: { | ||
getNotes: function getNotes() { | ||
axios__default["default"]({ | ||
method: "get", | ||
url: "http://localhost:5000/api/CandidateNotesService/GetNotes?CandidateSOSId=306831&SubjectId=43543&ContentType=-1&DeletedRecordCount=0&PageNumber=1&PageSize=12" | ||
var _this = this; | ||
var reqInstance = axios__default["default"].create({ | ||
headers: { | ||
Authorization: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1laWQiOiIzNzE0NzkiLCJ1bmlxdWVfbmFtZSI6ImhhbW1hZGxtczFfMSIsIkFzcE5ldC5JZGVudGl0eS5TZWN1cml0eVN0YW1wIjoiNzIzMUVDOTQtQzFGOC00NjdGLThCMzctODY3QTREQUYxM0U4Iiwicm9sZSI6ImNhbmRpZGF0ZV8xIiwiRnVsbE5hbWUiOiJoYW1tYWQgdWxsYWgga2hhbiIsIlRlbmFudElkIjoiMSIsIlBlcm1pc3Npb25JZCI6IjUiLCJVdGNPZmZzZXQiOiI3MjAiLCJUaW1lWm9uZUlkIjoiRGF0ZWxpbmUgU3RhbmRhcmQgVGltZSIsIklzT25saW5lIjoiVHJ1ZSIsIkVtYWlsIjoiaGFtbWFkQGNydW5jaGNyYWZ0LmNvbSIsIlBob25lTnVtYmVyIjoiOTIzMjM0MTc4MDIwIiwibmJmIjoxNjc2MzcxMTE5LCJleHAiOjE2ODE1NTUxMTksImlhdCI6MTY3NjM3MTExOSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo1MDAwIiwiYXVkIjoiNDE0ZTE5MjdhMzg4NGY2OGFiYzc5ZjcyODM4MzdmZDEifQ.SYxqOLsMeo7X7paq3wkHA5406GShCUWi3D-JGXFlirw", | ||
"api-security-key": "A956FFC5-8069-47F3-B1D7-AC6E11A21BFD" | ||
} | ||
}); | ||
var url = "http://localhost:5000/api/CandidateNotesService/GetNotes"; | ||
var params = { | ||
CandidateSOSId: 316547, | ||
SubjectId: 43543, | ||
ContentType: -1, | ||
DeletedRecordCount: 0, | ||
PageNumber: 1, | ||
PageSize: 12 | ||
}; | ||
reqInstance.get(url, { | ||
params: params | ||
}).then(function (res) { | ||
console.log(res); | ||
debugger; | ||
_this.getAllNotes = res.data; | ||
}).catch(function (err) { | ||
@@ -124,3 +141,3 @@ console.log(err); | ||
color: _vm.color | ||
}, null) + ">" + _vm._ssrEscape("\n " + _vm._s(_vm.text) + "\n ") + "</button>")]); | ||
}, null) + ">" + _vm._ssrEscape("\n " + _vm._s(_vm.text) + "\n ") + "</button> " + (_vm.getAllNotes && _vm.getAllNotes.Notes.length ? "<div>" + _vm._ssrEscape("\n " + _vm._s(_vm.getAllNotes) + "\n ") + "</div>" : "<!---->"))]); | ||
}; | ||
@@ -134,3 +151,3 @@ var __vue_staticRenderFns__ = []; | ||
/* module identifier */ | ||
var __vue_module_identifier__ = "data-v-553d6282"; | ||
var __vue_module_identifier__ = "data-v-6ebf0d2e"; | ||
/* functional template */ | ||
@@ -137,0 +154,0 @@ var __vue_is_functional_template__ = false; |
{ | ||
"name": "@iamhammad/vue-demo-1", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"private": false, | ||
@@ -58,4 +58,6 @@ "description": "A demo version for custom plugins in vue js", | ||
}, | ||
"rules": {} | ||
"rules": { | ||
"vue/multi-word-component-names": "off" | ||
} | ||
} | ||
} |
18116
359