improve generation of slugs
This commit is contained in:
parent
1048cbc5c9
commit
3efe3a7f61
|
|
@ -5,7 +5,6 @@
|
||||||
/public/js
|
/public/js
|
||||||
/public/vendor
|
/public/vendor
|
||||||
/public/themes
|
/public/themes
|
||||||
/storage/*.key
|
|
||||||
/vendor
|
/vendor
|
||||||
/.idea
|
/.idea
|
||||||
/.vscode
|
/.vscode
|
||||||
|
|
@ -21,3 +20,5 @@ yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
.php_cs.cache
|
.php_cs.cache
|
||||||
|
storage/
|
||||||
|
storage/*.key
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
bind(el, binding, vnode) {
|
bind(el, binding, vnode) {
|
||||||
let handler = function(e) {
|
let handler = function (e) {
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
e.target.value = e.target.value.toString().toLowerCase()
|
e.target.value = e.target.value
|
||||||
.replace(/[^\w- ]+/g,'')
|
.toString()
|
||||||
.trim()
|
.toLowerCase()
|
||||||
.replace(/ +/g,'-');
|
.replace(/[^\w- ]+/g, '')
|
||||||
|
.replace(/ +/g, '-')
|
||||||
|
.replace('![-\s]+!u', '-')
|
||||||
|
.trim();
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue