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> | |
<input v-validate data-rules="required" :class="{'has-error': errors.has("textInput")}" id="textInput" name="textInput" type="text"> | |
<span class="error" v-show="errors.has("textInput")">{{ errors.first("textInput") }}</span> | |
</div> | |
</template> | |
<script> | |
import { find, propEq } from 'ramda' | |
import bus from './bus' |
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"> | |
<div> | |
p(@click="handler") {{ greeting }} World! | |
h1 Hello World | |
</div> | |
</template> |
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> | |
<div v-if="user"> | |
<h5>{{ user.id }}</h5> | |
<h5>{{ user.name }}</h5> | |
<h5>{{ user.age }}</h5> | |
</div> | |
</div> | |
</template> |
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> | |
<my-input @custom-change="logChange"/> | |
</template> | |
<script> | |
import MyInput from './components/MyInput.vue' | |
export default { | |
components: { | |
MyInput | |
}, |
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> | |
<Navbar v-bind:links="['Home', 'About', 'Contact']"/> | |
<Login /> | |
<Footer /> | |
</template> | |
<script> | |
import Navbar from './components/Navbar' | |
import Login from './components/Login' | |
import Footer from './components/Footer' |
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> | |
<b-table> | |
<b-thead> | |
<b-tr> | |
<b-th class="text-left small text-muted border-top-0" style="width:15%;">名前</b-th> | |
<b-th class="text-left small text-muted border-top-0" style="width:25%;" v-if="isRecordButton">メモ</b-th> | |
</b-tr> | |
</b-thead> | |
<b-tbody> | |
<template v-for="(pattern, index) in patterns"> |
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
<?php | |
// Assuming we have ACF. | |
$rows = get_field('images'); | |
// Regular ACF query with 10 images in repeater yeilds 34 queries | |
foreach ($rows as $row) : | |
$image_id = $row['image']; | |
$image = wp_get_attachment_image_src($image_id, 'your-custom-image-size'); | |
echo '<img src="'. $image[0] . '" width="'. $image[1] . '" height="'. $image[2] . '" />'; | |
endforeach; |
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
import Vue from 'vue'; | |
import posts from './components/posts.vue'; | |
window.axios = require('axios'); | |
window.Vue = Vue; | |
Vue.component('posts', posts); | |
const app = new Vue({ | |
el: '#app', |
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"> | |
<p> | |
Pending: {{ $store.state.getInfoPending }} | |
</p> | |
<p> | |
{{ $store.state.getInfoData }} | |
</p> | |
</div> | |
</template> |
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
@mixin element($name) { | |
@at-root #{&}__#{$name}{ | |
@content; | |
} | |
} | |
@mixin modifier($name) { | |
@at-root #{&}--#{$name} { | |
@content; | |
} |
NewerOlder