-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* refactor: rename ERROR_MSG -> ERROR_MSGS, add tsconfig.json * style: quick-start -> guide, fix some eslint error, add some emoji
- Loading branch information
Showing
25 changed files
with
294 additions
and
165 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
// https://www.npmjs.com/package/@commitlint/config-conventional | ||
extends: ['@commitlint/config-conventional'], | ||
"rules": { | ||
rules: { | ||
}, | ||
} |
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 在 Vue 中使用 tua-storage | ||
## 代码示例 | ||
|
||
```js | ||
import Vue from 'vue' | ||
import TuaStorage from 'tua-storage' | ||
|
||
Vue.use(TuaStorage, { | ||
storageEngine: window.localStorage, | ||
// other options | ||
}) | ||
``` | ||
|
||
之后在组件中通过 `this.$tuaStorage` 即可获取实例。 | ||
|
||
```vue | ||
<template>...</template> | ||
<script> | ||
export default { | ||
methods: { | ||
async fetchData () { | ||
try { | ||
const data = await this.$tuaStorage.load({ ... }) | ||
console.log('data', data) | ||
} catch (e) { | ||
console.error(e) | ||
} | ||
}, | ||
}, | ||
} | ||
</script> | ||
<style>...</style> | ||
``` |
This file contains 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
Oops, something went wrong.