最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

vue中form表單禁用專用組件介紹

 更新時間:2024年01月16日 08:39:24   作者:是文靜的  
這篇文章主要介紹了vue中form表單禁用專用組件,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教

form表單禁用專用組件

JFormContainer.vue

<template>
  <div :class="disabled?'jeecg-form-container-disabled':''">
    <fieldset :disabled="disabled">
      <slot name="detail"></slot>
    </fieldset>
    <slot name="edit"></slot>
    <fieldset disabled>
      <slot></slot>
    </fieldset>
  </div>
</template>


<script>
/**
   * 使用方法
   * 在form下直接寫這個組件就行了,
   *<a-form layout="inline" :form="form" >
   *     <j-form-container :disabled="true">
   *         <!-- 表單內(nèi)容省略..... -->
   *     </j-form-container>
   *</a-form>
   */
export default {
  name: 'JFormContainer',
  props: {
    disabled: {
      type: Boolean,
      default: false,
      required: false
    }
  },
  mounted () {
    console.log('我是表單禁用專用組件,但是我并不支持表單中iframe的內(nèi)容禁用')
  }
}
</script>
<style>
  .jeecg-form-container-disabled{
    cursor: not-allowed;
  }
  .jeecg-form-container-disabled fieldset[disabled] {
    -ms-pointer-events: none;
    pointer-events: none;
  }
  .jeecg-form-container-disabled .ant-select{
    -ms-pointer-events: none;
    pointer-events: none;
  }

  .jeecg-form-container-disabled .ant-upload-select{display:none}
  .jeecg-form-container-disabled .ant-upload-list{cursor:grabbing}
  .jeecg-form-container-disabled fieldset[disabled] .ant-upload-list{
    -ms-pointer-events: auto !important;
    pointer-events: auto !important;
  }

  .jeecg-form-container-disabled .ant-upload-list-item-actions .anticon-delete,
  .jeecg-form-container-disabled .ant-upload-list-item .anticon-close{
    display: none;
  }
</style>
<template>
  <a-form layout="inline" :form="form" >
      <j-form-container :disabled="true">
        <!-- 表單內(nèi)容省略..... -->
        <a-row class="form-row" :gutter="16">
          <a-col :lg="10" :md="10" :sm="20">
            <a-form-item label="文件">
              <a-button> <a-icon type="upload" /> 上傳 </a-button>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row class="form-row" :gutter="16">
          <a-col :lg="10" :md="10" :sm="20">
            <a-form-item label="文件">
              <a-button> <a-icon type="upload" /> 上傳 </a-button>
            </a-form-item>
          </a-col>
        </a-row>
      </j-form-container>
    </a-form>
</template>
<script>
import JFormContainer from '@/components/jeecg/JFormContainer'
export default {
  components: {
    JFormContainer  
  },
  data () {
    return {
      form: this.$form.createForm(this)
    }
  },
  methods: {}
}
</script>

<style scoped>

</style>

總結(jié)

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • vue項目中的類使用方式

    vue項目中的類使用方式

    這篇文章主要介紹了vue項目中的類使用方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-03-03
  • vue中數(shù)據(jù)字典dicts的簡單說明和用法介紹

    vue中數(shù)據(jù)字典dicts的簡單說明和用法介紹

    這篇文章主要給大家介紹了關(guān)于vue中數(shù)據(jù)字典dicts的簡單說明和用法的相關(guān)資料,如果您想在Vue中使用字典查詢,您可以使用Vue的計算屬性和方法,文中通過代碼介紹的非常詳細,需要的朋友可以參考下
    2024-01-01
  • vue項目如何實現(xiàn)ip和localhost同時訪問

    vue項目如何實現(xiàn)ip和localhost同時訪問

    這篇文章主要介紹了vue項目如何實現(xiàn)ip和localhost同時訪問,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-10-10
  • vue elementui tree 任意級別拖拽功能代碼

    vue elementui tree 任意級別拖拽功能代碼

    這篇文章主要介紹了vue elementui tree 任意級別拖拽功能代碼,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2020-08-08
  • 如何基于Vue3封裝一個好用的Websocket

    如何基于Vue3封裝一個好用的Websocket

    這篇文章主要給大家介紹了關(guān)于如何基于Vue3封裝一個好用的Websocket的相關(guān)資料,在Vue3中我們可以將Websocket類封裝成一個Vue插件,以便全局使用,需要的朋友可以參考下
    2023-09-09
  • Vue3中結(jié)合ElementPlus實現(xiàn)彈窗的封裝方式

    Vue3中結(jié)合ElementPlus實現(xiàn)彈窗的封裝方式

    這篇文章主要介紹了Vue3中結(jié)合ElementPlus實現(xiàn)彈窗的封裝方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-01-01
  • vue項目打包后上傳至GitHub并實現(xiàn)github-pages的預(yù)覽

    vue項目打包后上傳至GitHub并實現(xiàn)github-pages的預(yù)覽

    這篇文章主要介紹了vue項目打包后上傳至GitHub并實現(xiàn)github-pages的預(yù)覽,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-05-05
  • 基于Vue-cli快速搭建項目的完整步驟

    基于Vue-cli快速搭建項目的完整步驟

    這篇文章主要給大家介紹了關(guān)于如何基于Vue-cli快速搭建項目的完整步驟,文中通過示例代碼以及圖片將搭建的步驟一步步介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2018-11-11
  • Vue實現(xiàn)嵌套菜單組件

    Vue實現(xiàn)嵌套菜單組件

    這篇文章主要為大家詳細介紹了Vue實現(xiàn)嵌套菜單組件,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-07-07
  • 詳解Vue如何進行表單聯(lián)動與級聯(lián)選擇

    詳解Vue如何進行表單聯(lián)動與級聯(lián)選擇

    表單聯(lián)動和級聯(lián)選擇是Vue.js中常見的功能,在下面的文章中,我們將討論如何在Vue.js中實現(xiàn)表單聯(lián)動和級聯(lián)選擇,感興趣的小伙伴可以了解一下
    2023-06-06

最新評論

黔江区| 金湖县| 宜州市| 东光县| 龙里县| 霍林郭勒市| 林口县| 余干县| 永泰县| 牡丹江市| 东源县| 蚌埠市| 毕节市| 晋州市| 泽库县| 彭州市| 济阳县| 广德县| 英超| 和田县| 安龙县| 霞浦县| 上杭县| 金平| 两当县| 林周县| 皋兰县| 白河县| 洱源县| 内江市| 海城市| 云南省| 抚顺市| 临沭县| 宝山区| 珲春市| 溧阳市| 田阳县| 元江| 静乐县| 尚志市|