Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

San模板编译时使用css module 未生效 #503

Closed
zhuguoxi opened this issue Jun 9, 2020 · 1 comment
Closed

San模板编译时使用css module 未生效 #503

zhuguoxi opened this issue Jun 9, 2020 · 1 comment

Comments

@zhuguoxi
Copy link
Member

zhuguoxi commented Jun 9, 2020

<template>
    <div class="{{style.box}}">
    </div>
</template>
<script>

export default {
    computed: {
    }
}
</script>
<style module="style">
    .box {
        width: 100px;
        height: 100px;
        background-color: brown;
    }
</style>

在包含 computed 属性时,san component优先使用自身属性,忽略了类静态属性
https://github.com/baidu/san/blob/master/src/view/component.js#L83

@errorrik
Copy link
Contributor

为了保证性能,san不会在初始化时候去assign prototype 和 Component 中的computed。你用的哪个loader,请loader解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants