侧边栏壁纸
  • 累计撰写 781 篇文章
  • 累计创建 1 个标签
  • 累计收到 1 条评论
标签搜索

Vue 精彩代码

Dettan
2021-04-10 / 0 评论 / 0 点赞 / 93 阅读 / 1,068 字
温馨提示:
本文最后更新于 2022-04-30,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。
this.$nextTick(() => {
  // 初始化Textarea编辑开关
  $vm.editableTextarea();
});

data() {
return {
s_scrollStyle: (() => {
return this.scrollStyle;
})(), // props 是否渲染滚动条样式
s_preview_switch: (() => {
let default_open_ = this.defaultOpen;
if (!default_open_) {
default_open_ = this.subfield ? "preview" : "edit";
}
return default_open_ === "preview" ? true : false;
})(), // props true 展示编辑 false展示预览
}
}

const { count, dataSource } = this
const newData = {
  key: count,
  name: `Edward King ${count}`,
  age: 32,
  address: `London, Park Lane no. ${count}`,
}
this.dataSource = [...dataSource, newData]
this.count = count + 1



onDelete (key) {
  const dataSource = [...this.dataSource]
  this.dataSource = dataSource.filter(item => item.key !== key)
},


<a-button class="editable-add-btn" @click="handleAdd">Add</a-button>
            <div style="color: inherit; fill: inherit;">
                <div style="display: flex;">

<select class="form-control" v-model="select1">
    <option v-for="type in types" v-bind:value="type.name">
        {{type.name}}
    </option>
</select>
0

评论区