File tree Expand file tree Collapse file tree 3 files changed +8
-20
lines changed
Expand file tree Collapse file tree 3 files changed +8
-20
lines changed Original file line number Diff line number Diff line change 3939 >
4040 <template
4141 slot="day-of-week"
42- slot-scope="{wd , index}">
42+ slot-scope="{ name , index, locale }">
4343 <slot
44- v-bind =" {wd , index}"
44+ v-bind =" { name , index, locale }"
4545 name =" day-of-week" >
46- {{ wd }}
46+ {{ name }}
4747 </slot >
4848
4949 </template >
Original file line number Diff line number Diff line change 77 </div >
88 <div class =" vuec-week-nav vuec-7col" >
99 <div
10- v-for =" (wd , index) in weekDays"
10+ v-for =" (name , index) in weekDays"
1111 :key =" index"
1212 class =" vuec-col" >
1313 <div class =" vuec-week-content" >
1414 <slot
15- v-bind =" {wd , index}"
15+ v-bind =" { name , index, locale }"
1616 name =" day-of-week" >
17- {{ wd }}
17+ {{ name }}
1818 </slot >
1919 </div >
2020 <div class =" vuec-week-placeholder" />
5959import dayjs from ' ../../date' ;
6060
6161import DayView from ' ./day.vue' ;
62- import { weekDays } from ' ../../utils' ;
6362
6463export default {
6564 components: {
@@ -101,7 +100,8 @@ export default {
101100 },
102101 data () {
103102 return {
104- weekDays: weekDays (),
103+ locale: this .date .$locale ().name ,
104+ weekDays: this .date .$locale ().weekdays ,
105105 };
106106 },
107107 computed: {
Original file line number Diff line number Diff line change @@ -41,15 +41,3 @@ export function toEnglishDigits(value) {
4141 . replace ( / [ ۰ - ۹ ] / g, w => w . charCodeAt ( 0 ) - PERSIAN_ZERO_CHAR_CODE )
4242 . replace ( / [ ٠ - ٩ ] / g, w => w . charCodeAt ( 0 ) - ARABIC_ZERO_CHAR_CODE ) ;
4343}
44-
45- export function weekDays ( ) {
46- return [
47- 'شنبه' ,
48- '۱ شنبه' ,
49- '۲ شنبه' ,
50- '۳ شنبه' ,
51- '۴ شنبه' ,
52- '۵ شنبه' ,
53- 'جمعه' ,
54- ] ;
55- }
You can’t perform that action at this time.
0 commit comments