# Called in the template Data Functions in
Due to the current glass-easel The component framework is available only for Skyline Rendering engineThese features are also limited.
if Data A field in is a function that can be called directly in the template:
Component({
data: {
getDataField() {
return 'someValue'
},
},
})
<view>{{ getDataField() }}</view>
Although this can sometimes be convenient, abuse is not recommended in practice.
From a code maintainability perspective, Data
The content should be strongly related to the data content. If the main purpose of the function is to preprocess the presentation of data, it is recommended to use WXS To inline the function implementation in the template.