ip-input-vue3 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +23 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,18 +1,30 @@
1
- # Vue 3 + TypeScript + Vite
1
+ # IpInput 一个IP地址输入框
2
2
 
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
3
 
5
- ## Recommended IDE Setup
4
+ ### 预览效果
6
5
 
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
6
+ ![预览效果](./截图.png)
8
7
 
9
- ## Type Support For `.vue` Imports in TS
8
+ ### 安装
10
9
 
11
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
10
+ ```sh
11
+ npm install ip-input-vue3 --save
12
+ ```
13
+
14
+ ### 使用
15
+
16
+ ```js
17
+ import IpInput from 'ip-input-vue3'
18
+ import "ip-input-vue3/dist/IpInput.css"
19
+
20
+ const ipAddr = reactive({
21
+ ip: "127.0.0.1",
22
+ port: 8080
23
+ })
24
+ ```
25
+
26
+ ```html
27
+ <ip-input v-model:ip="ipAddr.ip" v-model:port="ipAddr.port"/>
28
+ ```
12
29
 
13
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
30
 
15
- 1. Disable the built-in TypeScript Extension
16
- 1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ip-input-vue3",
3
3
  "author": "czl0325",
4
4
  "private": false,
5
- "version": "0.1.0",
5
+ "version": "0.1.1",
6
6
  "type": "module",
7
7
  "main": "dist/IpInput.es.js",
8
8
  "module": "dist/IpInput.es.js",