0

I am using elementUI's pagination component in my VueJS app.

I wish to replace the default 'Go to' text to 'Page' without altering the inner div:

<span class="el-pagination__jump">
   Go to
   <div class="el-input el-pagination__editor is-in-pagination">
      <!----><input type="number" autocomplete="off" min="1" max="6" class="el-input__inner"><!----><!----><!---->
   </div>
</span>

How can I do this? Do I have access to the DOM?

Thanks.

1 Answer 1

1

You can play with the localization settings. Since the default locale is Chinese, I assume you are already doing this in your main.js

import localeUI from 'element-ui/lib/locale'
import defaultLang from 'element-ui/lib/locale/lang/en' 
localeUI.use(defaultLang); 

So you have to clone the English locale, modify the el.pagination.goto value and then use this new locale.

Sign up to request clarification or add additional context in comments.

2 Comments

How do I use the new locale file? I am just replacing the PATH for defaultLang?
Yes, you point it to the modified locale file. Perhaps you can also try to still import the original, then modify it in-memory before the localeUI.use() call

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.