Repository: fritx/vue-at Branch: vue3 Commit: 43680e2102ef Files: 18 Total size: 45.2 KB Directory structure: gitextract_8hv1zyjq/ ├── .eslintignore ├── .eslintrc.js ├── .github/ │ └── FUNDING.yml ├── .gitignore ├── .npmrc ├── LICENSE ├── README.md ├── index.html ├── package.json ├── src/ │ ├── App.vue │ ├── At.scss │ ├── At.vue │ ├── AtTemplate.vue │ ├── AtTextarea.vue │ ├── main.js │ └── util.js ├── test_umd.html └── vue.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .eslintignore ================================================ /dist/ /package/dist/ ================================================ FILE: .eslintrc.js ================================================ module.exports = { root: true, extends: [ 'plugin:vue/vue3-recommended', '@vue/standard' ], rules: { 'vue/multiline-html-element-content-newline': 'off', 'vue/first-attribute-linebreak': 'off', 'vue/max-attributes-per-line': 'off', 'vue/order-in-components': 'off', 'vue/attributes-order': 'off', 'vue/html-indent': 'off', 'no-irregular-whitespace': 'off', 'no-mixed-operators': 'off', 'no-unused-vars': 'off', 'prefer-const': 'off', 'comma-dangle': 'off', 'max-len': 'off', 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' } } ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] patreon: # Replace with a single Patreon username open_collective: vue-at # Replace with a single Open Collective username ko_fi: # Replace with a single Ko-fi username tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel custom: # Replace with a single custom sponsorship URL ================================================ FILE: .gitignore ================================================ .DS_Store node_modules*/ dist/ dist_demo/ package/ *.tgz npm-debug.log yarn-error.log ================================================ FILE: .npmrc ================================================ package-lock=false ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016-present, Fritz Lin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # vue-at         Join the chat at https://gitter.im/fritx/vue-at    - [x] Chrome / Firefox / Edge / IE9~IE11 - [x] Plain-text based, no jQuery, no extra nodes - [x] Content-Editable / Textarea - [x] Avatars, custom templates - [x] Vite / Vue3 / Vue2 / Vue1 - [x] Vuetify / Element UI / Element Plus - [x] Vue-CLI build migration - [ ] Vite build migration - [x] CommonJS / UMD Support Playground: https://we-demo.github.io/vue-at-vite-app/
Vue2 Docs: https://github.com/fritx/vue-at/tree/vue2#readme
Vue3 Docs: See below
See also: [react-at](https://github.com/fritx/react-at) **If you're using Vue2, read [branch vue2](https://github.com/fritx/vue-at/tree/vue2#readme) instead.** ```plain npm i vue-at@next # for Vue3 (branch vue3) npm i vue-at@2.x # for Vue2 (branch vue2) npm i vue-at@1.x # for Vue1 (branch vue1-legacy) npm i vue1-at # for Vue1 (branch vue1-new) ``` ```vue ``` ## UMD Also Supported ```html
``` ## Using V-Model (Recommended) With Content-Editable, use ``
With Textarea, you can use either `` or ` ``` ## Custom Templates ### Custom List ```vue ``` #### Custom List with Vue 1.x There is no "scoped slot" feature in Vue 1.
Use a "normal slot" with `data-` attribute instead. ```vue ``` ### Custom Tags This gives you the option of changing the style of inserted tagged items. It is only supported for ContentEditable version, not Textarea. ```vue {{ s.current.name }} ``` ## Used with 3rd-party libraries ### Vuetify v-textarea ```vue ``` ### Element UI / Element-Plus el-input ```vue ``` ================================================ FILE: index.html ================================================ vue-at
================================================ FILE: package.json ================================================ { "name": "vue-at", "description": "At.js for Vue", "version": "3.0.0-alpha.3", "author": "Fritz Lin ", "repository": "https://github.com/fritx/vue-at", "scripts": { "lint:fix": "vue-cli-service lint", "lint": "vue-cli-service lint --no-fix", "dev:dist": "vue-cli-service serve --skip-plugins eslint", "dev": "vue-cli-service serve", "demo": "vue-cli-service build --dest dist_demo", "build:at": "vue-cli-service build --no-clean ./src/At.vue --target lib --name At --filename vue-at && shx mv dist/vue-at.common.js dist/vue-at.js", "build:at-ta": "vue-cli-service build --no-clean ./src/AtTextarea.vue --target lib --name AtTextarea --filename vue-at-textarea && shx mv dist/vue-at-textarea.common.js dist/vue-at-textarea.js", "build": "shx rm -rf dist && run-p build:at build:at-ta && shx rm dist/demo.html", "prepublish": "npm run build" }, "main": "dist/vue-at.js", "files": [ "dist" ], "engines": { "node": ">= 14.x" }, "dependencies": { "textarea-caret": "^3.1.0" }, "peerDependencies": { "vue": "3.x" }, "devDependencies": { "@babel/core": "^7.18.9", "@vue/cli-plugin-eslint": "^5.0.8", "@vue/cli-service": "^5.0.8", "@vue/compat": "^3.1.0", "@vue/compiler-sfc": "^3.1.0", "@vue/eslint-config-standard": "^8.0.1", "element-plus": "^2.2.12", "eslint": "^8.21.0", "eslint-plugin-vue": "^9.3.0", "npm-run-all": "^4.1.5", "sass": "^1.53.0", "sass-loader": "^13.0.2", "shx": "^0.3.4", "vue": "^3.1.0", "vue-loader": "^16.0.0", "vuetify": "3.0.0", "webpack": "^5.73.0" } } ================================================ FILE: src/App.vue ================================================