在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/ HTML問(wèn)答
久不遇 回答

上傳文件你可以分塊啊 用plupload 前端控制進(jìn)度 下次打開頁(yè)面可以重新繼續(xù)上傳

笑浮塵 回答

不太可能,一定是其它地方出了問(wèn)題,建議好好測(cè)一下。

安若晴 回答

路由不是在入口文件已經(jīng)引好了嗎?
就是你生成項(xiàng)目的時(shí)候選擇帶vuerouter的

store的創(chuàng)建代碼呢?有l(wèi)ogin?
const store = createStore(
reducer
)

賤人曾 回答

23333,你這個(gè)是最經(jīng)典的函數(shù)防抖應(yīng)用場(chǎng)景。

使函數(shù)在一定的時(shí)間內(nèi)不被再調(diào)用后執(zhí)行。

也就是說(shuō),當(dāng)你觸發(fā)scroll或者change時(shí),不要直接去修改數(shù)據(jù),而是添加一個(gè)定時(shí)器來(lái)執(zhí)行修改數(shù)據(jù)的操作,在下次觸發(fā)函數(shù)時(shí),清除這個(gè)定時(shí)器,然后重新設(shè)置定時(shí)器。

或者說(shuō)用函數(shù)節(jié)流的方式也可以實(shí)現(xiàn)你的效果。

// 函數(shù)節(jié)流的實(shí)現(xiàn)方案
let throttleIdentify = 0
$dragable.addEventListener('mousemove', () => {
  if (throttleIdentify) return
  throttleIdentify = setTimeout(() => throttleIdentify = 0, 500)
  console.log('trigger')
})

// 函數(shù)防抖方案
let debounceIdentify = 0
window.addEventListener('resize', () => {
  debounceIdentify && clearTimeout(debounceIdentify)
  debounceIdentify = setTimeout(() => {
    console.log('trigger')
  }, 300)
})

看選擇咯,目的都是限制函數(shù)執(zhí)行的頻率。
這里有一篇之前的博客可以參考:函數(shù)節(jié)流與函數(shù)防抖

焚音 回答

編譯成什么了?如果有C風(fēng)格的API的話,可以用ffi。

祉小皓 回答

可以的啊,參考文檔,改變一下里面的參數(shù)

喵小咪 回答

我的邏輯是這樣的,就是自己保存進(jìn)了state,再?gòu)牟煌缑嫒〕鰏tate的數(shù)據(jù)

    <template>
        <div class="single" ref="single">
            <div class="beforeContent">
                <h2 v-show="this.biaoti.length>0" v-html="this.biaoti[0]"></h2>
                <p class="ppp" v-html="this.biaotiNeirong[0]"></p>
                <el-button type="primary" @click="back">編輯</el-button>
            </div>
            
            <div class="titleWrapper">
                <div class="top">
                    <p>1、"index"</p>
                    <p>必填</p>
                    <!--單選標(biāo)題部分-->
                    <el-form :model="ruleForm3" :rules="rules3" ref="ruleForm3" class="demo-ruleForm">
                          <el-form-item label="編輯選項(xiàng)標(biāo)題信息" prop="singleTit">
                            <el-input v-model="ruleForm3.singleTit" placeholder="請(qǐng)輸入選項(xiàng)標(biāo)題信息"></el-input>
                          </el-form-item>
                         <el-form-item>
                            <el-button type="primary" @click="submitForm3('ruleForm3')">完成</el-button>
                            <el-button @click="resetForm3('ruleForm3')">重置</el-button>
                          </el-form-item>
                    </el-form>
                    
                    <p style="margin:10px 0 5px;">添加圖片 <small style="font-size:13px;color:gray;">[選填]</small></p>
                    <!--添加圖片上傳功能-->
                    <div style="border: 1px dashed red;" class="imgAdd">
                        <el-upload
                          :action="imgURL"
                          list-type="picture-card"
                          :on-preview="handlePictureCardPreview"
                          :on-remove="handleRemove"
                          :before-upload="beforeAvatarUpload"
                          :on-success="handleAvatarSuccess">
                          <i class="el-icon-plus"></i>
                        </el-upload>
                        <el-dialog :visible.sync="dialogVisible">
                                <img width="120%" :src="dialogImageUrl" alt="">
                        </el-dialog>
                    </div>

                    <!--編輯選項(xiàng)內(nèi)容部分-->
                    
                    <!--單選框表單部分-->
                    <el-form :model="dynamicValidateForm" ref="dynamicValidateForm" class="demo-dynamic">
                          
                          <el-form-item
                            v-for="(domain, index) in dynamicValidateForm.domains"
                            :label="'編輯選項(xiàng)內(nèi)容' + `${index+1}`"
                            :key="domain.key"
                            :prop="'domains.' + index + '.value'"
                            :rules="[
                                { required: true, message: '請(qǐng)輸入提示信息', trigger: 'blur' },
                                { min: 1, max: 5, message: '長(zhǎng)度在 3 到 5 個(gè)字符', trigger: 'blur' }
                              ]"
                          >
                            <el-input v-model="domain.value" placeholder="請(qǐng)輸入選項(xiàng)內(nèi)容"></el-input>
                                {{domain.value}}
                            <div class="imgIcon">
                                <div class="to-delete">
                                    <i class="iconfont toDelete" @click.prevent="removeDomain(domain)">&#xe602;</i>
                                </div>
                            </div>
                            <!--
                                <p>增刪變序功能</p>
                            <div class="imgIcon">
                                <div class="to-down">
                                    <i class="iconfont toDown">&#xe601;</i>
                                </div>
                                <div class="to-top">
                                    <i class="iconfont toTop">&#xe603;</i>
                                </div>
                                <div class="to-delete">
                                    <i class="iconfont toDelete">&#xe602;</i>
                                </div>
                            </div>
                            -->
                          </el-form-item>
                          
                          <el-form-item>
                                <el-button @click="addDomain" type="primary">新增選項(xiàng)</el-button>
                                 <el-button @click="submitForm6('dynamicValidateForm')" type="primary">完成</el-button>
                                <el-button @click="resetForm6('dynamicValidateForm')" style="margin-top:10px;">重置單選</el-button>
                                <el-button @click="submitAll" type="primary" style="margin-top:10px;">提交</el-button>
                          </el-form-item>
                    </el-form>
                    
                    
                    
                </div>
            </div>
            
            
            
            <span style="font-size:13px;">當(dāng)患者填寫完成后,提示患者:</span>
            
            <p class="gray">{{this.tishi[0]}}</p>
            
            <div class="button" style="text-align:right;">
                <router-link to="/Head/title">
                    <el-button type="primary" @click="back">編輯</el-button>
                </router-link>
            </div>
            
            
        </div>
    </template>

    <script type="text/ecmascript-6">

        import '@/common/js/mockCommon'
        import {mapMutations,mapGetters} from 'vuex'
        
        let reg = /^.{1,20}$/
        
        
        
        export default {

            props: {
                right: {
                    type: String
                }
                
            },
            data() {
                return{    
                    flag: false,
                    flagger: false,
                    dialogImageUrl: '',
                    dialogVisible: false,
                    imgURL: 'http://mockjs.com/dist/mock',
                    imageUrl: '',
                    imageNum: 0 ,
                    dynamicValidateForm: {
                      domains: [{
                        value: ''
                      }]
                    },
                    ruleForm3: {
                        singleTit: ''
                        
                    },

                    rules3: {
                        singleTit: [
                            { required: true, message: '請(qǐng)輸入標(biāo)題名稱', trigger: 'blur' },
                            { min: 1, max: 5, message: '長(zhǎng)度在 3 到 5 個(gè)字符', trigger: 'blur' }
                        ]
                    }
                    

                    
                    
                }
                
            },
            computed: {

                ...mapGetters([
                    'biaoti',
                    'biaotiNeirong',
                    'tishi',
                    'danxuan',
                    'danxuanBiaoti',
                    'danxuanXiang',
                    'imgurlDan'
                ])
                    
                
            },
            mounted() {
                this.$nextTick(() => {
                    this._neiStyle();
                    
                    
                    
                })
                
            },
            methods: {
                
                /*上傳圖片部分*/
                handleAvatarSuccess(res, file) {
                   this.imageUrl = URL.createObjectURL(file.raw);
                   console.log(this.imageUrl);
                   this.addimgurlDan(this.imageUrl)
       
                },
                beforeAvatarUpload(file) {
                    const isJPG = file.type === 'image/jpeg';
                    const isGIF = file.type === 'image/gif';
                    const isPNG = file.type === 'image/png';
                    const isBMP = file.type === 'image/bmp';
                    const isLt2M = file.size / 1024 / 1024 < 2;
                    if (!isJPG && !isGIF && !isPNG && !isBMP) {
                        this.$message.error('上傳圖片必須是JPG/GIF/PNG/BMP 格式!');
                    }
                    if (!isLt2M) {
                        this.$message.error('上傳圖片大小不能超過(guò) 2MB!');
                    }
                    this.imageNum++;
                    if(this.imageNum>3){
                           this.$message.error('最多只能上傳3張圖片');
                        return (!isJPG || !isBMP || !isGIF || !isPNG) && !isLt2M;
                    }
                   return (isJPG || isBMP || isGIF || isPNG) && isLt2M;
                },
                handleRemove(file, fileList) {
                    this.cutimgurlDan(this.imageUrl);
                    this.imageNum--;
                    console.log(file, fileList);
                },
                handlePictureCardPreview(file) {
                    this.dialogImageUrl = file.url;
                    this.dialogVisible = true;
                },
                
                //頁(yè)面剛剛加載完成執(zhí)行的部分
                _neiStyle(){
                    this.$refs.single.style.width = this.right;
                    this.addDomain();
                    
                },
                back() {
                    this.$router.push('/Head/title');

                },
                
                chooseImg() {

                    axios.get('http://mockjs.com/dist/mock').then((res) => {
                        console.log(res)
                    })
                    
                },
                
                //單選標(biāo)題
                submitForm3(formName) {
                    this.$refs[formName].validate((valid) => {
                      if (valid) {
                           this.$message.success('提交成功');
                        console.log(this.ruleForm3.singleTit); 
                        this.adddanxuanBiaoti(this.ruleForm3.singleTit);
                        this.flag = true;
                      } else {
                        this.$message.error('提交失敗');
                        this.flag = false;
                        return false;
                      }
                    });

                },

                resetForm3(formName) {
                    this.flag = false;
                    this.cutdanxuanBiaoti(this.ruleForm3.singleTit);
                    this.$refs[formName].resetFields();
                  },
                  //單選選項(xiàng)部分
                  submitForm6(formName) {
                    this.$refs[formName].validate((valid) => {
                      if (valid) {
                        this.$message.success('提交成功');
                        this.addSucesess();
                        this.flagger = true;
                      } else {
                        this.$message.error('提交失敗');
                        this.flagger = false;
                        return false;
                      }
                    });
                },
                addSucesess() {    
                       let index = this.dynamicValidateForm.domains.length
                       let domains = this.dynamicValidateForm.domains
                       for(index in domains){
                           //console.log(domains[index].value)
                           this.adddanxuanXiang(domains[index].value)
                       }    
                   },
                resetForm6(formName) {
                    this.cutdanxuanXiang(this.danxuanXiang);    
                    this.$refs[formName].resetFields();
                  },
                  //整體提交
                  submitAll() {
                      if(this.flag === true && this.flagger){
                           this.adddanXuan(this.danxuanBiaoti)
                           this.adddanXuan(this.imgurlDan)
                           this.adddanXuan(this.danxuanXiang)
                       }else{
                           this.$message.error('提交失敗,請(qǐng)檢查提交信息!');    
                       }
                       console.log(this.dynamicValidateForm.domains)
                  },
                  
                removeDomain(item) {
                    var index = this.dynamicValidateForm.domains.indexOf(item)
                    console.log(index);
                    if (index !== -1) {
                      this.dynamicValidateForm.domains.splice(index, 1)
                    }
                },
                addDomain() {
                    if(this.dynamicValidateForm.domains.length>2){
                        this.$message.error('單選最多只能添加3個(gè)選項(xiàng)')
                        return
                    }
                    this.dynamicValidateForm.domains.push({
                      value: '',
                      key: Date.now()
                    });
                },
               
                   
                   ...mapMutations({
                       adddanXuan: 'ADD_DANXUAN',
                       adddanxuanBiaoti: 'ADD_DANXUANBIAOTI',
                       adddanxuanXiang: 'ADD_DANXUANXIANG',
                       addimgurlDan: 'ADD_IMGURLDAN',
                       cutdanXuan: 'CUT_DANXUAN',
                       cutdanxuanBiaoti: 'CUT_DANXUANBIAOTI',
                       cutdanxuanXiang: 'CUT_DANXUANXIANG',
                       cutimgurlDan: 'CUT_IMGURLDAN'
                       
                   })
                
                
                
                
                
            },
            components: {
                
                
            }
            
            

        }


</script>
枕邊人 回答

nameTextStyle.padding 可以控制其位置,多看看 echarts 文檔

yAxis: {
    type: 'value',
    name: '數(shù)量',
    nameTextStyle: {
        padding: [0, 0, -50, 50]
    }
}
痞性 回答

利用canvas獲取圖片像素值,然后對(duì)像素進(jìn)行采樣,然后就不用我說(shuō)了吧?


那就把計(jì)算像素的工作交給后端,后端計(jì)算好了把圖片和結(jié)果一起返回給前端。不過(guò)這樣就得改api了,前一種方法實(shí)際上也得改api??梢栽黾咏涌冢桓膭?dòng)現(xiàn)有接口(但實(shí)現(xiàn)還是要改),每次隨機(jī)獲取圖片后后端就在session中記錄這個(gè)會(huì)話上一次獲取的圖片的唯一id,然后再提供一個(gè)接口獲取上一次隨機(jī)的圖片,或者上一次隨機(jī)的圖片的平均像素值。

逗婦乳 回答

你每次遞歸進(jìn)去都用的是函數(shù)外面的 變量 j,這樣做是錯(cuò)的。

你應(yīng)該在函數(shù)里面定義 j

笨小蛋 回答

\B匹配非單詞邊界;
\d匹配一個(gè)數(shù)字;
+是量詞,表示前面的內(nèi)容重復(fù)1到多次
?=是預(yù)言,表示這個(gè)位置后面的內(nèi)容需要滿足的條件,注意只是匹配一個(gè)位置,并不匹配具體的字符,所以是零寬;
?!也是預(yù)言,表示這個(gè)位置后面的內(nèi)容不能滿足的條件,注意也只是匹配一個(gè)位置,并不匹配具體的字符,所以也是零寬;

\d{3}匹配三個(gè)數(shù)字,+表示前面的內(nèi)容重復(fù)1到多次,所以(\d{3})+表示三個(gè)數(shù)字1到多次,也就是3,6,9...3的倍數(shù)個(gè)數(shù)字的字符串;
(?!\d)匹配一個(gè)位置,這個(gè)位置后面不是數(shù)字
(?=(\d{3})+(?!\d))匹配一個(gè)位置,這個(gè)位置后面首先是3的倍數(shù)個(gè)數(shù)字的字符串,接下來(lái)的位置不是數(shù)字
/\B(?=(\d{3})+(?!\d))/g就是全局匹配一個(gè)位置,這個(gè)位置是非單詞邊界,然后后面是3的倍數(shù)個(gè)數(shù)字,然后是非數(shù)字。

比如,字符串ad12345678abs,這個(gè)正則匹配的位置就是2后面的位置,5后面的位置。2后面6(3 * 2)個(gè)數(shù)字,5后面有3(3 * 1)個(gè)數(shù)字。

吃藕丑 回答

可以啊,index就是你傳入的dataSource數(shù)組的下標(biāo)啊

薄荷綠 回答

select a.*,a.salary-b.salary as diff from salaries a left join salaries b on a.from_date=b.to_date where a.emp_no=10001 and b.emp_no=10001 order by from_date;


**行轉(zhuǎn)列很容易,自己百度下就行,但我覺(jué)得意義不大,你大可以在頁(yè)面展現(xiàn)的時(shí)候?qū)崿F(xiàn),而不是糾結(jié)于sql語(yǔ)句。**

background-size需要放到background系列的最后寫才會(huì)生效,另外background-size的屬性及效果你要明白,然后設(shè)置為你想要的結(jié)果