mirror of https://github.com/sveltejs/svelte
parent
64094f631f
commit
4e004fdfa3
@ -1,5 +0,0 @@
|
|||||||
export default {
|
|
||||||
options: {
|
|
||||||
legacy: true
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,68 +0,0 @@
|
|||||||
/* generated by Svelte vX.Y.Z */
|
|
||||||
import {
|
|
||||||
SvelteComponent,
|
|
||||||
attr,
|
|
||||||
detach,
|
|
||||||
element,
|
|
||||||
init,
|
|
||||||
insert,
|
|
||||||
noop,
|
|
||||||
safe_not_equal,
|
|
||||||
space
|
|
||||||
} from "svelte/internal";
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
var div0, t, div1;
|
|
||||||
|
|
||||||
return {
|
|
||||||
c() {
|
|
||||||
div0 = element("div");
|
|
||||||
t = space();
|
|
||||||
div1 = element("div");
|
|
||||||
attr(div0, "data-foo", "bar");
|
|
||||||
attr(div1, "data-foo", ctx.bar);
|
|
||||||
},
|
|
||||||
|
|
||||||
m(target, anchor) {
|
|
||||||
insert(target, div0, anchor);
|
|
||||||
insert(target, t, anchor);
|
|
||||||
insert(target, div1, anchor);
|
|
||||||
},
|
|
||||||
|
|
||||||
p(changed, ctx) {
|
|
||||||
if (changed.bar) {
|
|
||||||
attr(div1, "data-foo", ctx.bar);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
|
|
||||||
d(detaching) {
|
|
||||||
if (detaching) {
|
|
||||||
detach(div0);
|
|
||||||
detach(t);
|
|
||||||
detach(div1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let { bar } = $$props;
|
|
||||||
|
|
||||||
$$self.$set = $$props => {
|
|
||||||
if ('bar' in $$props) $$invalidate('bar', bar = $$props.bar);
|
|
||||||
};
|
|
||||||
|
|
||||||
return { bar };
|
|
||||||
}
|
|
||||||
|
|
||||||
class Component extends SvelteComponent {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Component;
|
|
@ -1,6 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let bar;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div data-foo='bar'/>
|
|
||||||
<div data-foo='{bar}'/>
|
|
@ -1,66 +0,0 @@
|
|||||||
/* generated by Svelte vX.Y.Z */
|
|
||||||
import {
|
|
||||||
SvelteComponent,
|
|
||||||
append,
|
|
||||||
attr,
|
|
||||||
detach,
|
|
||||||
init,
|
|
||||||
insert,
|
|
||||||
noop,
|
|
||||||
safe_not_equal,
|
|
||||||
svg_element
|
|
||||||
} from "svelte/internal";
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
var svg, g0, g1;
|
|
||||||
|
|
||||||
return {
|
|
||||||
c() {
|
|
||||||
svg = svg_element("svg");
|
|
||||||
g0 = svg_element("g");
|
|
||||||
g1 = svg_element("g");
|
|
||||||
attr(g0, "data-foo", "bar");
|
|
||||||
attr(g1, "data-foo", ctx.bar);
|
|
||||||
},
|
|
||||||
|
|
||||||
m(target, anchor) {
|
|
||||||
insert(target, svg, anchor);
|
|
||||||
append(svg, g0);
|
|
||||||
append(svg, g1);
|
|
||||||
},
|
|
||||||
|
|
||||||
p(changed, ctx) {
|
|
||||||
if (changed.bar) {
|
|
||||||
attr(g1, "data-foo", ctx.bar);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
|
|
||||||
d(detaching) {
|
|
||||||
if (detaching) {
|
|
||||||
detach(svg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let { bar } = $$props;
|
|
||||||
|
|
||||||
$$self.$set = $$props => {
|
|
||||||
if ('bar' in $$props) $$invalidate('bar', bar = $$props.bar);
|
|
||||||
};
|
|
||||||
|
|
||||||
return { bar };
|
|
||||||
}
|
|
||||||
|
|
||||||
class Component extends SvelteComponent {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Component;
|
|
@ -1,8 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let bar;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svg>
|
|
||||||
<g data-foo='bar'/>
|
|
||||||
<g data-foo='{bar}'/>
|
|
||||||
</svg>
|
|
Loading…
Reference in new issue