zoukankan      html  css  js  c++  java
  • 一些我常用的css 或者 js

      三角形
    0; height: 0; border- 10px; border-color: transparent transparent red transparent; border-style: dashed dashed solid dashed

     

    图片自适应   
    .img-box { 18%; margin: 0 2% 0 0; background-size: cover; background-position: 50% 50%; &::before { content: ""; display: block; 100%; padding-top: 100%; } }

      

    对象变数组(用的vue 里的lodash)
    [].concat(this.CategoryId)

      

    数组转字符串  用 arry.json()
    

      

            for (let catItem of catItems) {
              Vue.set(this.categories, `${catItem.Id}`, {})
              Http.$http.get(`v1.1/CompanyCategories/${catItem.Id}?fields=SubCategories`).then((response) => {
                this.categories[`${catItem.Id}`] = response.data
              })
            }
    

      

    vue 用数据加载背景
    <div :style="{ backgroundImage: 'url('+imgSrc+')' }">   js.data  imgSrc:'bt_help_album-
    

      

    添加组件
    
    父组件
    import companyList from './list/index.vue'
    components: {
        companyList
    },
    
    父组件给子组件传参
    
    子组件
    props: {
        item: {
          type: Object
        }
    },
    父组件
    <company-list :item="item"></company-list>
    
    子组件给父组件传参

    子组件 closeSearch() { this.show = false this.$emit('handleShow', this.show); //第一个参数是父组件中v-on绑定的自定义回调方法,第二个参数为传递的参数 }, 父组件 <search @handleShow="changeShow()" :currType="currType" :ActionArgsJson="ActionArgsJson"></search> changeShow(show) { this.show = show; },

      

  • 相关阅读:
    hdu 4107 Gangster 线段树(成段更新)
    hdu 3037 Saving Beans (lucas定理)
    hdu 3944 DP? (Lucas 定理)
    hdu 5038 Grade 水
    ASP.NET Core 配置 MVC
    ASP.NET Core 静态文件
    ASP.NET Core 异常和错误处理
    ASP.NET Core 中间件
    ASP.NET Core 项目配置 ( Startup )
    ASP.NET Core 基本项目目录结构
  • 原文地址:https://www.cnblogs.com/beiqi/p/9473241.html
Copyright © 2011-2022 走看看