vue forceUpdate v-on input in slots
typescript
computed: {
inputEvents(): any {
return {
input: (e: { target: HTMLInputElement }) => {
const value = e.target.value;
const Names = [ | |
'Event Update' | |
] | |
type ToUnderscore<V extends string> = V extends `${infer S} ${infer E}` | |
? `${S}_${ToUnderscore<E>}` | |
: V | |
type TNames<N extends string> = { [K in N as Uppercase<ToUnderscore<N>>]: K } |
Vue.js 11 hrs 29 mins ███████████▊░░░░░░░░░ 56.5% | |
TypeScript 6 hrs 10 mins ██████▍░░░░░░░░░░░░░░ 30.4% | |
Other 1 hr 31 mins █▌░░░░░░░░░░░░░░░░░░░ 7.5% | |
Markdown 28 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.4% | |
YAML 18 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.5% |
<?php | |
function fixBr($str, $p = false) { | |
$str = str_ireplace(array("<br />","<br>","<br/>", "</br>"), PHP_EOL, $str); | |
$str = trim($str); | |
$arr = preg_split('/'.PHP_EOL.'/', $str); | |
vue forceUpdate v-on input in slots
typescript
computed: {
inputEvents(): any {
return {
input: (e: { target: HTMLInputElement }) => {
const value = e.target.value;
// https://www.typescriptlang.org/docs/handbook/advanced-types.html | |
// https://dev.to/pauloedurezende/the-power-of-union-and-type-guard-in-typescript-1amg | |
//https://www.freecodecamp.org/news/advanced-typescript-types-cheat-sheet-with-examples/ |
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
// page: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | |
// Wrap the data in a response object. | |
$response = rest_ensure_response( $data ); | |
// here!!!!! 여기 주석처리 중요 | |
// $response->add_links( $this->prepare_links( $post ) ); | |
// here!!!!! |