Answer the question
In order to leave comments, you need to log in
How to change the variables of the imported component and get to them from the children?
Good afternoon.
I import datepicker from China. Imported. Works. Only hieroglyphs interfere. If you register the local object in the child component, then the translation works. How to register it globally and refer to it?
main.js
import VueDatepickerLocal from "vue-datepicker-local";
Vue.use(VueDatepickerLocal);
new Vue({
el: "#app",
router,
store,
template: "<App/>",
components: {
App
},
data: {
local: { // <------ НЕ РАБОТАЕТ ---------<<<
dow: 0, // Sunday is the first day of the week
hourTip: "Select Hour", // tip of select hour
minuteTip: "Select Minute", // tip of select minute
secondTip: "Select Second", // tip of select second
yearSuffix: "", // suffix of head year
monthsHead: "January_February_March_April_May_June_July_August_September_October_November_December".split(
"_"
), // months of head
months: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), // months of panel
weeks: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), // weeks,
cancelTip: "cancel",
submitTip: "confirm"
}
}
<vue-datepicker-local v-model="time" :local="local" /> // как добраться до объект local обвяленного в main.js???
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question