This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // スクリーンの左上隅を基準(0,0)とする座標を指定する。 | |
| NativeMethods.SetCursorPos(123, 234); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace MyNamespace { | |
| public static class NativeMethods { | |
| [DllImport ("user32.dll")] | |
| public static extern bool SetCursorPos (int X, int Y); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template lang="pug"> | |
| extends BaseTemplate.pug | |
| block test | |
| div テストだよ | |
| </template> | |
| <!--scriptとstyleは省略--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| div.base | |
| <!--共通利用される部分--> | |
| div {{ sampleProp }} | |
| <!--呼び出し側から要素を入れ込める部分--> | |
| block test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <logic-component slot-scope="{ count, double, increment }"> | |
| <div>Count value: {{ count }}</div> | |
| <div>Double value: {{ double }}</div> | |
| <button @click="increment">Increment</button> | |
| </logic-component> | |
| </template> | |
| <script> | |
| import LogicComponent from "./LogicComponent.vue"; | |
| export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default { | |
| data: () => ({ | |
| count: 0 | |
| }), | |
| methods: { | |
| increment() { | |
| this.count++; | |
| } | |
| }, | |
| computed: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div id="app"> | |
| <base-component> | |
| Base Component | |
| <div slot="test">Test Slot</div> | |
| </base-component> | |
| <enhanced-component> | |
| Enhanced Component | |
| <div slot="test">Test Slot</div> | |
| </enhanced-component> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default function (WrappedComponent) { | |
| return ({ | |
| props: typeof WrappedComponent === 'function' | |
| ? WrappedComponent.options.props | |
| : WrappedComponent.props, | |
| mounted() { | |
| alert("Enhanced Component was mounted."); | |
| }, | |
| render(h) { | |
| const slots = this.$slots; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="root"> | |
| <div>data: {{sampleProp}}</div> | |
| <slot></slot> | |
| <slot name="test"></slot> | |
| </div> | |
| </template> | |
| <script> | |
| export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template><!-- 省略 --></template> | |
| <script> | |
| import CounterMixin from "./CounterMixin"; | |
| export default { | |
| mixins: [CounterMixin], | |
| methods: { | |
| decrement() { | |
| this.count--; | |
| } |