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

fix(build): 1:windows环境反斜杠导致的几个问题;2:props中使用模板字符串小程序中props中的值会变成"{{"; #195

Open
wants to merge 3 commits into
base: 0.3.x
Choose a base branch
from

Conversation

kingphone-he
Copy link
Contributor

fix(build): 1:windows环境反斜杠导致的几个问题;2:props中使用模板字符串小程序中props中的值会变成"{{";
fix(core): 1:使用mixins小程序中无效的问题;

@@ -11,7 +11,8 @@ import config from '../config';

export function makeVueCompCreator(getCompMixin) {
return function vueCompCreator(options) {
options.mixins = [getCompMixin(options)];
// 如果 options(vue组件的代码)中已有 mixins,则同时保留 options中的 mixins
options.mixins = (options.mixins || []).concat(getCompMixin(options));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

小程序中用behavior抹平

@@ -75,7 +75,8 @@ export function makeCreatePage(pageMixin, {handleProxy, handleModel}, setData, c
$api
}) {
return function (options) {
options.mixins = [pageMixin];
// 如果 options(vue页面的代码)中已有 mixins,则同时保留 options中的 mixins
options.mixins = (options.mixins || []).concat(pageMixin);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

小程序中用behavior抹平

@@ -108,7 +108,9 @@ module.exports = function (key, value, attrs, node) {
// so only bind values when is not components
// if (type === 3 && !isComp) {
if (type === 3) {
attrs[param] = `{{ ${value} }}`;
// 如果 mars中的 props里使用模板字符串,经过 bable转换之后 value会变成带双引号的字符串拼接
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

模板字符串不考虑支持

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

Successfully merging this pull request may close these issues.

2 participants