File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
page/development/request-interceptor Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1313 :loading =" loading"
1414 :remote-method =" remoteMethod"
1515 :prefix =" field.prefix"
16+ :max-tag-count =" field.maxTagCount"
17+ :max-tag-placeholder =" field.maxTagPlaceholder"
1618 @on-change =" handleChange"
1719 >
1820 <template v-for =" item in computedOptions " >
4648 :filterable =" filterable || false"
4749 :loading =" loading"
4850 :prefix =" field.prefix"
51+ :max-tag-count =" field.maxTagCount"
52+ :max-tag-placeholder =" field.maxTagPlaceholder"
4953 @on-change =" handleChange"
5054 >
5155 <template v-for =" item in computedOptions " >
Original file line number Diff line number Diff line change @@ -94,7 +94,11 @@ const multipleField = {
9494 model : 'city' ,
9595 multiple : true ,
9696 options : '/selectApi' ,
97- defaultValueIndexes : [ 0 , 1 ]
97+ defaultValueIndexes : [ 0 , 1 ] ,
98+ maxTagCount : 2 ,
99+ maxTagPlaceholder ( number ) {
100+ return `+${ number } ...` ;
101+ }
98102 // options: [
99103 // {label: '北京', 'value': 'Beijing'},
100104 // {label: '上海', 'value': 'Shanghai'},
@@ -149,7 +153,11 @@ const filterableAndMultipleField = {
149153 filterable : true ,
150154 multiple : true ,
151155 options : '/selectApi' ,
152- extraOptions : '/selectExtraOptionsApi'
156+ extraOptions : '/selectExtraOptionsApi' ,
157+ maxTagCount : 2 ,
158+ maxTagPlaceholder ( number ) {
159+ return `+${ number } ...` ;
160+ }
153161 // extraOptions: [
154162 // {
155163 // label: '张三',
Original file line number Diff line number Diff line change 4747import iArticle from ' ../../../components/article' ;
4848import inAnchor from ' ../../../components/anchor' ;
4949import iCode from ' ../../../components/code' ;
50- import Demo from ' ../../../components/demo ' ;
50+ import Demo from ' ../../../components/Demo ' ;
5151import Code from ' ../../../code/development/requestInterceptor' ;
5252import axios from ' axios' ;
5353
@@ -68,6 +68,7 @@ export default {
6868 const interceptor = {
6969 reqHandle (conf ) {
7070 let {url, params, method} = conf;
71+ // eslint-disable-next-line no-undef
7172 if (process .env .NODE_ENV === ' production' ) {
7273 url = ` website-data-api${ url} .json` ;
7374 }
@@ -80,6 +81,7 @@ export default {
8081 // product: 'your params',
8182 }
8283 };
84+ // eslint-disable-next-line no-console
8385 console .log (' postData' , postData);
8486 return postData;
8587 },
You can’t perform that action at this time.
0 commit comments