Giter VIP home page Giter VIP logo

Comments (5)

huangshuwei avatar huangshuwei commented on May 23, 2024

你好,可否实现 级联对象显示 如: {field: 'aa.bb.cc',.....}

可以啊,只不过不能放到 data(){return{}} 里,因为这里无法获取到上下文。
猜测你的业务场景是需要动态创建columns信息,那么你可以把拼接columns对象的逻辑放到 methods

from vue-easytable.

hujunhain avatar hujunhain commented on May 23, 2024

不是动态columns,只是数据单元格对象里面还包含对象。只是觉得放到methods中,有编辑就要两次拼接,稍显麻烦。

from vue-easytable.

huangshuwei avatar huangshuwei commented on May 23, 2024

放到data 里不行的,这是vuejs 的限制

from vue-easytable.

hujunhain avatar hujunhain commented on May 23, 2024

好的

from vue-easytable.

hujunhain avatar hujunhain commented on May 23, 2024

在获取值的时候由:item[colField] 改为如下方法可以应付我目前的状况
getItemValue(item,colField){
let value = item
let colArr=colField.split(".");
for(let i=0;i<colArr.length;i++){
value = value[colArr[i]]
if(!value) return;
}
return value
},

from vue-easytable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.