SHARE
TWEET

Untitled

a guest Aug 18th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { value, createComponent } from 'vue-function-api'
  2.  
  3. export default createComponent({
  4.   props: /* ... */,
  5.   setup(props) {
  6.     const sortField = value('created_at')
  7.     const reverse = value(false)
  8.  
  9.     function changeSort(field: string, reverse: boolean) {
  10.       sortField.value = field
  11.       reverse.value = reverse
  12.     }
  13.  
  14.     return { sortField, reverse, changeSort }
  15.   },
  16. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top