File tree Expand file tree Collapse file tree 3 files changed +73
-51
lines changed Expand file tree Collapse file tree 3 files changed +73
-51
lines changed Original file line number Diff line number Diff line change @@ -40,30 +40,36 @@ export default {
4040 openInCodeSandBox : "在 CodeSandBox 中编辑" ,
4141 } ,
4242 completeDemo : {
43- dataRowsOption : [
44- {
45- value : 5000 ,
46- label : "5000 行" ,
47- } ,
48- {
49- value : 10000 ,
50- label : "10,000 行" ,
51- } ,
52- {
53- value : 100000 ,
54- label : "100,000 行" ,
55- } ,
56- {
57- value : 150000 ,
58- label : "150,000 行" ,
59- } ,
60- ] ,
61- dataRows : "数据量:" ,
62- columnFixed : "列固定:" ,
63- loading : "Loading:" ,
64- expand : "行展开:" ,
65- radio : "行单选:" ,
66- checkbox : "行多选:" ,
43+ demo1 : {
44+ selection : "这是数据表格的应用场景" ,
45+ dataRowsOption : [
46+ {
47+ value : 5000 ,
48+ label : "5000 行" ,
49+ } ,
50+ {
51+ value : 10000 ,
52+ label : "10,000 行" ,
53+ } ,
54+ {
55+ value : 100000 ,
56+ label : "100,000 行" ,
57+ } ,
58+ {
59+ value : 150000 ,
60+ label : "150,000 行" ,
61+ } ,
62+ ] ,
63+ dataRows : "数据量:" ,
64+ columnFixed : "列固定:" ,
65+ loading : "Loading:" ,
66+ expand : "行展开:" ,
67+ radio : "行单选:" ,
68+ checkbox : "行多选:" ,
69+ } ,
70+ demo2 : {
71+ selection : "当然,你也可以把它当做 Excel 来用" ,
72+ } ,
6773 } ,
6874 } ,
6975 en : {
@@ -103,30 +109,37 @@ export default {
103109 openInCodeSandBox : "Edit in CodeSandBox" ,
104110 } ,
105111 completeDemo : {
106- dataRowsOption : [
107- {
108- value : 5000 ,
109- label : "5000 Rows" ,
110- } ,
111- {
112- value : 10000 ,
113- label : "10,000 Rows" ,
114- } ,
115- {
116- value : 100000 ,
117- label : "100,000 Rows" ,
118- } ,
119- {
120- value : 150000 ,
121- label : "150,000 Rows" ,
122- } ,
123- ] ,
124- dataRows : "Data Rows:" ,
125- columnFixed : "Fixed Columns:" ,
126- loading : "Loading:" ,
127- expand : "Row Expand:" ,
128- radio : "Row Radio:" ,
129- checkbox : "Row Checkbox:" ,
112+ demo1 : {
113+ selection : "Here is a data grid ." ,
114+ dataRowsOption : [
115+ {
116+ value : 5000 ,
117+ label : "5000 Rows" ,
118+ } ,
119+ {
120+ value : 10000 ,
121+ label : "10,000 Rows" ,
122+ } ,
123+ {
124+ value : 100000 ,
125+ label : "100,000 Rows" ,
126+ } ,
127+ {
128+ value : 150000 ,
129+ label : "150,000 Rows" ,
130+ } ,
131+ ] ,
132+ dataRows : "Data Rows:" ,
133+ columnFixed : "Fixed Columns:" ,
134+ loading : "Loading:" ,
135+ expand : "Row Expand:" ,
136+ radio : "Row Radio:" ,
137+ checkbox : "Row Checkbox:" ,
138+ } ,
139+ demo2 : {
140+ selection :
141+ "Of course, you can use it like Excel or Google Sheets ." ,
142+ } ,
130143 } ,
131144 } ,
132145} ;
Original file line number Diff line number Diff line change 33 <div class =" site-demo-container" >
44 <div class =" demo-title" >
55 <div class =" demo-title-text" >
6- This is a simple data table display.
6+ {{ currentLocal.demo1.selection }}
77 </div >
88 </div >
99 <NormalDataGrid />
1010 <div class =" demo-title last" >
1111 <div class =" demo-title-text" >
12- Of course, you can also use it like Excel or Google Sheets .
12+ {{ currentLocal.demo2.selection }}
1313 </div >
1414 </div >
1515 <Spreadsheet />
1818</template >
1919
2020<script >
21+ import locale from " ../comp/locale" ;
22+ import I18nMixins from " ../comp/mixins/i18n-mixins" ;
2123import NormalDataGrid from " ./normal-data-grid.vue" ;
2224import Spreadsheet from " ./spreadsheet.vue" ;
2325export default {
@@ -26,9 +28,16 @@ export default {
2628 NormalDataGrid,
2729 Spreadsheet,
2830 },
31+ mixins: [I18nMixins],
2932 data () {
3033 return {};
3134 },
35+ computed: {
36+ // current local
37+ currentLocal () {
38+ return locale[this .currentDocLang ][" completeDemo" ];
39+ },
40+ },
3241};
3342 </script >
3443<style lang="less">
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ export default {
188188 computed: {
189189 // current local
190190 currentLocal () {
191- return locale[this .currentDocLang ][" completeDemo" ];
191+ return locale[this .currentDocLang ][" completeDemo" ][ " demo1 " ] ;
192192 },
193193
194194 // tableScrollWidth
You can’t perform that action at this time.
0 commit comments