美文网首页
面试题-最后以自己名字.html的形式交给我

面试题-最后以自己名字.html的形式交给我

作者: 大佬_娜 | 来源:发表于2020-04-01 11:36 被阅读0次


1.实现以下方法
function timeFun(时间间隔分,开始时间)
timeFun (5, 2020-04-01 00:00)
结果 [‘00:00’,‘00:05’,‘00:10’] 返回10条数据

2.给出两数组arr1,arr2,最后实现为newArr的结果

newarr = [
  { time: '10:00',value: '1-1',value1: '2-1'}
  { time: '10:02',value: '1-3',value1: '2-2'}
]
const arr1 = [
  { time: '10:00', value: '1-1'},
  { time: '10:01', value: '1-2'},
  { time: '10:02', value: '1-3'}
]
const arr2 = [
  { time: '10:00', value: '2-1'},
  { time: '10:02', value: '2-2'},
  { time: '10:04', value: '2-3'}
]

3.给出两数组a,b,最后实现结果

[
  {id:'1',"checkList":["1121"]},
  {id:'2',"checkList":["3322,3321"]}
]
var  a = [
  {id:'1',  'checkList':[]},
  {id:'2',  'checkList':[]},
  {id:'3',  'checkList':[]},
var b = [
    {id:'1',"checklist":"1121"},
    {id:'2',,"checklist":"3322,3321"},
];

4.网络协议有几层 http在那层
5.vue 实现添加 删除方法;

<template>
  <div>
      <el-select v-model="value" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
      </el-select>
      <el-button @click="handleDel">删除</el-button>
      <el-button @click="handleAdd">添加</el-button>
  </div>
</template>

<script>
export default {
  data(){
    return {
      options: [{
          value: '选项1',
          label: '黄金糕'
        }, {
          value: '选项2',
          label: '双皮奶'
        }, {
          value: '选项3',
          label: '蚵仔煎'
        }],
        value: ''
    }
  },
  methods: {
    handleDel() {
      // 当前选中的删除
    },
    handleAdd() {
      //{value: '选项4', label: '龙须面' }   添加此条数据,并且添加的这条数据是不可点击状态
    }
  }
}
</script>

相关文章

网友评论

      本文标题:面试题-最后以自己名字.html的形式交给我

      本文链接:https://www.haomeiwen.com/subject/huuouhtx.html