Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div id="app">
  <h1 class="text-center mb-5">
    <a href="" target="_blank">v-region</a>
  <div class="text-center">The region selector for Vue2</div>
  <p class="text-center">Example version: <strong>v2.2.2</strong></p>
  <p>Regular form element with select tag</p>
  <v-region :town="true"></v-region>

  <p>Display initialized region info by Plain Text</p>
  <div class="text-container">
    <v-region :town="true" type="text" v-model="selected">

  <p>Tab group</p>

  <div class="bg-light p-3 mb-3">
    <strong>v-model value</strong>
    <pre class="m-0 mb-3" v-text="JSON.stringify(modelGroup, null, 2)"></pre>
    <strong>values event return</strong>
    <pre class="m-0" v-text="JSON.stringify(valuesGroup, null, 2)"></pre>
  <!-- customize region selector toggle, remove the button to use default toggle  -->
  <h5 class="mt-3">自定义呼出按钮</h5>
  <p>Custom v-region toggle</p>
  <v-region type="group" >
    <template #default="{ region, show }">
      <button type="button" class="btn btn-primary">
        show: {{show}}

  <p>Column group</p>
  <v-region type="column" @values="regionChange" >

  <p>City picker</p>
  <v-region type="city" :city-picker="true" >

<div class="blankSpace">


    padding: 50px;
.blankSpace {
    height: 500px;
    background-color: #eee;
    padding: 20px;
    border-radius: 4px;



new Vue({
  el: "#app",
  data() {
    return {
      btnText: 'please select',
      selected: {
          province: '350000',
          city: '350100',
          area: '350104',
          town: '350104008'
      modelGroup: {},
      valuesGroup: {}
  methods: {
    regionChange(d) {
      this.valuesGroup = d
    resultText (region) {
      if (!Object.values(region).some(val => val) || !region) return 'null'
      return Object.values(region).filter(val => val).map(val => val.value).join(',')